diff --git a/3rdparty/glsl-optimizer/autogen.sh b/3rdparty/glsl-optimizer/autogen.sh
old mode 100644
new mode 100755
diff --git a/3rdparty/glsl-optimizer/generateParsers.sh b/3rdparty/glsl-optimizer/generateParsers.sh
old mode 100644
new mode 100755
diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c
index 3f9e74c96..ea95522bf 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c
+++ b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c
@@ -47,7 +47,6 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -55,7 +54,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -159,7 +159,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#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
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -171,11 +179,6 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -198,6 +201,11 @@ typedef size_t yy_size_t;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -215,7 +223,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -294,7 +302,7 @@ static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner
YY_BUFFER_STATE glcpp__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE glcpp__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner );
void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -345,7 +353,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (yy_size_t) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -646,7 +654,7 @@ match longer strings take priority over those matching shorter
strings, we have to be careful to avoid OTHER matching and hiding
something that CPP does care about. So we simply exclude all
characters that appear in any other expressions. */
-#line 650 "src/glsl/glcpp/glcpp-lex.c"
+#line 658 "src/glsl/glcpp/glcpp-lex.c"
#define INITIAL 0
#define DONE 1
@@ -669,8 +677,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- yy_size_t yy_n_chars;
- yy_size_t yyleng_r;
+ int yy_n_chars;
+ int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -738,7 +746,7 @@ FILE *glcpp_get_out (yyscan_t yyscanner );
void glcpp_set_out (FILE * out_str ,yyscan_t yyscanner );
-yy_size_t glcpp_get_leng (yyscan_t yyscanner );
+int glcpp_get_leng (yyscan_t yyscanner );
char *glcpp_get_text (yyscan_t yyscanner );
@@ -794,7 +802,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#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
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -802,7 +815,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -813,7 +826,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -916,7 +929,7 @@ YY_DECL
}
/* Single-line comments */
-#line 920 "src/glsl/glcpp/glcpp-lex.c"
+#line 933 "src/glsl/glcpp/glcpp-lex.c"
yylval = yylval_param;
@@ -991,7 +1004,6 @@ yy_match:
yy_find_action:
yy_current_state = *--yyg->yy_state_ptr;
yyg->yy_lp = yy_accept[yy_current_state];
-goto find_rule; /* Shut up GCC warning -Wall */
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
@@ -1373,7 +1385,7 @@ YY_RULE_SETUP
#line 305 "src/glsl/glcpp/glcpp-lex.l"
ECHO;
YY_BREAK
-#line 1377 "src/glsl/glcpp/glcpp-lex.c"
+#line 1389 "src/glsl/glcpp/glcpp-lex.c"
case YY_STATE_EOF(DONE):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(UNREACHABLE):
@@ -1563,7 +1575,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1579,7 +1591,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
+ yyg->yy_n_chars, (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1688,7 +1700,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = yyg->yy_n_chars + 2;
+ register int number_to_move = yyg->yy_n_chars + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -1738,7 +1750,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1762,7 +1774,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( glcpp_wrap(yyscanner ) )
- return 0;
+ return EOF;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -2020,7 +2032,7 @@ void glcpp_pop_buffer_state (yyscan_t yyscanner)
*/
static void glcpp_ensure_buffer_stack (yyscan_t yyscanner)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2113,16 +2125,17 @@ YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2272,7 +2285,7 @@ FILE *glcpp_get_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-yy_size_t glcpp_get_leng (yyscan_t yyscanner)
+int glcpp_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c
index 96d20c152..1bd070aa4 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c
+++ b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,101 +52,28 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
/* Substitute the variable and function names. */
-#define yyparse glcpp_parser_parse
-#define yylex glcpp_parser_lex
-#define yyerror glcpp_parser_error
-#define yylval glcpp_parser_lval
-#define yychar glcpp_parser_char
-#define yydebug glcpp_parser_debug
-#define yynerrs glcpp_parser_nerrs
-#define yylloc glcpp_parser_lloc
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- COMMA_FINAL = 258,
- DEFINED = 259,
- ELIF_EXPANDED = 260,
- HASH = 261,
- HASH_DEFINE_FUNC = 262,
- HASH_DEFINE_OBJ = 263,
- HASH_ELIF = 264,
- HASH_ELSE = 265,
- HASH_ENDIF = 266,
- HASH_IF = 267,
- HASH_IFDEF = 268,
- HASH_IFNDEF = 269,
- HASH_LINE = 270,
- HASH_UNDEF = 271,
- HASH_VERSION = 272,
- IDENTIFIER = 273,
- IF_EXPANDED = 274,
- INTEGER = 275,
- INTEGER_STRING = 276,
- LINE_EXPANDED = 277,
- NEWLINE = 278,
- OTHER = 279,
- PLACEHOLDER = 280,
- SPACE = 281,
- PASTE = 282,
- OR = 283,
- AND = 284,
- NOT_EQUAL = 285,
- EQUAL = 286,
- GREATER_OR_EQUAL = 287,
- LESS_OR_EQUAL = 288,
- RIGHT_SHIFT = 289,
- LEFT_SHIFT = 290,
- UNARY = 291
- };
-#endif
-/* Tokens. */
-#define COMMA_FINAL 258
-#define DEFINED 259
-#define ELIF_EXPANDED 260
-#define HASH 261
-#define HASH_DEFINE_FUNC 262
-#define HASH_DEFINE_OBJ 263
-#define HASH_ELIF 264
-#define HASH_ELSE 265
-#define HASH_ENDIF 266
-#define HASH_IF 267
-#define HASH_IFDEF 268
-#define HASH_IFNDEF 269
-#define HASH_LINE 270
-#define HASH_UNDEF 271
-#define HASH_VERSION 272
-#define IDENTIFIER 273
-#define IF_EXPANDED 274
-#define INTEGER 275
-#define INTEGER_STRING 276
-#define LINE_EXPANDED 277
-#define NEWLINE 278
-#define OTHER 279
-#define PLACEHOLDER 280
-#define SPACE 281
-#define PASTE 282
-#define OR 283
-#define AND 284
-#define NOT_EQUAL 285
-#define EQUAL 286
-#define GREATER_OR_EQUAL 287
-#define LESS_OR_EQUAL 288
-#define RIGHT_SHIFT 289
-#define LEFT_SHIFT 290
-#define UNARY 291
-
-
-
+#define yyparse glcpp_parser_parse
+#define yylex glcpp_parser_lex
+#define yyerror glcpp_parser_error
+#define yylval glcpp_parser_lval
+#define yychar glcpp_parser_char
+#define yydebug glcpp_parser_debug
+#define yynerrs glcpp_parser_nerrs
+#define yylloc glcpp_parser_lloc
/* Copy the first part of user declarations. */
+
+/* Line 268 of yacc.c */
#line 1 "src/glsl/glcpp/glcpp-parse.y"
/*
@@ -297,6 +221,9 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
+/* Line 268 of yacc.c */
+#line 226 "src/glsl/glcpp/glcpp-parse.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -315,11 +242,56 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ COMMA_FINAL = 258,
+ DEFINED = 259,
+ ELIF_EXPANDED = 260,
+ HASH = 261,
+ HASH_DEFINE_FUNC = 262,
+ HASH_DEFINE_OBJ = 263,
+ HASH_ELIF = 264,
+ HASH_ELSE = 265,
+ HASH_ENDIF = 266,
+ HASH_IF = 267,
+ HASH_IFDEF = 268,
+ HASH_IFNDEF = 269,
+ HASH_LINE = 270,
+ HASH_UNDEF = 271,
+ HASH_VERSION = 272,
+ IDENTIFIER = 273,
+ IF_EXPANDED = 274,
+ INTEGER = 275,
+ INTEGER_STRING = 276,
+ LINE_EXPANDED = 277,
+ NEWLINE = 278,
+ OTHER = 279,
+ PLACEHOLDER = 280,
+ SPACE = 281,
+ PASTE = 282,
+ OR = 283,
+ AND = 284,
+ NOT_EQUAL = 285,
+ EQUAL = 286,
+ GREATER_OR_EQUAL = 287,
+ LESS_OR_EQUAL = 288,
+ RIGHT_SHIFT = 289,
+ LEFT_SHIFT = 290,
+ UNARY = 291
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
+
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -339,8 +311,8 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 344 "src/glsl/glcpp/glcpp-parse.c"
+/* Line 343 of yacc.c */
+#line 316 "src/glsl/glcpp/glcpp-parse.c"
#ifdef short
# undef short
@@ -415,14 +387,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -443,11 +415,11 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -470,24 +442,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -504,9 +476,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -518,6 +490,27 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
@@ -535,24 +528,7 @@ union yyalloc
while (YYID (0))
# endif
# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
+#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
@@ -749,8 +725,8 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 1
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
@@ -815,8 +791,7 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
@@ -889,6 +864,12 @@ static const yytype_uint8 yytable[] =
110, 111, 112, 113, 114, 115, 116, 117
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-149))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int16 yycheck[] =
{
7, 1, 15, 10, 4, 17, 19, 18, 156, 18,
@@ -996,9 +977,18 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -1008,7 +998,6 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -1174,17 +1163,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -1220,11 +1212,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, parser)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , parser);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1261,7 +1253,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -1364,115 +1355,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
{
- int yyn = yypact[yystate];
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
}
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1508,10 +1526,9 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser)
break;
}
}
-
+
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1527,10 +1544,6 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-
-
-
-
/*----------.
| yyparse. |
`----------*/
@@ -1557,24 +1570,59 @@ yyparse (parser)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
int yyn;
int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -1582,67 +1630,42 @@ YYLTYPE yylloc;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
-
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- YYLTYPE yyloc;
-
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
+/* User initialization code. */
- /* User initialization code. */
+/* Line 1590 of yacc.c */
#line 151 "src/glsl/glcpp/glcpp-parse.y"
{
yylloc.first_line = 1;
@@ -1651,9 +1674,11 @@ YYLTYPE yylloc;
yylloc.last_column = 1;
yylloc.source = 0;
}
-/* Line 1078 of yacc.c. */
-#line 1656 "src/glsl/glcpp/glcpp-parse.c"
+
+/* Line 1590 of yacc.c */
+#line 1680 "src/glsl/glcpp/glcpp-parse.c"
yylsp[0] = yylloc;
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -1690,6 +1715,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -1711,9 +1737,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1734,6 +1760,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -1742,16 +1771,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1777,26 +1806,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1837,36 +1862,46 @@ yyreduce:
switch (yyn)
{
case 4:
+
+/* Line 1806 of yacc.c */
#line 190 "src/glsl/glcpp/glcpp-parse.y"
{
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
- ;}
+ }
break;
case 5:
+
+/* Line 1806 of yacc.c */
#line 193 "src/glsl/glcpp/glcpp-parse.y"
{
_glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list));
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
ralloc_free ((yyvsp[(1) - (1)].token_list));
- ;}
+ }
break;
case 8:
+
+/* Line 1806 of yacc.c */
#line 203 "src/glsl/glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
case 9:
+
+/* Line 1806 of yacc.c */
#line 206 "src/glsl/glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
case 10:
+
+/* Line 1806 of yacc.c */
#line 209 "src/glsl/glcpp/glcpp-parse.y"
{
parser->has_new_line_number = 1;
@@ -1875,10 +1910,12 @@ yyreduce:
&parser->output_length,
"#line %" PRIiMAX "\n",
(yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
case 11:
+
+/* Line 1806 of yacc.c */
#line 217 "src/glsl/glcpp/glcpp-parse.y"
{
parser->has_new_line_number = 1;
@@ -1889,31 +1926,39 @@ yyreduce:
&parser->output_length,
"#line %" PRIiMAX " %" PRIiMAX "\n",
(yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].ival));
- ;}
+ }
break;
case 12:
+
+/* Line 1806 of yacc.c */
#line 230 "src/glsl/glcpp/glcpp-parse.y"
{
_define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list));
- ;}
+ }
break;
case 13:
+
+/* Line 1806 of yacc.c */
#line 233 "src/glsl/glcpp/glcpp-parse.y"
{
_define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list));
- ;}
+ }
break;
case 14:
+
+/* Line 1806 of yacc.c */
#line 236 "src/glsl/glcpp/glcpp-parse.y"
{
_define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list));
- ;}
+ }
break;
case 15:
+
+/* Line 1806 of yacc.c */
#line 239 "src/glsl/glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str));
@@ -1922,10 +1967,12 @@ yyreduce:
ralloc_free (macro);
}
ralloc_free ((yyvsp[(2) - (3)].str));
- ;}
+ }
break;
case 16:
+
+/* Line 1806 of yacc.c */
#line 247 "src/glsl/glcpp/glcpp-parse.y"
{
if (parser->skip_stack == NULL ||
@@ -1934,10 +1981,12 @@ yyreduce:
_glcpp_parser_expand_and_lex_from (parser,
LINE_EXPANDED, (yyvsp[(2) - (3)].token_list));
}
- ;}
+ }
break;
case 17:
+
+/* Line 1806 of yacc.c */
#line 255 "src/glsl/glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'if' expression if
@@ -1958,10 +2007,12 @@ yyreduce:
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), 0);
parser->skip_stack->type = SKIP_TO_ENDIF;
}
- ;}
+ }
break;
case 18:
+
+/* Line 1806 of yacc.c */
#line 275 "src/glsl/glcpp/glcpp-parse.y"
{
/* #if without an expression is only an error if we
@@ -1972,28 +2023,34 @@ yyreduce:
glcpp_error(& (yylsp[(1) - (2)]), parser, "#if with no expression");
}
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (2)]), 0);
- ;}
+ }
break;
case 19:
+
+/* Line 1806 of yacc.c */
#line 285 "src/glsl/glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL);
- ;}
+ }
break;
case 20:
+
+/* Line 1806 of yacc.c */
#line 290 "src/glsl/glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL);
- ;}
+ }
break;
case 21:
+
+/* Line 1806 of yacc.c */
#line 295 "src/glsl/glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'elif' expression
@@ -2014,10 +2071,12 @@ yyreduce:
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]),
"elif", 0);
}
- ;}
+ }
break;
case 22:
+
+/* Line 1806 of yacc.c */
#line 315 "src/glsl/glcpp/glcpp-parse.y"
{
/* #elif without an expression is an error unless we
@@ -2033,24 +2092,30 @@ yyreduce:
"elif", 0);
glcpp_warning(& (yylsp[(1) - (2)]), parser, "ignoring illegal #elif without expression");
}
- ;}
+ }
break;
case 23:
+
+/* Line 1806 of yacc.c */
#line 330 "src/glsl/glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1);
- ;}
+ }
break;
case 24:
+
+/* Line 1806 of yacc.c */
#line 333 "src/glsl/glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)]));
- ;}
+ }
break;
case 25:
+
+/* Line 1806 of yacc.c */
#line 336 "src/glsl/glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
@@ -2072,10 +2137,12 @@ yyreduce:
add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival));
- ;}
+ }
break;
case 27:
+
+/* Line 1806 of yacc.c */
#line 361 "src/glsl/glcpp/glcpp-parse.y"
{
if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) {
@@ -2085,129 +2152,165 @@ yyreduce:
} else {
(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 10);
}
- ;}
+ }
break;
case 28:
+
+/* Line 1806 of yacc.c */
#line 370 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (1)].ival);
- ;}
+ }
break;
case 30:
+
+/* Line 1806 of yacc.c */
#line 376 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = 0;
- ;}
+ }
break;
case 31:
+
+/* Line 1806 of yacc.c */
#line 379 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 32:
+
+/* Line 1806 of yacc.c */
#line 382 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 33:
+
+/* Line 1806 of yacc.c */
#line 385 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 34:
+
+/* Line 1806 of yacc.c */
#line 388 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 35:
+
+/* Line 1806 of yacc.c */
#line 391 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 36:
+
+/* Line 1806 of yacc.c */
#line 394 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 37:
+
+/* Line 1806 of yacc.c */
#line 397 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 38:
+
+/* Line 1806 of yacc.c */
#line 400 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 39:
+
+/* Line 1806 of yacc.c */
#line 403 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 40:
+
+/* Line 1806 of yacc.c */
#line 406 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 41:
+
+/* Line 1806 of yacc.c */
#line 409 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 42:
+
+/* Line 1806 of yacc.c */
#line 412 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 43:
+
+/* Line 1806 of yacc.c */
#line 415 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 44:
+
+/* Line 1806 of yacc.c */
#line 418 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 45:
+
+/* Line 1806 of yacc.c */
#line 421 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 46:
+
+/* Line 1806 of yacc.c */
#line 424 "src/glsl/glcpp/glcpp-parse.y"
{
if ((yyvsp[(3) - (3)].ival) == 0) {
@@ -2216,10 +2319,12 @@ yyreduce:
} else {
(yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
}
- ;}
+ }
break;
case 47:
+
+/* Line 1806 of yacc.c */
#line 432 "src/glsl/glcpp/glcpp-parse.y"
{
if ((yyvsp[(3) - (3)].ival) == 0) {
@@ -2228,342 +2333,462 @@ yyreduce:
} else {
(yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
}
- ;}
+ }
break;
case 48:
+
+/* Line 1806 of yacc.c */
#line 440 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival);
- ;}
+ }
break;
case 49:
+
+/* Line 1806 of yacc.c */
#line 443 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = ! (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
case 50:
+
+/* Line 1806 of yacc.c */
#line 446 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = ~ (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
case 51:
+
+/* Line 1806 of yacc.c */
#line 449 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = - (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
case 52:
+
+/* Line 1806 of yacc.c */
#line 452 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = + (yyvsp[(2) - (2)].ival);
- ;}
+ }
break;
case 53:
+
+/* Line 1806 of yacc.c */
#line 455 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(2) - (3)].ival);
- ;}
+ }
break;
case 54:
+
+/* Line 1806 of yacc.c */
#line 461 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.string_list) = _string_list_create (parser);
_string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str));
ralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str));
- ;}
+ }
break;
case 55:
+
+/* Line 1806 of yacc.c */
#line 466 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.string_list) = (yyvsp[(1) - (3)].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
- ;}
+ }
break;
case 56:
+
+/* Line 1806 of yacc.c */
#line 474 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.token_list) = NULL; ;}
+ { (yyval.token_list) = NULL; }
break;
case 58:
+
+/* Line 1806 of yacc.c */
#line 479 "src/glsl/glcpp/glcpp-parse.y"
{
yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #");
- ;}
+ }
break;
case 59:
+
+/* Line 1806 of yacc.c */
#line 485 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.token_list) = NULL; ;}
+ { (yyval.token_list) = NULL; }
break;
case 62:
+
+/* Line 1806 of yacc.c */
#line 491 "src/glsl/glcpp/glcpp-parse.y"
{
glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive");
- ;}
+ }
break;
case 63:
+
+/* Line 1806 of yacc.c */
#line 498 "src/glsl/glcpp/glcpp-parse.y"
{
int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0;
(yyval.token) = _token_create_ival (parser, INTEGER, v);
- ;}
+ }
break;
case 64:
+
+/* Line 1806 of yacc.c */
#line 502 "src/glsl/glcpp/glcpp-parse.y"
{
int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0;
(yyval.token) = _token_create_ival (parser, INTEGER, v);
- ;}
+ }
break;
case 66:
+
+/* Line 1806 of yacc.c */
#line 511 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token_list) = _token_list_create (parser);
_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
- ;}
+ }
break;
case 67:
+
+/* Line 1806 of yacc.c */
#line 515 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- ;}
+ }
break;
case 68:
+
+/* Line 1806 of yacc.c */
#line 522 "src/glsl/glcpp/glcpp-parse.y"
{
parser->space_tokens = 1;
(yyval.token_list) = _token_list_create (parser);
_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
- ;}
+ }
break;
case 69:
+
+/* Line 1806 of yacc.c */
#line 527 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- ;}
+ }
break;
case 70:
+
+/* Line 1806 of yacc.c */
#line 534 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
case 71:
+
+/* Line 1806 of yacc.c */
#line 538 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
case 72:
+
+/* Line 1806 of yacc.c */
#line 542 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
case 73:
+
+/* Line 1806 of yacc.c */
#line 546 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
- ;}
+ }
break;
case 74:
+
+/* Line 1806 of yacc.c */
#line 550 "src/glsl/glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
(yyval.token)->location = yylloc;
- ;}
+ }
break;
case 75:
+
+/* Line 1806 of yacc.c */
#line 557 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '['; ;}
+ { (yyval.ival) = '['; }
break;
case 76:
+
+/* Line 1806 of yacc.c */
#line 558 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = ']'; ;}
+ { (yyval.ival) = ']'; }
break;
case 77:
+
+/* Line 1806 of yacc.c */
#line 559 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '('; ;}
+ { (yyval.ival) = '('; }
break;
case 78:
+
+/* Line 1806 of yacc.c */
#line 560 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = ')'; ;}
+ { (yyval.ival) = ')'; }
break;
case 79:
+
+/* Line 1806 of yacc.c */
#line 561 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '{'; ;}
+ { (yyval.ival) = '{'; }
break;
case 80:
+
+/* Line 1806 of yacc.c */
#line 562 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '}'; ;}
+ { (yyval.ival) = '}'; }
break;
case 81:
+
+/* Line 1806 of yacc.c */
#line 563 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '.'; ;}
+ { (yyval.ival) = '.'; }
break;
case 82:
+
+/* Line 1806 of yacc.c */
#line 564 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '&'; ;}
+ { (yyval.ival) = '&'; }
break;
case 83:
+
+/* Line 1806 of yacc.c */
#line 565 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '*'; ;}
+ { (yyval.ival) = '*'; }
break;
case 84:
+
+/* Line 1806 of yacc.c */
#line 566 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '+'; ;}
+ { (yyval.ival) = '+'; }
break;
case 85:
+
+/* Line 1806 of yacc.c */
#line 567 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '-'; ;}
+ { (yyval.ival) = '-'; }
break;
case 86:
+
+/* Line 1806 of yacc.c */
#line 568 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '~'; ;}
+ { (yyval.ival) = '~'; }
break;
case 87:
+
+/* Line 1806 of yacc.c */
#line 569 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '!'; ;}
+ { (yyval.ival) = '!'; }
break;
case 88:
+
+/* Line 1806 of yacc.c */
#line 570 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '/'; ;}
+ { (yyval.ival) = '/'; }
break;
case 89:
+
+/* Line 1806 of yacc.c */
#line 571 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '%'; ;}
+ { (yyval.ival) = '%'; }
break;
case 90:
+
+/* Line 1806 of yacc.c */
#line 572 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = LEFT_SHIFT; ;}
+ { (yyval.ival) = LEFT_SHIFT; }
break;
case 91:
+
+/* Line 1806 of yacc.c */
#line 573 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = RIGHT_SHIFT; ;}
+ { (yyval.ival) = RIGHT_SHIFT; }
break;
case 92:
+
+/* Line 1806 of yacc.c */
#line 574 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '<'; ;}
+ { (yyval.ival) = '<'; }
break;
case 93:
+
+/* Line 1806 of yacc.c */
#line 575 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '>'; ;}
+ { (yyval.ival) = '>'; }
break;
case 94:
+
+/* Line 1806 of yacc.c */
#line 576 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = LESS_OR_EQUAL; ;}
+ { (yyval.ival) = LESS_OR_EQUAL; }
break;
case 95:
+
+/* Line 1806 of yacc.c */
#line 577 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = GREATER_OR_EQUAL; ;}
+ { (yyval.ival) = GREATER_OR_EQUAL; }
break;
case 96:
+
+/* Line 1806 of yacc.c */
#line 578 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = EQUAL; ;}
+ { (yyval.ival) = EQUAL; }
break;
case 97:
+
+/* Line 1806 of yacc.c */
#line 579 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = NOT_EQUAL; ;}
+ { (yyval.ival) = NOT_EQUAL; }
break;
case 98:
+
+/* Line 1806 of yacc.c */
#line 580 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '^'; ;}
+ { (yyval.ival) = '^'; }
break;
case 99:
+
+/* Line 1806 of yacc.c */
#line 581 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '|'; ;}
+ { (yyval.ival) = '|'; }
break;
case 100:
+
+/* Line 1806 of yacc.c */
#line 582 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = AND; ;}
+ { (yyval.ival) = AND; }
break;
case 101:
+
+/* Line 1806 of yacc.c */
#line 583 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = OR; ;}
+ { (yyval.ival) = OR; }
break;
case 102:
+
+/* Line 1806 of yacc.c */
#line 584 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = ';'; ;}
+ { (yyval.ival) = ';'; }
break;
case 103:
+
+/* Line 1806 of yacc.c */
#line 585 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = ','; ;}
+ { (yyval.ival) = ','; }
break;
case 104:
+
+/* Line 1806 of yacc.c */
#line 586 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = '='; ;}
+ { (yyval.ival) = '='; }
break;
case 105:
+
+/* Line 1806 of yacc.c */
#line 587 "src/glsl/glcpp/glcpp-parse.y"
- { (yyval.ival) = PASTE; ;}
+ { (yyval.ival) = PASTE; }
break;
-/* Line 1267 of yacc.c. */
-#line 2565 "src/glsl/glcpp/glcpp-parse.c"
+
+/* Line 1806 of yacc.c */
+#line 2779 "src/glsl/glcpp/glcpp-parse.c"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -2592,6 +2817,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -2599,45 +2828,44 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (&yylloc, parser, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (&yylloc, parser, yymsg);
- }
- else
- {
- yyerror (&yylloc, parser, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (&yylloc, parser, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
- yyerror_range[0] = yylloc;
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -2654,7 +2882,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2670,7 +2898,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[0] = yylsp[1-yylen];
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2689,7 +2917,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2704,7 +2932,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[0] = *yylsp;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parser);
YYPOPSTACK (1);
@@ -2712,15 +2940,12 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
- yyerror_range[1] = yylloc;
+ yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
@@ -2744,7 +2969,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2755,9 +2980,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc, parser);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc, parser);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
@@ -2781,6 +3011,8 @@ yyreturn:
}
+
+/* Line 2067 of yacc.c */
#line 590 "src/glsl/glcpp/glcpp-parse.y"
diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h
index 2727a111f..74767e72e 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h
+++ b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -75,50 +73,13 @@
UNARY = 291
};
#endif
-/* Tokens. */
-#define COMMA_FINAL 258
-#define DEFINED 259
-#define ELIF_EXPANDED 260
-#define HASH 261
-#define HASH_DEFINE_FUNC 262
-#define HASH_DEFINE_OBJ 263
-#define HASH_ELIF 264
-#define HASH_ELSE 265
-#define HASH_ENDIF 266
-#define HASH_IF 267
-#define HASH_IFDEF 268
-#define HASH_IFNDEF 269
-#define HASH_LINE 270
-#define HASH_UNDEF 271
-#define HASH_VERSION 272
-#define IDENTIFIER 273
-#define IF_EXPANDED 274
-#define INTEGER 275
-#define INTEGER_STRING 276
-#define LINE_EXPANDED 277
-#define NEWLINE 278
-#define OTHER 279
-#define PLACEHOLDER 280
-#define SPACE 281
-#define PASTE 282
-#define OR 283
-#define AND 284
-#define NOT_EQUAL 285
-#define EQUAL 286
-#define GREATER_OR_EQUAL 287
-#define LESS_OR_EQUAL 288
-#define RIGHT_SHIFT 289
-#define LEFT_SHIFT 290
-#define UNARY 291
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
+
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -137,3 +98,4 @@ typedef struct YYLTYPE
#endif
+
diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp
index b4b98ddbb..2f0c6865d 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp
+++ b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp
@@ -47,7 +47,6 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -55,7 +54,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -159,7 +159,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#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
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -171,11 +179,6 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -198,6 +201,11 @@ typedef size_t yy_size_t;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -215,7 +223,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -294,7 +302,7 @@ static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yysc
YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner );
void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -345,7 +353,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (yy_size_t) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -1135,7 +1143,7 @@ literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
-#line 1139 "src/glsl/glsl_lexer.cpp"
+#line 1147 "src/glsl/glsl_lexer.cpp"
#define INITIAL 0
#define PP 1
@@ -1156,8 +1164,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- yy_size_t yy_n_chars;
- yy_size_t yyleng_r;
+ int yy_n_chars;
+ int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -1214,7 +1222,7 @@ FILE *_mesa_glsl_get_out (yyscan_t yyscanner );
void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner );
-yy_size_t _mesa_glsl_get_leng (yyscan_t yyscanner );
+int _mesa_glsl_get_leng (yyscan_t yyscanner );
char *_mesa_glsl_get_text (yyscan_t yyscanner );
@@ -1262,7 +1270,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#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
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1270,7 +1283,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1281,7 +1294,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1372,7 +1385,7 @@ YY_DECL
#line 145 "src/glsl/glsl_lexer.ll"
-#line 1376 "src/glsl/glsl_lexer.cpp"
+#line 1389 "src/glsl/glsl_lexer.cpp"
yylval = yylval_param;
@@ -2645,7 +2658,7 @@ YY_RULE_SETUP
#line 489 "src/glsl/glsl_lexer.ll"
ECHO;
YY_BREAK
-#line 2649 "src/glsl/glsl_lexer.cpp"
+#line 2662 "src/glsl/glsl_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(PP):
case YY_STATE_EOF(PRAGMA):
@@ -2835,7 +2848,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2849,7 +2862,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2880,7 +2893,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
+ yyg->yy_n_chars, (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -3006,7 +3019,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -3030,7 +3043,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( _mesa_glsl_wrap(yyscanner ) )
- return 0;
+ return EOF;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -3288,7 +3301,7 @@ void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner)
*/
static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -3381,16 +3394,17 @@ YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscann
/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -3500,7 +3514,7 @@ FILE *_mesa_glsl_get_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-yy_size_t _mesa_glsl_get_leng (yyscan_t yyscanner)
+int _mesa_glsl_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp
index 5b95fb7c4..a4f108382 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp
+++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,18 +52,93 @@
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 1
/* Substitute the variable and function names. */
-#define yyparse _mesa_glsl_parse
-#define yylex _mesa_glsl_lex
-#define yyerror _mesa_glsl_error
-#define yylval _mesa_glsl_lval
-#define yychar _mesa_glsl_char
-#define yydebug _mesa_glsl_debug
-#define yynerrs _mesa_glsl_nerrs
-#define yylloc _mesa_glsl_lloc
+#define yyparse _mesa_glsl_parse
+#define yylex _mesa_glsl_lex
+#define yyerror _mesa_glsl_error
+#define yylval _mesa_glsl_lval
+#define yychar _mesa_glsl_char
+#define yydebug _mesa_glsl_debug
+#define yynerrs _mesa_glsl_nerrs
+#define yylloc _mesa_glsl_lloc
+
+/* Copy the first part of user declarations. */
+
+/* Line 268 of yacc.c */
+#line 1 "src/glsl/glsl_parser.yy"
+
+/*
+ * Copyright © 2008, 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include
+#include
+#include
+#include
+
+#include "ast.h"
+#include "glsl_parser_extras.h"
+#include "glsl_types.h"
+#include "main/context.h"
+
+#define YYLEX_PARAM state->scanner
+
+#undef yyerror
+
+static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
+{
+ _mesa_glsl_error(loc, st, "%s", msg);
+}
+
+
+/* Line 268 of yacc.c */
+#line 123 "src/glsl/glsl_parser.cpp"
+
+/* 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 1
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -274,276 +346,16 @@
ROW_MAJOR = 455
};
#endif
-/* Tokens. */
-#define ATTRIBUTE 258
-#define CONST_TOK 259
-#define BOOL_TOK 260
-#define FLOAT_TOK 261
-#define INT_TOK 262
-#define UINT_TOK 263
-#define BREAK 264
-#define CONTINUE 265
-#define DO 266
-#define ELSE 267
-#define FOR 268
-#define IF 269
-#define DISCARD 270
-#define RETURN 271
-#define SWITCH 272
-#define CASE 273
-#define DEFAULT 274
-#define BVEC2 275
-#define BVEC3 276
-#define BVEC4 277
-#define IVEC2 278
-#define IVEC3 279
-#define IVEC4 280
-#define UVEC2 281
-#define UVEC3 282
-#define UVEC4 283
-#define VEC2 284
-#define VEC3 285
-#define VEC4 286
-#define CENTROID 287
-#define IN_TOK 288
-#define OUT_TOK 289
-#define INOUT_TOK 290
-#define UNIFORM 291
-#define VARYING 292
-#define NOPERSPECTIVE 293
-#define FLAT 294
-#define SMOOTH 295
-#define MAT2X2 296
-#define MAT2X3 297
-#define MAT2X4 298
-#define MAT3X2 299
-#define MAT3X3 300
-#define MAT3X4 301
-#define MAT4X2 302
-#define MAT4X3 303
-#define MAT4X4 304
-#define SAMPLER1D 305
-#define SAMPLER2D 306
-#define SAMPLER3D 307
-#define SAMPLERCUBE 308
-#define SAMPLER1DSHADOW 309
-#define SAMPLER2DSHADOW 310
-#define SAMPLERCUBESHADOW 311
-#define SAMPLER1DARRAY 312
-#define SAMPLER2DARRAY 313
-#define SAMPLER1DARRAYSHADOW 314
-#define SAMPLER2DARRAYSHADOW 315
-#define ISAMPLER1D 316
-#define ISAMPLER2D 317
-#define ISAMPLER3D 318
-#define ISAMPLERCUBE 319
-#define ISAMPLER1DARRAY 320
-#define ISAMPLER2DARRAY 321
-#define USAMPLER1D 322
-#define USAMPLER2D 323
-#define USAMPLER3D 324
-#define USAMPLERCUBE 325
-#define USAMPLER1DARRAY 326
-#define USAMPLER2DARRAY 327
-#define SAMPLER2DRECT 328
-#define ISAMPLER2DRECT 329
-#define USAMPLER2DRECT 330
-#define SAMPLER2DRECTSHADOW 331
-#define SAMPLERBUFFER 332
-#define ISAMPLERBUFFER 333
-#define USAMPLERBUFFER 334
-#define SAMPLEREXTERNALOES 335
-#define STRUCT 336
-#define VOID_TOK 337
-#define WHILE 338
-#define IDENTIFIER 339
-#define TYPE_IDENTIFIER 340
-#define NEW_IDENTIFIER 341
-#define FLOATCONSTANT 342
-#define INTCONSTANT 343
-#define UINTCONSTANT 344
-#define BOOLCONSTANT 345
-#define FIELD_SELECTION 346
-#define LEFT_OP 347
-#define RIGHT_OP 348
-#define INC_OP 349
-#define DEC_OP 350
-#define LE_OP 351
-#define GE_OP 352
-#define EQ_OP 353
-#define NE_OP 354
-#define AND_OP 355
-#define OR_OP 356
-#define XOR_OP 357
-#define MUL_ASSIGN 358
-#define DIV_ASSIGN 359
-#define ADD_ASSIGN 360
-#define MOD_ASSIGN 361
-#define LEFT_ASSIGN 362
-#define RIGHT_ASSIGN 363
-#define AND_ASSIGN 364
-#define XOR_ASSIGN 365
-#define OR_ASSIGN 366
-#define SUB_ASSIGN 367
-#define INVARIANT 368
-#define LOWP 369
-#define MEDIUMP 370
-#define HIGHP 371
-#define SUPERP 372
-#define PRECISION 373
-#define VERSION_TOK 374
-#define EXTENSION 375
-#define LINE 376
-#define COLON 377
-#define EOL 378
-#define INTERFACE 379
-#define OUTPUT 380
-#define PRAGMA_DEBUG_ON 381
-#define PRAGMA_DEBUG_OFF 382
-#define PRAGMA_OPTIMIZE_ON 383
-#define PRAGMA_OPTIMIZE_OFF 384
-#define PRAGMA_INVARIANT_ALL 385
-#define LAYOUT_TOK 386
-#define ASM 387
-#define CLASS 388
-#define UNION 389
-#define ENUM 390
-#define TYPEDEF 391
-#define TEMPLATE 392
-#define THIS 393
-#define PACKED_TOK 394
-#define GOTO 395
-#define INLINE_TOK 396
-#define NOINLINE 397
-#define VOLATILE 398
-#define PUBLIC_TOK 399
-#define STATIC 400
-#define EXTERN 401
-#define EXTERNAL 402
-#define LONG_TOK 403
-#define SHORT_TOK 404
-#define DOUBLE_TOK 405
-#define HALF 406
-#define FIXED_TOK 407
-#define UNSIGNED 408
-#define INPUT_TOK 409
-#define OUPTUT 410
-#define HVEC2 411
-#define HVEC3 412
-#define HVEC4 413
-#define DVEC2 414
-#define DVEC3 415
-#define DVEC4 416
-#define FVEC2 417
-#define FVEC3 418
-#define FVEC4 419
-#define SAMPLER3DRECT 420
-#define SIZEOF 421
-#define CAST 422
-#define NAMESPACE 423
-#define USING 424
-#define ERROR_TOK 425
-#define COMMON 426
-#define PARTITION 427
-#define ACTIVE 428
-#define FILTER 429
-#define IMAGE1D 430
-#define IMAGE2D 431
-#define IMAGE3D 432
-#define IMAGECUBE 433
-#define IMAGE1DARRAY 434
-#define IMAGE2DARRAY 435
-#define IIMAGE1D 436
-#define IIMAGE2D 437
-#define IIMAGE3D 438
-#define IIMAGECUBE 439
-#define IIMAGE1DARRAY 440
-#define IIMAGE2DARRAY 441
-#define UIMAGE1D 442
-#define UIMAGE2D 443
-#define UIMAGE3D 444
-#define UIMAGECUBE 445
-#define UIMAGE1DARRAY 446
-#define UIMAGE2DARRAY 447
-#define IMAGE1DSHADOW 448
-#define IMAGE2DSHADOW 449
-#define IMAGEBUFFER 450
-#define IIMAGEBUFFER 451
-#define UIMAGEBUFFER 452
-#define IMAGE1DARRAYSHADOW 453
-#define IMAGE2DARRAYSHADOW 454
-#define ROW_MAJOR 455
-
-/* Copy the first part of user declarations. */
-#line 1 "src/glsl/glsl_parser.yy"
-
-/*
- * Copyright © 2008, 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#include
-#include
-#include
-#include
-
-#include "ast.h"
-#include "glsl_parser_extras.h"
-#include "glsl_types.h"
-#include "main/context.h"
-
-#define YYLEX_PARAM state->scanner
-
-#undef yyerror
-
-static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
-{
- _mesa_glsl_error(loc, st, "%s", msg);
-}
-
-
-/* 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 1
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 59 "src/glsl/glsl_parser.yy"
{
+
+/* Line 293 of yacc.c */
+#line 59 "src/glsl/glsl_parser.yy"
+
int n;
float real;
const char *identifier;
@@ -576,13 +388,15 @@ typedef union YYSTYPE
ast_node *then_statement;
ast_node *else_statement;
} selection_rest_statement;
-}
-/* Line 193 of yacc.c. */
-#line 582 "src/glsl/glsl_parser.cpp"
- YYSTYPE;
+
+
+
+/* Line 293 of yacc.c */
+#line 396 "src/glsl/glsl_parser.cpp"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -602,8 +416,8 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-/* Line 216 of yacc.c. */
-#line 607 "src/glsl/glsl_parser.cpp"
+/* Line 343 of yacc.c */
+#line 421 "src/glsl/glsl_parser.cpp"
#ifdef short
# undef short
@@ -678,14 +492,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -706,11 +520,11 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -733,24 +547,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -767,9 +581,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -781,6 +595,27 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
@@ -798,24 +633,7 @@ union yyalloc
while (YYID (0))
# endif
# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
+#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 5
@@ -1107,7 +925,7 @@ static const char *const yytname[] =
"IMAGE1DARRAYSHADOW", "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'",
"'['", "']'", "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'",
"'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'",
- "'{'", "'}'", "$accept", "translation_unit", "@1", "version_statement",
+ "'{'", "'}'", "$accept", "translation_unit", "$@1", "version_statement",
"pragma_statement", "extension_statement_list", "any_identifier",
"extension_statement", "external_declaration_list",
"variable_identifier", "primary_expression", "postfix_expression",
@@ -1136,7 +954,7 @@ static const char *const yytname[] =
"struct_specifier", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement",
- "compound_statement", "@2", "statement_no_new_scope",
+ "compound_statement", "$@2", "statement_no_new_scope",
"compound_statement_no_new_scope", "statement_list",
"expression_statement", "selection_statement",
"selection_rest_statement", "condition", "switch_statement",
@@ -1253,8 +1071,8 @@ static const yytype_uint8 yyr2[] =
6, 7, 1, 2, 0, 1, 5, 4, 3
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
@@ -1399,8 +1217,7 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -313
static const yytype_int16 yytable[] =
{
@@ -1717,6 +1534,12 @@ static const yytype_int16 yytable[] =
93, 94
};
+#define yypact_value_is_default(yystate) \
+ ((yystate) == (-373))
+
+#define yytable_value_is_error(yytable_value) \
+ YYID (0)
+
static const yytype_int16 yycheck[] =
{
9, 8, 84, 9, 180, 84, 4, 84, 86, 184,
@@ -2099,9 +1922,18 @@ static const yytype_uint16 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2111,7 +1943,6 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -2277,17 +2108,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2323,11 +2157,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, state)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , state);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2364,7 +2198,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -2467,115 +2300,142 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
{
- int yyn = yypact[yystate];
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = 0;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
}
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -2611,10 +2471,9 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, state)
break;
}
}
-
+
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -2630,10 +2489,6 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-
-
-
-
/*----------.
| yyparse. |
`----------*/
@@ -2660,24 +2515,59 @@ yyparse (state)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
int yyn;
int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -2685,67 +2575,42 @@ YYLTYPE yylloc;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
-
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- YYLTYPE yyloc;
-
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
+/* User initialization code. */
- /* User initialization code. */
+/* Line 1590 of yacc.c */
#line 48 "src/glsl/glsl_parser.yy"
{
yylloc.first_line = 1;
@@ -2754,9 +2619,11 @@ YYLTYPE yylloc;
yylloc.last_column = 1;
yylloc.source = 0;
}
-/* Line 1078 of yacc.c. */
-#line 2759 "src/glsl/glsl_parser.cpp"
+
+/* Line 1590 of yacc.c */
+#line 2625 "src/glsl/glsl_parser.cpp"
yylsp[0] = yylloc;
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -2793,6 +2660,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2814,9 +2682,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2837,6 +2705,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2845,16 +2716,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2880,26 +2751,22 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -2940,22 +2807,28 @@ yyreduce:
switch (yyn)
{
case 2:
+
+/* Line 1806 of yacc.c */
#line 243 "src/glsl/glsl_parser.yy"
{
_mesa_glsl_initialize_types(state);
- ;}
+ }
break;
case 3:
+
+/* Line 1806 of yacc.c */
#line 247 "src/glsl/glsl_parser.yy"
{
delete state->symbols;
state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
_mesa_glsl_initialize_types(state);
- ;}
+ }
break;
case 5:
+
+/* Line 1806 of yacc.c */
#line 257 "src/glsl/glsl_parser.yy"
{
bool supported = false;
@@ -3005,10 +2878,12 @@ yyreduce:
if (state->language_version >= 140) {
state->ARB_uniform_buffer_object_enable = true;
}
- ;}
+ }
break;
case 10:
+
+/* Line 1806 of yacc.c */
#line 314 "src/glsl/glsl_parser.yy"
{
if (state->language_version == 110) {
@@ -3018,19 +2893,23 @@ yyreduce:
} else {
state->all_invariant = true;
}
- ;}
+ }
break;
case 16:
+
+/* Line 1806 of yacc.c */
#line 338 "src/glsl/glsl_parser.yy"
{
if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
YYERROR;
}
- ;}
+ }
break;
case 17:
+
+/* Line 1806 of yacc.c */
#line 347 "src/glsl/glsl_parser.yy"
{
/* FINISHME: The NULL test is required because pragmas are set to
@@ -3038,10 +2917,12 @@ yyreduce:
*/
if ((yyvsp[(1) - (1)].node) != NULL)
state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link);
- ;}
+ }
break;
case 18:
+
+/* Line 1806 of yacc.c */
#line 355 "src/glsl/glsl_parser.yy"
{
/* FINISHME: The NULL test is required because pragmas are set to
@@ -3049,493 +2930,615 @@ yyreduce:
*/
if ((yyvsp[(2) - (2)].node) != NULL)
state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link);
- ;}
+ }
break;
case 21:
+
+/* Line 1806 of yacc.c */
#line 371 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)].identifier);
- ;}
+ }
break;
case 22:
+
+/* Line 1806 of yacc.c */
#line 378 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1)].n);
- ;}
+ }
break;
case 23:
+
+/* Line 1806 of yacc.c */
#line 385 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - (1)].n);
- ;}
+ }
break;
case 24:
+
+/* Line 1806 of yacc.c */
#line 392 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real);
- ;}
+ }
break;
case 25:
+
+/* Line 1806 of yacc.c */
#line 399 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - (1)].n);
- ;}
+ }
break;
case 26:
+
+/* Line 1806 of yacc.c */
#line 406 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(2) - (3)].expression);
- ;}
+ }
break;
case 28:
+
+/* Line 1806 of yacc.c */
#line 414 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 29:
+
+/* Line 1806 of yacc.c */
#line 420 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
- ;}
+ }
break;
case 30:
+
+/* Line 1806 of yacc.c */
#line 424 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)].identifier);
- ;}
+ }
break;
case 31:
+
+/* Line 1806 of yacc.c */
#line 431 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 32:
+
+/* Line 1806 of yacc.c */
#line 437 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 36:
+
+/* Line 1806 of yacc.c */
#line 455 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 41:
+
+/* Line 1806 of yacc.c */
#line 474 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (2)].expression);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
- ;}
+ }
break;
case 42:
+
+/* Line 1806 of yacc.c */
#line 480 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (3)].expression);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
- ;}
+ }
break;
case 44:
+
+/* Line 1806 of yacc.c */
#line 496 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 45:
+
+/* Line 1806 of yacc.c */
#line 502 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
(yyval.expression) = new(ctx) ast_function_expression(callee);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 46:
+
+/* Line 1806 of yacc.c */
#line 509 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
(yyval.expression) = new(ctx) ast_function_expression(callee);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 51:
+
+/* Line 1806 of yacc.c */
#line 529 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (2)].expression);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
- ;}
+ }
break;
case 52:
+
+/* Line 1806 of yacc.c */
#line 535 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (3)].expression);
(yyval.expression)->set_location(yylloc);
(yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
- ;}
+ }
break;
case 53:
+
+/* Line 1806 of yacc.c */
#line 547 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier));
(yyval.expression) = new(ctx) ast_function_expression(callee);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 55:
+
+/* Line 1806 of yacc.c */
#line 559 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 56:
+
+/* Line 1806 of yacc.c */
#line 565 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 57:
+
+/* Line 1806 of yacc.c */
#line 571 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 58:
+
+/* Line 1806 of yacc.c */
#line 580 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_plus; ;}
+ { (yyval.n) = ast_plus; }
break;
case 59:
+
+/* Line 1806 of yacc.c */
#line 581 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_neg; ;}
+ { (yyval.n) = ast_neg; }
break;
case 60:
+
+/* Line 1806 of yacc.c */
#line 582 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_logic_not; ;}
+ { (yyval.n) = ast_logic_not; }
break;
case 61:
+
+/* Line 1806 of yacc.c */
#line 583 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_bit_not; ;}
+ { (yyval.n) = ast_bit_not; }
break;
case 63:
+
+/* Line 1806 of yacc.c */
#line 589 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 64:
+
+/* Line 1806 of yacc.c */
#line 595 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 65:
+
+/* Line 1806 of yacc.c */
#line 601 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 67:
+
+/* Line 1806 of yacc.c */
#line 611 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 68:
+
+/* Line 1806 of yacc.c */
#line 617 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 70:
+
+/* Line 1806 of yacc.c */
#line 627 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 71:
+
+/* Line 1806 of yacc.c */
#line 633 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 73:
+
+/* Line 1806 of yacc.c */
#line 643 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 74:
+
+/* Line 1806 of yacc.c */
#line 649 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 75:
+
+/* Line 1806 of yacc.c */
#line 655 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 76:
+
+/* Line 1806 of yacc.c */
#line 661 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 78:
+
+/* Line 1806 of yacc.c */
#line 671 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 79:
+
+/* Line 1806 of yacc.c */
#line 677 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 81:
+
+/* Line 1806 of yacc.c */
#line 687 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 83:
+
+/* Line 1806 of yacc.c */
#line 697 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 85:
+
+/* Line 1806 of yacc.c */
#line 707 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 87:
+
+/* Line 1806 of yacc.c */
#line 717 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 89:
+
+/* Line 1806 of yacc.c */
#line 727 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 91:
+
+/* Line 1806 of yacc.c */
#line 737 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 93:
+
+/* Line 1806 of yacc.c */
#line 747 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression));
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 95:
+
+/* Line 1806 of yacc.c */
#line 757 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
(yyval.expression)->set_location(yylloc);
- ;}
+ }
break;
case 96:
+
+/* Line 1806 of yacc.c */
#line 765 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_assign; ;}
+ { (yyval.n) = ast_assign; }
break;
case 97:
+
+/* Line 1806 of yacc.c */
#line 766 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_mul_assign; ;}
+ { (yyval.n) = ast_mul_assign; }
break;
case 98:
+
+/* Line 1806 of yacc.c */
#line 767 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_div_assign; ;}
+ { (yyval.n) = ast_div_assign; }
break;
case 99:
+
+/* Line 1806 of yacc.c */
#line 768 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_mod_assign; ;}
+ { (yyval.n) = ast_mod_assign; }
break;
case 100:
+
+/* Line 1806 of yacc.c */
#line 769 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_add_assign; ;}
+ { (yyval.n) = ast_add_assign; }
break;
case 101:
+
+/* Line 1806 of yacc.c */
#line 770 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_sub_assign; ;}
+ { (yyval.n) = ast_sub_assign; }
break;
case 102:
+
+/* Line 1806 of yacc.c */
#line 771 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_ls_assign; ;}
+ { (yyval.n) = ast_ls_assign; }
break;
case 103:
+
+/* Line 1806 of yacc.c */
#line 772 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_rs_assign; ;}
+ { (yyval.n) = ast_rs_assign; }
break;
case 104:
+
+/* Line 1806 of yacc.c */
#line 773 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_and_assign; ;}
+ { (yyval.n) = ast_and_assign; }
break;
case 105:
+
+/* Line 1806 of yacc.c */
#line 774 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_xor_assign; ;}
+ { (yyval.n) = ast_xor_assign; }
break;
case 106:
+
+/* Line 1806 of yacc.c */
#line 775 "src/glsl/glsl_parser.yy"
- { (yyval.n) = ast_or_assign; ;}
+ { (yyval.n) = ast_or_assign; }
break;
case 107:
+
+/* Line 1806 of yacc.c */
#line 780 "src/glsl/glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
- ;}
+ }
break;
case 108:
+
+/* Line 1806 of yacc.c */
#line 784 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3548,57 +3551,71 @@ yyreduce:
}
(yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
- ;}
+ }
break;
case 110:
+
+/* Line 1806 of yacc.c */
#line 804 "src/glsl/glsl_parser.yy"
{
state->symbols->pop_scope();
(yyval.node) = (yyvsp[(1) - (2)].function);
- ;}
+ }
break;
case 111:
+
+/* Line 1806 of yacc.c */
#line 809 "src/glsl/glsl_parser.yy"
{
(yyval.node) = (yyvsp[(1) - (2)].declarator_list);
- ;}
+ }
break;
case 112:
+
+/* Line 1806 of yacc.c */
#line 813 "src/glsl/glsl_parser.yy"
{
(yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n);
(yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true;
(yyval.node) = (yyvsp[(3) - (4)].type_specifier);
- ;}
+ }
break;
case 113:
+
+/* Line 1806 of yacc.c */
#line 819 "src/glsl/glsl_parser.yy"
{
(yyval.node) = (yyvsp[(1) - (1)].node);
- ;}
+ }
break;
case 117:
+
+/* Line 1806 of yacc.c */
#line 835 "src/glsl/glsl_parser.yy"
{
(yyval.function) = (yyvsp[(1) - (2)].function);
(yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link);
- ;}
+ }
break;
case 118:
+
+/* Line 1806 of yacc.c */
#line 840 "src/glsl/glsl_parser.yy"
{
(yyval.function) = (yyvsp[(1) - (3)].function);
(yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link);
- ;}
+ }
break;
case 119:
+
+/* Line 1806 of yacc.c */
#line 848 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3609,10 +3626,12 @@ yyreduce:
state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier)));
state->symbols->push_scope();
- ;}
+ }
break;
case 120:
+
+/* Line 1806 of yacc.c */
#line 862 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3622,10 +3641,12 @@ yyreduce:
(yyval.parameter_declarator)->type->set_location(yylloc);
(yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].type_specifier);
(yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifier);
- ;}
+ }
break;
case 121:
+
+/* Line 1806 of yacc.c */
#line 872 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3637,28 +3658,34 @@ yyreduce:
(yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifier);
(yyval.parameter_declarator)->is_array = true;
(yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expression);
- ;}
+ }
break;
case 122:
+
+/* Line 1806 of yacc.c */
#line 887 "src/glsl/glsl_parser.yy"
{
(yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i;
(yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator);
(yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier);
- ;}
+ }
break;
case 123:
+
+/* Line 1806 of yacc.c */
#line 894 "src/glsl/glsl_parser.yy"
{
(yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator);
(yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
- ;}
+ }
break;
case 124:
+
+/* Line 1806 of yacc.c */
#line 899 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3669,10 +3696,12 @@ yyreduce:
(yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
(yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier);
(yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].type_specifier);
- ;}
+ }
break;
case 125:
+
+/* Line 1806 of yacc.c */
#line 910 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3681,42 +3710,52 @@ yyreduce:
(yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type();
(yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
(yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].type_specifier);
- ;}
+ }
break;
case 126:
+
+/* Line 1806 of yacc.c */
#line 922 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- ;}
+ }
break;
case 127:
+
+/* Line 1806 of yacc.c */
#line 926 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
- ;}
+ }
break;
case 128:
+
+/* Line 1806 of yacc.c */
#line 931 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
- ;}
+ }
break;
case 129:
+
+/* Line 1806 of yacc.c */
#line 936 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
(yyval.type_qualifier).flags.q.out = 1;
- ;}
+ }
break;
case 132:
+
+/* Line 1806 of yacc.c */
#line 950 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3726,10 +3765,12 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 133:
+
+/* Line 1806 of yacc.c */
#line 960 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3739,10 +3780,12 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 134:
+
+/* Line 1806 of yacc.c */
#line 970 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3752,10 +3795,12 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 135:
+
+/* Line 1806 of yacc.c */
#line 980 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3765,10 +3810,12 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 136:
+
+/* Line 1806 of yacc.c */
#line 990 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3778,10 +3825,12 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 137:
+
+/* Line 1806 of yacc.c */
#line 1000 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3791,20 +3840,24 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 138:
+
+/* Line 1806 of yacc.c */
#line 1014 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
/* Empty declaration list is valid. */
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
- ;}
+ }
break;
case 139:
+
+/* Line 1806 of yacc.c */
#line 1021 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3813,10 +3866,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (2)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 140:
+
+/* Line 1806 of yacc.c */
#line 1030 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3825,10 +3880,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 141:
+
+/* Line 1806 of yacc.c */
#line 1039 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3837,10 +3894,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (5)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 142:
+
+/* Line 1806 of yacc.c */
#line 1048 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3849,10 +3908,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (6)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 143:
+
+/* Line 1806 of yacc.c */
#line 1057 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3861,10 +3922,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (7)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 144:
+
+/* Line 1806 of yacc.c */
#line 1066 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3873,10 +3936,12 @@ yyreduce:
(yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type));
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 145:
+
+/* Line 1806 of yacc.c */
#line 1075 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3887,20 +3952,24 @@ yyreduce:
(yyval.declarator_list)->invariant = true;
(yyval.declarator_list)->declarations.push_tail(&decl->link);
- ;}
+ }
break;
case 146:
+
+/* Line 1806 of yacc.c */
#line 1089 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
(yyval.fully_specified_type)->set_location(yylloc);
(yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_specifier);
- ;}
+ }
break;
case 147:
+
+/* Line 1806 of yacc.c */
#line 1096 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -3908,27 +3977,33 @@ yyreduce:
(yyval.fully_specified_type)->set_location(yylloc);
(yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qualifier);
(yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_specifier);
- ;}
+ }
break;
case 148:
+
+/* Line 1806 of yacc.c */
#line 1107 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
- ;}
+ }
break;
case 150:
+
+/* Line 1806 of yacc.c */
#line 1115 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (3)].type_qualifier);
if (!(yyval.type_qualifier).merge_qualifier(& (yylsp[(3) - (3)]), state, (yyvsp[(3) - (3)].type_qualifier))) {
YYERROR;
}
- ;}
+ }
break;
case 151:
+
+/* Line 1806 of yacc.c */
#line 1125 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
@@ -3996,10 +4071,12 @@ yyreduce:
"`%s'\n", (yyvsp[(1) - (1)].identifier));
YYERROR;
}
- ;}
+ }
break;
case 152:
+
+/* Line 1806 of yacc.c */
#line 1193 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
@@ -4045,10 +4122,12 @@ yyreduce:
"GL_ARB_explicit_attrib_location layout "
"identifier `%s' used\n", (yyvsp[(1) - (3)].identifier));
}
- ;}
+ }
break;
case 153:
+
+/* Line 1806 of yacc.c */
#line 1239 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (1)].type_qualifier);
@@ -4062,517 +4141,687 @@ yyreduce:
"#version 140 / GL_ARB_uniform_buffer_object "
"layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].type_qualifier));
}
- ;}
+ }
break;
case 154:
+
+/* Line 1806 of yacc.c */
#line 1261 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.row_major = 1;
- ;}
+ }
break;
case 155:
+
+/* Line 1806 of yacc.c */
#line 1266 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.packed = 1;
- ;}
+ }
break;
case 156:
+
+/* Line 1806 of yacc.c */
#line 1274 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.smooth = 1;
- ;}
+ }
break;
case 157:
+
+/* Line 1806 of yacc.c */
#line 1279 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.flat = 1;
- ;}
+ }
break;
case 158:
+
+/* Line 1806 of yacc.c */
#line 1284 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.noperspective = 1;
- ;}
+ }
break;
case 159:
+
+/* Line 1806 of yacc.c */
#line 1292 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.constant = 1;
- ;}
+ }
break;
case 162:
+
+/* Line 1806 of yacc.c */
#line 1302 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
- ;}
+ }
break;
case 164:
+
+/* Line 1806 of yacc.c */
#line 1308 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
- ;}
+ }
break;
case 165:
+
+/* Line 1806 of yacc.c */
#line 1313 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
(yyval.type_qualifier).flags.q.invariant = 1;
- ;}
+ }
break;
case 166:
+
+/* Line 1806 of yacc.c */
#line 1318 "src/glsl/glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i;
(yyval.type_qualifier).flags.q.invariant = 1;
- ;}
+ }
break;
case 167:
+
+/* Line 1806 of yacc.c */
#line 1324 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.invariant = 1;
- ;}
+ }
break;
case 168:
+
+/* Line 1806 of yacc.c */
#line 1332 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.constant = 1;
- ;}
+ }
break;
case 169:
+
+/* Line 1806 of yacc.c */
#line 1337 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.attribute = 1;
- ;}
+ }
break;
case 170:
+
+/* Line 1806 of yacc.c */
#line 1342 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.varying = 1;
- ;}
+ }
break;
case 171:
+
+/* Line 1806 of yacc.c */
#line 1347 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1;
(yyval.type_qualifier).flags.q.varying = 1;
- ;}
+ }
break;
case 172:
+
+/* Line 1806 of yacc.c */
#line 1353 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
- ;}
+ }
break;
case 173:
+
+/* Line 1806 of yacc.c */
#line 1358 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
- ;}
+ }
break;
case 174:
+
+/* Line 1806 of yacc.c */
#line 1363 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1;
- ;}
+ }
break;
case 175:
+
+/* Line 1806 of yacc.c */
#line 1368 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1;
- ;}
+ }
break;
case 176:
+
+/* Line 1806 of yacc.c */
#line 1373 "src/glsl/glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.uniform = 1;
- ;}
+ }
break;
case 177:
+
+/* Line 1806 of yacc.c */
#line 1381 "src/glsl/glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier);
- ;}
+ }
break;
case 178:
+
+/* Line 1806 of yacc.c */
#line 1385 "src/glsl/glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier);
(yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n);
- ;}
+ }
break;
case 180:
+
+/* Line 1806 of yacc.c */
#line 1394 "src/glsl/glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
(yyval.type_specifier)->is_array = true;
(yyval.type_specifier)->array_size = NULL;
- ;}
+ }
break;
case 181:
+
+/* Line 1806 of yacc.c */
#line 1400 "src/glsl/glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier);
(yyval.type_specifier)->is_array = true;
(yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression);
- ;}
+ }
break;
case 182:
+
+/* Line 1806 of yacc.c */
#line 1409 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
(yyval.type_specifier)->set_location(yylloc);
- ;}
+ }
break;
case 183:
+
+/* Line 1806 of yacc.c */
#line 1415 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier));
(yyval.type_specifier)->set_location(yylloc);
- ;}
+ }
break;
case 184:
+
+/* Line 1806 of yacc.c */
#line 1421 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
(yyval.type_specifier)->set_location(yylloc);
- ;}
+ }
break;
case 185:
+
+/* Line 1806 of yacc.c */
#line 1429 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "void"; ;}
+ { (yyval.identifier) = "void"; }
break;
case 186:
+
+/* Line 1806 of yacc.c */
#line 1430 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "float"; ;}
+ { (yyval.identifier) = "float"; }
break;
case 187:
+
+/* Line 1806 of yacc.c */
#line 1431 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "int"; ;}
+ { (yyval.identifier) = "int"; }
break;
case 188:
+
+/* Line 1806 of yacc.c */
#line 1432 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "uint"; ;}
+ { (yyval.identifier) = "uint"; }
break;
case 189:
+
+/* Line 1806 of yacc.c */
#line 1433 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "bool"; ;}
+ { (yyval.identifier) = "bool"; }
break;
case 190:
+
+/* Line 1806 of yacc.c */
#line 1434 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "vec2"; ;}
+ { (yyval.identifier) = "vec2"; }
break;
case 191:
+
+/* Line 1806 of yacc.c */
#line 1435 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "vec3"; ;}
+ { (yyval.identifier) = "vec3"; }
break;
case 192:
+
+/* Line 1806 of yacc.c */
#line 1436 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "vec4"; ;}
+ { (yyval.identifier) = "vec4"; }
break;
case 193:
+
+/* Line 1806 of yacc.c */
#line 1437 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "bvec2"; ;}
+ { (yyval.identifier) = "bvec2"; }
break;
case 194:
+
+/* Line 1806 of yacc.c */
#line 1438 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "bvec3"; ;}
+ { (yyval.identifier) = "bvec3"; }
break;
case 195:
+
+/* Line 1806 of yacc.c */
#line 1439 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "bvec4"; ;}
+ { (yyval.identifier) = "bvec4"; }
break;
case 196:
+
+/* Line 1806 of yacc.c */
#line 1440 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "ivec2"; ;}
+ { (yyval.identifier) = "ivec2"; }
break;
case 197:
+
+/* Line 1806 of yacc.c */
#line 1441 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "ivec3"; ;}
+ { (yyval.identifier) = "ivec3"; }
break;
case 198:
+
+/* Line 1806 of yacc.c */
#line 1442 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "ivec4"; ;}
+ { (yyval.identifier) = "ivec4"; }
break;
case 199:
+
+/* Line 1806 of yacc.c */
#line 1443 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "uvec2"; ;}
+ { (yyval.identifier) = "uvec2"; }
break;
case 200:
+
+/* Line 1806 of yacc.c */
#line 1444 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "uvec3"; ;}
+ { (yyval.identifier) = "uvec3"; }
break;
case 201:
+
+/* Line 1806 of yacc.c */
#line 1445 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "uvec4"; ;}
+ { (yyval.identifier) = "uvec4"; }
break;
case 202:
+
+/* Line 1806 of yacc.c */
#line 1446 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat2"; ;}
+ { (yyval.identifier) = "mat2"; }
break;
case 203:
+
+/* Line 1806 of yacc.c */
#line 1447 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat2x3"; ;}
+ { (yyval.identifier) = "mat2x3"; }
break;
case 204:
+
+/* Line 1806 of yacc.c */
#line 1448 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat2x4"; ;}
+ { (yyval.identifier) = "mat2x4"; }
break;
case 205:
+
+/* Line 1806 of yacc.c */
#line 1449 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat3x2"; ;}
+ { (yyval.identifier) = "mat3x2"; }
break;
case 206:
+
+/* Line 1806 of yacc.c */
#line 1450 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat3"; ;}
+ { (yyval.identifier) = "mat3"; }
break;
case 207:
+
+/* Line 1806 of yacc.c */
#line 1451 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat3x4"; ;}
+ { (yyval.identifier) = "mat3x4"; }
break;
case 208:
+
+/* Line 1806 of yacc.c */
#line 1452 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat4x2"; ;}
+ { (yyval.identifier) = "mat4x2"; }
break;
case 209:
+
+/* Line 1806 of yacc.c */
#line 1453 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat4x3"; ;}
+ { (yyval.identifier) = "mat4x3"; }
break;
case 210:
+
+/* Line 1806 of yacc.c */
#line 1454 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "mat4"; ;}
+ { (yyval.identifier) = "mat4"; }
break;
case 211:
+
+/* Line 1806 of yacc.c */
#line 1455 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler1D"; ;}
+ { (yyval.identifier) = "sampler1D"; }
break;
case 212:
+
+/* Line 1806 of yacc.c */
#line 1456 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2D"; ;}
+ { (yyval.identifier) = "sampler2D"; }
break;
case 213:
+
+/* Line 1806 of yacc.c */
#line 1457 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2DRect"; ;}
+ { (yyval.identifier) = "sampler2DRect"; }
break;
case 214:
+
+/* Line 1806 of yacc.c */
#line 1458 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler3D"; ;}
+ { (yyval.identifier) = "sampler3D"; }
break;
case 215:
+
+/* Line 1806 of yacc.c */
#line 1459 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "samplerCube"; ;}
+ { (yyval.identifier) = "samplerCube"; }
break;
case 216:
+
+/* Line 1806 of yacc.c */
#line 1460 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "samplerExternalOES"; ;}
+ { (yyval.identifier) = "samplerExternalOES"; }
break;
case 217:
+
+/* Line 1806 of yacc.c */
#line 1461 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler1DShadow"; ;}
+ { (yyval.identifier) = "sampler1DShadow"; }
break;
case 218:
+
+/* Line 1806 of yacc.c */
#line 1462 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2DShadow"; ;}
+ { (yyval.identifier) = "sampler2DShadow"; }
break;
case 219:
+
+/* Line 1806 of yacc.c */
#line 1463 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2DRectShadow"; ;}
+ { (yyval.identifier) = "sampler2DRectShadow"; }
break;
case 220:
+
+/* Line 1806 of yacc.c */
#line 1464 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "samplerCubeShadow"; ;}
+ { (yyval.identifier) = "samplerCubeShadow"; }
break;
case 221:
+
+/* Line 1806 of yacc.c */
#line 1465 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler1DArray"; ;}
+ { (yyval.identifier) = "sampler1DArray"; }
break;
case 222:
+
+/* Line 1806 of yacc.c */
#line 1466 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2DArray"; ;}
+ { (yyval.identifier) = "sampler2DArray"; }
break;
case 223:
+
+/* Line 1806 of yacc.c */
#line 1467 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler1DArrayShadow"; ;}
+ { (yyval.identifier) = "sampler1DArrayShadow"; }
break;
case 224:
+
+/* Line 1806 of yacc.c */
#line 1468 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "sampler2DArrayShadow"; ;}
+ { (yyval.identifier) = "sampler2DArrayShadow"; }
break;
case 225:
+
+/* Line 1806 of yacc.c */
#line 1469 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "samplerBuffer"; ;}
+ { (yyval.identifier) = "samplerBuffer"; }
break;
case 226:
+
+/* Line 1806 of yacc.c */
#line 1470 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler1D"; ;}
+ { (yyval.identifier) = "isampler1D"; }
break;
case 227:
+
+/* Line 1806 of yacc.c */
#line 1471 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler2D"; ;}
+ { (yyval.identifier) = "isampler2D"; }
break;
case 228:
+
+/* Line 1806 of yacc.c */
#line 1472 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler2DRect"; ;}
+ { (yyval.identifier) = "isampler2DRect"; }
break;
case 229:
+
+/* Line 1806 of yacc.c */
#line 1473 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler3D"; ;}
+ { (yyval.identifier) = "isampler3D"; }
break;
case 230:
+
+/* Line 1806 of yacc.c */
#line 1474 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isamplerCube"; ;}
+ { (yyval.identifier) = "isamplerCube"; }
break;
case 231:
+
+/* Line 1806 of yacc.c */
#line 1475 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler1DArray"; ;}
+ { (yyval.identifier) = "isampler1DArray"; }
break;
case 232:
+
+/* Line 1806 of yacc.c */
#line 1476 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isampler2DArray"; ;}
+ { (yyval.identifier) = "isampler2DArray"; }
break;
case 233:
+
+/* Line 1806 of yacc.c */
#line 1477 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "isamplerBuffer"; ;}
+ { (yyval.identifier) = "isamplerBuffer"; }
break;
case 234:
+
+/* Line 1806 of yacc.c */
#line 1478 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler1D"; ;}
+ { (yyval.identifier) = "usampler1D"; }
break;
case 235:
+
+/* Line 1806 of yacc.c */
#line 1479 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler2D"; ;}
+ { (yyval.identifier) = "usampler2D"; }
break;
case 236:
+
+/* Line 1806 of yacc.c */
#line 1480 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler2DRect"; ;}
+ { (yyval.identifier) = "usampler2DRect"; }
break;
case 237:
+
+/* Line 1806 of yacc.c */
#line 1481 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler3D"; ;}
+ { (yyval.identifier) = "usampler3D"; }
break;
case 238:
+
+/* Line 1806 of yacc.c */
#line 1482 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usamplerCube"; ;}
+ { (yyval.identifier) = "usamplerCube"; }
break;
case 239:
+
+/* Line 1806 of yacc.c */
#line 1483 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler1DArray"; ;}
+ { (yyval.identifier) = "usampler1DArray"; }
break;
case 240:
+
+/* Line 1806 of yacc.c */
#line 1484 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usampler2DArray"; ;}
+ { (yyval.identifier) = "usampler2DArray"; }
break;
case 241:
+
+/* Line 1806 of yacc.c */
#line 1485 "src/glsl/glsl_parser.yy"
- { (yyval.identifier) = "usamplerBuffer"; ;}
+ { (yyval.identifier) = "usamplerBuffer"; }
break;
case 242:
+
+/* Line 1806 of yacc.c */
#line 1489 "src/glsl/glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
@@ -4583,10 +4832,12 @@ yyreduce:
state->version_string);
(yyval.n) = ast_precision_high;
- ;}
+ }
break;
case 243:
+
+/* Line 1806 of yacc.c */
#line 1499 "src/glsl/glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
@@ -4597,10 +4848,12 @@ yyreduce:
state->version_string);
(yyval.n) = ast_precision_medium;
- ;}
+ }
break;
case 244:
+
+/* Line 1806 of yacc.c */
#line 1509 "src/glsl/glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
@@ -4611,45 +4864,55 @@ yyreduce:
state->version_string);
(yyval.n) = ast_precision_low;
- ;}
+ }
break;
case 245:
+
+/* Line 1806 of yacc.c */
#line 1523 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].declarator_list));
(yyval.struct_specifier)->set_location(yylloc);
state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type);
- ;}
+ }
break;
case 246:
+
+/* Line 1806 of yacc.c */
#line 1530 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].declarator_list));
(yyval.struct_specifier)->set_location(yylloc);
- ;}
+ }
break;
case 247:
+
+/* Line 1806 of yacc.c */
#line 1539 "src/glsl/glsl_parser.yy"
{
(yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list);
(yyvsp[(1) - (1)].declarator_list)->link.self_link();
- ;}
+ }
break;
case 248:
+
+/* Line 1806 of yacc.c */
#line 1544 "src/glsl/glsl_parser.yy"
{
(yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list);
(yyval.declarator_list)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
- ;}
+ }
break;
case 249:
+
+/* Line 1806 of yacc.c */
#line 1552 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -4661,99 +4924,123 @@ yyreduce:
(yyval.declarator_list)->set_location(yylloc);
(yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link);
- ;}
+ }
break;
case 250:
+
+/* Line 1806 of yacc.c */
#line 1567 "src/glsl/glsl_parser.yy"
{
(yyval.declaration) = (yyvsp[(1) - (1)].declaration);
(yyvsp[(1) - (1)].declaration)->link.self_link();
- ;}
+ }
break;
case 251:
+
+/* Line 1806 of yacc.c */
#line 1572 "src/glsl/glsl_parser.yy"
{
(yyval.declaration) = (yyvsp[(1) - (3)].declaration);
(yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link);
- ;}
+ }
break;
case 252:
+
+/* Line 1806 of yacc.c */
#line 1580 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL);
(yyval.declaration)->set_location(yylloc);
state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(1) - (1)].identifier), ir_var_auto, glsl_precision_undefined));
- ;}
+ }
break;
case 253:
+
+/* Line 1806 of yacc.c */
#line 1587 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL);
(yyval.declaration)->set_location(yylloc);
- ;}
+ }
break;
case 256:
+
+/* Line 1806 of yacc.c */
#line 1605 "src/glsl/glsl_parser.yy"
- { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); }
break;
case 264:
+
+/* Line 1806 of yacc.c */
#line 1620 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
(yyval.compound_statement)->set_location(yylloc);
- ;}
+ }
break;
case 265:
+
+/* Line 1806 of yacc.c */
#line 1626 "src/glsl/glsl_parser.yy"
{
state->symbols->push_scope();
- ;}
+ }
break;
case 266:
+
+/* Line 1806 of yacc.c */
#line 1630 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node));
(yyval.compound_statement)->set_location(yylloc);
state->symbols->pop_scope();
- ;}
+ }
break;
case 267:
+
+/* Line 1806 of yacc.c */
#line 1639 "src/glsl/glsl_parser.yy"
- { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); }
break;
case 269:
+
+/* Line 1806 of yacc.c */
#line 1645 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
(yyval.compound_statement)->set_location(yylloc);
- ;}
+ }
break;
case 270:
+
+/* Line 1806 of yacc.c */
#line 1651 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node));
(yyval.compound_statement)->set_location(yylloc);
- ;}
+ }
break;
case 271:
+
+/* Line 1806 of yacc.c */
#line 1660 "src/glsl/glsl_parser.yy"
{
if ((yyvsp[(1) - (1)].node) == NULL) {
@@ -4763,10 +5050,12 @@ yyreduce:
(yyval.node) = (yyvsp[(1) - (1)].node);
(yyval.node)->link.self_link();
- ;}
+ }
break;
case 272:
+
+/* Line 1806 of yacc.c */
#line 1670 "src/glsl/glsl_parser.yy"
{
if ((yyvsp[(2) - (2)].node) == NULL) {
@@ -4775,60 +5064,74 @@ yyreduce:
}
(yyval.node) = (yyvsp[(1) - (2)].node);
(yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link);
- ;}
+ }
break;
case 273:
+
+/* Line 1806 of yacc.c */
#line 1682 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement(NULL);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 274:
+
+/* Line 1806 of yacc.c */
#line 1688 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 275:
+
+/* Line 1806 of yacc.c */
#line 1697 "src/glsl/glsl_parser.yy"
{
(yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement,
(yyvsp[(5) - (5)].selection_rest_statement).else_statement);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 276:
+
+/* Line 1806 of yacc.c */
#line 1706 "src/glsl/glsl_parser.yy"
{
(yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node);
(yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node);
- ;}
+ }
break;
case 277:
+
+/* Line 1806 of yacc.c */
#line 1711 "src/glsl/glsl_parser.yy"
{
(yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node);
(yyval.selection_rest_statement).else_statement = NULL;
- ;}
+ }
break;
case 278:
+
+/* Line 1806 of yacc.c */
#line 1719 "src/glsl/glsl_parser.yy"
{
(yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
- ;}
+ }
break;
case 279:
+
+/* Line 1806 of yacc.c */
#line 1723 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -4839,50 +5142,62 @@ yyreduce:
declarator->declarations.push_tail(&decl->link);
(yyval.node) = declarator;
- ;}
+ }
break;
case 280:
+
+/* Line 1806 of yacc.c */
#line 1741 "src/glsl/glsl_parser.yy"
{
(yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 281:
+
+/* Line 1806 of yacc.c */
#line 1749 "src/glsl/glsl_parser.yy"
{
(yyval.switch_body) = new(state) ast_switch_body(NULL);
(yyval.switch_body)->set_location(yylloc);
- ;}
+ }
break;
case 282:
+
+/* Line 1806 of yacc.c */
#line 1754 "src/glsl/glsl_parser.yy"
{
(yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list));
(yyval.switch_body)->set_location(yylloc);
- ;}
+ }
break;
case 283:
+
+/* Line 1806 of yacc.c */
#line 1762 "src/glsl/glsl_parser.yy"
{
(yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression));
(yyval.case_label)->set_location(yylloc);
- ;}
+ }
break;
case 284:
+
+/* Line 1806 of yacc.c */
#line 1767 "src/glsl/glsl_parser.yy"
{
(yyval.case_label) = new(state) ast_case_label(NULL);
(yyval.case_label)->set_location(yylloc);
- ;}
+ }
break;
case 285:
+
+/* Line 1806 of yacc.c */
#line 1775 "src/glsl/glsl_parser.yy"
{
ast_case_label_list *labels = new(state) ast_case_label_list();
@@ -4890,18 +5205,22 @@ yyreduce:
labels->labels.push_tail(& (yyvsp[(1) - (1)].case_label)->link);
(yyval.case_label_list) = labels;
(yyval.case_label_list)->set_location(yylloc);
- ;}
+ }
break;
case 286:
+
+/* Line 1806 of yacc.c */
#line 1783 "src/glsl/glsl_parser.yy"
{
(yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list);
(yyval.case_label_list)->labels.push_tail(& (yyvsp[(2) - (2)].case_label)->link);
- ;}
+ }
break;
case 287:
+
+/* Line 1806 of yacc.c */
#line 1791 "src/glsl/glsl_parser.yy"
{
ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list));
@@ -4909,18 +5228,22 @@ yyreduce:
stmts->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link);
(yyval.case_statement) = stmts;
- ;}
+ }
break;
case 288:
+
+/* Line 1806 of yacc.c */
#line 1799 "src/glsl/glsl_parser.yy"
{
(yyval.case_statement) = (yyvsp[(1) - (2)].case_statement);
(yyval.case_statement)->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link);
- ;}
+ }
break;
case 289:
+
+/* Line 1806 of yacc.c */
#line 1807 "src/glsl/glsl_parser.yy"
{
ast_case_statement_list *cases= new(state) ast_case_statement_list();
@@ -4928,136 +5251,170 @@ yyreduce:
cases->cases.push_tail(& (yyvsp[(1) - (1)].case_statement)->link);
(yyval.case_statement_list) = cases;
- ;}
+ }
break;
case 290:
+
+/* Line 1806 of yacc.c */
#line 1815 "src/glsl/glsl_parser.yy"
{
(yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list);
(yyval.case_statement_list)->cases.push_tail(& (yyvsp[(2) - (2)].case_statement)->link);
- ;}
+ }
break;
case 291:
+
+/* Line 1806 of yacc.c */
#line 1823 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while,
NULL, (yyvsp[(3) - (5)].node), NULL, (yyvsp[(5) - (5)].node));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 292:
+
+/* Line 1806 of yacc.c */
#line 1830 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while,
NULL, (yyvsp[(5) - (7)].expression), NULL, (yyvsp[(2) - (7)].node));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 293:
+
+/* Line 1806 of yacc.c */
#line 1837 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for,
(yyvsp[(3) - (6)].node), (yyvsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).rest, (yyvsp[(6) - (6)].node));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 297:
+
+/* Line 1806 of yacc.c */
#line 1853 "src/glsl/glsl_parser.yy"
{
(yyval.node) = NULL;
- ;}
+ }
break;
case 298:
+
+/* Line 1806 of yacc.c */
#line 1860 "src/glsl/glsl_parser.yy"
{
(yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
(yyval.for_rest_statement).rest = NULL;
- ;}
+ }
break;
case 299:
+
+/* Line 1806 of yacc.c */
#line 1865 "src/glsl/glsl_parser.yy"
{
(yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
(yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
- ;}
+ }
break;
case 300:
+
+/* Line 1806 of yacc.c */
#line 1874 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 301:
+
+/* Line 1806 of yacc.c */
#line 1880 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 302:
+
+/* Line 1806 of yacc.c */
#line 1886 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 303:
+
+/* Line 1806 of yacc.c */
#line 1892 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression));
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 304:
+
+/* Line 1806 of yacc.c */
#line 1898 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
(yyval.node)->set_location(yylloc);
- ;}
+ }
break;
case 305:
+
+/* Line 1806 of yacc.c */
#line 1906 "src/glsl/glsl_parser.yy"
- { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;}
+ { (yyval.node) = (yyvsp[(1) - (1)].function_definition); }
break;
case 306:
+
+/* Line 1806 of yacc.c */
#line 1907 "src/glsl/glsl_parser.yy"
- { (yyval.node) = (yyvsp[(1) - (1)].node); ;}
+ { (yyval.node) = (yyvsp[(1) - (1)].node); }
break;
case 307:
+
+/* Line 1806 of yacc.c */
#line 1908 "src/glsl/glsl_parser.yy"
- { (yyval.node) = NULL; ;}
+ { (yyval.node) = NULL; }
break;
case 308:
+
+/* Line 1806 of yacc.c */
#line 1909 "src/glsl/glsl_parser.yy"
- { (yyval.node) = NULL; ;}
+ { (yyval.node) = NULL; }
break;
case 309:
+
+/* Line 1806 of yacc.c */
#line 1914 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -5067,10 +5424,12 @@ yyreduce:
(yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statement);
state->symbols->pop_scope();
- ;}
+ }
break;
case 310:
+
+/* Line 1806 of yacc.c */
#line 1928 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -5086,10 +5445,12 @@ yyreduce:
"#version 140 / GL_ARB_uniform_buffer_object "
"required for defining uniform blocks\n");
}
- ;}
+ }
break;
case 311:
+
+/* Line 1806 of yacc.c */
#line 1944 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -5109,26 +5470,32 @@ yyreduce:
"#version 140 / GL_ARB_uniform_buffer_object "
"required for defining uniform blocks\n");
}
- ;}
+ }
break;
case 312:
+
+/* Line 1806 of yacc.c */
#line 1967 "src/glsl/glsl_parser.yy"
{
(yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list);
(yyvsp[(1) - (1)].declarator_list)->link.self_link();
- ;}
+ }
break;
case 313:
+
+/* Line 1806 of yacc.c */
#line 1972 "src/glsl/glsl_parser.yy"
{
(yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list);
(yyvsp[(2) - (2)].declarator_list)->link.insert_before(& (yyval.declarator_list)->link);
- ;}
+ }
break;
case 316:
+
+/* Line 1806 of yacc.c */
#line 1986 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -5143,10 +5510,12 @@ yyreduce:
(yyval.declarator_list)->ubo_qualifiers_valid = true;
(yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(4) - (5)].declaration)->link);
- ;}
+ }
break;
case 317:
+
+/* Line 1806 of yacc.c */
#line 2001 "src/glsl/glsl_parser.yy"
{
void *ctx = state;
@@ -5160,24 +5529,38 @@ yyreduce:
(yyval.declarator_list)->ubo_qualifiers_valid = true;
(yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(3) - (4)].declaration)->link);
- ;}
+ }
break;
case 318:
+
+/* Line 1806 of yacc.c */
#line 2018 "src/glsl/glsl_parser.yy"
{
if (!state->default_uniform_qualifier->merge_qualifier(& (yylsp[(1) - (3)]), state,
(yyvsp[(1) - (3)].type_qualifier))) {
YYERROR;
}
- ;}
+ }
break;
-/* Line 1267 of yacc.c. */
-#line 5179 "src/glsl/glsl_parser.cpp"
+
+/* Line 1806 of yacc.c */
+#line 5551 "src/glsl/glsl_parser.cpp"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -5206,6 +5589,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -5213,45 +5600,44 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (&yylloc, state, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (&yylloc, state, yymsg);
- }
- else
- {
- yyerror (&yylloc, state, YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (&yylloc, state, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
- yyerror_range[0] = yylloc;
+ yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5268,7 +5654,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5284,7 +5670,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[0] = yylsp[1-yylen];
+ yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -5303,7 +5689,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -5318,7 +5704,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[0] = *yylsp;
+ yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, state);
YYPOPSTACK (1);
@@ -5326,15 +5712,12 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
- yyerror_range[1] = yylloc;
+ yyerror_range[2] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
*++yylsp = yyloc;
/* Shift the error token. */
@@ -5358,7 +5741,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5369,9 +5752,14 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc, state);
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc, state);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h
index 4487551d9..4c9d316b4 100644
--- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h
+++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.5. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -239,213 +237,16 @@
ROW_MAJOR = 455
};
#endif
-/* Tokens. */
-#define ATTRIBUTE 258
-#define CONST_TOK 259
-#define BOOL_TOK 260
-#define FLOAT_TOK 261
-#define INT_TOK 262
-#define UINT_TOK 263
-#define BREAK 264
-#define CONTINUE 265
-#define DO 266
-#define ELSE 267
-#define FOR 268
-#define IF 269
-#define DISCARD 270
-#define RETURN 271
-#define SWITCH 272
-#define CASE 273
-#define DEFAULT 274
-#define BVEC2 275
-#define BVEC3 276
-#define BVEC4 277
-#define IVEC2 278
-#define IVEC3 279
-#define IVEC4 280
-#define UVEC2 281
-#define UVEC3 282
-#define UVEC4 283
-#define VEC2 284
-#define VEC3 285
-#define VEC4 286
-#define CENTROID 287
-#define IN_TOK 288
-#define OUT_TOK 289
-#define INOUT_TOK 290
-#define UNIFORM 291
-#define VARYING 292
-#define NOPERSPECTIVE 293
-#define FLAT 294
-#define SMOOTH 295
-#define MAT2X2 296
-#define MAT2X3 297
-#define MAT2X4 298
-#define MAT3X2 299
-#define MAT3X3 300
-#define MAT3X4 301
-#define MAT4X2 302
-#define MAT4X3 303
-#define MAT4X4 304
-#define SAMPLER1D 305
-#define SAMPLER2D 306
-#define SAMPLER3D 307
-#define SAMPLERCUBE 308
-#define SAMPLER1DSHADOW 309
-#define SAMPLER2DSHADOW 310
-#define SAMPLERCUBESHADOW 311
-#define SAMPLER1DARRAY 312
-#define SAMPLER2DARRAY 313
-#define SAMPLER1DARRAYSHADOW 314
-#define SAMPLER2DARRAYSHADOW 315
-#define ISAMPLER1D 316
-#define ISAMPLER2D 317
-#define ISAMPLER3D 318
-#define ISAMPLERCUBE 319
-#define ISAMPLER1DARRAY 320
-#define ISAMPLER2DARRAY 321
-#define USAMPLER1D 322
-#define USAMPLER2D 323
-#define USAMPLER3D 324
-#define USAMPLERCUBE 325
-#define USAMPLER1DARRAY 326
-#define USAMPLER2DARRAY 327
-#define SAMPLER2DRECT 328
-#define ISAMPLER2DRECT 329
-#define USAMPLER2DRECT 330
-#define SAMPLER2DRECTSHADOW 331
-#define SAMPLERBUFFER 332
-#define ISAMPLERBUFFER 333
-#define USAMPLERBUFFER 334
-#define SAMPLEREXTERNALOES 335
-#define STRUCT 336
-#define VOID_TOK 337
-#define WHILE 338
-#define IDENTIFIER 339
-#define TYPE_IDENTIFIER 340
-#define NEW_IDENTIFIER 341
-#define FLOATCONSTANT 342
-#define INTCONSTANT 343
-#define UINTCONSTANT 344
-#define BOOLCONSTANT 345
-#define FIELD_SELECTION 346
-#define LEFT_OP 347
-#define RIGHT_OP 348
-#define INC_OP 349
-#define DEC_OP 350
-#define LE_OP 351
-#define GE_OP 352
-#define EQ_OP 353
-#define NE_OP 354
-#define AND_OP 355
-#define OR_OP 356
-#define XOR_OP 357
-#define MUL_ASSIGN 358
-#define DIV_ASSIGN 359
-#define ADD_ASSIGN 360
-#define MOD_ASSIGN 361
-#define LEFT_ASSIGN 362
-#define RIGHT_ASSIGN 363
-#define AND_ASSIGN 364
-#define XOR_ASSIGN 365
-#define OR_ASSIGN 366
-#define SUB_ASSIGN 367
-#define INVARIANT 368
-#define LOWP 369
-#define MEDIUMP 370
-#define HIGHP 371
-#define SUPERP 372
-#define PRECISION 373
-#define VERSION_TOK 374
-#define EXTENSION 375
-#define LINE 376
-#define COLON 377
-#define EOL 378
-#define INTERFACE 379
-#define OUTPUT 380
-#define PRAGMA_DEBUG_ON 381
-#define PRAGMA_DEBUG_OFF 382
-#define PRAGMA_OPTIMIZE_ON 383
-#define PRAGMA_OPTIMIZE_OFF 384
-#define PRAGMA_INVARIANT_ALL 385
-#define LAYOUT_TOK 386
-#define ASM 387
-#define CLASS 388
-#define UNION 389
-#define ENUM 390
-#define TYPEDEF 391
-#define TEMPLATE 392
-#define THIS 393
-#define PACKED_TOK 394
-#define GOTO 395
-#define INLINE_TOK 396
-#define NOINLINE 397
-#define VOLATILE 398
-#define PUBLIC_TOK 399
-#define STATIC 400
-#define EXTERN 401
-#define EXTERNAL 402
-#define LONG_TOK 403
-#define SHORT_TOK 404
-#define DOUBLE_TOK 405
-#define HALF 406
-#define FIXED_TOK 407
-#define UNSIGNED 408
-#define INPUT_TOK 409
-#define OUPTUT 410
-#define HVEC2 411
-#define HVEC3 412
-#define HVEC4 413
-#define DVEC2 414
-#define DVEC3 415
-#define DVEC4 416
-#define FVEC2 417
-#define FVEC3 418
-#define FVEC4 419
-#define SAMPLER3DRECT 420
-#define SIZEOF 421
-#define CAST 422
-#define NAMESPACE 423
-#define USING 424
-#define ERROR_TOK 425
-#define COMMON 426
-#define PARTITION 427
-#define ACTIVE 428
-#define FILTER 429
-#define IMAGE1D 430
-#define IMAGE2D 431
-#define IMAGE3D 432
-#define IMAGECUBE 433
-#define IMAGE1DARRAY 434
-#define IMAGE2DARRAY 435
-#define IIMAGE1D 436
-#define IIMAGE2D 437
-#define IIMAGE3D 438
-#define IIMAGECUBE 439
-#define IIMAGE1DARRAY 440
-#define IIMAGE2DARRAY 441
-#define UIMAGE1D 442
-#define UIMAGE2D 443
-#define UIMAGE3D 444
-#define UIMAGECUBE 445
-#define UIMAGE1DARRAY 446
-#define UIMAGE2DARRAY 447
-#define IMAGE1DSHADOW 448
-#define IMAGE2DSHADOW 449
-#define IMAGEBUFFER 450
-#define IIMAGEBUFFER 451
-#define UIMAGEBUFFER 452
-#define IMAGE1DARRAYSHADOW 453
-#define IMAGE2DARRAYSHADOW 454
-#define ROW_MAJOR 455
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 59 "src/glsl/glsl_parser.yy"
{
+
+/* Line 2068 of yacc.c */
+#line 59 "src/glsl/glsl_parser.yy"
+
int n;
float real;
const char *identifier;
@@ -478,13 +279,15 @@ typedef union YYSTYPE
ast_node *then_statement;
ast_node *else_statement;
} selection_rest_statement;
-}
-/* Line 1529 of yacc.c. */
-#line 484 "src/glsl/glsl_parser.h"
- YYSTYPE;
+
+
+
+/* Line 2068 of yacc.c */
+#line 287 "src/glsl/glsl_parser.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -503,3 +306,4 @@ typedef struct YYLTYPE
#endif
+
diff --git a/tools/bin/shaderc b/tools/bin/shaderc
index b88dfaefd..ff997b7a2 100755
Binary files a/tools/bin/shaderc and b/tools/bin/shaderc differ