]> git.saurik.com Git - bison.git/blame - NEWS
Renamed file from bison.glr.
[bison.git] / NEWS
CommitLineData
6780ca7a
DM
1Bison News
2----------
3
6cbfbcc5 4Changes in version 1.49b:
adc8c848 5
8c165d89
AD
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
007a50a4
AD
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
77714df2 15* Unknown token numbers
007a50a4
AD
16 If yylex returned a code out of range, yyparse could die. This is
17 no longer the case.
18
23c5a174
AD
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
68cd8af3
PE
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
5504898e
AD
34* Traces
35 Popped tokens and nonterminals are now reported.
36
355e7c1c 37* Large grammars
77714df2
AD
38 Large grammars are now supported (large token numbers, large grammar
39 size (= sum of the LHS and RHS lengths), large LALR tables).
355e7c1c 40
77714df2 41* Explicit initial rule
643a5994
AD
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.
23c5a174 45
77714df2 46* Useless rules
643a5994 47 Before, Bison reported the useless rules, but, although not used,
77714df2 48 included them in the parsers. They are now actually removed.
23c5a174 49
6b98e4b5
AD
50* Useless rules, useless nonterminals
51 They are now reported, as a warning, with their locations.
52
77714df2 53* Incorrect `Token not used'
11652ab3
AD
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
77714df2
AD
63* Revert the C++ namespace changes introduced in 1.31
64 as they caused too many portability hassles.
0179dd65 65
b2d52318
AD
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 @$.
adc8c848 71
b7c49edf
AD
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"
fdbcd8e2
AD
80
81* Semantic parser
82 This old option, which has been broken for ages, is removed.
83
b408954b 84* New translation
84614e13
AD
85 Croatian, thanks to Denis Lackovic.
86
77714df2 87* Incorrect token definitions
b87f8b21
AD
88 When fed with `%token 'a' "A"', Bison used to output `#define 'a' 65'.
89
77714df2
AD
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
ec3bc396
AD
95* Reports
96 In addition to --verbose, bison supports --report=THINGS, which
97 produces additional information:
b408954b
AD
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.
ec3bc396 106
9af3fbce
AD
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.
f987e9d2 116\f
76551463
AD
117Changes 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
133Changes 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
153Changes 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
162Changes 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
52d1aeee
MA
170Changes 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.
76551463 197 [This turned out to be a failed experiment, and it was reverted later.]
52d1aeee
MA
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
76551463 255Changes in version 1.30, 2001-10-26:
342b8b6e
AD
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
f987e9d2
AD
264* Portability fixes.
265\f
9f4503d6 266Changes in version 1.29, 2001-09-07:
342b8b6e
AD
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'.
f87a2205 274
f2b5126e
PB
275* The Bison manual is now distributed under the terms of the GNU FDL.
276
f1c63ced 277* The input and the output files has automatically a similar extension.
234a3be3 278
f87a2205
JT
279* Russian translation added.
280
281* NLS support updated; should hopefully be less troublesome.
282
283* Added the old Bison reference card.
c33638bb
AD
284
285* Added `--locations' and `%locations'.
6deb4447 286
cd5bd6ac
AD
287* Added `-S' and `--skeleton'.
288
62ab6972
AD
289* `%raw', `-r', `--raw' is disabled.
290
cd5bd6ac
AD
291* Special characters are escaped when output. This solves the problems
292 of the #line lines with path names including backslashes.
293
6deb4447 294* New directives.
4ecbf796
MA
295 `%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
296 `%debug', `%source_extension' and `%header_extension'.
f987e9d2
AD
297
298* @$
299 Automatic location tracking.
f87a2205 300\f
9f4503d6 301Changes in version 1.28, 1999-07-06:
d2e00347
JT
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
5c31c3c2
JT
311Changes 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
316Changes in version 1.26:
4be07551
JT
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.
f51dbca1
JT
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().
4be07551 332\f
9f4503d6 333Changes in version 1.25, 1995-10-16:
df8878c5
RS
334
335* Errors in the input grammar are not fatal; Bison keeps reading
336the grammar file, and reports all the errors found in it.
8c44d3ec 337
df8878c5
RS
338* Tokens can now be specified as multiple-character strings: for
339example, you could use "<=" for a token which looks like <=, instead
340of chosing a name like LESSEQ.
341
342* The %token_table declaration says to write a table of tokens (names
343and numbers) into the parser file. The yylex function can use this
344table to recognize multiple-character string tokens, or for other
345purposes.
346
347* The %no_lines declaration says not to generate any #line preprocessor
348directives in the parser file.
349
350* The %raw declaration says to use internal Bison token numbers, not
351Yacc-compatible token numbers, when token names are defined as macros.
352
353* The --no-parser option produces the parser tables without including
354the parser engine; a project can now use its own parser engine.
355The actions go into a separate file called NAME.act, in the form of
356a switch statement body.
357\f
6780ca7a
DM
358Changes in version 1.23:
359
4d019228
DM
360The user can define YYPARSE_PARAM as the name of an argument to be
361passed into yyparse. The argument should have type void *. It should
362actually point to an object. Grammar actions can access the variable
363by casting it to the proper pointer type.
6780ca7a 364
6780ca7a 365Line numbers in output file corrected.
6780ca7a
DM
366\f
367Changes in version 1.22:
368
369--help option added.
6780ca7a
DM
370\f
371Changes in version 1.20:
372
373Output file does not redefine const for C++.
9f4503d6
AD
374
375Local Variables:
376mode: outline
377End:
76551463
AD
378
379-----
380
381Copyright (C) 2001, 2002 Free Software Foundation, Inc.
382
383This file is part of GNU Autoconf.
384
385GNU Autoconf is free software; you can redistribute it and/or modify
386it under the terms of the GNU General Public License as published by
387the Free Software Foundation; either version 2, or (at your option)
388any later version.
389
390GNU Autoconf is distributed in the hope that it will be useful,
391but WITHOUT ANY WARRANTY; without even the implied warranty of
392MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
393GNU General Public License for more details.
394
395You should have received a copy of the GNU General Public License
396along with autoconf; see the file COPYING. If not, write to
397the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
398Boston, MA 02111-1307, USA.