Le 4 nov. 08 à 20:47, Joel E. Denny a écrit :
On Mon, 3 Nov 2008, Sergei Steshenko wrote:
And bison-2.3a does _not_ break the build, i.e. the
'treelang' broken by
bison-2.4, bison-2.3b is not broken by bison-2.3a, but the
Either you did something wrong or something else strange is happening.
2.3a has the same bug as 2.3b and 2.4:
% echo '%% start: {asdf} ;' > tmp.y
% ~/installs/bison/2.3/bin/bison tmp.y && grep asdf tmp.tab.c
{asdf;}
% ~/installs/bison/2.3a/bin/bison tmp.y && grep asdf tmp.tab.c
{asdf}
% ~/installs/bison/2.3b/bin/bison tmp.y && grep asdf tmp.tab.c
{asdf}
% ~/installs/bison/2.4/bin/bison tmp.y && grep asdf tmp.tab.c
{asdf}
As far as I can tell (and according to Bison's source comments), this
strange little feature is undocumented, and I don't know why the gcc
maintainers would depend on it. It's not that hard to type a
semicolon.
In general, I don't understand why people like to make life
complicated by
being so uselessly clever. I guess this feature was originally
introduced
for compatibility with some other implementation of Yacc.
Anyway, I pushed the following to branch-2.4.1 to fix it. I'll push
to
master soon.
The problem with this fix is that it is very "C/C++/Java" based. That
is why is was obsoleted and I believed that Paul had agreed to get rid
of it. I'm obviously wrong.
The day we add support for languages that are not using ; as these
languages do, we'll have problems. If possible, I'd like to add a
warning so that code that lacks this ';' is reported (I don't know yet
how feasible this warning is).