From 21563e5ca4a5ce191f3c2385ad2c7d685fb7a158 Mon Sep 17 00:00:00 2001 From: bgk Date: Tue, 23 Dec 2008 12:27:43 +0000 Subject: [PATCH] Regenerated the lexer using a newer version of flex to fix a warning with GCC 4.3 --- src/sdl/expr-lex.cpp | 54 ++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/src/sdl/expr-lex.cpp b/src/sdl/expr-lex.cpp index e4117185..877072d2 100644 --- a/src/sdl/expr-lex.cpp +++ b/src/sdl/expr-lex.cpp @@ -1,5 +1,6 @@ +#line 2 "expr-lex.cpp" -#line 3 "lex.yy.c" +#line 4 "expr-lex.cpp" #define YY_INT_ALIGNED short int @@ -8,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 34 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -53,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 @@ -84,6 +84,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -178,13 +180,6 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - * Given that the standard has decreed that size_t exists since 1989, - * I guess we can afford to depend on it. Manoj. - */ - #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; @@ -488,7 +483,7 @@ int exprCol; exprCol++;\ result = (c == 0) ? YY_NULL : (buf[0] = c, 1); \ } -#line 492 "lex.yy.c" +#line 487 "expr-lex.cpp" #define INITIAL 0 @@ -506,6 +501,35 @@ int exprCol; static int yy_init_globals (void ); +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +int yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -546,7 +570,7 @@ static int input (void ); /* 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, @@ -557,7 +581,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -642,7 +666,7 @@ YY_DECL #line 33 "expr.l" -#line 646 "lex.yy.c" +#line 670 "expr-lex.cpp" if ( !(yy_init) ) { @@ -790,7 +814,7 @@ YY_RULE_SETUP #line 67 "expr.l" ECHO; YY_BREAK -#line 794 "lex.yy.c" +#line 818 "expr-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate();