[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incompatibility between Bison 1.875 and Flex 2.5.25
From: |
Paul Eggert |
Subject: |
Incompatibility between Bison 1.875 and Flex 2.5.25 |
Date: |
Tue, 7 Jan 2003 23:22:54 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> Date: Mon, 06 Jan 2003 09:44:20 +0100
>
> YYLTYPE was a name invented in the Bison world: how can they use it
> without asking us?
I think flex is trying to generate a file that can be used along with
a Bison-generated file. That is, flex is not defining YYLTYPE; it is
merely using "#ifdef YYLTYPE" and assuming that if the type is defined
as a macro, then Bison is generating line number info. This
assumption was incorrect for Bison 1.75b, as it defined YYLTYPE as a
macro even when it was not generating line number information.
But hmm, come to think of it, the assumption is also incorrect for
Bison 1.875. In Bison 1.875, YYLTYPE is a typedef, not a macro: this
is for consistency with YYSTYPE, which POSIX requires to be a typedef.
This change first appeared in Bison 1.75e.
I guess we have to choose between consistency with POSIX and
compatibility with flex 2.5.23 (dated 2002-10-21) through flex 2.5.25
(dated 2002-12-02).
I didn't know that Flex test versions were available. I'll CC: this
message to W. L. Estes, since he is generating those versions.
Perhaps he can suggest a way of fixing flex so that it works with the
new Bison regime, or vice versa. Bison 1.875 does define a macro
YYLTYPE_IS_DECLARED which flex might want to use instead. Or perhaps
we should define a more standard (and documented) macro regime for C
code that needs to know which Bison options were used, and then have
flex use that.