bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: append-semicolon-to-action backward compatibility patch


From: Akim Demaille
Subject: Re: append-semicolon-to-action backward compatibility patch
Date: Wed, 08 Jan 2003 09:43:19 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

 >> From: Akim Demaille <address@hidden>
 >> Date: Sun, 05 Jan 2003 14:19:40 +0100
 >> 
 >> Bison should never have accepted such inputs,

 Paul> You might have to take that up with RMS; I suspect that he put that
 Paul> feature in.  (I wouldn't have done it myself....)

I'm not sure this was intentional, to me it looked very much like an
unexpected ``feature''.

 >> This change is very much C oriented,

 Paul> Absolutely.  The change should be done only for C-like languages.

It is also dangerous for C itself, as you have discovered for %union.
We can fall onto it at other places.

 >> Having people fix their grammars is saner, imho.

 Paul> Perhaps; but Bison 1.50 and 1.75 have developed a reputation for
 Paul> breaking grammars that worked perfectly well with earlier versions of
 Paul> Bison.  

I'm afraid that the back and forth might be even worse, sending as
message that we don't know what we want.  As a user, I can understand
that something that used to work by accident now triggers explicit
errors.  That's what I expect from better compilers.  Making a
stricter Bison also helps in getting more robust and portable
grammars.  Today, someone could write a Yacc grammar, use bison on it,
and have it work.  Then she passes her file to someone willing to use
yacc, and boom, it fails for these `;'.  Of course the original user
could have used bison -y, but, heck, what stupid file name that
creates!

 Paul> I don't want people to have excuses to stick with old versions.
 Paul> Admittedly it is a judgment call, but this change is a pure
 Paul> extension to POSIX and is perfectly safe, as far as I can tell.

The ratio betwen costs and benefits seem quite high to me.  There is
no real added value.

 Paul> I have started to prepare a patch for a --pedantic option to
 Paul> Bison, which will catch the use of extensions like this.  I
 Paul> think it should wait until after Bison 2.0 is out, though.

I have had similar plans for months too.  But I'm willing to go onto
something like --warnings/$WARNINGS in Autoconf and Automake.  We have
the support lib in Perl, we need to implement it in C, then many
project would benefit from such a thing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]