[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reentrant flex, bison glue
From: |
Akim Demaille |
Subject: |
Re: reentrant flex, bison glue |
Date: |
18 Mar 2002 11:04:31 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
| > I'm very worried when I see two packages having an increased
| > impedance.
|
| I've only done what was ALREADY IN BISON! Below is code from bison,
| followed by code from flex:
Maybe you'll think I'm dishonest in the following sentence, but...
I don't see where Bison mentions Flex and binds the Flex community
with the following prototypes.
| /***** GENERATED BY BISON *****/
| /* Automatic implicit declaration of yylex. [Comment added by millaway] */
| #ifndef YYPURE
| #define YYLEX yylex()
| #endif
| #ifdef YYPURE
| #ifdef YYLSP_NEEDED
| #ifdef YYLEX_PARAM
| #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
| #else
| #define YYLEX yylex(&yylval, &yylloc)
| #endif
| #else /* not YYLSP_NEEDED */
| #ifdef YYLEX_PARAM
| #define YYLEX yylex(&yylval, YYLEX_PARAM)
| #else
| #define YYLEX yylex(&yylval)
| #endif
| #endif /* not YYLSP_NEEDED */
| #endif
|
|
| /**** GENERATED BY FLEX *****/
| /* Automatic explicit declaration of yylex. */
| #ifdef YY_REENTRANT_BISON_PURE
| # ifdef YYLTYPE
| # ifdef YY_USE_PROTOS
| # define YY_LEX_ARGS (YYSTYPE * yylvalp, YYLTYPE * yyllocp YY_LAST_ARG)
| # else
| # define YY_LEX_ARGS (yylvalp, yyllocp YY_LAST_ARG) \
| YYSTYPE * yylvalp; YYLTYPE * yyllocp; YY_DECL_LAST_ARG
| # endif
| # else
| # ifdef YY_USE_PROTOS
| # define YY_LEX_ARGS (YYSTYPE * yylvalp YY_LAST_ARG)
| # else
| # define YY_LEX_ARGS (yylvalp YY_LAST_ARG) \
| YYSTYPE * yylvalp; YY_DECL_LAST_ARG
| # endif
| # endif
| #else
| # ifdef YY_USE_PROTOS
| # define YY_LEX_ARGS (YY_ONLY_ARG)
| # else
| # define YY_LEX_ARGS (YY_ONLY_ARG) YY_DECL_LAST_ARG
| # endif
| #endif
| extern int yylex YY_PROTO( YY_LEX_ARGS );
I'm happy to see that. How about this alternative implementation:
Flex does need make an hypothesis on Bison. But Flex
documents the macro YY_LEX_ARGS and Bison defines it in the
header file.
It seems to me that this is saner. What do you think? This way it is
not named `Bison' or whatever in the Flex' option, and if something
changes in Bison, then we can handle by ourselves the compatibility?
And Flex does not have this big chunk.
- Re: reentrant flex, bison glue, (continued)
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/11
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/11
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/12
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/12
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/12
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/13
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/13
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/13
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/14
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/14
- Re: reentrant flex, bison glue,
Akim Demaille <=
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/18
- Re: reentrant flex, bison glue, Akim Demaille, 2002/03/18
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/18
- Re: reentrant flex, bison glue, John W. Millaway, 2002/03/18