mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* 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>.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
# 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);
|
||||
@@ -44,9 +42,13 @@ int FLEX_PREFIX (lex_destroy) (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
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#ifndef LOCATION_H_
|
||||
# define LOCATION_H_
|
||||
|
||||
# include "system.h"
|
||||
# include "uniqstr.h"
|
||||
|
||||
/* A boundary between two characters. */
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#include <config.h>
|
||||
#include "system.h"
|
||||
#include "scan-code.c"
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
%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
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
%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
|
||||
|
||||
Reference in New Issue
Block a user