X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/96e3b08533ea7fc6bd4b4de58849da0dec72411c..308dc7bdfb924370cfd205f656eb0e83191d01a9:/src/lexer.l diff --git a/src/lexer.l b/src/lexer.l index b25574b..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; @@ -230,7 +237,7 @@ REJECT; BEGIN(CLASS_CODE_I); add_gtk_doc_func(); } -^[ \t]*\*\ { +^[ \t]*\*[ \t] { fflush(stdout); add_to_cbuf(" * "); BEGIN(GTK_DOC_LINE); @@ -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 -