diff options
author | wiz <wiz> | 2012-07-29 19:25:53 +0000 |
---|---|---|
committer | wiz <wiz> | 2012-07-29 19:25:53 +0000 |
commit | e6712d0e46972ecc5d6c562c790439b89f8e6cd2 (patch) | |
tree | 9f8d3c3c10d84b79cd9ccc1ec5b627d283c9e596 /devel | |
parent | 1ff21907580d6af48c8b1460ce1857e9acc41ba6 (diff) | |
download | pkgsrc-e6712d0e46972ecc5d6c562c790439b89f8e6cd2.tar.gz |
Update to 2.6:
* 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 */
Diffstat (limited to 'devel')
-rw-r--r-- | devel/bison/Makefile | 4 | ||||
-rw-r--r-- | devel/bison/distinfo | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/devel/bison/Makefile b/devel/bison/Makefile index 94b9c5ea821..ecb350c9ec1 100644 --- a/devel/bison/Makefile +++ b/devel/bison/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.83 2012/06/08 07:33:46 obache Exp $ +# $NetBSD: Makefile,v 1.84 2012/07/29 19:25:53 wiz Exp $ -DISTNAME= bison-2.5.1 +DISTNAME= bison-2.6 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=bison/} EXTRACT_SUFX= .tar.xz diff --git a/devel/bison/distinfo b/devel/bison/distinfo index 758558e264e..824451e77cb 100644 --- a/devel/bison/distinfo +++ b/devel/bison/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.30 2012/06/06 07:20:36 wiz Exp $ +$NetBSD: distinfo,v 1.31 2012/07/29 19:25:53 wiz Exp $ -SHA1 (bison-2.5.1.tar.xz) = 4cd881033f4a66cf691462b0f2d8293aa712a781 -RMD160 (bison-2.5.1.tar.xz) = 45c2c6fa232bf9697e73653722d51759f284bbd4 -Size (bison-2.5.1.tar.xz) = 1608376 bytes +SHA1 (bison-2.6.tar.xz) = d2825cc4c5610c13a3035b5b97dcd9bf394c6ff5 +RMD160 (bison-2.6.tar.xz) = a0713e9cbddf856241e809d2a65ef7ee3637ff51 +Size (bison-2.6.tar.xz) = 1639796 bytes SHA1 (patch-doc_Makefile.in) = 11371a773019ada76396d36334abc6c8cac75ec6 SHA1 (patch-lib_isnan.c) = c5d2603447064c95e8bbc75a24c09366b752bad6 SHA1 (patch-src_Makefile.in) = 6baa8ff8b8f4f0aa9c8efee60e172584c68eac7c |