4 Changes in version 1.75e:
6 * References to the experimental %lex-param and %parse-param directives
7 have been temporarily removed from the manual, since we don't want
8 users to rely upon these features quite yet.
10 Changes in version 1.75d, 2002-12-13:
12 * Semicolons are once again optional at the end of grammar rules.
13 This reverts to the behavior of Bison 1.33 and earlier, and improves
14 compatibility with Yacc.
16 * Type clashes now generate warnings, not errors.
18 * Yacc command and library now available
19 The Bison distribution now installs a yacc command, as POSIX requires.
20 Also, Bison now installs a small library liby.a containing
21 implementations of Yacc-compatible yyerror and main functions.
22 This library is normally not useful, but POSIX requires it.
24 * %lex-param, %parse-param
25 These now take just one operand, not two.
27 * The documentation now emphasizes that yylex and yyerror must be
28 declared before use. C99 requires this.
30 * The documentation license has been upgraded to version 1.2
31 of the GNU Free Documentation License.
33 Changes in version 1.75c, 2002-11-25:
35 * "parse error" -> "syntax error"
36 Bison now uniformly uses the term "syntax error"; formerly, the code
37 and manual sometimes used the term "parse error" instead. POSIX
38 requires "syntax error" in diagnostics, and it was thought better to
41 * "parsing stack overflow..." -> "parser stack overflow"
42 GLR parsers now report "parser stack overflow" as per the Bison manual.
45 Users of Bison have to decide how they handle the portability of the
48 Changes in version 1.75b, 2002-11-13:
51 It is now possible to reclaim the memory associated to symbols
52 discarded during error recovery. This feature is still experimental.
54 * Bison now parses C99 lexical constructs like UCNs and
55 backslash-newline within C escape sequences, as POSIX 1003.1-2001 requires.
57 * --no-line works properly.
60 This new directive is preferred over YYERROR_VERBOSE.
62 * %lex-param, %parse-param
63 These new directives are preferred over PARSE_PARAM and LEX_PARAM.
64 In addition, they provide a means for yyerror to remain pure, and
65 to access to the current location.
67 #defining yyerror to steal internal variables is strongly
68 discouraged. It is not guaranteed to work for ever.
71 Bison now recognizes #line in its input, and forwards them.
74 File names are properly escaped. E.g. foo\bar.y give #line 123 "foo\\bar.y".
76 Changes in version 1.75a, 2002-10-24:
78 * Bison can no longer be built by a K&R C compiler; it requires C89 or
79 later to be built. This change originally took place a few versions
80 ago, but nobody noticed until we recently asked someone to try
81 building Bison with a K&R C compiler.
83 Changes in version 1.75, 2002-10-14:
85 * Bison should now work on 64-bit hosts.
87 * Indonesian translation thanks to Tedi Heriyanto.
90 Fix spurious parse errors.
93 Some people redefine yyerror to steal yyparse' private variables.
94 Reenable this trick until an official feature replaces it.
97 In agreement with POSIX and with other Yaccs, leaving a default
98 action is valid when $$ is untyped, and $1 typed:
102 but the converse remains an error:
106 * Values of mid-rule actions
109 foo: { ... } { $$ = $1; } ...
111 was incorrectly rejected: $1 is defined in the second mid-rule
112 action, and is equal to the $$ of the first mid-rule action.
114 Changes in version 1.50, 2002-10-04:
119 causes Bison to produce a Generalized LR (GLR) parser, capable of handling
120 almost any context-free grammar, ambiguous or not. The new declarations
121 %dprec and %merge on grammar rules allow parse-time resolution of
122 ambiguities. Contributed by Paul Hilfinger.
124 Unfortunately Bison 1.50 does not work properly on 64-bit hosts
125 like the Alpha, so please stick to 32-bit hosts for now.
128 When not in Yacc compatibility mode, when the output file was not
129 specified, running `bison foo/bar.y' created `foo/bar.c'. It
133 The undefined token was systematically mapped to 2 which prevented
134 the use of 2 by the user. This is no longer the case.
136 * Unknown token numbers
137 If yylex returned an out of range value, yyparse could die. This is
141 According to POSIX, the error token must be 256.
142 Bison extends this requirement by making it a preference: *if* the
143 user specified that one of her tokens is numbered 256, then error
144 will be mapped onto another number.
146 * Verbose error messages
147 They no longer report `..., expecting error or...' for states where
148 error recovery is possible.
151 Defaults to `$end' instead of `$'.
153 * Error recovery now conforms to documentation and to POSIX
154 When a Bison-generated parser encounters a syntax error, it now pops
155 the stack until it finds a state that allows shifting the error
156 token. Formerly, it popped the stack until it found a state that
157 allowed some non-error action other than a default reduction on the
158 error token. The new behavior has long been the documented behavior,
159 and has long been required by POSIX. For more details, please see
160 <http://mail.gnu.org/pipermail/bug-bison/2002-May/001452.html>.
163 Popped tokens and nonterminals are now reported.
166 Larger grammars are now supported (larger token numbers, larger grammar
167 size (= sum of the LHS and RHS lengths), larger LALR tables).
168 Formerly, many of these numbers ran afoul of 16-bit limits;
169 now these limits are 32 bits on most hosts.
171 * Explicit initial rule
172 Bison used to play hacks with the initial rule, which the user does
173 not write. It is now explicit, and visible in the reports and
177 Before, Bison reported the useless rules, but, although not used,
178 included them in the parsers. They are now actually removed.
180 * Useless rules, useless nonterminals
181 They are now reported, as a warning, with their locations.
183 * Rules never reduced
184 Rules that can never be reduced because of conflicts are now
187 * Incorrect `Token not used'
190 %token useless useful
192 exp: '0' %prec useful;
194 where a token was used to set the precedence of the last rule,
195 bison reported both `useful' and `useless' as useless tokens.
197 * Revert the C++ namespace changes introduced in 1.31
198 as they caused too many portability hassles.
201 By an accident of design, the default computation of @$ was
202 performed after another default computation was performed: @$ = @1.
203 The latter is now removed: YYLLOC_DEFAULT is fully responsible of
204 the computation of @$.
207 The token end of file may be specified by the user, in which case,
208 the user symbol is used in the reports, the graphs, and the verbose
209 error messages instead of `$end', which remains being the default.
213 %token MYEOF 0 "end of file"
216 This old option, which has been broken for ages, is removed.
219 Brazilian Portuguese, thanks to Alexandre Folle de Menezes.
220 Croatian, thanks to Denis Lackovic.
222 * Incorrect token definitions
223 When given `%token 'a' "A"', Bison used to output `#define 'a' 65'.
225 * Token definitions as enums
226 Tokens are output both as the traditional #define's, and, provided
227 the compiler supports ANSI C or is a C++ compiler, as enums.
228 This lets debuggers display names instead of integers.
231 In addition to --verbose, bison supports --report=THINGS, which
232 produces additional information:
234 complete the core item sets with their closure
236 explicitly associate lookaheads to items
238 describe shift/reduce conflicts solving.
239 Bison used to systematically output this information on top of
240 the report. Solved conflicts are now attached to their states.
243 Previous versions don't complain when there is a type clash on
244 the default action if the rule has a mid-rule action, such as in:
252 * GNU M4 is now required when using Bison.
254 Changes in version 1.35, 2002-03-25:
257 Some projects use Bison's C parser with C++ compilers, and define
258 YYSTYPE as a class. The recent adjustment of C parsers for data
259 alignment and 64 bit architectures made this impossible.
261 Because for the time being no real solution for C++ parser
262 generation exists, kludges were implemented in the parser to
263 maintain this use. In the future, when Bison has C++ parsers, this
264 kludge will be disabled.
266 This kludge also addresses some C++ problems when the stack was
269 Changes in version 1.34, 2002-03-12:
271 * File name clashes are detected
272 $ bison foo.y -d -o foo.x
273 fatal error: header and parser would both be named `foo.x'
275 * A missing `;' at the end of a rule triggers a warning
276 In accordance with POSIX, and in agreement with other
277 Yacc implementations, Bison will mandate this semicolon in the near
278 future. This eases the implementation of a Bison parser of Bison
279 grammars by making this grammar LALR(1) instead of LR(2). To
280 facilitate the transition, this release introduces a warning.
282 * Revert the C++ namespace changes introduced in 1.31, as they caused too
283 many portability hassles.
285 * DJGPP support added.
287 * Fix test suite portability problems.
289 Changes in version 1.33, 2002-02-07:
292 Groff could not be compiled for the definition of size_t was lacking
293 under some conditions.
298 Changes in version 1.32, 2002-01-23:
300 * Fix Yacc output file names
304 * Italian, Dutch translations
306 Changes in version 1.31, 2002-01-14:
310 * GNU Gettext and %expect
311 GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
312 Bison dies on incorrect %expectations, we fear there will be
313 too many bug reports for Gettext, so _for the time being_, %expect
314 does not trigger an error when the input file is named `plural.y'.
316 * Use of alloca in parsers
317 If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
318 malloc exclusively. Since 1.29, but was not NEWS'ed.
320 alloca is used only when compiled with GCC, to avoid portability
323 * When the generated parser lacks debugging code, YYDEBUG is now 0
324 (as POSIX requires) instead of being undefined.
327 Bison has always permitted actions such as { $$ = $1 }: it adds the
328 ending semicolon. Now if in Yacc compatibility mode, the semicolon
329 is no longer output: one has to write { $$ = $1; }.
331 * Better C++ compliance
332 The output parsers try to respect C++ namespaces.
333 [This turned out to be a failed experiment, and it was reverted later.]
336 Fixed bugs when reporting useless nonterminals.
339 The parsers work properly on 64 bit hosts.
342 Some calls to strerror resulted in scrambled or missing error messages.
345 When the number of shift/reduce conflicts is correct, don't issue
348 * The verbose report includes the rule line numbers.
350 * Rule line numbers are fixed in traces.
352 * Swedish translation
355 Verbose parse error messages from the parsers are better looking.
356 Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
357 Now: parse error: unexpected '/', expecting "number" or '-' or '('
359 * Fixed parser memory leaks.
360 When the generated parser was using malloc to extend its stacks, the
361 previous allocations were not freed.
363 * Fixed verbose output file.
364 Some newlines were missing.
365 Some conflicts in state descriptions were missing.
367 * Fixed conflict report.
368 Option -v was needed to get the result.
372 Mismatches are errors, not warnings.
374 * Fixed incorrect processing of some invalid input.
376 * Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
378 * Fixed some typos in the documentation.
380 * %token MY_EOF 0 is supported.
381 Before, MY_EOF was silently renumbered as 257.
383 * doc/refcard.tex is updated.
385 * %output, %file-prefix, %name-prefix.
389 New, aliasing `--output-file'.
391 Changes in version 1.30, 2001-10-26:
393 * `--defines' and `--graph' have now an optional argument which is the
394 output file name. `-d' and `-g' do not change; they do not take any
397 * `%source_extension' and `%header_extension' are removed, failed
402 Changes in version 1.29, 2001-09-07:
404 * The output file does not define const, as this caused problems when used
405 with common autoconfiguration schemes. If you still use ancient compilers
406 that lack const, compile with the equivalent of the C compiler option
407 `-Dconst='. autoconf's AC_C_CONST macro provides one way to do this.
409 * Added `-g' and `--graph'.
411 * The Bison manual is now distributed under the terms of the GNU FDL.
413 * The input and the output files has automatically a similar extension.
415 * Russian translation added.
417 * NLS support updated; should hopefully be less troublesome.
419 * Added the old Bison reference card.
421 * Added `--locations' and `%locations'.
423 * Added `-S' and `--skeleton'.
425 * `%raw', `-r', `--raw' is disabled.
427 * Special characters are escaped when output. This solves the problems
428 of the #line lines with path names including backslashes.
431 `%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
432 `%debug', `%source_extension' and `%header_extension'.
435 Automatic location tracking.
437 Changes in version 1.28, 1999-07-06:
439 * Should compile better now with K&R compilers.
443 * Fixed a problem with escaping the double quote character.
445 * There is now a FAQ.
447 Changes in version 1.27:
449 * The make rule which prevented bison.simple from being created on
450 some systems has been fixed.
452 Changes in version 1.26:
454 * Bison now uses automake.
456 * New mailing lists: <bug-bison@gnu.org> and <help-bison@gnu.org>.
458 * Token numbers now start at 257 as previously documented, not 258.
460 * Bison honors the TMPDIR environment variable.
462 * A couple of buffer overruns have been fixed.
464 * Problems when closing files should now be reported.
466 * Generated parsers should now work even on operating systems which do
467 not provide alloca().
469 Changes in version 1.25, 1995-10-16:
471 * Errors in the input grammar are not fatal; Bison keeps reading
472 the grammar file, and reports all the errors found in it.
474 * Tokens can now be specified as multiple-character strings: for
475 example, you could use "<=" for a token which looks like <=, instead
476 of chosing a name like LESSEQ.
478 * The %token_table declaration says to write a table of tokens (names
479 and numbers) into the parser file. The yylex function can use this
480 table to recognize multiple-character string tokens, or for other
483 * The %no_lines declaration says not to generate any #line preprocessor
484 directives in the parser file.
486 * The %raw declaration says to use internal Bison token numbers, not
487 Yacc-compatible token numbers, when token names are defined as macros.
489 * The --no-parser option produces the parser tables without including
490 the parser engine; a project can now use its own parser engine.
491 The actions go into a separate file called NAME.act, in the form of
492 a switch statement body.
494 Changes in version 1.23:
496 The user can define YYPARSE_PARAM as the name of an argument to be
497 passed into yyparse. The argument should have type void *. It should
498 actually point to an object. Grammar actions can access the variable
499 by casting it to the proper pointer type.
501 Line numbers in output file corrected.
503 Changes in version 1.22:
507 Changes in version 1.20:
509 Output file does not redefine const for C++.
517 Copyright (C) 2001, 2002 Free Software Foundation, Inc.
519 This file is part of GNU Autoconf.
521 GNU Autoconf is free software; you can redistribute it and/or modify
522 it under the terms of the GNU General Public License as published by
523 the Free Software Foundation; either version 2, or (at your option)
526 GNU Autoconf is distributed in the hope that it will be useful,
527 but WITHOUT ANY WARRANTY; without even the implied warranty of
528 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
529 GNU General Public License for more details.
531 You should have received a copy of the GNU General Public License
532 along with autoconf; see the file COPYING. If not, write to
533 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
534 Boston, MA 02111-1307, USA.