Clean up scanners a bit.

* src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
definitions so gcc won't warn when obstack_for_string is unused.
* src/scan-code.l: config.h and system.h are already #include'd by
scan-code-c.c, so get rid of them here.
* src/scan-gram.l: Likewise.
* src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
definitions rather than duplicating the rest of it.
* src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
This commit is contained in:
Joel E. Denny
2006-08-10 04:53:04 +00:00
parent 06e8700a00
commit f9bfc42aa7
7 changed files with 24 additions and 21 deletions

View File

@@ -24,17 +24,15 @@
%option prefix="code_" outfile="lex.yy.c"
%{
#include <config.h>
#include "system.h"
/* Work around a bug in flex 2.5.31. See Debian bug 333231
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
#undef code_wrap
#define code_wrap() 1
#define FLEX_PREFIX(Id) code_ ## Id
#include "complain.h"
#include "flex-scanner.h"
#include "complain.h"
#include "reader.h"
#include "getargs.h"
#include <assert.h>