]>
Commit | Line | Data |
---|---|---|
6780ca7a DM |
1 | Bison News |
2 | ---------- | |
3af4feb2 | 3 | |
20daca06 PE |
4 | Changes in version 1.75e: |
5 | ||
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. | |
9 | ||
d2caf554 | 10 | Changes in version 1.75d, 2002-12-13: |
74724a70 | 11 | |
d1de5372 PE |
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. | |
15 | ||
16 | * Type clashes now generate warnings, not errors. | |
17 | ||
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. | |
74724a70 PE |
23 | |
24 | * %lex-param, %parse-param | |
25 | These now take just one operand, not two. | |
26 | ||
d1de5372 PE |
27 | * The documentation now emphasizes that yylex and yyerror must be |
28 | declared before use. C99 requires this. | |
29 | ||
30 | * The documentation license has been upgraded to version 1.2 | |
31 | of the GNU Free Documentation License. | |
32 | ||
3af4feb2 | 33 | Changes in version 1.75c, 2002-11-25: |
6780ca7a | 34 | |
6e649e65 PE |
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 | |
39 | be consistent. | |
40 | ||
41 | * "parsing stack overflow..." -> "parser stack overflow" | |
42 | GLR parsers now report "parser stack overflow" as per the Bison manual. | |
43 | ||
9501dc6e AD |
44 | * GLR and inline |
45 | Users of Bison have to decide how they handle the portability of the | |
46 | C keyword `inline'. | |
47 | ||
87f721cc | 48 | Changes in version 1.75b, 2002-11-13: |
886a425c | 49 | |
72f889cc AD |
50 | * %destructor |
51 | It is now possible to reclaim the memory associated to symbols | |
52 | discarded during error recovery. This feature is still experimental. | |
53 | ||
87f721cc PE |
54 | * Bison now parses C99 lexical constructs like UCNs and |
55 | backslash-newline within C escape sequences, as POSIX 1003.1-2001 requires. | |
886a425c | 56 | |
437c2d80 AD |
57 | * --no-line works properly. |
58 | ||
2a8d363a AD |
59 | * %error-verbose |
60 | This new directive is preferred over YYERROR_VERBOSE. | |
61 | ||
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. | |
66 | ||
959e5f51 AD |
67 | #defining yyerror to steal internal variables is strongly |
68 | discouraged. It is not guaranteed to work for ever. | |
69 | ||
900c5db5 AD |
70 | * #line |
71 | Bison now recognizes #line in its input, and forwards them. | |
72 | ||
6e40b4eb AD |
73 | * #line |
74 | File names are properly escaped. E.g. foo\bar.y give #line 123 "foo\\bar.y". | |
75 | ||
76 | Changes in version 1.75a, 2002-10-24: | |
77 | ||
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. | |
82 | ||
5c16c6b1 | 83 | Changes in version 1.75, 2002-10-14: |
7933f2b5 PE |
84 | |
85 | * Bison should now work on 64-bit hosts. | |
86 | ||
b7195100 | 87 | * Indonesian translation thanks to Tedi Heriyanto. |
7933f2b5 | 88 | |
f50adbbd AD |
89 | * GLR parsers |
90 | Fix spurious parse errors. | |
91 | ||
92 | * Pure parsers | |
93 | Some people redefine yyerror to steal yyparse' private variables. | |
94 | Reenable this trick until an official feature replaces it. | |
95 | ||
d90c934c AD |
96 | * Type Clashes |
97 | In agreement with POSIX and with other Yaccs, leaving a default | |
98 | action is valid when $$ is untyped, and $1 typed: | |
99 | ||
100 | untyped: ... typed; | |
101 | ||
102 | but the converse remains an error: | |
103 | ||
104 | typed: ... untyped; | |
105 | ||
106 | * Values of mid-rule actions | |
107 | The following code: | |
108 | ||
109 | foo: { ... } { $$ = $1; } ... | |
110 | ||
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. | |
113 | ||
420f93c8 | 114 | Changes in version 1.50, 2002-10-04: |
adc8c848 | 115 | |
676385e2 PH |
116 | * GLR parsing |
117 | The declaration | |
118 | %glr-parser | |
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 | |
e8832397 | 121 | %dprec and %merge on grammar rules allow parse-time resolution of |
676385e2 PH |
122 | ambiguities. Contributed by Paul Hilfinger. |
123 | ||
7933f2b5 | 124 | Unfortunately Bison 1.50 does not work properly on 64-bit hosts |
420f93c8 PE |
125 | like the Alpha, so please stick to 32-bit hosts for now. |
126 | ||
8c165d89 AD |
127 | * Output Directory |
128 | When not in Yacc compatibility mode, when the output file was not | |
e88dbdbf | 129 | specified, running `bison foo/bar.y' created `foo/bar.c'. It |
8c165d89 AD |
130 | now creates `bar.c'. |
131 | ||
007a50a4 AD |
132 | * Undefined token |
133 | The undefined token was systematically mapped to 2 which prevented | |
e88dbdbf | 134 | the use of 2 by the user. This is no longer the case. |
007a50a4 | 135 | |
77714df2 | 136 | * Unknown token numbers |
e88dbdbf | 137 | If yylex returned an out of range value, yyparse could die. This is |
007a50a4 AD |
138 | no longer the case. |
139 | ||
23c5a174 | 140 | * Error token |
e88dbdbf | 141 | According to POSIX, the error token must be 256. |
23c5a174 AD |
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. | |
145 | ||
217598da | 146 | * Verbose error messages |
e88dbdbf | 147 | They no longer report `..., expecting error or...' for states where |
217598da AD |
148 | error recovery is possible. |
149 | ||
150 | * End token | |
151 | Defaults to `$end' instead of `$'. | |
152 | ||
68cd8af3 PE |
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>. | |
161 | ||
5504898e AD |
162 | * Traces |
163 | Popped tokens and nonterminals are now reported. | |
164 | ||
a861a339 PE |
165 | * Larger grammars |
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. | |
355e7c1c | 170 | |
77714df2 | 171 | * Explicit initial rule |
643a5994 AD |
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 | |
174 | graphs as rule 0. | |
23c5a174 | 175 | |
77714df2 | 176 | * Useless rules |
643a5994 | 177 | Before, Bison reported the useless rules, but, although not used, |
77714df2 | 178 | included them in the parsers. They are now actually removed. |
23c5a174 | 179 | |
6b98e4b5 AD |
180 | * Useless rules, useless nonterminals |
181 | They are now reported, as a warning, with their locations. | |
182 | ||
e8832397 AD |
183 | * Rules never reduced |
184 | Rules that can never be reduced because of conflicts are now | |
185 | reported. | |
186 | ||
77714df2 | 187 | * Incorrect `Token not used' |
11652ab3 AD |
188 | On a grammar such as |
189 | ||
190 | %token useless useful | |
191 | %% | |
192 | exp: '0' %prec useful; | |
193 | ||
194 | where a token was used to set the precedence of the last rule, | |
195 | bison reported both `useful' and `useless' as useless tokens. | |
196 | ||
77714df2 AD |
197 | * Revert the C++ namespace changes introduced in 1.31 |
198 | as they caused too many portability hassles. | |
0179dd65 | 199 | |
b2d52318 AD |
200 | * Default locations |
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 @$. | |
adc8c848 | 205 | |
b7c49edf AD |
206 | * Token end-of-file |
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 | |
a861a339 | 209 | error messages instead of `$end', which remains being the default. |
b7c49edf | 210 | For instance |
7bd6c77e | 211 | %token MYEOF 0 |
b7c49edf | 212 | or |
7bd6c77e | 213 | %token MYEOF 0 "end of file" |
fdbcd8e2 AD |
214 | |
215 | * Semantic parser | |
216 | This old option, which has been broken for ages, is removed. | |
217 | ||
a861a339 PE |
218 | * New translations |
219 | Brazilian Portuguese, thanks to Alexandre Folle de Menezes. | |
84614e13 AD |
220 | Croatian, thanks to Denis Lackovic. |
221 | ||
77714df2 | 222 | * Incorrect token definitions |
e88dbdbf | 223 | When given `%token 'a' "A"', Bison used to output `#define 'a' 65'. |
b87f8b21 | 224 | |
77714df2 AD |
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. | |
e88dbdbf | 228 | This lets debuggers display names instead of integers. |
77714df2 | 229 | |
ec3bc396 AD |
230 | * Reports |
231 | In addition to --verbose, bison supports --report=THINGS, which | |
232 | produces additional information: | |
b408954b AD |
233 | - itemset |
234 | complete the core item sets with their closure | |
235 | - lookahead | |
236 | explicitly associate lookaheads to items | |
237 | - solved | |
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. | |
ec3bc396 | 241 | |
9af3fbce AD |
242 | * Type clashes |
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: | |
245 | ||
246 | %type <foo> bar | |
247 | %% | |
248 | bar: '0' {} '0'; | |
249 | ||
250 | This is fixed. | |
a861a339 PE |
251 | |
252 | * GNU M4 is now required when using Bison. | |
f987e9d2 | 253 | \f |
76551463 AD |
254 | Changes in version 1.35, 2002-03-25: |
255 | ||
256 | * C Skeleton | |
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. | |
260 | ||
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. | |
265 | ||
266 | This kludge also addresses some C++ problems when the stack was | |
267 | extended. | |
76551463 AD |
268 | \f |
269 | Changes in version 1.34, 2002-03-12: | |
270 | ||
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' | |
274 | ||
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. | |
281 | ||
282 | * Revert the C++ namespace changes introduced in 1.31, as they caused too | |
283 | many portability hassles. | |
284 | ||
285 | * DJGPP support added. | |
286 | ||
287 | * Fix test suite portability problems. | |
288 | \f | |
289 | Changes in version 1.33, 2002-02-07: | |
290 | ||
291 | * Fix C++ issues | |
292 | Groff could not be compiled for the definition of size_t was lacking | |
293 | under some conditions. | |
294 | ||
295 | * Catch invalid @n | |
296 | As is done with $n. | |
297 | \f | |
298 | Changes in version 1.32, 2002-01-23: | |
299 | ||
300 | * Fix Yacc output file names | |
301 | ||
302 | * Portability fixes | |
303 | ||
304 | * Italian, Dutch translations | |
305 | \f | |
52d1aeee MA |
306 | Changes in version 1.31, 2002-01-14: |
307 | ||
308 | * Many Bug Fixes | |
309 | ||
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'. | |
315 | ||
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. | |
319 | ||
320 | alloca is used only when compiled with GCC, to avoid portability | |
321 | problems as on AIX. | |
322 | ||
323 | * When the generated parser lacks debugging code, YYDEBUG is now 0 | |
324 | (as POSIX requires) instead of being undefined. | |
325 | ||
326 | * User Actions | |
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; }. | |
330 | ||
331 | * Better C++ compliance | |
332 | The output parsers try to respect C++ namespaces. | |
76551463 | 333 | [This turned out to be a failed experiment, and it was reverted later.] |
52d1aeee MA |
334 | |
335 | * Reduced Grammars | |
336 | Fixed bugs when reporting useless nonterminals. | |
337 | ||
338 | * 64 bit hosts | |
339 | The parsers work properly on 64 bit hosts. | |
340 | ||
341 | * Error messages | |
342 | Some calls to strerror resulted in scrambled or missing error messages. | |
343 | ||
344 | * %expect | |
345 | When the number of shift/reduce conflicts is correct, don't issue | |
346 | any warning. | |
347 | ||
348 | * The verbose report includes the rule line numbers. | |
349 | ||
350 | * Rule line numbers are fixed in traces. | |
351 | ||
352 | * Swedish translation | |
353 | ||
354 | * Parse errors | |
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 '(' | |
358 | ||
359 | * Fixed parser memory leaks. | |
360 | When the generated parser was using malloc to extend its stacks, the | |
361 | previous allocations were not freed. | |
362 | ||
363 | * Fixed verbose output file. | |
364 | Some newlines were missing. | |
365 | Some conflicts in state descriptions were missing. | |
366 | ||
367 | * Fixed conflict report. | |
368 | Option -v was needed to get the result. | |
369 | ||
370 | * %expect | |
371 | Was not used. | |
372 | Mismatches are errors, not warnings. | |
373 | ||
374 | * Fixed incorrect processing of some invalid input. | |
375 | ||
376 | * Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H. | |
377 | ||
378 | * Fixed some typos in the documentation. | |
379 | ||
380 | * %token MY_EOF 0 is supported. | |
381 | Before, MY_EOF was silently renumbered as 257. | |
382 | ||
383 | * doc/refcard.tex is updated. | |
384 | ||
385 | * %output, %file-prefix, %name-prefix. | |
386 | New. | |
387 | ||
388 | * --output | |
389 | New, aliasing `--output-file'. | |
390 | \f | |
76551463 | 391 | Changes in version 1.30, 2001-10-26: |
342b8b6e | 392 | |
fdac0091 PE |
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 | |
342b8b6e AD |
395 | argument. |
396 | ||
397 | * `%source_extension' and `%header_extension' are removed, failed | |
398 | experiment. | |
399 | ||
f987e9d2 AD |
400 | * Portability fixes. |
401 | \f | |
9f4503d6 | 402 | Changes in version 1.29, 2001-09-07: |
342b8b6e AD |
403 | |
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. | |
408 | ||
409 | * Added `-g' and `--graph'. | |
f87a2205 | 410 | |
f2b5126e PB |
411 | * The Bison manual is now distributed under the terms of the GNU FDL. |
412 | ||
f1c63ced | 413 | * The input and the output files has automatically a similar extension. |
234a3be3 | 414 | |
f87a2205 JT |
415 | * Russian translation added. |
416 | ||
417 | * NLS support updated; should hopefully be less troublesome. | |
418 | ||
419 | * Added the old Bison reference card. | |
c33638bb AD |
420 | |
421 | * Added `--locations' and `%locations'. | |
6deb4447 | 422 | |
cd5bd6ac AD |
423 | * Added `-S' and `--skeleton'. |
424 | ||
62ab6972 AD |
425 | * `%raw', `-r', `--raw' is disabled. |
426 | ||
cd5bd6ac AD |
427 | * Special characters are escaped when output. This solves the problems |
428 | of the #line lines with path names including backslashes. | |
429 | ||
6deb4447 | 430 | * New directives. |
4ecbf796 MA |
431 | `%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose', |
432 | `%debug', `%source_extension' and `%header_extension'. | |
f987e9d2 AD |
433 | |
434 | * @$ | |
435 | Automatic location tracking. | |
f87a2205 | 436 | \f |
9f4503d6 | 437 | Changes in version 1.28, 1999-07-06: |
d2e00347 JT |
438 | |
439 | * Should compile better now with K&R compilers. | |
440 | ||
441 | * Added NLS. | |
442 | ||
443 | * Fixed a problem with escaping the double quote character. | |
444 | ||
445 | * There is now a FAQ. | |
446 | \f | |
5c31c3c2 JT |
447 | Changes in version 1.27: |
448 | ||
449 | * The make rule which prevented bison.simple from being created on | |
450 | some systems has been fixed. | |
451 | \f | |
452 | Changes in version 1.26: | |
4be07551 JT |
453 | |
454 | * Bison now uses automake. | |
455 | ||
456 | * New mailing lists: <bug-bison@gnu.org> and <help-bison@gnu.org>. | |
457 | ||
458 | * Token numbers now start at 257 as previously documented, not 258. | |
459 | ||
460 | * Bison honors the TMPDIR environment variable. | |
461 | ||
462 | * A couple of buffer overruns have been fixed. | |
f51dbca1 JT |
463 | |
464 | * Problems when closing files should now be reported. | |
465 | ||
466 | * Generated parsers should now work even on operating systems which do | |
467 | not provide alloca(). | |
4be07551 | 468 | \f |
9f4503d6 | 469 | Changes in version 1.25, 1995-10-16: |
df8878c5 RS |
470 | |
471 | * Errors in the input grammar are not fatal; Bison keeps reading | |
472 | the grammar file, and reports all the errors found in it. | |
8c44d3ec | 473 | |
df8878c5 RS |
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. | |
477 | ||
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 | |
481 | purposes. | |
482 | ||
483 | * The %no_lines declaration says not to generate any #line preprocessor | |
484 | directives in the parser file. | |
485 | ||
486 | * The %raw declaration says to use internal Bison token numbers, not | |
487 | Yacc-compatible token numbers, when token names are defined as macros. | |
488 | ||
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. | |
493 | \f | |
6780ca7a DM |
494 | Changes in version 1.23: |
495 | ||
4d019228 DM |
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. | |
6780ca7a | 500 | |
6780ca7a | 501 | Line numbers in output file corrected. |
6780ca7a DM |
502 | \f |
503 | Changes in version 1.22: | |
504 | ||
505 | --help option added. | |
6780ca7a DM |
506 | \f |
507 | Changes in version 1.20: | |
508 | ||
509 | Output file does not redefine const for C++. | |
9f4503d6 AD |
510 | |
511 | Local Variables: | |
512 | mode: outline | |
513 | End: | |
76551463 AD |
514 | |
515 | ----- | |
516 | ||
517 | Copyright (C) 2001, 2002 Free Software Foundation, Inc. | |
518 | ||
519 | This file is part of GNU Autoconf. | |
520 | ||
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) | |
524 | any later version. | |
525 | ||
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. | |
530 | ||
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. |