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