X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e29f0771d7a7a569f830bfe75216e1e0db3362e4..9bcffa0c13d1abee13433f14cdb785cbb960425c:/NEWS diff --git a/NEWS b/NEWS index 9c5d67b7..10829f54 100644 --- a/NEWS +++ b/NEWS @@ -2,17 +2,33 @@ GNU Bison NEWS * Noteworthy changes in release ?.? (????-??-??) [?] -** Future changes: +** 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 supprt ISO C90, and are tested with ISO C99 and ISO C11 + compilers. - The next major release will drop support for generating parsers in K&R C, - and remove the definition of yystype (removal announced since Bison - 1.875). +*** Deprecated features -** The generated header is included (yacc.c) + The definitions of yystype and yyltype will be removed, as announced since + Bison 1.875. Use YYSTYPE and YYLTYPE only. + + YYPARSE_PARAM and YYLEX_PARAM, which were deprecated in favor of + %parse-param and %lex-param (introduced in Bison 1.875), will no longer be + supported. + +*** The generated header will be included (yacc.c) Instead of duplicating the content of the generated header (definition of - YYSTYPE, yyltype etc.), the generated parser now includes it, as was - already the case for GLR or C++ parsers. + 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. ** Headers (yacc.c, glr.c, glr.cc) @@ -1202,6 +1218,33 @@ GNU Bison NEWS - "parsing stack overflow..." -> "parser stack overflow" GLR parsers now report "parser stack overflow" as per the Bison manual. +** %parse-param and %lex-param + The macros YYPARSE_PARAM and YYLEX_PARAM provide a means to pass + additional context to yyparse and yylex. They suffer from several + shortcomings: + + - a single argument only can be added, + - their types are weak (void *), + - this context is not passed to anciliary functions such as yyerror, + - only yacc.c parsers support them. + + The new %parse-param/%lex-param directives provide a more precise control. + For instance: + + %parse-param {int *nastiness} + %lex-param {int *nastiness} + %parse-param {int *randomness} + + results in the following signatures: + + int yylex (int *nastiness); + int yyparse (int *nastiness, int *randomness); + + or, if both %pure-parser and %locations are used: + + int yylex (YYSTYPE *lvalp, YYLTYPE *llocp, int *nastiness); + int yyparse (int *nastiness, int *randomness); + ** Bison now warns if it detects conflicting outputs to the same file, e.g., it generates a warning for "bison -d -o foo.h foo.y" since that command outputs both code and header to foo.h.