Changes in version 2.1, 2005-09-16:
* Bison-generated parsers now support the translation of diagnostics like
"syntax error" into languages other than English. The default
language is still English. For details, please see the new
Internationalization section of the Bison manual. Software
distributors should also see the new PACKAGING file. Thanks to
Bruno Haible for this new feature.
* Wording in the Bison-generated parsers has been changed slightly to
simplify translation. In particular, the message "memory exhausted"
has replaced "parser stack overflow", as the old message was not
always accurate for modern Bison-generated parsers.
* Destructors are now called when the parser aborts, for all symbols left
behind on the stack. Also, the start symbol is now destroyed after a
successful parse. In both cases, the behavior was formerly inconsistent.
* When generating verbose diagnostics, Bison-generated parsers no longer
quote the literal strings associated with tokens. For example, for
a syntax error associated with '%token NUM "number"' they might
print 'syntax error, unexpected number' instead of 'syntax error,
unexpected "number"'.
run-time dependency (DEPENDS) on a tool is to append a ":run" modifier
to the tool name, e.g.,
USE_TOOLS+= perl:run
Tools without modifiers or with an explicit ":build" modifier will
cause build dependencies (BUILD_DEPENDS) on those tools to be added.
This makes the notation a bit more compact.
Changes in version 2.0, 2004-12-25:
* Possibly-incompatible changes
- Bison-generated parsers no longer default to using the alloca function
(when available) to extend the parser stack, due to widespread
problems in unchecked stack-overflow detection. You can "#define
YYSTACK_USE_ALLOCA 1" to require the use of alloca, but please read
the manual to determine safe values for YYMAXDEPTH in that case.
- Error token location.
During error recovery, the location of the syntax error is updated
to cover the whole sequence covered by the error token: it includes
the shifted symbols thrown away during the first part of the error
recovery, and the lookahead rejected during the second part.
- Semicolon changes:
. Stray semicolons are no longer allowed at the start of a grammar.
. Semicolons are now required after in-grammar declarations.
- Unescaped newlines are no longer allowed in character constants or
string literals. They were never portable, and GCC 3.4.0 has
dropped support for them. Better diagnostics are now generated if
forget a closing quote.
- NUL bytes are no longer allowed in Bison string literals, unfortunately.
* New features
- GLR grammars now support locations.
- New directive: %initial-action.
This directive allows the user to run arbitrary code (including
initializing @$) from yyparse before parsing starts.
- A new directive "%expect-rr N" specifies the expected number of
reduce/reduce conflicts in GLR parsers.
- %token numbers can now be hexadecimal integers, e.g., `%token FOO 0x12d'.
This is a GNU extension.
- The option `--report=lookahead' was changed to `--report=look-ahead'.
The old spelling still works, but is not documented and will be
removed.
- Experimental %destructor support has been added to lalr1.cc.
- New configure option --disable-yacc, to disable installation of the
yacc command and -ly library introduced in 1.875 for POSIX conformance.
* Bug fixes
- For now, %expect-count violations are now just warnings, not errors.
This is for compatibility with Bison 1.75 and earlier (when there are
reduce/reduce conflicts) and with Bison 1.30 and earlier (when there
are too many or too few shift/reduce conflicts). However, in future
versions of Bison we plan to improve the %expect machinery so that
these violations will become errors again.
- Within Bison itself, numbers (e.g., goto numbers) are no longer
arbitrarily limited to 16-bit counts.
- Semicolons are now allowed before "|" in grammar rules, as POSIX requires.
quotearg_buffer_restyled(). Google suggests this function has issues
with other non-gcc compilers using optimisation as well.
Notable fixes include net/libIDL's parser.y
Differences to the plain GNU version in the packages collection:
* We do not install the shell wrapper "yacc" (it is supplied because
POSIX requires it and we already have a yacc command).
Changes since 1.75:
* Numerous bug fixes and improvements including:
+ Compatibility (with 1.35 and Solaris yacc) changes;
+ Fixes for GCC 3.2.1;
+ Use Yacc style of conflict reports;
+ Fix bug where error locations were not being recorded correctly;
+ Fix bad interaction with flex 2.5.23.
Please see the ChangeLog file supplied with the bison source code
for more details.
Changes since 1.35 (too many to mention here, please see the
ChangeLog in the bison source distribution):
* GNU m4 is now required.
* Various bug fixes.
* intl source removed.
NetBSD pkgsrc changes:
* Change of maintainer thorpej->cjep.
libintl.so won't pass the test for a GNU gettext, so building bison will
build the supplied gettext anyway, but there won't be a dependency on
gettext-lib in any case, so the bookkeeping is correct. If there isn't a
libintl.so in the base system, then bison will use the libintl.so installed
by gettext-lib, so again the bookkeeping will be correct.
So the short of it is that this is strongly buildlinked again.
* C Skeleton
Some projects use Bison's C parser with C++ compilers, and define
YYSTYPE as a class. The recent adjustment of C parsers for data
alignment and 64 bit architectures made this impossible.
Because for the time being no real solution for C++ parser
generation exists, kludges were implemented in the parser to
maintain this use. In the future, when Bison has C++ parsers, this
kludge will be disabled.
This kludge also addresses some C++ problems when the stack was
extended.
* File name clashes are detected
$ bison foo.y -d -o foo.x
fatal error: header and parser would be both named `foo.x'
* A missing `;' ending a rule triggers a warning
In accordance with POSIX, and in agreement with other
Yacc implementations, Bison will mandate this semicolon in a near
future. This eases the implementation of a Bison parser of Bison
grammars by making this grammar LALR(1) instead of LR(2). To
facilitate the transition, this release introduces a warning.
* Revert the C++ namespace changes introduced in 1.31, as they caused too
many portability hassles.
* Fix test suite portability problems.
* Fix C++ issues
Groff could not be compiled for the definition of size_t was lacking
under some conditions.
* Catch invalid @n
As is done with $n.
Summary of changes:
- removal of USE_GTEXINFO
- addition of mk/texinfo.mk
- inclusion of this file in package Makefiles requiring it
- `install-info' substituted by `${INSTALL_INFO}' in PLISTs
- tuning of mk/bsd.pkg.mk:
removal of USE_GTEXINFO
INSTALL_INFO added to PLIST_SUBST
`${INSTALL_INFO}' replace `install-info' in target rules
print-PLIST target now generate `${INSTALL_INFO}' instead of `install-info'
- a couple of new patch files added for a handful of packages
- setting of the TEXINFO_OVERRIDE "switch" in packages Makefiles requiring it
- devel/cssc marked requiring texinfo 4.0
- a couple of packages Makefiles were tuned with respect of INFO_FILES and
makeinfo command usage
See -newly added by this commit- section 10.24 of Packages.txt for
further information.
* Fix Yacc output file names
* Portability fixes
* Italian, Dutch, Swedish, Russian translation
* Many Bug Fixes
* Use of alloca in parsers
* When the generated parser lacks debugging code, YYDEBUG is now 0
(as POSIX requires) instead of being undefined.
* User Actions
Bison has always permitted actions such as { $$ = $1 }: it adds the
ending semicolon. Now if in Yacc compatibility mode, the semicolon
is no longer output: one has to write { $$ = $1; }.
* Better C++ compliance
The output parsers try to respect C++ namespaces.
* Reduced Grammars
Fixed bugs when reporting useless nonterminals.
* 64 bit hosts
The parsers work properly on 64 bit hosts.
* Error messages
Some calls to strerror resulted in scrambled or missing error messages.
* The verbose report includes the rule line numbers.
* Rule line numbers are fixed in traces.
* Parse errors
Verbose parse error messages from the parsers are better looking.
* Fixed parser memory leaks.
When the generated parser was using malloc to extend its stacks, the
previous allocations were not freed.
* Fixed verbose output file.
Some newlines were missing.
Some conflicts in state descriptions were missing.
* Fixed conflict report.
Option -v was needed to get the result.
* Fixed incorrect processing of some invalid input.
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
* %token MY_EOF 0 is supported.
Before, MY_EOF was silently renumbered as 257.
* doc/refcard.tex is updated.
* %output, %file-prefix, %name-prefix.
* --output
* `--defines' and `--graph' have now an optionnal argument which is the
output file name. `-d' and `-g' do not change, they do not take any
argument.
* Portability fixes.
* The output file does not define const, as this caused problems when used
with common autoconfiguration schemes. If you still use ancient compilers
that lack const, compile with the equivalent of the C compiler option
`-Dconst='. autoconf's AC_C_CONST macro provides one way to do this.
* Added `-g' and `--graph'.
* The input and the output files has automatically a similar extension.
* NLS support updated; should hopefully be less troublesome.
* Added the old Bison reference card.
* Added `--locations' and `%locations'.
* Added `-S' and `--skeleton'.
* `%raw', `-r', `--raw' is disabled.
* Special characters are escaped when output. This solves the problems
of the #line lines with path names including backslashes.
* New directives.
* @$ Automatic location tracking.
first component is now a package name+version/pattern, no more
executable/patchname/whatnot.
While there, introduce BUILD_USES_MSGFMT as shorthand to pull in
devel/gettext unless /usr/bin/msgfmt exists (i.e. on post-1.5 -current).
Patch by Alistair Crooks <agc@netbsd.org>