X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/ada81cd69cc17de9e0f15214782c8067436c5354..308dc7bdfb924370cfd205f656eb0e83191d01a9:/src/lexer.l diff --git a/src/lexer.l b/src/lexer.l index e70d3a2..56f86ad 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -21,9 +21,10 @@ %{ #include "config.h" -#include +#include #include #include +#include #include "treefuncs.h" #include "parse.h" @@ -31,7 +32,13 @@ #include "util.h" static int parenth_depth = 0; -static int before_comment = INITIAL; +static int before_comment +/* New flex is on drugs */ +#if defined(FLEX_SCANNER) && ! defined(INITIAL) + = 0; +#else + = INITIAL; +#endif static gboolean class_after_c = FALSE; static int code_type = CCODE; static int before_string; @@ -593,14 +600,3 @@ flags { return FLAGS; } <*>[\n\r] ; /*ignore*/ %% - -/* Ugly warning avoiding */ -#ifdef FLEX_SCANNER -static void warning_avoider(void) G_GNUC_UNUSED; -static void warning_avoider(void) { - yy_flex_realloc(NULL, 0); - yyunput(0, NULL); - warning_avoider(); -} -#endif -