mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-15 05:41:59 +00:00
Adjust lex files to work with updated git flex
While my modified version is needed to actually avoid warnings (vs upstream git flex), the files still work with debian's flex (with no warnings). I needed to update (and fix) flex so the lexer line numbers would be correct.
This commit is contained in:
parent
0199c44374
commit
3f61d22e6a
3 changed files with 12 additions and 23 deletions
|
@ -55,8 +55,10 @@
|
|||
#include "QF/cexpr.h"
|
||||
#include "libs/util/cexpr-parse.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
#define YY_NO_UNPUT
|
||||
#define YY_NO_INPUT // debian flex
|
||||
#define YY_NO_UNPUT // debian flex
|
||||
#define YY_NO_YYINPUT
|
||||
#define YY_NO_YYUNPUT
|
||||
|
||||
#define YYSTYPE CEXPR_YYSTYPE
|
||||
#define YY_EXTRA_TYPE exprctx_t *
|
||||
|
|
|
@ -68,7 +68,10 @@
|
|||
# define YY_FLEX_REALLOC_HACK
|
||||
#endif
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
#define YY_NO_INPUT // debian flex
|
||||
#define YY_NO_UNPUT // debian flex
|
||||
#define YY_NO_YYINPUT
|
||||
#define YY_NO_YYUNPUT
|
||||
#define YY_DECL int yylex YY_PROTO(( void ))
|
||||
YY_DECL;
|
||||
|
||||
|
@ -767,12 +770,3 @@ parse_float_vector (const char *token, int width)
|
|||
expr->implicit = !t;
|
||||
return expr;
|
||||
}
|
||||
|
||||
#ifdef YY_FLEX_REALLOC_HACK
|
||||
static __attribute__ ((used)) void *(*const yy_flex_realloc_hack)(void *,yy_size_t) = yy_flex_realloc;
|
||||
#else
|
||||
#ifdef yyunput
|
||||
static __attribute__ ((used)) void (*yyunput_hack)(int, char*) = yyunput;
|
||||
#endif
|
||||
static __attribute__ ((used)) int (*input_hack)(void) = input;
|
||||
#endif
|
||||
|
|
|
@ -53,7 +53,10 @@
|
|||
# define YY_FLEX_REALLOC_HACK
|
||||
#endif
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
#define YY_NO_INPUT // debian flex
|
||||
#define YY_NO_UNPUT // debian flex
|
||||
#define YY_NO_YYINPUT
|
||||
#define YY_NO_YYUNPUT
|
||||
#define YY_DECL int yylex YY_PROTO(( void ))
|
||||
YY_DECL;
|
||||
|
||||
|
@ -299,13 +302,3 @@ convert_relop (const char *relop)
|
|||
}
|
||||
internal_error (0, "bad relop %s", relop);
|
||||
}
|
||||
|
||||
#ifdef YY_FLEX_REALLOC_HACK
|
||||
static __attribute__ ((used)) void *(*const yy_flex_realloc_hack)(void *,yy_size_t) = yy_flex_realloc;
|
||||
#else
|
||||
#ifdef yyunput
|
||||
static __attribute__ ((used)) void (*yyunput_hack)(int, char*) = yyunput;
|
||||
#endif
|
||||
static __attribute__ ((used)) int (*input_hack)(void) = input;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue