]> git.saurik.com Git - bison.git/blob - NEWS
Renamed file from bison.glr.
[bison.git] / NEWS
1 Bison News
2 ----------
3
4 Changes in version 1.49b:
5
6 * Output Directory
7 When not in Yacc compatibility mode, when the output file was not
8 specified, runnning `bison foo/bar.y' created `foo/bar.c'. It
9 now creates `bar.c'.
10
11 * Undefined token
12 The undefined token was systematically mapped to 2 which prevented
13 the use of 2 from the user. This is no longer the case.
14
15 * Unknown token numbers
16 If yylex returned a code out of range, yyparse could die. This is
17 no longer the case.
18
19 * Error token
20 According to POSIX, the error token should be numbered as 256.
21 Bison extends this requirement by making it a preference: *if* the
22 user specified that one of her tokens is numbered 256, then error
23 will be mapped onto another number.
24
25 * Error recovery now conforms to documentation and to POSIX
26 When a Bison-generated parser encounters a syntax error, it now pops
27 the stack until it finds a state that allows shifting the error
28 token. Formerly, it popped the stack until it found a state that
29 allowed some non-error action other than a default reduction on the
30 error token. The new behavior has long been the documented behavior,
31 and has long been required by POSIX. For more details, please see
32 <http://mail.gnu.org/pipermail/bug-bison/2002-May/001452.html>.
33
34 * Traces
35 Popped tokens and nonterminals are now reported.
36
37 * Large grammars
38 Large grammars are now supported (large token numbers, large grammar
39 size (= sum of the LHS and RHS lengths), large LALR tables).
40
41 * Explicit initial rule
42 Bison used to play hacks with the initial rule, which the user does
43 not write. It is now explicit, and visible in the reports and
44 graphs as rule 0.
45
46 * Useless rules
47 Before, Bison reported the useless rules, but, although not used,
48 included them in the parsers. They are now actually removed.
49
50 * Useless rules, useless nonterminals
51 They are now reported, as a warning, with their locations.
52
53 * Incorrect `Token not used'
54 On a grammar such as
55
56 %token useless useful
57 %%
58 exp: '0' %prec useful;
59
60 where a token was used to set the precedence of the last rule,
61 bison reported both `useful' and `useless' as useless tokens.
62
63 * Revert the C++ namespace changes introduced in 1.31
64 as they caused too many portability hassles.
65
66 * Default locations
67 By an accident of design, the default computation of @$ was
68 performed after another default computation was performed: @$ = @1.
69 The latter is now removed: YYLLOC_DEFAULT is fully responsible of
70 the computation of @$.
71
72 * Token end-of-file
73 The token end of file may be specified by the user, in which case,
74 the user symbol is used in the reports, the graphs, and the verbose
75 error messages instead of `$', which remains being the defaults.
76 For instance
77 %token YYEOF 0
78 or
79 %token YYEOF 0 "end of file"
80
81 * Semantic parser
82 This old option, which has been broken for ages, is removed.
83
84 * New translation
85 Croatian, thanks to Denis Lackovic.
86
87 * Incorrect token definitions
88 When fed with `%token 'a' "A"', Bison used to output `#define 'a' 65'.
89
90 * Token definitions as enums
91 Tokens are output both as the traditional #define's, and, provided
92 the compiler supports ANSI C or is a C++ compiler, as enums.
93 This helps debuggers producing symbols instead of values.
94
95 * Reports
96 In addition to --verbose, bison supports --report=THINGS, which
97 produces additional information:
98 - itemset
99 complete the core item sets with their closure
100 - lookahead
101 explicitly associate lookaheads to items
102 - solved
103 describe shift/reduce conflicts solving.
104 Bison used to systematically output this information on top of
105 the report. Solved conflicts are now attached to their states.
106
107 * Type clashes
108 Previous versions don't complain when there is a type clash on
109 the default action if the rule has a mid-rule action, such as in:
110
111 %type <foo> bar
112 %%
113 bar: '0' {} '0';
114
115 This is fixed.
116 \f
117 Changes in version 1.35, 2002-03-25:
118
119 * C Skeleton
120 Some projects use Bison's C parser with C++ compilers, and define
121 YYSTYPE as a class. The recent adjustment of C parsers for data
122 alignment and 64 bit architectures made this impossible.
123
124 Because for the time being no real solution for C++ parser
125 generation exists, kludges were implemented in the parser to
126 maintain this use. In the future, when Bison has C++ parsers, this
127 kludge will be disabled.
128
129 This kludge also addresses some C++ problems when the stack was
130 extended.
131
132 \f
133 Changes in version 1.34, 2002-03-12:
134
135 * File name clashes are detected
136 $ bison foo.y -d -o foo.x
137 fatal error: header and parser would both be named `foo.x'
138
139 * A missing `;' at the end of a rule triggers a warning
140 In accordance with POSIX, and in agreement with other
141 Yacc implementations, Bison will mandate this semicolon in the near
142 future. This eases the implementation of a Bison parser of Bison
143 grammars by making this grammar LALR(1) instead of LR(2). To
144 facilitate the transition, this release introduces a warning.
145
146 * Revert the C++ namespace changes introduced in 1.31, as they caused too
147 many portability hassles.
148
149 * DJGPP support added.
150
151 * Fix test suite portability problems.
152 \f
153 Changes in version 1.33, 2002-02-07:
154
155 * Fix C++ issues
156 Groff could not be compiled for the definition of size_t was lacking
157 under some conditions.
158
159 * Catch invalid @n
160 As is done with $n.
161 \f
162 Changes in version 1.32, 2002-01-23:
163
164 * Fix Yacc output file names
165
166 * Portability fixes
167
168 * Italian, Dutch translations
169 \f
170 Changes in version 1.31, 2002-01-14:
171
172 * Many Bug Fixes
173
174 * GNU Gettext and %expect
175 GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
176 Bison dies on incorrect %expectations, we fear there will be
177 too many bug reports for Gettext, so _for the time being_, %expect
178 does not trigger an error when the input file is named `plural.y'.
179
180 * Use of alloca in parsers
181 If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
182 malloc exclusively. Since 1.29, but was not NEWS'ed.
183
184 alloca is used only when compiled with GCC, to avoid portability
185 problems as on AIX.
186
187 * When the generated parser lacks debugging code, YYDEBUG is now 0
188 (as POSIX requires) instead of being undefined.
189
190 * User Actions
191 Bison has always permitted actions such as { $$ = $1 }: it adds the
192 ending semicolon. Now if in Yacc compatibility mode, the semicolon
193 is no longer output: one has to write { $$ = $1; }.
194
195 * Better C++ compliance
196 The output parsers try to respect C++ namespaces.
197 [This turned out to be a failed experiment, and it was reverted later.]
198
199 * Reduced Grammars
200 Fixed bugs when reporting useless nonterminals.
201
202 * 64 bit hosts
203 The parsers work properly on 64 bit hosts.
204
205 * Error messages
206 Some calls to strerror resulted in scrambled or missing error messages.
207
208 * %expect
209 When the number of shift/reduce conflicts is correct, don't issue
210 any warning.
211
212 * The verbose report includes the rule line numbers.
213
214 * Rule line numbers are fixed in traces.
215
216 * Swedish translation
217
218 * Parse errors
219 Verbose parse error messages from the parsers are better looking.
220 Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
221 Now: parse error: unexpected '/', expecting "number" or '-' or '('
222
223 * Fixed parser memory leaks.
224 When the generated parser was using malloc to extend its stacks, the
225 previous allocations were not freed.
226
227 * Fixed verbose output file.
228 Some newlines were missing.
229 Some conflicts in state descriptions were missing.
230
231 * Fixed conflict report.
232 Option -v was needed to get the result.
233
234 * %expect
235 Was not used.
236 Mismatches are errors, not warnings.
237
238 * Fixed incorrect processing of some invalid input.
239
240 * Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
241
242 * Fixed some typos in the documentation.
243
244 * %token MY_EOF 0 is supported.
245 Before, MY_EOF was silently renumbered as 257.
246
247 * doc/refcard.tex is updated.
248
249 * %output, %file-prefix, %name-prefix.
250 New.
251
252 * --output
253 New, aliasing `--output-file'.
254 \f
255 Changes in version 1.30, 2001-10-26:
256
257 * `--defines' and `--graph' have now an optionnal argument which is the
258 output file name. `-d' and `-g' do not change, they do not take any
259 argument.
260
261 * `%source_extension' and `%header_extension' are removed, failed
262 experiment.
263
264 * Portability fixes.
265 \f
266 Changes in version 1.29, 2001-09-07:
267
268 * The output file does not define const, as this caused problems when used
269 with common autoconfiguration schemes. If you still use ancient compilers
270 that lack const, compile with the equivalent of the C compiler option
271 `-Dconst='. autoconf's AC_C_CONST macro provides one way to do this.
272
273 * Added `-g' and `--graph'.
274
275 * The Bison manual is now distributed under the terms of the GNU FDL.
276
277 * The input and the output files has automatically a similar extension.
278
279 * Russian translation added.
280
281 * NLS support updated; should hopefully be less troublesome.
282
283 * Added the old Bison reference card.
284
285 * Added `--locations' and `%locations'.
286
287 * Added `-S' and `--skeleton'.
288
289 * `%raw', `-r', `--raw' is disabled.
290
291 * Special characters are escaped when output. This solves the problems
292 of the #line lines with path names including backslashes.
293
294 * New directives.
295 `%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
296 `%debug', `%source_extension' and `%header_extension'.
297
298 * @$
299 Automatic location tracking.
300 \f
301 Changes in version 1.28, 1999-07-06:
302
303 * Should compile better now with K&R compilers.
304
305 * Added NLS.
306
307 * Fixed a problem with escaping the double quote character.
308
309 * There is now a FAQ.
310 \f
311 Changes in version 1.27:
312
313 * The make rule which prevented bison.simple from being created on
314 some systems has been fixed.
315 \f
316 Changes in version 1.26:
317
318 * Bison now uses automake.
319
320 * New mailing lists: <bug-bison@gnu.org> and <help-bison@gnu.org>.
321
322 * Token numbers now start at 257 as previously documented, not 258.
323
324 * Bison honors the TMPDIR environment variable.
325
326 * A couple of buffer overruns have been fixed.
327
328 * Problems when closing files should now be reported.
329
330 * Generated parsers should now work even on operating systems which do
331 not provide alloca().
332 \f
333 Changes in version 1.25, 1995-10-16:
334
335 * Errors in the input grammar are not fatal; Bison keeps reading
336 the grammar file, and reports all the errors found in it.
337
338 * Tokens can now be specified as multiple-character strings: for
339 example, you could use "<=" for a token which looks like <=, instead
340 of chosing a name like LESSEQ.
341
342 * The %token_table declaration says to write a table of tokens (names
343 and numbers) into the parser file. The yylex function can use this
344 table to recognize multiple-character string tokens, or for other
345 purposes.
346
347 * The %no_lines declaration says not to generate any #line preprocessor
348 directives in the parser file.
349
350 * The %raw declaration says to use internal Bison token numbers, not
351 Yacc-compatible token numbers, when token names are defined as macros.
352
353 * The --no-parser option produces the parser tables without including
354 the parser engine; a project can now use its own parser engine.
355 The actions go into a separate file called NAME.act, in the form of
356 a switch statement body.
357 \f
358 Changes in version 1.23:
359
360 The user can define YYPARSE_PARAM as the name of an argument to be
361 passed into yyparse. The argument should have type void *. It should
362 actually point to an object. Grammar actions can access the variable
363 by casting it to the proper pointer type.
364
365 Line numbers in output file corrected.
366 \f
367 Changes in version 1.22:
368
369 --help option added.
370 \f
371 Changes in version 1.20:
372
373 Output file does not redefine const for C++.
374
375 Local Variables:
376 mode: outline
377 End:
378
379 -----
380
381 Copyright (C) 2001, 2002 Free Software Foundation, Inc.
382
383 This file is part of GNU Autoconf.
384
385 GNU Autoconf is free software; you can redistribute it and/or modify
386 it under the terms of the GNU General Public License as published by
387 the Free Software Foundation; either version 2, or (at your option)
388 any later version.
389
390 GNU Autoconf is distributed in the hope that it will be useful,
391 but WITHOUT ANY WARRANTY; without even the implied warranty of
392 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
393 GNU General Public License for more details.
394
395 You should have received a copy of the GNU General Public License
396 along with autoconf; see the file COPYING. If not, write to
397 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
398 Boston, MA 02111-1307, USA.