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: Paul Eggert
Subject: Re: append-semicolon-to-action backward compatibility patch
Date: Thu, 9 Jan 2003 00:06:29 -0800 (PST)

> From: Akim Demaille <address@hidden>
> Date: Wed, 08 Jan 2003 09:43:19 +0100

> It is also dangerous for C itself, as you have discovered for %union.

Sorry, I don't follow this point.  How can inserting an extra
semicolon cause harm?  How is %union relevant here?

> As a user, I can understand that something that used to work by
> accident now triggers explicit errors.

Users like you we don't have to worry about.  :-)

What I'm more worried about is users who say "It works with Bison
1.35, it doesn't work with newer Bisons, so I'll keep using the older
Bison.  I don't have time to futz with getting grammar fixes
propagated upstream."  At least one Debian maintainer took this
approach, if memory serves.  And he had a point.

> Making a stricter Bison also helps in getting
> more robust and portable grammars.

True, but the first goal in Bison is not to build robust and portable
grammars.  It is to encourage the use of free software.  We shouldn't
discourage the use of Bison compared to Yacc, unless there is an
important technical reason to do so.  I don't see how this relatively
minor issue qualifies.


> 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 `;'.

True.  But that's also true for other Bison extensions.  I don't see
this as an argument against this particular extension.


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

The only added value is compatibility with older Bison versions.
But this is a real added value; it should not be underestimated.
And the cost is quite small, as far as I can see.


>  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.

Sorry, I don't follow this.  I don't know what --warnings is, or why
Automake's warnings are relevant to Bison's warnings.




reply via email to

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