* 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.
This commit is contained in:
Paul Eggert
2006-05-09 06:40:13 +00:00
parent f5d5ecdfaf
commit 193d7c7054
7 changed files with 172 additions and 52 deletions

12
NEWS
View File

@@ -1,14 +1,16 @@
Bison News 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. * %name-prefix changes the namespace name in C++ outputs.
* The C++ parsers export their token_type. * The C++ parsers export their token_type.
Changes in version 2.1a, 2006-02-13:
* Bison now allows multiple %union declarations, and concatenates * Bison now allows multiple %union declarations, and concatenates
their contents together. their contents together.
@@ -80,7 +82,7 @@ Changes in version 2.1a, 2006-02-13:
fail using `%require "2.1a"'. fail using `%require "2.1a"'.
* DJGPP support added. * DJGPP support added.
Changes in version 2.1, 2005-09-16: Changes in version 2.1, 2005-09-16:
* The C++ lalr1.cc skeleton supports %lex-param. * 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 a syntax error associated with '%token NUM "number"' they might
print 'syntax error, unexpected number' instead of 'syntax error, print 'syntax error, unexpected number' instead of 'syntax error,
unexpected "number"'. unexpected "number"'.
Changes in version 2.0, 2004-12-25: Changes in version 2.0, 2004-12-25:
* Possibly-incompatible changes * Possibly-incompatible changes

View File

@@ -143,10 +143,23 @@ m4_define([b4_rhs_location],
m4_changecom() m4_changecom()
m4_divert(0)dnl m4_divert(0)dnl
@output @output_parser_name@ @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]) [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 ]b4_identification
@@ -2597,10 +2610,21 @@ yypdumpstack (yyGLRStack* yystackp)
b4_epilogue b4_epilogue
m4_if(b4_defines_flag, 0, [], m4_if(b4_defines_flag, 0, [],
[@output @output_header_name@ [@output @output_header_name@
b4_copyright([Skeleton parser for GLR parsing with Bison], b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002, 2003, 2004, 2005, 2006])[ [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.
/* C GLR parser skeleton written by Paul Hilfinger. */ This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
] ]
b4_shared_declarations b4_shared_declarations

View File

@@ -213,8 +213,21 @@ m4_popdef([b4_parse_param])
@output @output_header_name@ @output @output_header_name@
b4_copyright([C++ Skeleton parser for GLALR(1) parsing with Bison], b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002, 2003, 2004, 2005, 2006])[ [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. */ /* C++ GLR parser skeleton written by Akim Demaille. */

View File

@@ -29,10 +29,23 @@ m4_changecom()
m4_divert(0)dnl m4_divert(0)dnl
m4_if(b4_defines_flag, 0, [], m4_if(b4_defines_flag, 0, [],
[@output @output_header_name@ [@output @output_header_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
[2002, 2003, 2004, 2005, 2006]) [2002, 2003, 2004, 2005, 2006])
dnl FIXME: This is wrong, we want computed header guards. 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. */ /* C++ LALR(1) parser skeleton written by Akim Demaille. */
#ifndef PARSER_HEADER_H #ifndef PARSER_HEADER_H
@@ -297,8 +310,22 @@ b4_error_verbose_if([, int tok])[);
#endif /* ! defined PARSER_HEADER_H */] #endif /* ! defined PARSER_HEADER_H */]
])dnl ])dnl
@output @output_parser_name@ @output @output_parser_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison], b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
[2002, 2003, 2004, 2005, 2006]) [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], [], m4_if(b4_prefix, [yy], [],
[ [
// Take the name prefix into account. // Take the name prefix into account.
@@ -1052,8 +1079,21 @@ b4_error_verbose_if([, int tok])[)
]b4_epilogue ]b4_epilogue
dnl dnl
@output b4_dir_prefix[]stack.hh @output b4_dir_prefix[]stack.hh
b4_copyright([stack handling for Bison C++ parsers], b4_copyright([Stack handling for Bison parsers in C++],
[2002, 2003, 2004, 2005, 2006])[ [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 #ifndef BISON_STACK_HH
# define BISON_STACK_HH # define BISON_STACK_HH

View File

@@ -23,8 +23,21 @@ m4_divert(-1)
m4_changecom() m4_changecom()
m4_divert(0)dnl m4_divert(0)dnl
@output b4_dir_prefix[]position.hh @output b4_dir_prefix[]position.hh
b4_copyright([Position class for Bison C++ parsers], b4_copyright([Positions for Bison parsers in C++],
[2002, 2003, 2004, 2005, 2006])[ [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 ** \file position.hh
@@ -135,8 +148,21 @@ namespace ]b4_namespace[
} }
#endif // not BISON_POSITION_HH] #endif // not BISON_POSITION_HH]
@output b4_dir_prefix[]location.hh @output b4_dir_prefix[]location.hh
b4_copyright([Location class for Bison C++ parsers], b4_copyright([Locations for Bison parsers in C++],
[2002, 2003, 2004, 2005, 2006])[ [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 ** \file location.hh

View File

@@ -135,13 +135,21 @@ m4_define([b4_rhs_location],
m4_changecom() m4_changecom()
m4_divert(0)dnl m4_divert(0)dnl
@output @output_parser_name@ @output @output_parser_name@
b4_copyright([Skeleton parser for Yacc-like parsing with Bison], b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[ [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.
/* As a special exception, when this file is copied by Bison into a This special exception was added by the Free Software Foundation in
Bison output file, you may use that output file without restriction. version 2.2 of Bison. */
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by /* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */ simplifying the original so-called "semantic" parser. */
@@ -1492,14 +1500,22 @@ yyreturn:
b4_epilogue b4_epilogue
m4_if(b4_defines_flag, 0, [], m4_if(b4_defines_flag, 0, [],
[@output @output_header_name@ [@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]) [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.
/* As a special exception, when this file is copied by Bison into a This special exception was added by the Free Software Foundation in
Bison output file, you may use that output file without restriction. version 2.2 of Bison. */
This special exception was added by the Free Software Foundation ]
in version 1.24 of Bison. */
b4_token_enums_defines(b4_tokens) b4_token_enums_defines(b4_tokens)
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED

View File

@@ -356,9 +356,10 @@ This edition corresponds to version @value{VERSION} of Bison.
@node Conditions @node Conditions
@unnumbered Conditions for Using Bison @unnumbered Conditions for Using Bison
As of Bison version 1.24, we have changed the distribution terms for The distribution terms for Bison-generated parsers permit using the
@code{yyparse} to permit using Bison's output in nonfree programs when parsers in nonfree programs. Before Bison version 2.2, these extra
Bison is generating C code for @acronym{LALR}(1) parsers. Formerly, these 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. parsers could be used only in programs that were free software.
The other @acronym{GNU} programming tools, such as the @acronym{GNU} C 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 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 verbatim copy of a sizable piece of Bison, which is the code for the
@code{yyparse} function. (The actions from your grammar are inserted parser's implementation. (The actions from your grammar are inserted
into this function at one point, but the rest of the function is not into this implementation at one point, but most of the rest of the
changed.) When we applied the @acronym{GPL} terms to the code for implementation is not changed.) When we applied the @acronym{GPL}
@code{yyparse}, terms to the skeleton code for the parser's implementation,
the effect was to restrict the use of Bison output to free software. 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 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 practical conditions for using Bison match the practical conditions for
using the other @acronym{GNU} tools. using the other @acronym{GNU} tools.
This exception applies only when Bison is generating C code for an This exception applies when Bison is generating code for a parser.
@acronym{LALR}(1) parser; otherwise, the @acronym{GPL} terms operate You can tell whether the exception applies to a Bison output file by
as usual. You can inspecting the file for text beginning with ``As a special
tell whether the exception applies to your @samp{.c} output file by exception@dots{}''. The text spells out the exact terms of the
inspecting it to see whether it says ``As a special exception, when exception.
this file is copied by Bison into a Bison output file, you may use
that output file without restriction.''
@include gpl.texi @include gpl.texi