mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16: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>
|
2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Get Bison to build again when configured with --enable-gcc-warnings.
|
Get Bison to build again when configured with --enable-gcc-warnings.
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
# error "FLEX_PREFIX not defined"
|
# error "FLEX_PREFIX not defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "system.h"
|
|
||||||
|
|
||||||
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
|
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
|
||||||
int FLEX_PREFIX (get_lineno) (void);
|
int FLEX_PREFIX (get_lineno) (void);
|
||||||
FILE *FLEX_PREFIX (get_in) (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,
|
/* 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
|
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, but rather the token is actually changed in the output.
|
||||||
*/
|
However, this is not true for Flex 2.5.4. */
|
||||||
#define yyleng FLEX_PREFIX (leng)
|
#ifndef yyleng
|
||||||
#define yytext FLEX_PREFIX (text)
|
# 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
|
/* OBSTACK_FOR_STRING -- Used to store all the characters that we need to
|
||||||
keep (to construct ID, STRINGS etc.). Use the following macros to
|
keep (to construct ID, STRINGS etc.). Use the following macros to
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#ifndef LOCATION_H_
|
#ifndef LOCATION_H_
|
||||||
# define LOCATION_H_
|
# define LOCATION_H_
|
||||||
|
|
||||||
# include "system.h"
|
|
||||||
# include "uniqstr.h"
|
# include "uniqstr.h"
|
||||||
|
|
||||||
/* A boundary between two characters. */
|
/* A boundary between two characters. */
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include "system.h"
|
||||||
#include "scan-code.c"
|
#include "scan-code.c"
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
%option prefix="code_" outfile="lex.yy.c"
|
%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
|
/* Work around a bug in flex 2.5.31. See Debian bug 333231
|
||||||
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
||||||
#undef code_wrap
|
#undef code_wrap
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
%option prefix="gram_" outfile="lex.yy.c"
|
%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
|
/* Work around a bug in flex 2.5.31. See Debian bug 333231
|
||||||
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
||||||
#undef gram_wrap
|
#undef gram_wrap
|
||||||
|
|||||||
Reference in New Issue
Block a user