Bison - News
bison-2.6 released [stable]
Item posted by Akim Demaille <akim> on Thu 19 Jul 2012 02:39:36 PM UTC.
Bison 2.6 is born, the parents are well, and happy.
In this release, a special emphasis was put on producing more
complete, and more usable, parser headers.
Here are the compressed sources:
ftp://ftp.gnu.org/gnu/bison/bison-2.6.tar.gz (2.9MB)
ftp://ftp.gnu.org/gnu/bison/bison-2.6.tar.xz (1.6MB)
Here are the GPG detached signatures[*]:
ftp://ftp.gnu.org/gnu/bison/bison-2.6.tar.gz.sig
ftp://ftp.gnu.org/gnu/bison/bison-2.6.tar.xz.sig
Use a mirror for higher download bandwidth:
http://www.gnu.org/order/ftp.html
[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact. First, be sure to download both the .sig file
and the corresponding tarball. Then, run a command like this:
gpg --verify bison-2.6.tar.gz.sig
If that command fails because you don't have the required public key,
then run this command to import it:
gpg --keyserver keys.gnupg.net --recv-keys 0DDCAA3278D5264E
and rerun the 'gpg --verify' command.
This release was bootstrapped with the following tools:
Autoconf 2.69
Automake 1.12.2
Flex 2.5.35
Gettext 0.18.1
Gnulib v0.0-7534-gcabce6b
NEWS
* Noteworthy changes in release 2.6 (2012-07-19) [stable]
** Future Changes
The next major release of Bison will drop support for the following
deprecated features. Please report disagreements to bug-bison@gnu.org.
*** K&C parsers
Support for generating parsers in K&R C will be removed. Parsers
generated for C support ISO C90, and are tested with ISO C99 and ISO C11
compilers.
*** Features deprecated since Bison 1.875
The definitions of yystype and yyltype will be removed; use YYSTYPE and
YYLTYPE.
YYPARSE_PARAM and YYLEX_PARAM, deprecated in favor of %parse-param and
%lex-param, will no longer be supported.
Support for the preprocessor symbol YYERROR_VERBOSE will be removed, use
%error-verbose.
*** The generated header will be included (yacc.c)
Instead of duplicating the content of the generated header (definition of
YYSTYPE, yyparse declaration etc.), the generated parser will include it,
as is already the case for GLR or C++ parsers. This change is deferred
because existing versions of ylwrap (e.g., Automake 1.12.1) do not support
it.
** Generated Parser Headers
*** Guards (yacc.c, glr.c, glr.cc)
The generated headers are now guarded, as is already the case for C++
parsers (lalr1.cc). For instance, with --defines=foo.h:
#ifndef YY_FOO_H
# define YY_FOO_H
...
#endif /* !YY_FOO_H */
*** New declarations (yacc.c, glr.c)
The generated header now declares yydebug and yyparse. Both honor
--name-prefix=bar_, and yield
int bar_parse (void);
rather than
#define yyparse bar_parse
int yyparse (void);
in order to facilitate the inclusion of several parser headers inside a
single compilation unit.
*** Exported symbols in C++
The symbols YYTOKEN_TABLE and YYERROR_VERBOSE, which were defined in the
header, are removed, as they prevent the possibility of including several
generated headers from a single compilation unit.
*** YYLSP_NEEDED
For the same reasons, the undocumented and unused macro YYLSP_NEEDED is no
longer defined.
** New %define variable: api.prefix
Now that the generated headers are more complete and properly protected
against multiple inclusions, constant names, such as YYSTYPE are a
problem. While yyparse and others are properly renamed by %name-prefix,
YYSTYPE, YYDEBUG and others have never been affected by it. Because it
would introduce backward compatibility issues in projects not expecting
YYSTYPE to be renamed, instead of changing the behavior of %name-prefix,
it is deprecated in favor of a new %define variable: api.prefix.
The following examples compares both:
%name-prefix "bar_" | %define api.prefix "bar_"
%token <ival> FOO %token <ival> FOO
%union { int ival; } %union { int ival; }
%% %%
exp: 'a'; exp: 'a';
bison generates:
#ifndef BAR_FOO_H #ifndef BAR_FOO_H
# define BAR_FOO_H # define BAR_FOO_H
/* Enabling traces. */ /* Enabling traces. */
# ifndef YYDEBUG | # ifndef BAR_DEBUG
> # if defined YYDEBUG
> # if YYDEBUG
> # define BAR_DEBUG 1
> # else
> # define BAR_DEBUG 0
> # endif
> # else
# define YYDEBUG 0 | # define BAR_DEBUG 0
> # endif
# endif | # endif
# if YYDEBUG | # if BAR_DEBUG
extern int bar_debug; extern int bar_debug;
# endif # endif
/* Tokens. */ /* Tokens. */
# ifndef YYTOKENTYPE | # ifndef BAR_TOKENTYPE
# define YYTOKENTYPE | # define BAR_TOKENTYPE
enum yytokentype { | enum bar_tokentype {
FOO = 258 FOO = 258
}; };
# endif # endif
#if ! defined YYSTYPE \ | #if ! defined BAR_STYPE \
&& ! defined YYSTYPE_IS_DECLARED | && ! defined BAR_STYPE_IS_DECLARED
typedef union YYSTYPE | typedef union BAR_STYPE
{ {
int ival; int ival;
} YYSTYPE; | } BAR_STYPE;
# define YYSTYPE_IS_DECLARED 1 | # define BAR_STYPE_IS_DECLARED 1
#endif #endif
extern YYSTYPE bar_lval; | extern BAR_STYPE bar_lval;
int bar_parse (void); int bar_parse (void);
#endif /* !BAR_FOO_H */ #endif /* !BAR_FOO_H */
Powered by Savane 3.14-8aba.
Corresponding source code