Commit 536888b8 by apatrick@chromium.org

Explicitly disable warnings for auto-generated files.

I think this is better than modifying the auto-generated files. Review URL: https://codereview.appspot.com/5569058 git-svn-id: https://angleproject.googlecode.com/svn/trunk@963 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f3c92311
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 962 #define BUILD_REVISION 963
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -21,6 +21,13 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). ...@@ -21,6 +21,13 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
// //
// This file is auto-generated by generate_parser.sh. DO NOT EDIT! // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#endif
} }
%{ %{
......
...@@ -22,6 +22,13 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). ...@@ -22,6 +22,13 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
// This file is auto-generated by generate_parser.sh. DO NOT EDIT! // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#endif
#include "compiler/SymbolTable.h" #include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h" #include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
......
#line 17 "compiler/glslang.l" #line 17 "./glslang.l"
// //
// Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
...@@ -7,9 +7,16 @@ ...@@ -7,9 +7,16 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT! // This file is auto-generated by generate_parser.sh. DO NOT EDIT!
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#endif
#line 13 "compiler/glslang_lex.cpp" #line 20 "./glslang_lex.cpp"
#define YY_INT_ALIGNED short int #define YY_INT_ALIGNED short int
...@@ -63,6 +70,7 @@ typedef int flex_int32_t; ...@@ -63,6 +70,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t; typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t; typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
/* Limits of integral types. */ /* Limits of integral types. */
#ifndef INT8_MIN #ifndef INT8_MIN
...@@ -93,8 +101,6 @@ typedef unsigned int flex_uint32_t; ...@@ -93,8 +101,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U) #define UINT32_MAX (4294967295U)
#endif #endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */ #endif /* ! FLEXINT_H */
#ifdef __cplusplus #ifdef __cplusplus
...@@ -168,15 +174,7 @@ typedef void* yyscan_t; ...@@ -168,15 +174,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */ /* Size of default input buffer. */
#ifndef YY_BUF_SIZE #ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384 #define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif #endif
/* The state buf must be large enough to hold one state per character in the main buffer. /* The state buf must be large enough to hold one state per character in the main buffer.
...@@ -922,12 +920,7 @@ static int input (yyscan_t yyscanner ); ...@@ -922,12 +920,7 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */ /* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE #ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192 #define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif #endif
/* Copy whatever the last rule matched to the standard output. */ /* Copy whatever the last rule matched to the standard output. */
...@@ -935,7 +928,7 @@ static int input (yyscan_t yyscanner ); ...@@ -935,7 +928,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's, /* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite(). * we now use fwrite().
*/ */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif #endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
...@@ -946,7 +939,7 @@ static int input (yyscan_t yyscanner ); ...@@ -946,7 +939,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \ { \
int c = '*'; \ int c = '*'; \
size_t n; \ int n; \
for ( n = 0; n < max_size && \ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \ buf[n] = (char) c; \
...@@ -2461,8 +2454,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) ...@@ -2461,8 +2454,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes. * scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan * @param bytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
......
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C /* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation; either version 2, or (at your option)
(at your option) any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -17,7 +16,9 @@ ...@@ -17,7 +16,9 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.4.1" #define YYBISON_VERSION "2.3"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -54,55 +55,11 @@ ...@@ -54,55 +55,11 @@
/* Pure parsers. */ /* Pure parsers. */
#define YYPURE 1 #define YYPURE 1
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */ /* Using locations. */
#define YYLSP_NEEDED 0 #define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
#define YYLEX_PARAM context->scanner
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -204,14 +161,151 @@ ...@@ -204,14 +161,151 @@
QUESTION = 350 QUESTION = 350
}; };
#endif #endif
/* Tokens. */
#define INVARIANT 258
#define HIGH_PRECISION 259
#define MEDIUM_PRECISION 260
#define LOW_PRECISION 261
#define PRECISION 262
#define ATTRIBUTE 263
#define CONST_QUAL 264
#define BOOL_TYPE 265
#define FLOAT_TYPE 266
#define INT_TYPE 267
#define BREAK 268
#define CONTINUE 269
#define DO 270
#define ELSE 271
#define FOR 272
#define IF 273
#define DISCARD 274
#define RETURN 275
#define BVEC2 276
#define BVEC3 277
#define BVEC4 278
#define IVEC2 279
#define IVEC3 280
#define IVEC4 281
#define VEC2 282
#define VEC3 283
#define VEC4 284
#define MATRIX2 285
#define MATRIX3 286
#define MATRIX4 287
#define IN_QUAL 288
#define OUT_QUAL 289
#define INOUT_QUAL 290
#define UNIFORM 291
#define VARYING 292
#define STRUCT 293
#define VOID_TYPE 294
#define WHILE 295
#define SAMPLER2D 296
#define SAMPLERCUBE 297
#define SAMPLER_EXTERNAL_OES 298
#define SAMPLER2DRECT 299
#define IDENTIFIER 300
#define TYPE_NAME 301
#define FLOATCONSTANT 302
#define INTCONSTANT 303
#define BOOLCONSTANT 304
#define FIELD_SELECTION 305
#define LEFT_OP 306
#define RIGHT_OP 307
#define INC_OP 308
#define DEC_OP 309
#define LE_OP 310
#define GE_OP 311
#define EQ_OP 312
#define NE_OP 313
#define AND_OP 314
#define OR_OP 315
#define XOR_OP 316
#define MUL_ASSIGN 317
#define DIV_ASSIGN 318
#define ADD_ASSIGN 319
#define MOD_ASSIGN 320
#define LEFT_ASSIGN 321
#define RIGHT_ASSIGN 322
#define AND_ASSIGN 323
#define XOR_ASSIGN 324
#define OR_ASSIGN 325
#define SUB_ASSIGN 326
#define LEFT_PAREN 327
#define RIGHT_PAREN 328
#define LEFT_BRACKET 329
#define RIGHT_BRACKET 330
#define LEFT_BRACE 331
#define RIGHT_BRACE 332
#define DOT 333
#define COMMA 334
#define COLON 335
#define EQUAL 336
#define SEMICOLON 337
#define BANG 338
#define DASH 339
#define TILDE 340
#define PLUS 341
#define STAR 342
#define SLASH 343
#define PERCENT 344
#define LEFT_ANGLE 345
#define RIGHT_ANGLE 346
#define VERTICAL_BAR 347
#define CARET 348
#define AMPERSAND 349
#define QUESTION 350
/* Copy the first part of user declarations. */
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065)
#endif
#include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
#define YYLEX_PARAM context->scanner
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
{
{
struct { struct {
TSourceLoc line; TSourceLoc line;
union { union {
...@@ -241,16 +335,17 @@ typedef union YYSTYPE ...@@ -241,16 +335,17 @@ typedef union YYSTYPE
TTypeList* typeList; TTypeList* typeList;
}; };
} interm; } interm;
}
/* Line 187 of yacc.c. */
YYSTYPE;
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
...@@ -280,6 +375,8 @@ extern void yyerror(TParseContext* context, const char* reason); ...@@ -280,6 +375,8 @@ extern void yyerror(TParseContext* context, const char* reason);
} }
/* Line 216 of yacc.c. */
#ifdef short #ifdef short
# undef short # undef short
...@@ -354,14 +451,14 @@ typedef short int yytype_int16; ...@@ -354,14 +451,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static int static int
YYID (int yyi) YYID (int i)
#else #else
static int static int
YYID (yyi) YYID (i)
int yyi; int i;
#endif #endif
{ {
return yyi; return i;
} }
#endif #endif
...@@ -442,9 +539,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ ...@@ -442,9 +539,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */ /* A type that is properly aligned for any stack member. */
union yyalloc union yyalloc
{ {
yytype_int16 yyss_alloc; yytype_int16 yyss;
YYSTYPE yyvs_alloc; YYSTYPE yyvs;
}; };
/* The size of the maximum gap between one aligned stack and the next. */ /* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
...@@ -478,12 +575,12 @@ union yyalloc ...@@ -478,12 +575,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next stack. Advance YYPTR to a properly aligned location for the next
stack. */ stack. */
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ # define YYSTACK_RELOCATE(Stack) \
do \ do \
{ \ { \
YYSIZE_T yynewbytes; \ YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \ yyptr += yynewbytes / sizeof (*yyptr); \
} \ } \
...@@ -645,26 +742,26 @@ static const yytype_int16 yyrhs[] = ...@@ -645,26 +742,26 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 153, 153, 188, 191, 204, 209, 214, 220, 223, 0, 160, 160, 195, 198, 211, 216, 221, 227, 230,
296, 299, 408, 418, 431, 439, 538, 541, 549, 553, 303, 306, 415, 425, 438, 446, 545, 548, 556, 560,
560, 564, 571, 577, 586, 594, 649, 656, 666, 669, 567, 571, 578, 584, 593, 601, 656, 663, 673, 676,
679, 689, 710, 711, 712, 717, 718, 727, 739, 740, 686, 696, 717, 718, 719, 724, 725, 734, 746, 747,
748, 759, 763, 764, 774, 784, 794, 807, 808, 818, 755, 766, 770, 771, 781, 791, 801, 814, 815, 825,
831, 835, 839, 843, 844, 857, 858, 871, 872, 885, 838, 842, 846, 850, 851, 864, 865, 878, 879, 892,
886, 903, 904, 917, 918, 919, 920, 921, 925, 928, 893, 910, 911, 924, 925, 926, 927, 928, 932, 935,
939, 947, 972, 977, 984, 1020, 1023, 1030, 1038, 1059, 946, 954, 979, 984, 991, 1027, 1030, 1037, 1045, 1066,
1078, 1089, 1118, 1123, 1133, 1138, 1148, 1151, 1154, 1157, 1085, 1096, 1125, 1130, 1140, 1145, 1155, 1158, 1161, 1164,
1163, 1170, 1173, 1189, 1207, 1231, 1254, 1258, 1276, 1284, 1170, 1177, 1180, 1196, 1214, 1238, 1261, 1265, 1283, 1291,
1316, 1336, 1412, 1421, 1444, 1447, 1453, 1461, 1469, 1477, 1323, 1343, 1419, 1428, 1451, 1454, 1460, 1468, 1476, 1484,
1487, 1494, 1497, 1500, 1506, 1509, 1524, 1528, 1532, 1536, 1494, 1501, 1504, 1507, 1513, 1516, 1531, 1535, 1539, 1543,
1545, 1550, 1555, 1560, 1565, 1570, 1575, 1580, 1585, 1590, 1552, 1557, 1562, 1567, 1572, 1577, 1582, 1587, 1592, 1597,
1596, 1602, 1608, 1613, 1618, 1627, 1636, 1641, 1654, 1654, 1603, 1609, 1615, 1620, 1625, 1634, 1643, 1648, 1661, 1661,
1668, 1668, 1677, 1680, 1695, 1731, 1735, 1741, 1749, 1765, 1675, 1675, 1684, 1687, 1702, 1738, 1742, 1748, 1756, 1772,
1769, 1773, 1774, 1780, 1781, 1782, 1783, 1784, 1788, 1789, 1776, 1780, 1781, 1787, 1788, 1789, 1790, 1791, 1795, 1796,
1789, 1789, 1799, 1800, 1805, 1808, 1818, 1821, 1827, 1828, 1796, 1796, 1806, 1807, 1812, 1815, 1825, 1828, 1834, 1835,
1832, 1840, 1844, 1854, 1859, 1876, 1876, 1881, 1881, 1888, 1839, 1847, 1851, 1861, 1866, 1883, 1883, 1888, 1888, 1895,
1888, 1896, 1899, 1905, 1908, 1914, 1918, 1925, 1932, 1939, 1895, 1903, 1906, 1912, 1915, 1921, 1925, 1932, 1939, 1946,
1946, 1957, 1966, 1970, 1977, 1980, 1986, 1986 1953, 1964, 1973, 1977, 1984, 1987, 1993, 1993
}; };
#endif #endif
...@@ -708,16 +805,16 @@ static const char *const yytname[] = ...@@ -708,16 +805,16 @@ static const char *const yytname[] =
"init_declarator_list", "single_declaration", "fully_specified_type", "init_declarator_list", "single_declaration", "fully_specified_type",
"type_qualifier", "type_specifier", "precision_qualifier", "type_qualifier", "type_specifier", "precision_qualifier",
"type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier", "type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
"$@1", "$@2", "struct_declaration_list", "struct_declaration", "@1", "@2", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer", "struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement", "declaration_statement", "statement", "simple_statement",
"compound_statement", "$@3", "$@4", "statement_no_new_scope", "compound_statement", "@3", "@4", "statement_no_new_scope",
"compound_statement_no_new_scope", "statement_list", "compound_statement_no_new_scope", "statement_list",
"expression_statement", "selection_statement", "expression_statement", "selection_statement",
"selection_rest_statement", "condition", "iteration_statement", "$@5", "selection_rest_statement", "condition", "iteration_statement", "@5",
"$@6", "$@7", "for_init_statement", "conditionopt", "for_rest_statement", "@6", "@7", "for_init_statement", "conditionopt", "for_rest_statement",
"jump_statement", "translation_unit", "external_declaration", "jump_statement", "translation_unit", "external_declaration",
"function_definition", "$@8", 0 "function_definition", "@8", 0
}; };
#endif #endif
...@@ -1399,20 +1496,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, context) ...@@ -1399,20 +1496,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, context)
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static void static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else #else
static void static void
yy_stack_print (yybottom, yytop) yy_stack_print (bottom, top)
yytype_int16 *yybottom; yytype_int16 *bottom;
yytype_int16 *yytop; yytype_int16 *top;
#endif #endif
{ {
YYFPRINTF (stderr, "Stack now"); YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++) for (; bottom <= top; ++bottom)
{ YYFPRINTF (stderr, " %d", *bottom);
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
...@@ -1447,11 +1541,11 @@ yy_reduce_print (yyvsp, yyrule, context) ...@@ -1447,11 +1541,11 @@ yy_reduce_print (yyvsp, yyrule, context)
/* The symbols being reduced. */ /* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++) for (yyi = 0; yyi < yynrhs; yyi++)
{ {
YYFPRINTF (stderr, " $%d = ", yyi + 1); fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)]) &(yyvsp[(yyi + 1) - (yynrhs)])
, context); , context);
YYFPRINTF (stderr, "\n"); fprintf (stderr, "\n");
} }
} }
...@@ -1726,11 +1820,17 @@ yydestruct (yymsg, yytype, yyvaluep, context) ...@@ -1726,11 +1820,17 @@ yydestruct (yymsg, yytype, yyvaluep, context)
yymsg = "Deleting"; yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
// Delete any automatically generated switch with no cases code that appears switch (yytype)
// here. It will produce a warning (and therefore an error) in MSVC. {
default:
break;
}
} }
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus #if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM); int yyparse (void *YYPARSE_PARAM);
...@@ -1749,9 +1849,10 @@ int yyparse (); ...@@ -1749,9 +1849,10 @@ int yyparse ();
/*-------------------------.
| yyparse or yypush_parse. | /*----------.
`-------------------------*/ | yyparse. |
`----------*/
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
...@@ -1775,64 +1876,62 @@ yyparse (context) ...@@ -1775,64 +1876,62 @@ yyparse (context)
#endif #endif
#endif #endif
{ {
/* The lookahead symbol. */ /* The look-ahead symbol. */
int yychar; int yychar;
/* The semantic value of the lookahead symbol. */ /* The semantic value of the look-ahead symbol. */
YYSTYPE yylval; YYSTYPE yylval;
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
int yynerrs; int yynerrs;
int yystate; int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* The stacks and their tools: /* Three stacks and their tools:
`yyss': related to states. `yyss': related to states,
`yyvs': related to semantic values. `yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
/* The state stack. */ /* The state stack. */
yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss; yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp; yytype_int16 *yyssp;
/* The semantic value stack. */ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs; YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp; YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
int yyresult; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* Lookahead token as an internal (translated) token number. */
int yytoken; YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the /* The variables used to return semantic value and location from the
action routines. */ action routines. */
YYSTYPE yyval; YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule. /* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */ Keep to zero when no symbol should be popped. */
int yylen = 0; int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n")); YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0; yystate = 0;
...@@ -1844,6 +1943,7 @@ YYSTYPE yylval; ...@@ -1844,6 +1943,7 @@ YYSTYPE yylval;
Waste one element of value and location stack Waste one element of value and location stack
so that they stay on the same level as the state stack. so that they stay on the same level as the state stack.
The wasted elements are never initialized. */ The wasted elements are never initialized. */
yyssp = yyss; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
...@@ -1873,6 +1973,7 @@ YYSTYPE yylval; ...@@ -1873,6 +1973,7 @@ YYSTYPE yylval;
YYSTYPE *yyvs1 = yyvs; YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss; yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the /* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
...@@ -1880,6 +1981,7 @@ YYSTYPE yylval; ...@@ -1880,6 +1981,7 @@ YYSTYPE yylval;
yyoverflow (YY_("memory exhausted"), yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
&yystacksize); &yystacksize);
yyss = yyss1; yyss = yyss1;
...@@ -1902,8 +2004,9 @@ YYSTYPE yylval; ...@@ -1902,8 +2004,9 @@ YYSTYPE yylval;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyexhaustedlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyvs);
# undef YYSTACK_RELOCATE # undef YYSTACK_RELOCATE
if (yyss1 != yyssa) if (yyss1 != yyssa)
YYSTACK_FREE (yyss1); YYSTACK_FREE (yyss1);
...@@ -1914,6 +2017,7 @@ YYSTYPE yylval; ...@@ -1914,6 +2017,7 @@ YYSTYPE yylval;
yyssp = yyss + yysize - 1; yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1; yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n", YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize)); (unsigned long int) yystacksize));
...@@ -1923,9 +2027,6 @@ YYSTYPE yylval; ...@@ -1923,9 +2027,6 @@ YYSTYPE yylval;
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup; goto yybackup;
/*-----------. /*-----------.
...@@ -1934,16 +2035,16 @@ YYSTYPE yylval; ...@@ -1934,16 +2035,16 @@ YYSTYPE yylval;
yybackup: yybackup:
/* Do appropriate processing given the current state. Read a /* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */ look-ahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yyn == YYPACT_NINF)
goto yydefault; goto yydefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY) if (yychar == YYEMPTY)
{ {
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
...@@ -1975,15 +2076,19 @@ yybackup: ...@@ -1975,15 +2076,19 @@ yybackup:
goto yyreduce; goto yyreduce;
} }
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error /* Count tokens shifted since error; after three, turn off error
status. */ status. */
if (yyerrstatus) if (yyerrstatus)
yyerrstatus--; yyerrstatus--;
/* Shift the lookahead token. */ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token. */ /* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY; yychar = YYEMPTY;
yystate = yyn; yystate = yyn;
...@@ -2056,14 +2161,14 @@ yyreduce: ...@@ -2056,14 +2161,14 @@ yyreduce:
(yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(), (yyval.interm.intermTypedNode) = context->intermediate.addSymbol(variable->getUniqueId(),
variable->getName(), variable->getName(),
variable->getType(), (yyvsp[(1) - (1)].lex).line); variable->getType(), (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 3: case 3:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 4: case 4:
...@@ -2080,7 +2185,7 @@ yyreduce: ...@@ -2080,7 +2185,7 @@ yyreduce:
ConstantUnion *unionArray = new ConstantUnion[1]; ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setIConst((yyvsp[(1) - (1)].lex).i); unionArray->setIConst((yyvsp[(1) - (1)].lex).i);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 5: case 5:
...@@ -2089,7 +2194,7 @@ yyreduce: ...@@ -2089,7 +2194,7 @@ yyreduce:
ConstantUnion *unionArray = new ConstantUnion[1]; ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setFConst((yyvsp[(1) - (1)].lex).f); unionArray->setFConst((yyvsp[(1) - (1)].lex).f);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 6: case 6:
...@@ -2098,21 +2203,21 @@ yyreduce: ...@@ -2098,21 +2203,21 @@ yyreduce:
ConstantUnion *unionArray = new ConstantUnion[1]; ConstantUnion *unionArray = new ConstantUnion[1];
unionArray->setBConst((yyvsp[(1) - (1)].lex).b); unionArray->setBConst((yyvsp[(1) - (1)].lex).b);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 7: case 7:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode);
} ;}
break; break;
case 8: case 8:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 9: case 9:
...@@ -2189,14 +2294,14 @@ yyreduce: ...@@ -2189,14 +2294,14 @@ yyreduce:
(yyval.interm.intermTypedNode)->setType(TType((yyvsp[(1) - (4)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getPrecision(), EvqTemporary)); (yyval.interm.intermTypedNode)->setType(TType((yyvsp[(1) - (4)].interm.intermTypedNode)->getBasicType(), (yyvsp[(1) - (4)].interm.intermTypedNode)->getPrecision(), EvqTemporary));
else else
(yyval.interm.intermTypedNode)->setType((yyvsp[(1) - (4)].interm.intermTypedNode)->getType()); (yyval.interm.intermTypedNode)->setType((yyvsp[(1) - (4)].interm.intermTypedNode)->getType());
} ;}
break; break;
case 10: case 10:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 11: case 11:
...@@ -2309,7 +2414,7 @@ yyreduce: ...@@ -2309,7 +2414,7 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
// don't delete $3.string, it's from the pool // don't delete $3.string, it's from the pool
} ;}
break; break;
case 12: case 12:
...@@ -2323,7 +2428,7 @@ yyreduce: ...@@ -2323,7 +2428,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
} }
} ;}
break; break;
case 13: case 13:
...@@ -2337,7 +2442,7 @@ yyreduce: ...@@ -2337,7 +2442,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (2)].interm.intermTypedNode);
} }
} ;}
break; break;
case 14: case 14:
...@@ -2346,7 +2451,7 @@ yyreduce: ...@@ -2346,7 +2451,7 @@ yyreduce:
if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]")) if (context->integerErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"))
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 15: case 15:
...@@ -2446,14 +2551,14 @@ yyreduce: ...@@ -2446,14 +2551,14 @@ yyreduce:
} }
} }
delete fnCall; delete fnCall;
} ;}
break; break;
case 16: case 16:
{ {
(yyval.interm) = (yyvsp[(1) - (1)].interm); (yyval.interm) = (yyvsp[(1) - (1)].interm);
} ;}
break; break;
case 17: case 17:
...@@ -2462,7 +2567,7 @@ yyreduce: ...@@ -2462,7 +2567,7 @@ yyreduce:
context->error((yyvsp[(3) - (3)].interm).line, "methods are not supported", "", ""); context->error((yyvsp[(3) - (3)].interm).line, "methods are not supported", "", "");
context->recover(); context->recover();
(yyval.interm) = (yyvsp[(3) - (3)].interm); (yyval.interm) = (yyvsp[(3) - (3)].interm);
} ;}
break; break;
case 18: case 18:
...@@ -2470,7 +2575,7 @@ yyreduce: ...@@ -2470,7 +2575,7 @@ yyreduce:
{ {
(yyval.interm) = (yyvsp[(1) - (2)].interm); (yyval.interm) = (yyvsp[(1) - (2)].interm);
(yyval.interm).line = (yyvsp[(2) - (2)].lex).line; (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
} ;}
break; break;
case 19: case 19:
...@@ -2478,7 +2583,7 @@ yyreduce: ...@@ -2478,7 +2583,7 @@ yyreduce:
{ {
(yyval.interm) = (yyvsp[(1) - (2)].interm); (yyval.interm) = (yyvsp[(1) - (2)].interm);
(yyval.interm).line = (yyvsp[(2) - (2)].lex).line; (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
} ;}
break; break;
case 20: case 20:
...@@ -2486,7 +2591,7 @@ yyreduce: ...@@ -2486,7 +2591,7 @@ yyreduce:
{ {
(yyval.interm).function = (yyvsp[(1) - (2)].interm.function); (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
(yyval.interm).intermNode = 0; (yyval.interm).intermNode = 0;
} ;}
break; break;
case 21: case 21:
...@@ -2494,7 +2599,7 @@ yyreduce: ...@@ -2494,7 +2599,7 @@ yyreduce:
{ {
(yyval.interm).function = (yyvsp[(1) - (1)].interm.function); (yyval.interm).function = (yyvsp[(1) - (1)].interm.function);
(yyval.interm).intermNode = 0; (yyval.interm).intermNode = 0;
} ;}
break; break;
case 22: case 22:
...@@ -2504,7 +2609,7 @@ yyreduce: ...@@ -2504,7 +2609,7 @@ yyreduce:
(yyvsp[(1) - (2)].interm.function)->addParameter(param); (yyvsp[(1) - (2)].interm.function)->addParameter(param);
(yyval.interm).function = (yyvsp[(1) - (2)].interm.function); (yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
(yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode);
} ;}
break; break;
case 23: case 23:
...@@ -2514,14 +2619,14 @@ yyreduce: ...@@ -2514,14 +2619,14 @@ yyreduce:
(yyvsp[(1) - (3)].interm).function->addParameter(param); (yyvsp[(1) - (3)].interm).function->addParameter(param);
(yyval.interm).function = (yyvsp[(1) - (3)].interm).function; (yyval.interm).function = (yyvsp[(1) - (3)].interm).function;
(yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line); (yyval.interm).intermNode = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).line);
} ;}
break; break;
case 24: case 24:
{ {
(yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function);
} ;}
break; break;
case 25: case 25:
...@@ -2580,7 +2685,7 @@ yyreduce: ...@@ -2580,7 +2685,7 @@ yyreduce:
TType type((yyvsp[(1) - (1)].interm.type)); TType type((yyvsp[(1) - (1)].interm.type));
TFunction *function = new TFunction(&tempString, type, op); TFunction *function = new TFunction(&tempString, type, op);
(yyval.interm.function) = function; (yyval.interm.function) = function;
} ;}
break; break;
case 26: case 26:
...@@ -2591,7 +2696,7 @@ yyreduce: ...@@ -2591,7 +2696,7 @@ yyreduce:
TType type(EbtVoid, EbpUndefined); TType type(EbtVoid, EbpUndefined);
TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
(yyval.interm.function) = function; (yyval.interm.function) = function;
} ;}
break; break;
case 27: case 27:
...@@ -2602,14 +2707,14 @@ yyreduce: ...@@ -2602,14 +2707,14 @@ yyreduce:
TType type(EbtVoid, EbpUndefined); TType type(EbtVoid, EbpUndefined);
TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type); TFunction *function = new TFunction((yyvsp[(1) - (1)].lex).string, type);
(yyval.interm.function) = function; (yyval.interm.function) = function;
} ;}
break; break;
case 28: case 28:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 29: case 29:
...@@ -2623,7 +2728,7 @@ yyreduce: ...@@ -2623,7 +2728,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
} }
} ;}
break; break;
case 30: case 30:
...@@ -2637,7 +2742,7 @@ yyreduce: ...@@ -2637,7 +2742,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
} }
} ;}
break; break;
case 31: case 31:
...@@ -2658,27 +2763,27 @@ yyreduce: ...@@ -2658,27 +2763,27 @@ yyreduce:
} }
} else } else
(yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode);
} ;}
break; break;
case 32: case 32:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNull; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNull; ;}
break; break;
case 33: case 33:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNegative; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpNegative; ;}
break; break;
case 34: case 34:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpLogicalNot; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpLogicalNot; ;}
break; break;
case 35: case 35:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 36: case 36:
...@@ -2691,7 +2796,7 @@ yyreduce: ...@@ -2691,7 +2796,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 37: case 37:
...@@ -2704,12 +2809,12 @@ yyreduce: ...@@ -2704,12 +2809,12 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 38: case 38:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 39: case 39:
...@@ -2721,7 +2826,7 @@ yyreduce: ...@@ -2721,7 +2826,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 40: case 40:
...@@ -2733,17 +2838,17 @@ yyreduce: ...@@ -2733,17 +2838,17 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 41: case 41:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 42: case 42:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 43: case 43:
...@@ -2757,7 +2862,7 @@ yyreduce: ...@@ -2757,7 +2862,7 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 44: case 44:
...@@ -2771,7 +2876,7 @@ yyreduce: ...@@ -2771,7 +2876,7 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 45: case 45:
...@@ -2785,7 +2890,7 @@ yyreduce: ...@@ -2785,7 +2890,7 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 46: case 46:
...@@ -2799,12 +2904,12 @@ yyreduce: ...@@ -2799,12 +2904,12 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 47: case 47:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 48: case 48:
...@@ -2818,7 +2923,7 @@ yyreduce: ...@@ -2818,7 +2923,7 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 49: case 49:
...@@ -2832,27 +2937,27 @@ yyreduce: ...@@ -2832,27 +2937,27 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 50: case 50:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 51: case 51:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 52: case 52:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 53: case 53:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 54: case 54:
...@@ -2866,12 +2971,12 @@ yyreduce: ...@@ -2866,12 +2971,12 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 55: case 55:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 56: case 56:
...@@ -2885,12 +2990,12 @@ yyreduce: ...@@ -2885,12 +2990,12 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 57: case 57:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 58: case 58:
...@@ -2904,12 +3009,12 @@ yyreduce: ...@@ -2904,12 +3009,12 @@ yyreduce:
unionArray->setBConst(false); unionArray->setBConst(false);
(yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtBool, EbpUndefined, EvqConst), (yyvsp[(2) - (3)].lex).line);
} }
} ;}
break; break;
case 59: case 59:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 60: case 60:
...@@ -2927,12 +3032,12 @@ yyreduce: ...@@ -2927,12 +3032,12 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(5) - (5)].interm.intermTypedNode);
} }
} ;}
break; break;
case 61: case 61:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 62: case 62:
...@@ -2946,39 +3051,39 @@ yyreduce: ...@@ -2946,39 +3051,39 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 63: case 63:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAssign; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAssign; ;}
break; break;
case 64: case 64:
{ FRAG_VERT_ONLY("*=", (yyvsp[(1) - (1)].lex).line); (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpMulAssign; } { FRAG_VERT_ONLY("*=", (yyvsp[(1) - (1)].lex).line); (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpMulAssign; ;}
break; break;
case 65: case 65:
{ FRAG_VERT_ONLY("/=", (yyvsp[(1) - (1)].lex).line); (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpDivAssign; } { FRAG_VERT_ONLY("/=", (yyvsp[(1) - (1)].lex).line); (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpDivAssign; ;}
break; break;
case 66: case 66:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAddAssign; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpAddAssign; ;}
break; break;
case 67: case 67:
{ (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpSubAssign; } { (yyval.interm).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm).op = EOpSubAssign; ;}
break; break;
case 68: case 68:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 69: case 69:
...@@ -2990,7 +3095,7 @@ yyreduce: ...@@ -2990,7 +3095,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode);
} }
} ;}
break; break;
case 70: case 70:
...@@ -2999,7 +3104,7 @@ yyreduce: ...@@ -2999,7 +3104,7 @@ yyreduce:
if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode))) if (context->constErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)))
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 71: case 71:
...@@ -3028,7 +3133,7 @@ yyreduce: ...@@ -3028,7 +3133,7 @@ yyreduce:
prototype->setOp(EOpPrototype); prototype->setOp(EOpPrototype);
(yyval.interm.intermNode) = prototype; (yyval.interm.intermNode) = prototype;
} ;}
break; break;
case 72: case 72:
...@@ -3037,7 +3142,7 @@ yyreduce: ...@@ -3037,7 +3142,7 @@ yyreduce:
if ((yyvsp[(1) - (2)].interm).intermAggregate) if ((yyvsp[(1) - (2)].interm).intermAggregate)
(yyvsp[(1) - (2)].interm).intermAggregate->setOp(EOpDeclaration); (yyvsp[(1) - (2)].interm).intermAggregate->setOp(EOpDeclaration);
(yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermAggregate; (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermAggregate;
} ;}
break; break;
case 73: case 73:
...@@ -3045,7 +3150,7 @@ yyreduce: ...@@ -3045,7 +3150,7 @@ yyreduce:
{ {
context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type).type, (yyvsp[(2) - (4)].interm.precision) ); context->symbolTable.setDefaultPrecision( (yyvsp[(3) - (4)].interm.type).type, (yyvsp[(2) - (4)].interm.precision) );
(yyval.interm.intermNode) = 0; (yyval.interm.intermNode) = 0;
} ;}
break; break;
case 74: case 74:
...@@ -3082,21 +3187,21 @@ yyreduce: ...@@ -3082,21 +3187,21 @@ yyreduce:
(yyval.interm).line = (yyvsp[(2) - (2)].lex).line; (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
context->symbolTable.insert(*(yyval.interm).function); context->symbolTable.insert(*(yyval.interm).function);
} ;}
break; break;
case 75: case 75:
{ {
(yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
} ;}
break; break;
case 76: case 76:
{ {
(yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function);
} ;}
break; break;
case 77: case 77:
...@@ -3108,7 +3213,7 @@ yyreduce: ...@@ -3108,7 +3213,7 @@ yyreduce:
(yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param);
else else
delete (yyvsp[(2) - (2)].interm).param.type; delete (yyvsp[(2) - (2)].interm).param.type;
} ;}
break; break;
case 78: case 78:
...@@ -3130,7 +3235,7 @@ yyreduce: ...@@ -3130,7 +3235,7 @@ yyreduce:
(yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function);
(yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param);
} }
} ;}
break; break;
case 79: case 79:
...@@ -3149,7 +3254,7 @@ yyreduce: ...@@ -3149,7 +3254,7 @@ yyreduce:
TType type((yyvsp[(1) - (3)].interm.type)); TType type((yyvsp[(1) - (3)].interm.type));
function = new TFunction((yyvsp[(2) - (3)].lex).string, type); function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
(yyval.interm.function) = function; (yyval.interm.function) = function;
} ;}
break; break;
case 80: case 80:
...@@ -3164,7 +3269,7 @@ yyreduce: ...@@ -3164,7 +3269,7 @@ yyreduce:
TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))};
(yyval.interm).line = (yyvsp[(2) - (2)].lex).line; (yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
(yyval.interm).param = param; (yyval.interm).param = param;
} ;}
break; break;
case 81: case 81:
...@@ -3186,7 +3291,7 @@ yyreduce: ...@@ -3186,7 +3291,7 @@ yyreduce:
TParameter param = { (yyvsp[(2) - (5)].lex).string, type }; TParameter param = { (yyvsp[(2) - (5)].lex).string, type };
(yyval.interm).line = (yyvsp[(2) - (5)].lex).line; (yyval.interm).line = (yyvsp[(2) - (5)].lex).line;
(yyval.interm).param = param; (yyval.interm).param = param;
} ;}
break; break;
case 82: case 82:
...@@ -3195,7 +3300,7 @@ yyreduce: ...@@ -3195,7 +3300,7 @@ yyreduce:
(yyval.interm) = (yyvsp[(3) - (3)].interm); (yyval.interm) = (yyvsp[(3) - (3)].interm);
if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
context->recover(); context->recover();
} ;}
break; break;
case 83: case 83:
...@@ -3206,7 +3311,7 @@ yyreduce: ...@@ -3206,7 +3311,7 @@ yyreduce:
context->recover(); context->recover();
if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
context->recover(); context->recover();
} ;}
break; break;
case 84: case 84:
...@@ -3215,7 +3320,7 @@ yyreduce: ...@@ -3215,7 +3320,7 @@ yyreduce:
(yyval.interm) = (yyvsp[(3) - (3)].interm); (yyval.interm) = (yyvsp[(3) - (3)].interm);
if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type)) if (context->paramErrorCheck((yyvsp[(3) - (3)].interm).line, (yyvsp[(1) - (3)].interm.type).qualifier, (yyvsp[(2) - (3)].interm.qualifier), (yyval.interm).param.type))
context->recover(); context->recover();
} ;}
break; break;
case 85: case 85:
...@@ -3226,35 +3331,35 @@ yyreduce: ...@@ -3226,35 +3331,35 @@ yyreduce:
context->recover(); context->recover();
if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type)) if (context->paramErrorCheck((yyvsp[(2) - (2)].interm).line, EvqTemporary, (yyvsp[(1) - (2)].interm.qualifier), (yyval.interm).param.type))
context->recover(); context->recover();
} ;}
break; break;
case 86: case 86:
{ {
(yyval.interm.qualifier) = EvqIn; (yyval.interm.qualifier) = EvqIn;
} ;}
break; break;
case 87: case 87:
{ {
(yyval.interm.qualifier) = EvqIn; (yyval.interm.qualifier) = EvqIn;
} ;}
break; break;
case 88: case 88:
{ {
(yyval.interm.qualifier) = EvqOut; (yyval.interm.qualifier) = EvqOut;
} ;}
break; break;
case 89: case 89:
{ {
(yyval.interm.qualifier) = EvqInOut; (yyval.interm.qualifier) = EvqInOut;
} ;}
break; break;
case 90: case 90:
...@@ -3262,14 +3367,14 @@ yyreduce: ...@@ -3262,14 +3367,14 @@ yyreduce:
{ {
TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) };
(yyval.interm).param = param; (yyval.interm).param = param;
} ;}
break; break;
case 91: case 91:
{ {
(yyval.interm) = (yyvsp[(1) - (1)].interm); (yyval.interm) = (yyvsp[(1) - (1)].interm);
} ;}
break; break;
case 92: case 92:
...@@ -3289,7 +3394,7 @@ yyreduce: ...@@ -3289,7 +3394,7 @@ yyreduce:
context->recover(); context->recover();
if (symbol && variable) if (symbol && variable)
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
} ;}
break; break;
case 93: case 93:
...@@ -3311,7 +3416,7 @@ yyreduce: ...@@ -3311,7 +3416,7 @@ yyreduce:
if (context->arrayErrorCheck((yyvsp[(4) - (5)].lex).line, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, variable)) if (context->arrayErrorCheck((yyvsp[(4) - (5)].lex).line, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, variable))
context->recover(); context->recover();
} }
} ;}
break; break;
case 94: case 94:
...@@ -3339,7 +3444,7 @@ yyreduce: ...@@ -3339,7 +3444,7 @@ yyreduce:
type.setArraySize(size); type.setArraySize(size);
(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); (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);
} }
} ;}
break; break;
case 95: case 95:
...@@ -3363,7 +3468,7 @@ yyreduce: ...@@ -3363,7 +3468,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm).intermAggregate = 0; (yyval.interm).intermAggregate = 0;
} }
} ;}
break; break;
case 96: case 96:
...@@ -3371,7 +3476,7 @@ yyreduce: ...@@ -3371,7 +3476,7 @@ yyreduce:
{ {
(yyval.interm).type = (yyvsp[(1) - (1)].interm.type); (yyval.interm).type = (yyvsp[(1) - (1)].interm.type);
(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); (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);
} ;}
break; break;
case 97: case 97:
...@@ -3393,7 +3498,7 @@ yyreduce: ...@@ -3393,7 +3498,7 @@ yyreduce:
context->recover(); context->recover();
if (variable && symbol) if (variable && symbol)
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
} ;}
break; break;
case 98: case 98:
...@@ -3405,7 +3510,7 @@ yyreduce: ...@@ -3405,7 +3510,7 @@ yyreduce:
TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).string, TType((yyvsp[(1) - (4)].interm.type)), (yyvsp[(2) - (4)].lex).line); TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).string, TType((yyvsp[(1) - (4)].interm.type)), (yyvsp[(2) - (4)].lex).line);
(yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (4)].lex).line); (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (4)].lex).line);
(yyval.interm).type = (yyvsp[(1) - (4)].interm.type); (yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
} ;}
break; break;
case 99: case 99:
...@@ -3441,7 +3546,7 @@ yyreduce: ...@@ -3441,7 +3546,7 @@ yyreduce:
if (variable && symbol) if (variable && symbol)
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
} }
} ;}
break; break;
case 100: case 100:
...@@ -3465,7 +3570,7 @@ yyreduce: ...@@ -3465,7 +3570,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm).intermAggregate = 0; (yyval.interm).intermAggregate = 0;
} }
} ;}
break; break;
case 101: case 101:
...@@ -3474,7 +3579,7 @@ yyreduce: ...@@ -3474,7 +3579,7 @@ yyreduce:
VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line); VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line);
(yyval.interm).qualifier = EvqInvariantVaryingOut; (yyval.interm).qualifier = EvqInvariantVaryingOut;
(yyval.interm).intermAggregate = 0; (yyval.interm).intermAggregate = 0;
} ;}
break; break;
case 102: case 102:
...@@ -3487,7 +3592,7 @@ yyreduce: ...@@ -3487,7 +3592,7 @@ yyreduce:
context->recover(); context->recover();
(yyvsp[(1) - (1)].interm.type).setArray(false); (yyvsp[(1) - (1)].interm.type).setArray(false);
} }
} ;}
break; break;
case 103: case 103:
...@@ -3511,14 +3616,14 @@ yyreduce: ...@@ -3511,14 +3616,14 @@ yyreduce:
} }
(yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
(yyval.interm.type).qualifier = (yyvsp[(1) - (2)].interm.type).qualifier; (yyval.interm.type).qualifier = (yyvsp[(1) - (2)].interm.type).qualifier;
} ;}
break; break;
case 104: case 104:
{ {
(yyval.interm.type).setBasic(EbtVoid, EvqConst, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqConst, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 105: case 105:
...@@ -3528,7 +3633,7 @@ yyreduce: ...@@ -3528,7 +3633,7 @@ yyreduce:
if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "attribute")) if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "attribute"))
context->recover(); context->recover();
(yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqAttribute, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 106: case 106:
...@@ -3540,7 +3645,7 @@ yyreduce: ...@@ -3540,7 +3645,7 @@ yyreduce:
(yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqVaryingOut, (yyvsp[(1) - (1)].lex).line);
else else
(yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqVaryingIn, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 107: case 107:
...@@ -3552,7 +3657,7 @@ yyreduce: ...@@ -3552,7 +3657,7 @@ yyreduce:
(yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yyvsp[(1) - (2)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingOut, (yyvsp[(1) - (2)].lex).line);
else else
(yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yyvsp[(1) - (2)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqInvariantVaryingIn, (yyvsp[(1) - (2)].lex).line);
} ;}
break; break;
case 108: case 108:
...@@ -3561,7 +3666,7 @@ yyreduce: ...@@ -3561,7 +3666,7 @@ yyreduce:
if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "uniform")) if (context->globalErrorCheck((yyvsp[(1) - (1)].lex).line, context->symbolTable.atGlobalLevel(), "uniform"))
context->recover(); context->recover();
(yyval.interm.type).setBasic(EbtVoid, EvqUniform, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, EvqUniform, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 109: case 109:
...@@ -3575,7 +3680,7 @@ yyreduce: ...@@ -3575,7 +3680,7 @@ yyreduce:
context->recover(); context->recover();
} }
} }
} ;}
break; break;
case 110: case 110:
...@@ -3583,35 +3688,35 @@ yyreduce: ...@@ -3583,35 +3688,35 @@ yyreduce:
{ {
(yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type);
(yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision); (yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
} ;}
break; break;
case 111: case 111:
{ {
(yyval.interm.precision) = EbpHigh; (yyval.interm.precision) = EbpHigh;
} ;}
break; break;
case 112: case 112:
{ {
(yyval.interm.precision) = EbpMedium; (yyval.interm.precision) = EbpMedium;
} ;}
break; break;
case 113: case 113:
{ {
(yyval.interm.precision) = EbpLow; (yyval.interm.precision) = EbpLow;
} ;}
break; break;
case 114: case 114:
{ {
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
} ;}
break; break;
case 115: case 115:
...@@ -3627,7 +3732,7 @@ yyreduce: ...@@ -3627,7 +3732,7 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.type).setArray(true, size); (yyval.interm.type).setArray(true, size);
} }
} ;}
break; break;
case 116: case 116:
...@@ -3635,7 +3740,7 @@ yyreduce: ...@@ -3635,7 +3740,7 @@ yyreduce:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtVoid, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtVoid, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 117: case 117:
...@@ -3643,7 +3748,7 @@ yyreduce: ...@@ -3643,7 +3748,7 @@ yyreduce:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 118: case 118:
...@@ -3651,7 +3756,7 @@ yyreduce: ...@@ -3651,7 +3756,7 @@ yyreduce:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 119: case 119:
...@@ -3659,7 +3764,7 @@ yyreduce: ...@@ -3659,7 +3764,7 @@ yyreduce:
{ {
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 120: case 120:
...@@ -3668,7 +3773,7 @@ yyreduce: ...@@ -3668,7 +3773,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(2); (yyval.interm.type).setAggregate(2);
} ;}
break; break;
case 121: case 121:
...@@ -3677,7 +3782,7 @@ yyreduce: ...@@ -3677,7 +3782,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(3); (yyval.interm.type).setAggregate(3);
} ;}
break; break;
case 122: case 122:
...@@ -3686,7 +3791,7 @@ yyreduce: ...@@ -3686,7 +3791,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(4); (yyval.interm.type).setAggregate(4);
} ;}
break; break;
case 123: case 123:
...@@ -3695,7 +3800,7 @@ yyreduce: ...@@ -3695,7 +3800,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(2); (yyval.interm.type).setAggregate(2);
} ;}
break; break;
case 124: case 124:
...@@ -3704,7 +3809,7 @@ yyreduce: ...@@ -3704,7 +3809,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(3); (yyval.interm.type).setAggregate(3);
} ;}
break; break;
case 125: case 125:
...@@ -3713,7 +3818,7 @@ yyreduce: ...@@ -3713,7 +3818,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtBool, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(4); (yyval.interm.type).setAggregate(4);
} ;}
break; break;
case 126: case 126:
...@@ -3722,7 +3827,7 @@ yyreduce: ...@@ -3722,7 +3827,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(2); (yyval.interm.type).setAggregate(2);
} ;}
break; break;
case 127: case 127:
...@@ -3731,7 +3836,7 @@ yyreduce: ...@@ -3731,7 +3836,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(3); (yyval.interm.type).setAggregate(3);
} ;}
break; break;
case 128: case 128:
...@@ -3740,7 +3845,7 @@ yyreduce: ...@@ -3740,7 +3845,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtInt, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(4); (yyval.interm.type).setAggregate(4);
} ;}
break; break;
case 129: case 129:
...@@ -3750,7 +3855,7 @@ yyreduce: ...@@ -3750,7 +3855,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(2, true); (yyval.interm.type).setAggregate(2, true);
} ;}
break; break;
case 130: case 130:
...@@ -3760,7 +3865,7 @@ yyreduce: ...@@ -3760,7 +3865,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(3, true); (yyval.interm.type).setAggregate(3, true);
} ;}
break; break;
case 131: case 131:
...@@ -3770,7 +3875,7 @@ yyreduce: ...@@ -3770,7 +3875,7 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtFloat, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).setAggregate(4, true); (yyval.interm.type).setAggregate(4, true);
} ;}
break; break;
case 132: case 132:
...@@ -3779,7 +3884,7 @@ yyreduce: ...@@ -3779,7 +3884,7 @@ yyreduce:
FRAG_VERT_ONLY("sampler2D", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("sampler2D", (yyvsp[(1) - (1)].lex).line);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSampler2D, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtSampler2D, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 133: case 133:
...@@ -3788,7 +3893,7 @@ yyreduce: ...@@ -3788,7 +3893,7 @@ yyreduce:
FRAG_VERT_ONLY("samplerCube", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("samplerCube", (yyvsp[(1) - (1)].lex).line);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSamplerCube, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtSamplerCube, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 134: case 134:
...@@ -3801,7 +3906,7 @@ yyreduce: ...@@ -3801,7 +3906,7 @@ yyreduce:
FRAG_VERT_ONLY("samplerExternalOES", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("samplerExternalOES", (yyvsp[(1) - (1)].lex).line);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 135: case 135:
...@@ -3814,7 +3919,7 @@ yyreduce: ...@@ -3814,7 +3919,7 @@ yyreduce:
FRAG_VERT_ONLY("sampler2DRect", (yyvsp[(1) - (1)].lex).line); FRAG_VERT_ONLY("sampler2DRect", (yyvsp[(1) - (1)].lex).line);
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yyvsp[(1) - (1)].lex).line);
} ;}
break; break;
case 136: case 136:
...@@ -3823,7 +3928,7 @@ yyreduce: ...@@ -3823,7 +3928,7 @@ yyreduce:
FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line); FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line);
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
(yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; (yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
} ;}
break; break;
case 137: case 137:
...@@ -3837,12 +3942,12 @@ yyreduce: ...@@ -3837,12 +3942,12 @@ yyreduce:
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
(yyval.interm.type).setBasic(EbtStruct, qual, (yyvsp[(1) - (1)].lex).line); (yyval.interm.type).setBasic(EbtStruct, qual, (yyvsp[(1) - (1)].lex).line);
(yyval.interm.type).userDef = &structure; (yyval.interm.type).userDef = &structure;
} ;}
break; break;
case 138: case 138:
{ if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); } { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); ;}
break; break;
case 139: case 139:
...@@ -3860,12 +3965,12 @@ yyreduce: ...@@ -3860,12 +3965,12 @@ yyreduce:
(yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (6)].lex).line); (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (6)].lex).line);
(yyval.interm.type).userDef = structure; (yyval.interm.type).userDef = structure;
context->exitStructDeclaration(); context->exitStructDeclaration();
} ;}
break; break;
case 140: case 140:
{ if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); } { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); ;}
break; break;
case 141: case 141:
...@@ -3875,14 +3980,14 @@ yyreduce: ...@@ -3875,14 +3980,14 @@ yyreduce:
(yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line); (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line);
(yyval.interm.type).userDef = structure; (yyval.interm.type).userDef = structure;
context->exitStructDeclaration(); context->exitStructDeclaration();
} ;}
break; break;
case 142: case 142:
{ {
(yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
} ;}
break; break;
case 143: case 143:
...@@ -3898,7 +4003,7 @@ yyreduce: ...@@ -3898,7 +4003,7 @@ yyreduce:
} }
(yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]); (yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]);
} }
} ;}
break; break;
case 144: case 144:
...@@ -3935,7 +4040,7 @@ yyreduce: ...@@ -3935,7 +4040,7 @@ yyreduce:
context->recover(); context->recover();
} }
} }
} ;}
break; break;
case 145: case 145:
...@@ -3943,14 +4048,14 @@ yyreduce: ...@@ -3943,14 +4048,14 @@ yyreduce:
{ {
(yyval.interm.typeList) = NewPoolTTypeList(); (yyval.interm.typeList) = NewPoolTTypeList();
(yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine)); (yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine));
} ;}
break; break;
case 146: case 146:
{ {
(yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
} ;}
break; break;
case 147: case 147:
...@@ -3962,7 +4067,7 @@ yyreduce: ...@@ -3962,7 +4067,7 @@ yyreduce:
(yyval.interm.typeLine).type = new TType(EbtVoid, EbpUndefined); (yyval.interm.typeLine).type = new TType(EbtVoid, EbpUndefined);
(yyval.interm.typeLine).line = (yyvsp[(1) - (1)].lex).line; (yyval.interm.typeLine).line = (yyvsp[(1) - (1)].lex).line;
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string); (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string);
} ;}
break; break;
case 148: case 148:
...@@ -3979,67 +4084,67 @@ yyreduce: ...@@ -3979,67 +4084,67 @@ yyreduce:
if (context->arraySizeErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(3) - (4)].interm.intermTypedNode), size)) if (context->arraySizeErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(3) - (4)].interm.intermTypedNode), size))
context->recover(); context->recover();
(yyval.interm.typeLine).type->setArraySize(size); (yyval.interm.typeLine).type->setArraySize(size);
} ;}
break; break;
case 149: case 149:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break; break;
case 150: case 150:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 151: case 151:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); ;}
break; break;
case 152: case 152:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 153: case 153:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 154: case 154:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 155: case 155:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 156: case 156:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 157: case 157:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 158: case 158:
{ (yyval.interm.intermAggregate) = 0; } { (yyval.interm.intermAggregate) = 0; ;}
break; break;
case 159: case 159:
{ context->symbolTable.push(); } { context->symbolTable.push(); ;}
break; break;
case 160: case 160:
{ context->symbolTable.pop(); } { context->symbolTable.pop(); ;}
break; break;
case 161: case 161:
...@@ -4050,24 +4155,24 @@ yyreduce: ...@@ -4050,24 +4155,24 @@ yyreduce:
(yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yyvsp[(5) - (5)].lex).line); (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yyvsp[(5) - (5)].lex).line);
} }
(yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate); (yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
} ;}
break; break;
case 162: case 162:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 163: case 163:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break; break;
case 164: case 164:
{ {
(yyval.interm.intermNode) = 0; (yyval.interm.intermNode) = 0;
} ;}
break; break;
case 165: case 165:
...@@ -4078,31 +4183,31 @@ yyreduce: ...@@ -4078,31 +4183,31 @@ yyreduce:
(yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yyvsp[(3) - (3)].lex).line); (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yyvsp[(3) - (3)].lex).line);
} }
(yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate); (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
} ;}
break; break;
case 166: case 166:
{ {
(yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
} ;}
break; break;
case 167: case 167:
{ {
(yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
} ;}
break; break;
case 168: case 168:
{ (yyval.interm.intermNode) = 0; } { (yyval.interm.intermNode) = 0; ;}
break; break;
case 169: case 169:
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); } { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); ;}
break; break;
case 170: case 170:
...@@ -4111,7 +4216,7 @@ yyreduce: ...@@ -4111,7 +4216,7 @@ yyreduce:
if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
context->recover(); context->recover();
(yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).line); (yyval.interm.intermNode) = context->intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).line);
} ;}
break; break;
case 171: case 171:
...@@ -4119,7 +4224,7 @@ yyreduce: ...@@ -4119,7 +4224,7 @@ yyreduce:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode);
} ;}
break; break;
case 172: case 172:
...@@ -4127,7 +4232,7 @@ yyreduce: ...@@ -4127,7 +4232,7 @@ yyreduce:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
(yyval.interm.nodePair).node2 = 0; (yyval.interm.nodePair).node2 = 0;
} ;}
break; break;
case 173: case 173:
...@@ -4136,7 +4241,7 @@ yyreduce: ...@@ -4136,7 +4241,7 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode))) if (context->boolErrorCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLine(), (yyvsp[(1) - (1)].interm.intermTypedNode)))
context->recover(); context->recover();
} ;}
break; break;
case 174: case 174:
...@@ -4154,12 +4259,12 @@ yyreduce: ...@@ -4154,12 +4259,12 @@ yyreduce:
context->recover(); context->recover();
(yyval.interm.intermTypedNode) = 0; (yyval.interm.intermTypedNode) = 0;
} }
} ;}
break; break;
case 175: case 175:
{ context->symbolTable.push(); ++context->loopNestingLevel; } { context->symbolTable.push(); ++context->loopNestingLevel; ;}
break; break;
case 176: case 176:
...@@ -4168,12 +4273,12 @@ yyreduce: ...@@ -4168,12 +4273,12 @@ yyreduce:
context->symbolTable.pop(); context->symbolTable.pop();
(yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(1) - (6)].lex).line); (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopWhile, 0, (yyvsp[(4) - (6)].interm.intermTypedNode), 0, (yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(1) - (6)].lex).line);
--context->loopNestingLevel; --context->loopNestingLevel;
} ;}
break; break;
case 177: case 177:
{ ++context->loopNestingLevel; } { ++context->loopNestingLevel; ;}
break; break;
case 178: case 178:
...@@ -4184,12 +4289,12 @@ yyreduce: ...@@ -4184,12 +4289,12 @@ yyreduce:
(yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(4) - (8)].lex).line); (yyval.interm.intermNode) = context->intermediate.addLoop(ELoopDoWhile, 0, (yyvsp[(6) - (8)].interm.intermTypedNode), 0, (yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(4) - (8)].lex).line);
--context->loopNestingLevel; --context->loopNestingLevel;
} ;}
break; break;
case 179: case 179:
{ context->symbolTable.push(); ++context->loopNestingLevel; } { context->symbolTable.push(); ++context->loopNestingLevel; ;}
break; break;
case 180: case 180:
...@@ -4198,35 +4303,35 @@ yyreduce: ...@@ -4198,35 +4303,35 @@ yyreduce:
context->symbolTable.pop(); context->symbolTable.pop();
(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); (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);
--context->loopNestingLevel; --context->loopNestingLevel;
} ;}
break; break;
case 181: case 181:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} ;}
break; break;
case 182: case 182:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} ;}
break; break;
case 183: case 183:
{ {
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
} ;}
break; break;
case 184: case 184:
{ {
(yyval.interm.intermTypedNode) = 0; (yyval.interm.intermTypedNode) = 0;
} ;}
break; break;
case 185: case 185:
...@@ -4234,7 +4339,7 @@ yyreduce: ...@@ -4234,7 +4339,7 @@ yyreduce:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = 0; (yyval.interm.nodePair).node2 = 0;
} ;}
break; break;
case 186: case 186:
...@@ -4242,7 +4347,7 @@ yyreduce: ...@@ -4242,7 +4347,7 @@ yyreduce:
{ {
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode);
} ;}
break; break;
case 187: case 187:
...@@ -4253,7 +4358,7 @@ yyreduce: ...@@ -4253,7 +4358,7 @@ yyreduce:
context->recover(); context->recover();
} }
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).line);
} ;}
break; break;
case 188: case 188:
...@@ -4264,7 +4369,7 @@ yyreduce: ...@@ -4264,7 +4369,7 @@ yyreduce:
context->recover(); context->recover();
} }
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).line);
} ;}
break; break;
case 189: case 189:
...@@ -4275,7 +4380,7 @@ yyreduce: ...@@ -4275,7 +4380,7 @@ yyreduce:
context->error((yyvsp[(1) - (2)].lex).line, "non-void function must return a value", "return", ""); context->error((yyvsp[(1) - (2)].lex).line, "non-void function must return a value", "return", "");
context->recover(); context->recover();
} }
} ;}
break; break;
case 190: case 190:
...@@ -4290,7 +4395,7 @@ yyreduce: ...@@ -4290,7 +4395,7 @@ yyreduce:
context->error((yyvsp[(1) - (3)].lex).line, "function return is not matching type:", "return", ""); context->error((yyvsp[(1) - (3)].lex).line, "function return is not matching type:", "return", "");
context->recover(); context->recover();
} }
} ;}
break; break;
case 191: case 191:
...@@ -4298,7 +4403,7 @@ yyreduce: ...@@ -4298,7 +4403,7 @@ yyreduce:
{ {
FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line); FRAG_ONLY("discard", (yyvsp[(1) - (2)].lex).line);
(yyval.interm.intermNode) = context->intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).line); (yyval.interm.intermNode) = context->intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).line);
} ;}
break; break;
case 192: case 192:
...@@ -4306,7 +4411,7 @@ yyreduce: ...@@ -4306,7 +4411,7 @@ yyreduce:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
context->treeRoot = (yyval.interm.intermNode); context->treeRoot = (yyval.interm.intermNode);
} ;}
break; break;
case 193: case 193:
...@@ -4314,21 +4419,21 @@ yyreduce: ...@@ -4314,21 +4419,21 @@ yyreduce:
{ {
(yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0); (yyval.interm.intermNode) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode), 0);
context->treeRoot = (yyval.interm.intermNode); context->treeRoot = (yyval.interm.intermNode);
} ;}
break; break;
case 194: case 194:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} ;}
break; break;
case 195: case 195:
{ {
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
} ;}
break; break;
case 196: case 196:
...@@ -4413,7 +4518,7 @@ yyreduce: ...@@ -4413,7 +4518,7 @@ yyreduce:
context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yyvsp[(1) - (1)].interm).line); context->intermediate.setAggregateOperator(paramNodes, EOpParameters, (yyvsp[(1) - (1)].interm).line);
(yyvsp[(1) - (1)].interm).intermAggregate = paramNodes; (yyvsp[(1) - (1)].interm).intermAggregate = paramNodes;
context->loopNestingLevel = 0; context->loopNestingLevel = 0;
} ;}
break; break;
case 197: case 197:
...@@ -4439,10 +4544,11 @@ yyreduce: ...@@ -4439,10 +4544,11 @@ yyreduce:
if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()) if ((yyvsp[(3) - (3)].interm.intermNode) && (yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate())
(yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine()); (yyval.interm.intermNode)->getAsAggregate()->setEndLine((yyvsp[(3) - (3)].interm.intermNode)->getAsAggregate()->getEndLine());
} ;}
break; break;
/* Line 1267 of yacc.c. */
default: break; default: break;
} }
...@@ -4454,6 +4560,7 @@ yyreduce: ...@@ -4454,6 +4560,7 @@ yyreduce:
*++yyvsp = yyval; *++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state /* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule that goes to, based on the state we popped back to and the rule
number reduced by. */ number reduced by. */
...@@ -4518,7 +4625,7 @@ yyerrlab: ...@@ -4518,7 +4625,7 @@ yyerrlab:
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse look-ahead token after an
error, discard it. */ error, discard it. */
if (yychar <= YYEOF) if (yychar <= YYEOF)
...@@ -4535,7 +4642,7 @@ yyerrlab: ...@@ -4535,7 +4642,7 @@ yyerrlab:
} }
} }
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse look-ahead token after shifting the error
token. */ token. */
goto yyerrlab1; goto yyerrlab1;
...@@ -4592,6 +4699,9 @@ yyerrlab1: ...@@ -4592,6 +4699,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
} }
if (yyn == YYFINAL)
YYACCEPT;
*++yyvsp = yylval; *++yyvsp = yylval;
...@@ -4616,7 +4726,7 @@ yyabortlab: ...@@ -4616,7 +4726,7 @@ yyabortlab:
yyresult = 1; yyresult = 1;
goto yyreturn; goto yyreturn;
#if !defined(yyoverflow) || YYERROR_VERBOSE #ifndef yyoverflow
/*-------------------------------------------------. /*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/ `-------------------------------------------------*/
...@@ -4627,7 +4737,7 @@ yyexhaustedlab: ...@@ -4627,7 +4737,7 @@ yyexhaustedlab:
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEMPTY) if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, context); yytoken, &yylval, context);
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule which action triggered
......
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation; either version 2, or (at your option)
(at your option) any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -17,7 +16,9 @@ ...@@ -17,7 +16,9 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -32,7 +33,6 @@ ...@@ -32,7 +33,6 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -134,14 +134,108 @@ ...@@ -134,14 +134,108 @@
QUESTION = 350 QUESTION = 350
}; };
#endif #endif
/* Tokens. */
#define INVARIANT 258
#define HIGH_PRECISION 259
#define MEDIUM_PRECISION 260
#define LOW_PRECISION 261
#define PRECISION 262
#define ATTRIBUTE 263
#define CONST_QUAL 264
#define BOOL_TYPE 265
#define FLOAT_TYPE 266
#define INT_TYPE 267
#define BREAK 268
#define CONTINUE 269
#define DO 270
#define ELSE 271
#define FOR 272
#define IF 273
#define DISCARD 274
#define RETURN 275
#define BVEC2 276
#define BVEC3 277
#define BVEC4 278
#define IVEC2 279
#define IVEC3 280
#define IVEC4 281
#define VEC2 282
#define VEC3 283
#define VEC4 284
#define MATRIX2 285
#define MATRIX3 286
#define MATRIX4 287
#define IN_QUAL 288
#define OUT_QUAL 289
#define INOUT_QUAL 290
#define UNIFORM 291
#define VARYING 292
#define STRUCT 293
#define VOID_TYPE 294
#define WHILE 295
#define SAMPLER2D 296
#define SAMPLERCUBE 297
#define SAMPLER_EXTERNAL_OES 298
#define SAMPLER2DRECT 299
#define IDENTIFIER 300
#define TYPE_NAME 301
#define FLOATCONSTANT 302
#define INTCONSTANT 303
#define BOOLCONSTANT 304
#define FIELD_SELECTION 305
#define LEFT_OP 306
#define RIGHT_OP 307
#define INC_OP 308
#define DEC_OP 309
#define LE_OP 310
#define GE_OP 311
#define EQ_OP 312
#define NE_OP 313
#define AND_OP 314
#define OR_OP 315
#define XOR_OP 316
#define MUL_ASSIGN 317
#define DIV_ASSIGN 318
#define ADD_ASSIGN 319
#define MOD_ASSIGN 320
#define LEFT_ASSIGN 321
#define RIGHT_ASSIGN 322
#define AND_ASSIGN 323
#define XOR_ASSIGN 324
#define OR_ASSIGN 325
#define SUB_ASSIGN 326
#define LEFT_PAREN 327
#define RIGHT_PAREN 328
#define LEFT_BRACKET 329
#define RIGHT_BRACKET 330
#define LEFT_BRACE 331
#define RIGHT_BRACE 332
#define DOT 333
#define COMMA 334
#define COLON 335
#define EQUAL 336
#define SEMICOLON 337
#define BANG 338
#define DASH 339
#define TILDE 340
#define PLUS 341
#define STAR 342
#define SLASH 343
#define PERCENT 344
#define LEFT_ANGLE 345
#define RIGHT_ANGLE 346
#define VERTICAL_BAR 347
#define CARET 348
#define AMPERSAND 349
#define QUESTION 350
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
{
{
struct { struct {
TSourceLoc line; TSourceLoc line;
union { union {
...@@ -171,15 +265,14 @@ typedef union YYSTYPE ...@@ -171,15 +265,14 @@ typedef union YYSTYPE
TTypeList* typeList; TTypeList* typeList;
}; };
} interm; } interm;
}
/* Line 1489 of yacc.c. */
YYSTYPE;
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment