Updated generated source files.

This commit is contained in:
bkaradzic 2013-03-19 21:58:26 -07:00
parent 5682b469de
commit 1648c34b84
9 changed files with 2034 additions and 1621 deletions

0
3rdparty/glsl-optimizer/autogen.sh vendored Normal file → Executable file
View File

0
3rdparty/glsl-optimizer/generateParsers.sh vendored Normal file → Executable file
View File

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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 <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@ -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

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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 <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@ -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

Binary file not shown.