From 193d7c7054ba7197b0789e14965b739162319b5e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 9 May 2006 06:40:13 +0000 Subject: [PATCH] * data/glr.c: Switch to Bison 2.2 special-exception language in the copyright notice. Use more-regular format for titles and copyright notices. * data/glr.cc: Likewise. * data/location.cc: Likewise. * data/yacc.cc: Likewise. * doc/bison.texinfo (Conditions): Document this. * NEWS: likewise. Upgrade version to 2.2. --- NEWS | 12 ++++++---- data/glr.c | 36 +++++++++++++++++++++++----- data/glr.cc | 17 ++++++++++++-- data/lalr1.cc | 60 +++++++++++++++++++++++++++++++++++++++-------- data/location.cc | 34 +++++++++++++++++++++++---- data/yacc.c | 44 +++++++++++++++++++++++----------- doc/bison.texinfo | 27 ++++++++++----------- 7 files changed, 175 insertions(+), 55 deletions(-) diff --git a/NEWS b/NEWS index 4de67f10..2fd81bf3 100644 --- a/NEWS +++ b/NEWS @@ -1,14 +1,16 @@ Bison News ---------- -Changes in version 2.1b: +Changes in version 2.2, 2006-05-09: + +* The distribution terms for all Bison-generated parsers now permit + using the parsers in nonfree programs. Previously, this permission + was granted only for Bison-generated LALR(1) parsers in C. * %name-prefix changes the namespace name in C++ outputs. * The C++ parsers export their token_type. -Changes in version 2.1a, 2006-02-13: - * Bison now allows multiple %union declarations, and concatenates their contents together. @@ -80,7 +82,7 @@ Changes in version 2.1a, 2006-02-13: fail using `%require "2.1a"'. * DJGPP support added. - + Changes in version 2.1, 2005-09-16: * The C++ lalr1.cc skeleton supports %lex-param. @@ -106,7 +108,7 @@ Changes in version 2.1, 2005-09-16: a syntax error associated with '%token NUM "number"' they might print 'syntax error, unexpected number' instead of 'syntax error, unexpected "number"'. - + Changes in version 2.0, 2004-12-25: * Possibly-incompatible changes diff --git a/data/glr.c b/data/glr.c index 9902b29f..29ea3bc7 100644 --- a/data/glr.c +++ b/data/glr.c @@ -143,10 +143,23 @@ m4_define([b4_rhs_location], m4_changecom() m4_divert(0)dnl @output @output_parser_name@ -b4_copyright([Skeleton parser for GLR parsing with Bison], +b4_copyright([Skeleton implementation for Bison GLR parsers in C], [2002, 2003, 2004, 2005, 2006]) [ -/* This is the parser code for GLR (Generalized LR) parser. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C GLR parser skeleton written by Paul Hilfinger. */ ]b4_identification @@ -2597,10 +2610,21 @@ yypdumpstack (yyGLRStack* yystackp) b4_epilogue m4_if(b4_defines_flag, 0, [], [@output @output_header_name@ -b4_copyright([Skeleton parser for GLR parsing with Bison], - [2002, 2003, 2004, 2005, 2006])[ - -/* C GLR parser skeleton written by Paul Hilfinger. */ +b4_copyright([Skeleton interface for Bison GLR parsers in C], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ ] b4_shared_declarations diff --git a/data/glr.cc b/data/glr.cc index 4507c778..9322cf5e 100644 --- a/data/glr.cc +++ b/data/glr.cc @@ -213,8 +213,21 @@ m4_popdef([b4_parse_param]) @output @output_header_name@ -b4_copyright([C++ Skeleton parser for GLALR(1) parsing with Bison], - [2002, 2003, 2004, 2005, 2006])[ +b4_copyright([Skeleton interface for Bison GLR parsers in C++], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* C++ GLR parser skeleton written by Akim Demaille. */ diff --git a/data/lalr1.cc b/data/lalr1.cc index e4c1e6db..d079933a 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -29,10 +29,23 @@ m4_changecom() m4_divert(0)dnl m4_if(b4_defines_flag, 0, [], [@output @output_header_name@ -b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], - [2002, 2003, 2004, 2005, 2006]) +b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++], + [2002, 2003, 2004, 2005, 2006]) dnl FIXME: This is wrong, we want computed header guards. [ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + /* C++ LALR(1) parser skeleton written by Akim Demaille. */ #ifndef PARSER_HEADER_H @@ -297,8 +310,22 @@ b4_error_verbose_if([, int tok])[); #endif /* ! defined PARSER_HEADER_H */] ])dnl @output @output_parser_name@ -b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], - [2002, 2003, 2004, 2005, 2006]) +b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ +] m4_if(b4_prefix, [yy], [], [ // Take the name prefix into account. @@ -386,14 +413,14 @@ namespace ]b4_namespace[ { std::string yyr = ""; char const *yyp = yystr; - + for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; - + case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; @@ -401,13 +428,13 @@ namespace ]b4_namespace[ default: yyr += *yyp; break; - + case '"': return yyr; } do_not_strip_quotes: ; } - + return yystr; } @@ -1052,8 +1079,21 @@ b4_error_verbose_if([, int tok])[) ]b4_epilogue dnl @output b4_dir_prefix[]stack.hh -b4_copyright([stack handling for Bison C++ parsers], - [2002, 2003, 2004, 2005, 2006])[ +b4_copyright([Stack handling for Bison parsers in C++], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ #ifndef BISON_STACK_HH # define BISON_STACK_HH diff --git a/data/location.cc b/data/location.cc index a3dacac0..6581b384 100644 --- a/data/location.cc +++ b/data/location.cc @@ -23,8 +23,21 @@ m4_divert(-1) m4_changecom() m4_divert(0)dnl @output b4_dir_prefix[]position.hh -b4_copyright([Position class for Bison C++ parsers], - [2002, 2003, 2004, 2005, 2006])[ +b4_copyright([Positions for Bison parsers in C++], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /** ** \file position.hh @@ -135,8 +148,21 @@ namespace ]b4_namespace[ } #endif // not BISON_POSITION_HH] @output b4_dir_prefix[]location.hh -b4_copyright([Location class for Bison C++ parsers], - [2002, 2003, 2004, 2005, 2006])[ +b4_copyright([Locations for Bison parsers in C++], + [2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /** ** \file location.hh diff --git a/data/yacc.c b/data/yacc.c index d62b8b60..ac8e335e 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -135,13 +135,21 @@ m4_define([b4_rhs_location], m4_changecom() m4_divert(0)dnl @output @output_parser_name@ -b4_copyright([Skeleton parser for Yacc-like parsing with Bison], - [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C], + [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006]) +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ @@ -1492,14 +1500,22 @@ yyreturn: b4_epilogue m4_if(b4_defines_flag, 0, [], [@output @output_header_name@ -b4_copyright([Skeleton parser for Yacc-like parsing with Bison], +b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C], [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006]) - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - +[ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ +] b4_token_enums_defines(b4_tokens) #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 9e65195d..a0c9402a 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -356,9 +356,10 @@ This edition corresponds to version @value{VERSION} of Bison. @node Conditions @unnumbered Conditions for Using Bison -As of Bison version 1.24, we have changed the distribution terms for -@code{yyparse} to permit using Bison's output in nonfree programs when -Bison is generating C code for @acronym{LALR}(1) parsers. Formerly, these +The distribution terms for Bison-generated parsers permit using the +parsers in nonfree programs. Before Bison version 2.2, these extra +permissions applied only when Bison was generating @acronym{LALR}(1) +parsers in C@. And before Bison version 1.24, Bison-generated parsers could be used only in programs that were free software. The other @acronym{GNU} programming tools, such as the @acronym{GNU} C @@ -370,10 +371,10 @@ License to all of the Bison source code. The output of the Bison utility---the Bison parser file---contains a verbatim copy of a sizable piece of Bison, which is the code for the -@code{yyparse} function. (The actions from your grammar are inserted -into this function at one point, but the rest of the function is not -changed.) When we applied the @acronym{GPL} terms to the code for -@code{yyparse}, +parser's implementation. (The actions from your grammar are inserted +into this implementation at one point, but most of the rest of the +implementation is not changed.) When we applied the @acronym{GPL} +terms to the skeleton code for the parser's implementation, the effect was to restrict the use of Bison output to free software. We didn't change the terms because of sympathy for people who want to @@ -383,13 +384,11 @@ encourage people to make other software free. So we decided to make the practical conditions for using Bison match the practical conditions for using the other @acronym{GNU} tools. -This exception applies only when Bison is generating C code for an -@acronym{LALR}(1) parser; otherwise, the @acronym{GPL} terms operate -as usual. You can -tell whether the exception applies to your @samp{.c} output file by -inspecting it to see whether it says ``As a special exception, when -this file is copied by Bison into a Bison output file, you may use -that output file without restriction.'' +This exception applies when Bison is generating code for a parser. +You can tell whether the exception applies to a Bison output file by +inspecting the file for text beginning with ``As a special +exception@dots{}''. The text spells out the exact terms of the +exception. @include gpl.texi -- 2.45.2