Restore 64-bit support of the GLSL lexer.

TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2260 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 08968f78
...@@ -68,6 +68,7 @@ typedef int16_t flex_int16_t; ...@@ -68,6 +68,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t; typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t; typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t; typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else #else
typedef signed char flex_int8_t; typedef signed char flex_int8_t;
typedef short int flex_int16_t; typedef short int flex_int16_t;
...@@ -191,6 +192,11 @@ typedef void* yyscan_t; ...@@ -191,6 +192,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE; typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif #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_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2 #define EOB_ACT_LAST_MATCH 2
...@@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; ...@@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
*/ */
#define YY_LESS_LINENO(n) \ #define YY_LESS_LINENO(n) \
do { \ do { \
int yyl;\ yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\ for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\ if ( yytext[yyl] == '\n' )\
--yylineno;\ --yylineno;\
...@@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; ...@@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #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 #ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state struct yy_buffer_state
...@@ -248,7 +249,7 @@ struct yy_buffer_state ...@@ -248,7 +249,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB /* Number of characters read into yy_ch_buf, not including EOB
* characters. * characters.
*/ */
int yy_n_chars; yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it, /* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to * and can realloc() it to grow it, and should free() it to
...@@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); ...@@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner ); void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
...@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); ...@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \ yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \ yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \ yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
...@@ -819,8 +820,8 @@ struct yyguts_t ...@@ -819,8 +820,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char; char yy_hold_char;
int yy_n_chars; yy_size_t yy_n_chars;
int yyleng_r; yy_size_t yyleng_r;
char *yy_c_buf_p; char *yy_c_buf_p;
int yy_init; int yy_init;
int yy_start; int yy_start;
...@@ -877,7 +878,7 @@ FILE *yyget_out (yyscan_t yyscanner ); ...@@ -877,7 +878,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner ); void yyset_out (FILE * out_str ,yyscan_t yyscanner );
int yyget_leng (yyscan_t yyscanner ); yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner ); char *yyget_text (yyscan_t yyscanner );
...@@ -944,7 +945,7 @@ static int input (yyscan_t yyscanner ); ...@@ -944,7 +945,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \ { \
int c = '*'; \ int c = '*'; \
int n; \ yy_size_t n; \
for ( n = 0; n < max_size && \ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \ buf[n] = (char) c; \
...@@ -1101,7 +1102,7 @@ yy_find_action: ...@@ -1101,7 +1102,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{ {
int yyl; yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl ) for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' ) if ( yytext[yyl] == '\n' )
...@@ -1902,7 +1903,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1902,7 +1903,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ {
int num_to_read = yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 ) while ( num_to_read <= 0 )
...@@ -1916,7 +1917,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1916,7 +1917,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer ) if ( b->yy_is_our_buffer )
{ {
int new_size = b->yy_buf_size * 2; yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 ) if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8; b->yy_buf_size += b->yy_buf_size / 8;
...@@ -1947,7 +1948,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1947,7 +1948,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */ /* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, (size_t) num_to_read ); yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
} }
...@@ -2072,7 +2073,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -2072,7 +2073,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else else
{ /* need more input */ { /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p; ++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) ) switch ( yy_get_next_buffer( yyscanner ) )
...@@ -2359,7 +2360,7 @@ void yypop_buffer_state (yyscan_t yyscanner) ...@@ -2359,7 +2360,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/ */
static void yyensure_buffer_stack (yyscan_t yyscanner) static void yyensure_buffer_stack (yyscan_t yyscanner)
{ {
int num_to_alloc; yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) { if (!yyg->yy_buffer_stack) {
...@@ -2457,12 +2458,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) ...@@ -2457,12 +2458,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
* @return the newly allocated buffer state object. * @return the newly allocated buffer state object.
*/ */
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{ {
YY_BUFFER_STATE b; YY_BUFFER_STATE b;
char *buf; char *buf;
yy_size_t n; yy_size_t n, i;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */ /* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2; n = _yybytes_len + 2;
...@@ -2572,7 +2572,7 @@ FILE *yyget_out (yyscan_t yyscanner) ...@@ -2572,7 +2572,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token. /** Get the length of the current token.
* @param yyscanner The scanner object. * @param yyscanner The scanner object.
*/ */
int yyget_leng (yyscan_t yyscanner) yy_size_t yyget_leng (yyscan_t yyscanner)
{ {
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng; return yyleng;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment