[Top][All Lists]

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

Re: Bison Skeleton: irksome GPL license.

From: Hans Åberg
Subject: Re: Bison Skeleton: irksome GPL license.
Date: Wed, 18 Apr 2018 10:36:08 +0200

> On 18 Apr 2018, at 02:16, Kaz Kylheku <address@hidden> wrote:
> On 2018-04-16 13:27, Hans Åberg wrote:
>>> On 16 Apr 2018, at 22:01, Kaz Kylheku <address@hidden> wrote:
>>> When Bison turns a .y file into a y.tab.c, it removes any license
>>> header from the .y file, and asserts its own license over the file
>>> (which comes from the parser skeleton).
>>> *Replacing* the copyright notice to assert another one isn't appropriate,
>>> though.
>> Indeed, different copyrights may apply to different parts, but it may
>> not be necessary to put it in generated files. But as a workaround,
>> you might put it as a comment in the %code section.
> %code is Bison specific; however, simply moving the comment into the regular
> %{ ... %} block allows it to pass into the output.

So you probably use the Yacc compatibility mode. For say the C++ parser, there 
would be more locations.

> (Side note: this is a different behavior from GNU Flex, which passes through
> the comment even if is outside of the %{ ... %} block).

No, it doesn't, not in my code. In some circumstances, one might leave out 
those braces, and then it would be included because considered within, I think. 
Otherwise, Flex is not GNU, but BSD.

> That little GNU license blurb is still a problem there. A pre-built y.tab.c
> file could end up being packaged as a distributed file: say, for the
> convenience of users who don't have a Yacc installed.

The license applies to stuff in the skeleton M4 file that is copied over, so it 
should be there.

> Someone's corporate license scanning tool could misidentify that file
> as being GPL, and taint the whole project that way, causing some
> problem for someone.

It is judicial courts that decide, and they are still run by humans.

> What I've done is added a sed filter to my build rule which basically
> takes that notice out of the y.tab.c right after the file is
> generated.

That wouldn't be legal: your copyright does not override the one for the 
skeleton file contents.

> The output of Berkeley Yacc has no such thing in it, luckily.
> The word "Copyright" is not to be found at all, unless it came
> from the .y file, as it should be.

Neither copyright notices nor registration are required in a number of 
legislations, for example the US, but not all. So it may be a good idea to 
still have it.

reply via email to

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