+2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
+ and yytext if they're already #define'd.
+ * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
+ * src/scan-code-c.c: ... here.
+ * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
+ <config.h>.
+
2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
Get Bison to build again when configured with --enable-gcc-warnings.
# error "FLEX_PREFIX not defined"
#endif
-#include "system.h"
-
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
int FLEX_PREFIX (get_lineno) (void);
FILE *FLEX_PREFIX (get_in) (void);
/* It seems to be a nice "feature" of Flex that one cannot use yytext,
yyleng etc. when a prefix is given, since there is no longer a
#define, but rather the token is actually changed in the output.
- */
-#define yyleng FLEX_PREFIX (leng)
-#define yytext FLEX_PREFIX (text)
+ However, this is not true for Flex 2.5.4. */
+#ifndef yyleng
+# define yyleng FLEX_PREFIX (leng)
+#endif
+#ifndef yytext
+# define yytext FLEX_PREFIX (text) */
+#endif
/* OBSTACK_FOR_STRING -- Used to store all the characters that we need to
keep (to construct ID, STRINGS etc.). Use the following macros to
%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
%option prefix="gram_" 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 gram_wrap