X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7aaaad6c6dc0fae412d608dcf20a3977d8902cd1..ccdc1577ef7fb32a5e30cb655337e7cd42b98987:/NEWS?ds=sidebyside diff --git a/NEWS b/NEWS index e1373657..eddfa8ee 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,15 @@ GNU Bison NEWS * Noteworthy changes in release ?.? (????-??-??) [?] -** Warnings about useless semantic types +** Warnings + +*** Warning categories are now displayed in warnings + + For instance: + + foo.y:4.6: warning: type clash on default action: != [-Wother] + +*** Useless semantic types Bison now warns about useless (uninhabited) semantic types. Since semantic types are not declared to Bison (they are defined in the opaque @@ -19,7 +27,7 @@ GNU Bison NEWS 3.28-34: warning: type is used, but is not associated to any symbol 4.28-34: warning: type is used, but is not associated to any symbol -** Warnings about undeclared symbols +*** Undeclared symbols Bison used to raise an error for %printer and %destructor directives for undefined symbols. @@ -31,7 +39,7 @@ GNU Bison NEWS This is now only a warning. -** Warnings about useless destructors or printers +*** Useless destructors or printers Bison now warns about useless destructors or printers. In the following example, the printer for , and the destructor for are @@ -109,7 +117,7 @@ GNU Bison NEWS YYERROR) if the expression evaluates to 0, and are evaluated immediately in GLR parsers, rather than being deferred. The result is that they allow the programmer to prune possible parses based on the values of - runtime expressions. + run-time expressions. * Noteworthy changes in release ?.? (????-??-??) [?] @@ -121,7 +129,7 @@ GNU Bison NEWS *** 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 + generated for C support ISO C90, and are tested with ISO C99 and ISO C11 compilers. *** Features deprecated since Bison 1.875 @@ -148,7 +156,7 @@ GNU Bison NEWS *** Guards (yacc.c, glr.c, glr.cc) The generated headers are now guarded, as is already the case for C++ - parsers (lalr1.cc). For intance, with --defines=foo.h: + parsers (lalr1.cc). For instance, with --defines=foo.h: #ifndef YY_FOO_H # define YY_FOO_H @@ -181,6 +189,69 @@ GNU Bison NEWS 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 FOO %token 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 */ + * Noteworthy changes in release 2.5.1 (2012-06-05) [stable] ** Future changes: @@ -1349,7 +1420,7 @@ GNU Bison NEWS - a single argument only can be added, - their types are weak (void *), - - this context is not passed to anciliary functions such as yyerror, + - this context is not passed to ancillary functions such as yyerror, - only yacc.c parsers support them. The new %parse-param/%lex-param directives provide a more precise control. @@ -1847,9 +1918,12 @@ along with this program. If not, see . LocalWords: struct yystype DJGPP lex param Haible NUM alloca YYSTACK NUL goto LocalWords: YYMAXDEPTH Unescaped UCNs YYLTYPE's yyltype typedefs inline Yaccs LocalWords: Heriyanto Reenable dprec Hilfinger Eggert MYEOF Folle Menezes EOF - LocalWords: Lackovic define's itemset Groff Gettext malloc NEWS'ed YYDEBUG + LocalWords: Lackovic define's itemset Groff Gettext malloc NEWS'ed YYDEBUG YY LocalWords: namespaces strerror const autoconfiguration Dconst Autoconf's FDL - LocalWords: Automake TMPDIR LESSEQ + LocalWords: Automake TMPDIR LESSEQ ylwrap endif yydebug YYTOKEN YYLSP ival hh + LocalWords: extern YYTOKENTYPE TOKENTYPE yytokentype tokentype STYPE lval pdf + LocalWords: lang yyoutput dvi html ps POSIX lvalp llocp Wother nterm arg init + LocalWords: TOK Local Variables: mode: outline