michael@0: --- a/src/compiler/glslang_lex.cpp michael@0: +++ b/src/compiler/glslang_lex.cpp michael@0: @@ -68,6 +68,7 @@ typedef int16_t flex_int16_t; michael@0: typedef uint16_t flex_uint16_t; michael@0: typedef int32_t flex_int32_t; michael@0: typedef uint32_t flex_uint32_t; michael@0: +typedef uint64_t flex_uint64_t; michael@0: #else michael@0: typedef signed char flex_int8_t; michael@0: typedef short int flex_int16_t; michael@0: @@ -191,6 +192,11 @@ typedef void* yyscan_t; michael@0: typedef struct yy_buffer_state *YY_BUFFER_STATE; michael@0: #endif michael@0: michael@0: +#ifndef YY_TYPEDEF_YY_SIZE_T michael@0: +#define YY_TYPEDEF_YY_SIZE_T michael@0: +typedef size_t yy_size_t; michael@0: +#endif michael@0: + michael@0: #define EOB_ACT_CONTINUE_SCAN 0 michael@0: #define EOB_ACT_END_OF_FILE 1 michael@0: #define EOB_ACT_LAST_MATCH 2 michael@0: @@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; michael@0: */ michael@0: #define YY_LESS_LINENO(n) \ michael@0: do { \ michael@0: - int yyl;\ michael@0: + yy_size_t yyl;\ michael@0: for ( yyl = n; yyl < yyleng; ++yyl )\ michael@0: if ( yytext[yyl] == '\n' )\ michael@0: --yylineno;\ michael@0: @@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; michael@0: michael@0: #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) michael@0: michael@0: -#ifndef YY_TYPEDEF_YY_SIZE_T michael@0: -#define YY_TYPEDEF_YY_SIZE_T michael@0: -typedef size_t yy_size_t; michael@0: -#endif michael@0: - michael@0: #ifndef YY_STRUCT_YY_BUFFER_STATE michael@0: #define YY_STRUCT_YY_BUFFER_STATE michael@0: struct yy_buffer_state michael@0: @@ -248,7 +249,7 @@ struct yy_buffer_state michael@0: /* Number of characters read into yy_ch_buf, not including EOB michael@0: * characters. michael@0: */ michael@0: - int yy_n_chars; michael@0: + yy_size_t yy_n_chars; michael@0: michael@0: /* Whether we "own" the buffer - i.e., we know we created it, michael@0: * and can realloc() it to grow it, and should free() it to michael@0: @@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); michael@0: michael@0: YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); michael@0: YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); michael@0: -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); michael@0: +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); michael@0: michael@0: void *yyalloc (yy_size_t ,yyscan_t yyscanner ); michael@0: void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); michael@0: @@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); michael@0: */ michael@0: #define YY_DO_BEFORE_ACTION \ michael@0: yyg->yytext_ptr = yy_bp; \ michael@0: - yyleng = (size_t) (yy_cp - yy_bp); \ michael@0: + yyleng = (yy_size_t) (yy_cp - yy_bp); \ michael@0: yyg->yy_hold_char = *yy_cp; \ michael@0: *yy_cp = '\0'; \ michael@0: yyg->yy_c_buf_p = yy_cp; michael@0: @@ -1035,8 +1036,8 @@ struct yyguts_t michael@0: size_t yy_buffer_stack_max; /**< capacity of stack. */ michael@0: YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ michael@0: char yy_hold_char; michael@0: - int yy_n_chars; michael@0: - int yyleng_r; michael@0: + yy_size_t yy_n_chars; michael@0: + yy_size_t yyleng_r; michael@0: char *yy_c_buf_p; michael@0: int yy_init; michael@0: int yy_start; michael@0: @@ -1089,7 +1090,7 @@ FILE *yyget_out (yyscan_t yyscanner ); michael@0: michael@0: void yyset_out (FILE * out_str ,yyscan_t yyscanner ); michael@0: michael@0: -int yyget_leng (yyscan_t yyscanner ); michael@0: +yy_size_t yyget_leng (yyscan_t yyscanner ); michael@0: michael@0: char *yyget_text (yyscan_t yyscanner ); michael@0: michael@0: @@ -1158,7 +1159,7 @@ static int input (yyscan_t yyscanner ); michael@0: if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ michael@0: { \ michael@0: int c = '*'; \ michael@0: - int n; \ michael@0: + yy_size_t n; \ michael@0: for ( n = 0; n < max_size && \ michael@0: (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ michael@0: buf[n] = (char) c; \ michael@0: @@ -1317,7 +1318,7 @@ yy_find_action: michael@0: michael@0: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) michael@0: { michael@0: - int yyl; michael@0: + yy_size_t yyl; michael@0: for ( yyl = 0; yyl < yyleng; ++yyl ) michael@0: if ( yytext[yyl] == '\n' ) michael@0: michael@0: @@ -2203,7 +2204,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) michael@0: michael@0: else michael@0: { michael@0: - int num_to_read = michael@0: + yy_size_t num_to_read = michael@0: YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; michael@0: michael@0: while ( num_to_read <= 0 ) michael@0: @@ -2217,7 +2218,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) michael@0: michael@0: if ( b->yy_is_our_buffer ) michael@0: { michael@0: - int new_size = b->yy_buf_size * 2; michael@0: + yy_size_t new_size = b->yy_buf_size * 2; michael@0: michael@0: if ( new_size <= 0 ) michael@0: b->yy_buf_size += b->yy_buf_size / 8; michael@0: @@ -2248,7 +2249,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) michael@0: michael@0: /* Read in more data. */ michael@0: YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), michael@0: - yyg->yy_n_chars, (size_t) num_to_read ); michael@0: + yyg->yy_n_chars, num_to_read ); michael@0: michael@0: YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; michael@0: } michael@0: @@ -2373,7 +2374,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) michael@0: michael@0: else michael@0: { /* need more input */ michael@0: - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; michael@0: + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; michael@0: ++yyg->yy_c_buf_p; michael@0: michael@0: switch ( yy_get_next_buffer( yyscanner ) ) michael@0: @@ -2660,7 +2661,7 @@ void yypop_buffer_state (yyscan_t yyscanner) michael@0: */ michael@0: static void yyensure_buffer_stack (yyscan_t yyscanner) michael@0: { michael@0: - int num_to_alloc; michael@0: + yy_size_t num_to_alloc; michael@0: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; michael@0: michael@0: if (!yyg->yy_buffer_stack) { michael@0: @@ -2758,12 +2759,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) michael@0: * @param yyscanner The scanner object. michael@0: * @return the newly allocated buffer state object. michael@0: */ michael@0: -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) michael@0: +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) michael@0: { michael@0: YY_BUFFER_STATE b; michael@0: char *buf; michael@0: - yy_size_t n; michael@0: - int i; michael@0: + yy_size_t n, i; michael@0: michael@0: /* Get memory for full buffer, including space for trailing EOB's. */ michael@0: n = _yybytes_len + 2; michael@0: @@ -2913,7 +2913,7 @@ FILE *yyget_out (yyscan_t yyscanner) michael@0: /** Get the length of the current token. michael@0: * @param yyscanner The scanner object. michael@0: */ michael@0: -int yyget_leng (yyscan_t yyscanner) michael@0: +yy_size_t yyget_leng (yyscan_t yyscanner) michael@0: { michael@0: struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; michael@0: return yyleng;