]> git.saurik.com Git - bison.git/blob - ChangeLog
7451a103e2ccb4fbb0f74e9954a9ba4936a22197
[bison.git] / ChangeLog
1 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Don't escape $ in test case titles since Autoconf 2.61 now does that
4 correctly.
5 * tests/actions.at (Default %printer and %destructor are not for error
6 or $undefined): Here.
7 (Default %printer and %destructor are not for $accept): Here.
8 * tests/input.at (Invalid $n and @n): Here.
9
10 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
11
12 Rename <!> to <>. Discussed starting at
13 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
14 * NEWS (2.3a+): Update.
15 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
16 Update.
17 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
18 * src/scan-gram.l (INITIAL): Implement.
19 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
20 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
21 comment.
22 * tests/actions.at (Default tagless %printer and %destructor,
23 Default tagged and per-type %printer and %destructor,
24 Default %printer and %destructor are not for error or $undefined,
25 Default %printer and %destructor are not for $accept,
26 Default %printer and %destructor for mid-rule values): Update.
27 * tests/input.at (Default %printer and %destructor redeclared,
28 Unused values with default %destructor): Update.
29
30 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
31
32 Don't let %prec take a nonterminal.
33 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
34 token.
35 * tests/input.at (%prec takes a token): New test checking that %prec
36 won't take a nonterminal.
37
38 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
39
40 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
41 it was double-quoted.
42 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
43 grammar is maintained with Bison's highest standards.
44 * src/getargs.c: Fix some typos in Doxygen comments.
45
46 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
47
48 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
49 later. Reported by Paul Eggert in
50 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
51 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
52 * src/scan-code.l (translate_action): Don't bother invoking
53 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
54 (code_scanner_free): Instead of invoking
55 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
56 which frees more.
57 * src/scan-gram.l (gram_scanner_free): Likewise.
58 * src/scan-skel.l (scan_skel): Likewise.
59
60 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
61
62 * src/files.c (tr): Change return type to void.
63 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
64 has been called previously for the same key.
65 (muscle_find): Return storage instead of value so that
66 --enable-gcc-warnings doesn't produce warnings that the return discards
67 const. aver that the value and storage are the same since storage
68 could potentially be NULL when value is not.
69 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
70 same as 0.
71
72 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
73
74 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
75 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
76 us a slightly cleaner distribution, and also works.
77 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
78 gnulib changes.
79
80 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
81 and Paul Eggert <eggert@cs.ucla.edu>
82
83 Don't let Bison leak memory except when it complains.
84 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
85 (spec_defines_file, dir_prefix): Now char *, not const char *,
86 since they are freed.
87 * src/files.c: Likewise.
88 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
89 Likewise.
90 (tr): Now operates in-place. All uses changed.
91 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
92 values.
93 (compute_file_name_parts, compute_output_file_names): Don't store
94 read-only data in variables that will be freed.
95 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
96 src_extension, and header_extension.
97 (output_file_names_free): New public function to free
98 spec_verbose_file, spec_graph_file, spec_defines_file,
99 parser_file_name, and dir_prefix.
100 * src/getargs.c (getargs): Don't store read-only data in variables that
101 will be freed.
102 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
103 (which previously existed but was unused), and quotearg_free.
104 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
105 * src/muscle_tab.c: Likewise.
106 (muscle_entry): Make the value char const *,
107 and add a new storage member that is char * and can be freed.
108 (muscle_entry_free): New private function.
109 (muscle_init): Use it instead of free.
110 (muscle_insert, muscle_grow): Update and use new storage member.
111 (muscle_code_grow): Free the string passed to muscle_grow
112 since it's not needed anymore.
113 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
114 add a new `char *code' member.
115 ("{...}"): Declare semantic type as code.
116 * src/scan-code.h (translate_rule_action):
117 (translate_symbol_action, translate_code, translate_action): Return
118 `char const *' rather than `char *' since external code should not free
119 these strings.
120 * src/scan-code.l: Likewise.
121 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
122 which is "{...}" in the parser.
123 * tests/Makefile.am (maintainer-check-valgrind): Set
124 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
125 Valgrind.
126 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
127 complain.
128 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
129 expecting a non-zero exit status sets --leak-check=summary and
130 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
131 this case, and we don't want to hear about it.
132
133 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
134
135 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
136 instead of from the template, to simplify configuration a bit.
137 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
138 and m4/wint_t.m4, as they are needed with the latest gnulib.
139
140 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
141
142 Disable unset/unused mid-rule value warnings by default, and recognize
143 --warnings=midrule-values to enable them. Discussed starting at
144 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
145 * NEWS (2.3a+): Mention.
146 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
147 warnings): Add entry for midrule-values subargument.
148 * src/reader.c (symbol_should_be_used): Don't return true just because
149 the value is a set/used mid-rule value unless
150 --warnings=midrule-values was specified.
151 * tests/input.at (Unused values, Unused values before symbol
152 declarations): Run tests with and without --warnings=midrule-values.
153
154 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
155 than LIST_FREE directly.
156
157 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
158
159 Finish implementing --warnings=error, which should not be implied by
160 --warnings=all (or by its synonyms -W and --warnings without
161 subarguments).
162 * src/complain.c (set_warning_issued): New function to report that
163 warnings are being treated as errors and to record an error if so.
164 Invoke...
165 (warn_at, warn): ... here.
166 * src/getargs.c (warnings_args, warnings_types): Reorder so that
167 "error - warnings are errors" does not appear above "all - all of the
168 above".
169 (getargs): For -W and --warnings without subarguments, don't let
170 FLAGS_ARGMATCH set warnings_error in warnings_flag.
171 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
172
173 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
174
175 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
176 empty subargument list. For example: `bison --warnings= parser.y'.
177
178 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
179
180 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
181 the parser header file so that gcc doesn't warn.
182
183 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
184
185 Split the default %destructor/%printer into two kinds: <*> and <!>.
186 Discussed starting at
187 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
188 * NEWS (2.3a+): Mention.
189 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
190 previous change today related to mid-rules.
191 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
192 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
193 (TYPE_TAG_ANY): Add as <*>.
194 (TYPE_TAG_NONE): Add as <!>.
195 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
196 for <*> and <!>.
197 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
198 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
199 * src/symlist.c (symbol_list_default_new): Split into tagged and
200 tagless versions.
201 (symbol_list_destructor_set, symbol_list_printer_set): Split
202 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
203 SYMLIST_DEFAULT_TAGLESS.
204 * src/symlist.h: Update symbol_list_default*_new prototypes.
205 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
206 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
207 * src/symtab.c (default_destructor, default_destructor_location,
208 default_printer, default_printer_location): Split each into tagged and
209 tagless versions.
210 (symbol_destructor_get, symbol_destructor_location_get,
211 symbol_printer_get, symbol_printer_location_get): Implement tagged
212 default and tagless default cases.
213 (default_destructor_set, default_printer_set): Split each into tagged
214 and tagless versions.
215 * src/symtab.h: Update prototypes.
216 * tests/actions.at (Default %printer and %destructor): Rename to...
217 (Default tagless %printer and %destructor): ... this, and extend.
218 (Per-type %printer and %destructor): Rename to...
219 (Default tagged and per-type %printer and %destructor): ... this, and
220 extend.
221 (Default %printer and %destructor for user-defined end token): Extend.
222 (Default %printer and %destructor are not for error or $undefined):
223 Update.
224 (Default %printer and %destructor are not for $accept): Update.
225 (Default %printer and %destructor for mid-rule values): Extend.
226 * tests/input.at (Default %printer and %destructor redeclared): Extend.
227 (Unused values with default %destructor): Extend.
228
229 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
230
231 Don't apply the default %destructor/%printer to an unreferenced midrule
232 value. Mentioned at
233 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
234 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
235 like $@n instead of just @n so that the default %destructor/%printer
236 logic doesn't see them as user-defined symbols.
237 (symbol_is_dummy): Check for both forms of the name.
238 * src/reader.c (packgram): Remove the `$' from each midrule symbol
239 name for which the midrule value is referenced in any action.
240 * tests/actions.at (Default %printer and %destructor for mid-rule
241 values): New test.
242 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
243 for change to dummy symbol names.
244
245 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
246
247 Warn about unset midrule $$ if the corresponding $n is used.
248 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
249 $n usage.
250 (packgram): Before invoking grammar_rule_check on any rule, make sure
251 all actions have already been scanned in order to set `used' flags.
252 Otherwise, checking that a midrule's $$ is set will not always work
253 properly because the midrule check must forward-reference the midrule's
254 parent rule.
255 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
256 warning.
257
258 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
259
260 More improvements to the documentation of the prologue alternatives:
261 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
262 Bison manual.
263 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
264 some text to clarify the relative importance of the new directives and
265 to show how these directives may be viewed as code labels.
266
267 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
268
269 Similar to the recently removed %before-header, add %code-top as the
270 alternative to the pre-prologue. Mentioned at
271 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
272 Also, let the prologue alternatives appear in the grammar section.
273 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
274 (prologue_declaration): Move the existing prologue alternatives to...
275 (grammar_declaration): ... here and add %code-top.
276 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
277
278 Clean up and extend documentation for the prologue alternatives.
279 * NEWS (2.3a+): Describe prologue alternatives.
280 * doc/bison.texinfo (Prologue): Move discussion of prologue
281 alternatives to...
282 (Prologue Alternatives): ... this new section, and extend it to discuss
283 all 4 directives in detail.
284 (Bison Symbols): Clean up discussion of prologue alternatives and add
285 %code-top.
286
287 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
288
289 DJGPP specific issues.
290
291 * djgpp/config.bat: config.hin has been moved to lib. Adjust
292 config.bat accordingly.
293 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
294 * djgpp/config.site: Likewise.
295
296 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
297
298 Replace %*-header with %provides, %requires, %code. See discussion at
299 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
300
301 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
302 (b4_user_start_header): Remove.
303 * data/glr.c: Use new macros instead of b4_*start_header
304 and b4_*end_header.
305 * data/glr.cc: Likewise.
306 * data/lalr1.cc: Likewise.
307 * data/push.c: Likewise.
308 * data/yacc.c: Likewise.
309
310 * doc/bison.texinfo: Remove %before-header, rename
311 %{start,end,after}-header to %requires, %provides, %code.
312
313 * src/parse-gram.y: Likewise (also rename token names accordingly).
314 * src/scan-gram.l: Likewise.
315 * tests/actions.at: Likewise.
316
317 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
318
319 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
320 Problem reported by Joel E. Denny.
321
322 2006-10-14 Jim Meyering <jim@meyering.net>
323
324 (Sync from coreutils.)
325 Work also when the working directory (with e.g. coreutils sources)
326 is version controlled with git, rather than CVS.
327 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
328 rather than CVS.
329 In messages and comments, say e.g., "checked-out sources",
330 rather than "CVS sources".
331 (version_controlled_file): New function. Work for git as well as
332 for CVS. Don't use grep's -q option.
333 (slurp): Call it here, in place of CVS-specific code.
334
335 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
336
337 Fix testsuite for ./configure --enable-gcc-warnings:
338 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
339 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
340 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
341 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
342 * test/regression.at (Diagnostic that expects two alternatives):
343 Likewise.
344
345 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
346
347 * bootstrap.conf (gnulib_modules): Add config-h.
348 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
349 worry about HAVE_CONFIG_H.
350 * lib/abitset.c: Likewise.
351 * lib/bitset.c: Likewise.
352 * lib/bitset_stats.c: Likewise.
353 * lib/bitsetv-print.c: Likewise.
354 * lib/bitsetv.c: Likewise.
355 * lib/ebitset.c: Likewise.
356 * lib/get-errno.c: Likewise.
357 * lib/lbitset.c: Likewise.
358 * lib/subpipe.c: Likewise.
359 * lib/timevar.c: Likewise.
360 * lib/vbitset.c: Likewise.
361 * lib/bitset.c: Include "bitset.h" first, to test interface.
362 * lib/bitset_stats.c: Include "bitset_stats.h" first.
363 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
364 * lib/bitsetv.c: Include "bitsetv.h" first.
365 * lib/get-errno.c: Include "get-errno.h" first.
366 * m4/.cvsignore: Add config-h.m4.
367 * tests/actions.at (Default %printer and %destructor for ...):
368 Adjust expected line numbers in output to reflect removal of #if
369 HAVE_CONFIG_H lines.
370 * tests/glr-regression.at (Missed %merge type warnings when ...):
371 Likewise.
372 * tests/regression.at (Braced code in declaration in rules section):
373 Likewise.
374 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
375 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
376 Include <config.h> unconditionally.
377
378 * bootstrap: Sync from coreutils, as follows:
379
380 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
381
382 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
383 variable was sometimes used without being initialized. This
384 messed up the installation of the INSTALL file in some cases.
385
386 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
387
388 * bootstrap (usage, main program, symlink_to_gnulib): Add option
389 --copy. Inspired by a suggestion from Bruno Haible.
390
391 2006-10-03 Jim Meyering <jim@meyering.net>
392
393 * bootstrap: Undo last change to this file, since now gnulib-tool
394 sticks with the automake default in generating dependencies.
395
396 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
397
398 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
399 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
400
401 * doc/bison.1: Add copyright notice.
402
403 * data/glr.c: Don't include <stdarg.h>; not used.
404
405 * NEWS: The -g and --graph options now output graphs in Graphviz
406 DOT format, not VCG format.
407 * doc/bison.1: Likewise.
408 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
409 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
410 of this change in
411 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
412 * TODO: Remove Graphviz entry.
413 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
414 remove vcg.c, vcg.h, vcg_defaults.h.
415 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
416 * src/graphviz.c, src/graphviz.h: New files.
417 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
418 * src/files.h: Make comment more generic.
419 * src/main.c (main): Likewise.
420 * src/print_graph.h: Likewise.
421 * src/getargs.c (usage): Make usage description more generic.
422 * src/print_graph.c: Include graphviz.h rather than vcg.h.
423 (static_graph, fgraph): Remove. All uses changed to pass
424 arguments instead of sharing a static var.
425 (print_core, print_actions, print_state, print_graph):
426 Output graphviz format rather than VCG format.
427 * tests/.cvsignore: Remove *.vcg; add *.dot.
428 * tests/output.at: Expect *.dot files, not *.vcg files.
429
430 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
431 accommodates the 2006-10-08 change.
432
433 2006-10-11 Bob Rossi <bob@brasko.net>
434
435 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
436 (b4_yyssa, b4_yyerror_range): New macros.
437 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
438 (yypvarsinit): Remove init of removed fields.
439 (yypushparse): Remove use of removed fields; use new macros instead.
440
441 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
442
443 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
444 in a push parser. Reindent slightly to match yacc.c better.
445
446 2006-10-11 Bob Rossi <bob@brasko.net>
447
448 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
449 yymsg_alloc fields.
450 (yypvarsinit, yypushparse): Remove init of removed fields.
451 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
452
453 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
454
455 * THANKS: Add Paolo Bonzini and Bob Rossi.
456
457 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
458
459 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
460 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
461 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
462 b4_define_user_cde and uses): Remove.
463 (b4_comment, b4_prefix, b4_sync_start): New.
464 * data/bison.m4: New file, with most of the content removed from c.m4.
465 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
466 * src/output.c (output_skeleton): Pass bison.m4.
467 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
468 only if specified.
469
470 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
471
472 Fix test failure reported by Tom Lane in
473 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
474 and try to make such failures easier to catch in the future.
475 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
476 that's now the caller's responsibility.
477 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
478 Set yychar = YYEOF if it's negative.
479 * tests/actions.at (yylex): Abort if asked to read past EOF.
480 * tests/conflicts.at (yylex): Likewise.
481 * tests/cxx-type.at (yylex): Likewise.
482 * tests/glr-regression.at (yylex): Likewise.
483 * tests/input.at (yylex): Likewise.
484 * tests/regression.at (yylex): Likewise.
485 * tests/torture.at (yylex): Likewise.
486
487 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
488
489 Fix problems with translating English-language diagnostics.
490 * bootstrap: Fix bug introduced in recent bootstrap changes, with
491 respect to bison-runtime pot generation. The YY_ stuff
492 wasn't being captured.
493 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
494 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
495 * runtime-po/POTFILES.in: Add data/push.c.
496
497 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
498
499 Merge bootstrap changes from coreutils.
500
501 2006-09-28 Jim Meyering <jim@meyering.net>
502
503 Automatically generated dependencies are important even
504 when all of the sources in a directory come from gnulib.
505 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
506 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
507
508 2006-09-23 Jim Meyering <jim@meyering.net>
509
510 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
511
512 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
513
514 * bootstrap: Add support for --force.
515 (usage): New function. Describe usage less tersely.
516 (CVS_only_file): New var.
517
518 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
519
520 * data/push.c (YYPUSH_MORE): Make it an enum instead.
521 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
522 Adjust white space and comments to match GNU style better.
523
524 2006-09-20 Bob Rossi <bob@brasko.net>
525
526 * data/push.c (yyresult_get): Remove function.
527 (YYPUSH_MORE): Add #define.
528 (yypushparse): Modify return value.
529
530 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
531
532 * stamp-h.in: Remove; no longer needed.
533 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
534 Remove config.h, config.hin, intl (no longer created).
535 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
536 stamp-h1.
537
538 Sync bootstrap from coreutils, as follows:
539
540 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
541
542 * bootstrap (symlink_to_gnulib): New function.
543 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
544 to copies-of-gnulib.
545 (cp_mark_as_generated, slurp, gnulib_files):
546 Avoid making a copy if it's the same as the old version.
547 (gnulib_files): Add support for this variable (used by Bison).
548
549 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
550
551 * src/getargs.c (usage): Rework to use conventions similar to
552 coreutils, to make translation a bit easier and the code a bit
553 smaller. Problem reported by Tim Van Holder.
554
555 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
556
557 Use some of gnulib's new modules, taken from coreutils.
558
559 * bootstrap: Sync from coreutils, except add support for gnulib_files.
560 * bootstrap.conf: New file.
561 (gnulib_modules): Add configmake, inttypes, unistd.
562 (XGETTEXT_OPTIONS): Add complain, complain_at,
563 fatal, fatal_at, warn, warn_at, unexpected_end.
564 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
565 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
566 (gl_EARLY): Add.
567 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
568 (gl_INIT): Add
569 (GNULIB_AUTOCONF_SNIPPET): Remove.
570 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
571 the pickiest.
572 * lib/.cvsignore: Add inttypes_.h.
573 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
574 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
575 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
576 no-longer-necessary initializations.
577 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
578 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
579 use the unistd module.
580 * src/system.h: Likewise.
581 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
582 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
583 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
584 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
585 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
586 * src/system.h: Include inttypes.h unconditionally, now that we
587 use the inttypes module. Don't bother to include stdint.h, since
588 inttypes.h now does that for us.
589 (LOCALEDIR): Remove, now that we use the configmake module.
590 * src/getargs.c: Include configmake.h.
591 * src/main.c: Likewise.
592 * src/output.c: Likewise.
593 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
594 not from $abs_top_builddir, since config.h moved.
595
596
597 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
598 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
599
600 * src/parse-gram.y (symbol_declaration): Don't put statements
601 before declarations; it's not portable to C89.
602 * src/scan-code.l (handle_action_at): Likewise.
603
604 * src/scan-code.l: Always initialize braces_level; the old code
605 left it uninitialized and therefore had undefined behavior.
606
607 Don't attempt to redefine 'assert', since it runs afoul of
608 systems where standard headers (mistakenly) include <assert.h>.
609 Instead, define and use our own alternative, called 'aver'.
610 * src/reader.c: Don't include assert.h, since we no longer
611 use assert.
612 * src/scan-code.l: Likewise.
613 * src/system.h (assert): Remove, replacing with....
614 (aver): New function, taking a bool arg. All uses changed.
615 * src/tables.c (pack_vector): Ensure that aver arg is bool,
616 not merely an integer.
617
618 2006-09-15 Bob Rossi <bob@brasko.net>
619
620 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
621 * data/c.m4 (YYPUSH): New.
622 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
623 * src/getargs.c (push_parser): New var.
624 * src/getargs.h (push_parser): New declaration.
625 * src/output.c (prepare): Add macro insertion of `push_flag'.
626 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
627 (prologue_declaration): Parse %push-parser.
628 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
629 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
630 list of removed lines from the traces observed.
631 (AT_CHECK_CALC_LALR): Added push parser tests.
632
633 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
634
635 * NEWS: Version 2.3a.
636 * configure.ac (AC_INIT): Likewise.
637
638 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
639 "#define YYSTYPE int" that caused "make maintainer-check" to fail
640 due to header ordering dependencies. I don't know why the #define
641 was there.
642
643 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
644 runtime cost when YYDEBUG is not defined, and so that some tests
645 that used to fail now work. Problem and initial suggestion by
646 Paolo Bonzini.
647 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
648 * data/glr.cc (b4_parser_class_name):
649 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
650 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
651 (yydebug_) [YYDEBUG]: New member.
652 (yycdebug_): Now defined only if YYDEBUG.
653 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
654 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
655 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
656 if YYYDEBUG.
657 (debug_stream, set_debug_stream, debug_level, set_debug_level):
658 Define only if YYDEBUG.
659 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
660 set_debug_level.
661 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
662 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
663 AT_CHECK_CALC_GLR_CC that are working now.
664
665 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
666
667 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
668 We don't need them in glr.cc, and glr.c defines them.
669 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
670 assumes that defining it to anything is the same as defining
671 it to 1. Problem reported by Paolo Bonzini.
672
673 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
674
675 * data/c.m4 (b4_null, b4_case): Define.
676 * src/output.c (prepare_symbols): Use b4_null.
677 (user_actions_output): Use b4_case.
678
679 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
680
681 * data/glr.c (b4_shared_declarations): Put start-header first,
682 before any #includes that we generate, so that feature-test
683 macros work. Problem reported by Michael Deutschmann in
684 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
685 * data/lalr1.cc: Likewise.
686 * doc/bison.texinfo (Prologue): Document that feature-test macros
687 should be defined before any Bison declarations.
688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
689 that depend on location.hh after, not before, Bison decls, since
690 we now include location.hh after the first user prologue.
691
692 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
693 Sander Brandenburg in
694 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
695 Also, fix minor white space and comment issues.
696 (Prologue): Mention that it's better to define feature-test macros
697 before Bison declarations. Problem reported by Michael Deutschmann.
698
699 * README-cvs: Fix typo: "&" should be "&&". Problem reported
700 by Jim Meyering.
701 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
702 This adjusts to recent gnulib changes.
703
704 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
705
706 Finish implementation of per-type %destructor/%printer. Discussed
707 starting at
708 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
709 and
710 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
711 * NEWS (2.3+): Add a description of this feature to the default
712 %destructor/%printer description.
713 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
714 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
715 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
716 list node contains a semantic type.
717 * src/symtab.c, src/symtab.h: Extend with a table that associates
718 semantic types with their %destructor's and %printer's.
719 (semantic_type_from_uniqstr, semantic_type_get,
720 semantic_type_destructor_set, semantic_type_printer_set): New functions
721 composing the public interface of that table.
722 (symbol_destructor_get, symbol_destructor_location_get,
723 symbol_printer_get, symbol_printer_location_get): If there's no
724 per-symbol %destructor/%printer, look up the per-type before trying
725 the default.
726 * tests/actions.at (Per-type %printer and %destructor): New test case.
727 * tests/input.at (Default %printer and %destructor redeclared):
728 Extend to check that multiple occurrences of %symbol-default in a
729 single %destructor/%printer declaration is an error.
730 (Per-type %printer and %destructor redeclared, Unused values with
731 per-type %destructor): New test cases.
732
733 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
734
735 Require default %destructor/%printer to be declared using
736 %symbol-default instead of an empty symbol list, and start working on
737 new per-type %destructor/%printer. Discussed at
738 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
739 * NEWS (2.3+): Add %symbol-default to example.
740 * bison.texinfo (Freeing Discarded Symbols): Likewise.
741 (Bison Symbols): Add entry for %symbol-default.
742 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
743 (generic_symlist, generic_symlist_item): New nonterminals for creating
744 a list in which each item is a symbol, semantic type, or
745 %symbol-default.
746 (grammar_declaration): Use generic_symlist in %destructor and %printer
747 declarations instead of symbols.1 or an empty list.
748 (symbol_declaration, precedence_declaration, symbols.1): Update actions
749 for changes to symbol_list.
750 * src/reader.c: Update for changes to symbol_list.
751 * src/scan-code.l: Likewise.
752 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
753 * src/symlist.c, src/symlist.h: Extend such that a list node may
754 represent a semantic type or a %symbol-default in addition to just an
755 ordinary symbol. Add switched functions for setting %destructor's and
756 %printer's.
757 * tests/actions.at, tests/input.at: Add %symbol-default to all default
758 %destructor/%printer declarations.
759
760 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
761
762 Whether the default %destructor/%printer applies to a particular symbol
763 isn't a question of whether the user *declares* that symbol (in %token,
764 for example). It's a question of whether the user by any means
765 *defines* the symbol at all (by simply using a char token, for
766 example). $end is defined by Bison whereas any other token with token
767 number 0 is defined by the user. The error token is always defined by
768 Bison regardless of whether the user declares it with %token, but we
769 may one day let the user define error as a nonterminal instead.
770 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
771 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
772 the meaning of "user-defined".
773 * tests/actions.at (Default %printer and %destructor for user-declared
774 end token): Rename to...
775 (Default %printer and %destructor for user-defined end token): ...
776 this.
777
778 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
779 computation of whether to apply the default, don't maintain a list of
780 every Bison-defined symbol. Instead, just check for a first character
781 of '$', which a user symbol cannot have, and check for the error token.
782
783 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
784
785 Don't apply the default %destructor or %printer to the error token,
786 $undefined, or $accept. This change fits the general rule that the
787 default %destructor and %printer are only for user-declared symbols,
788 and it solves several difficulties that are described in the new test
789 cases listed below.
790 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
791 * tests/actions.at (Default %printer and %destructor are not for error
792 or $undefined, Default %printer and %destructor are not for $accept):
793 New test cases.
794
795 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
796
797 Allow %start after the first rule.
798 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
799 when parsing the first rule.
800 (check_and_convert_grammar): Search for it here after all grammar
801 declarations have been parsed. Skip midrules, which have dummy LHS
802 nonterminals.
803 * src/symtab.c (symbol_is_dummy): New function.
804 * src/symtab.h (symbol_is_dummy): Declare it.
805 * tests/input.at (%start after first rule): New test.
806
807 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
808
809 Redo some of the previous commit: add back the ability to use
810 non-aliased/undeclared string literals since it might be useful to
811 those declaring %token-table.
812 * src/reader.c (check_and_convert_grammar): Undo changes in previous
813 commit: don't worry about complaints from symbols_pack.
814 * src/symtab.c (symbol_new, symbol_class_set,
815 symbol_check_alias_consistency): Undo changes in previous commit: count
816 each string literal as a new symbol and token, assign it a symbol
817 number, and don't complain about non-aliased string literals.
818 (symbols_pack): Since symbol_make_alias still does not decrement symbol
819 and token counts but does still set aliased tokens to the same number,
820 symbol_pack_processor now leaves empty slots in the symbols array.
821 Remove those slots.
822 * tests/regression.at (Undeclared string literal): Remove test case
823 added in previous commit since non-aliased string literals are allowed
824 again.
825 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
826 remove unnecessary string literal declarations.
827 * tests/sets.at (Firsts): Likewise.
828
829 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
830
831 Don't allow an undeclared string literal, but allow a string literal to
832 be used before its declaration.
833 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
834 symbols_pack complained.
835 * src/symtab.c (symbol_new): Don't count a string literal as a new
836 symbol.
837 (symbol_class_set): Don't count a string literal as a new token, and
838 don't assign it a symbol number since symbol_make_alias does that.
839 (symbol_make_alias): It's not necessary to decrement the symbol and
840 token counts anymore. Don't assume that an alias declaration occurs
841 before any uses of the identifier or string, and thus don't assert that
842 one of them has the highest symbol number so far.
843 (symbol_check_alias_consistency): Complain if there's a string literal
844 that wasn't declared as an alias.
845 (symbols_pack): Bail if symbol_check_alias_consistency failed since
846 symbol_pack asserts that every token has been assigned a symbol number
847 although undeclared string literals have not.
848 * tests/regression.at (String alias declared after use, Undeclared
849 string literal): New test cases.
850 (Characters Escapes, Web2c Actions): Declare string literals as
851 aliases.
852 * tests/sets.at (Firsts): Likewise.
853
854 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
855
856 In the grammar scanner, STRING_FINISH unclosed constructs and return
857 them to the parser in order to improve error messages.
858 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
859 SC_BRACED_CODE, SC_PROLOGUE): Implement.
860 * tests/input.at (Unclosed constructs): New test case.
861 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
862 seen.
863
864 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
865 unused global.
866
867 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
868
869 Handle string aliases for character tokens correctly.
870 * src/symtab.c (symbol_user_token_number_set): If the token has an
871 alias, check and set its alias's user token number instead of its own,
872 which is set to indicate the alias. Previously, every occurrence of
873 the character token in the grammar overwrote that alias indicator with
874 the character code.
875 * tests/input.at (String aliases for character tokens): New test.
876
877 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
878
879 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
880
881 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
882
883 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
884 to prevent failures when building on older platforms.
885 Check for autopoint failure.
886 Set XGETTEXT_OPTIONS to values that check for C format strings,
887 so that translators are warned about them (this also helps
888 prevent core dumps).
889
890 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
891 function, since it simplifies our code a bit.
892
893 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
894 rather than -W, so we don't get bogus warnings about sign comparisons.
895 Add -Wpointer-arith, since that warning is useful (it reports code
896 that does not conform to C89 and that some compilers reject).
897 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
898 since it's no longer needed.
899
900 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
901
902 Clean up scanners a bit.
903 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
904 definitions so gcc won't warn when obstack_for_string is unused.
905 * src/scan-code.l: config.h and system.h are already #include'd by
906 scan-code-c.c, so get rid of them here.
907 * src/scan-gram.l: Likewise.
908 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
909 definitions rather than duplicating the rest of it.
910 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
911
912 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
913
914 Suppress signed/unsigned comparison warnings for yycheck.
915 * data/c.m4 (b4_safest_int_type): New macro.
916 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
917 a signed int type, cast it to b4_safest_int_type first.
918 * data/yacc.c: Likewise.
919 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
920 also overwritten.
921
922 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
923
924 * doc/bison.texinfo: Fix some typos.
925
926 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
927
928 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
929 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
930
931 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
932 the latest gnulib does this a different way.
933 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
934 translation was patched, so stop omitting it.
935
936 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
937
938 Enable declaration of default %printer/%destructor. Make the parser
939 use these for all user-declared grammar symbols for which the user does
940 not declare a specific %printer/%destructor. Thus, the parser uses it
941 for token 0 if the user declares it but not if Bison generates it as
942 $end. Discussed starting at
943 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
944 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
945 and
946 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
947 * NEWS (2.3+): Mention.
948 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
949 declare a %destructor for a mid-rule's semantic value. It's just
950 impossible to declare one specific to it.
951 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
952 code. Describe default %destructor form.
953 * src/parse-gram.y (grammar_declaration): Parse default
954 %printer/%destructor declarations.
955 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
956 and symbol_destructor_location_get rather than accessing the destructor
957 and destructor_location members of struct symbol.
958 (symbol_printers_output): Likewise but for %printer's.
959 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
960 again.
961 * src/symtab.c (default_destructor, default_destructor_location,
962 default_printer, default_printer_location): New static global
963 variables to record the default %destructor and %printer.
964 (symbol_destructor_get, symbol_destructor_location_get,
965 symbol_printer_get, symbol_printer_location_get): New functions to
966 compute the appropriate %destructor and %printer for a symbol.
967 (default_destructor_set, default_printer_set): New functions to set the
968 default %destructor and %printer.
969 * src/symtab.h: Prototype all those new functions.
970 * tests/actions.at (Default %printer and %destructor): New test to
971 check that the right %printer and %destructor are called, that they're
972 not called for $end, and that $$ and @$ work correctly.
973 (Default %printer and %destructor for user-declared end token): New
974 test to check that the default %printer and %destructor are called for
975 a user-declared end token.
976 * tests/input.at (Default %printer and %destructor redeclared, Unused
977 values with default %destructor): New tests to check related grammar
978 warnings and errors.
979
980 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
981
982 Clean up handling of %destructor for the end token (token 0).
983 Discussed starting at
984 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
985 and
986 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
987
988 Make the skeletons consistent in how they pop the end token and invoke
989 its %destructor.
990 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
991 state, which has token number 0, since this would invoke the
992 %destructor for the end token.
993 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
994 until after shifting the end token, or else it won't be popped.
995 * data/yacc.c (yyparse): Likewise.
996
997 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
998 it's the end token. Upon termination, destroy an unshifted lookahead
999 even when it's the end token.
1000 * data/lalr1.cc (yy::parser::parse): Likewise.
1001 * data/yacc.c (yyparse): Likewise.
1002
1003 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1004 value warnings for the end token when the user gives the end token a
1005 %destructor.
1006
1007 * tests/actions.at (Printers and Destructors): Test all the above.
1008
1009 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1010
1011 Update to latest gnulib and gettext versions.
1012 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1013 Add fopen-safer.
1014 (gnulib_files): Add m4/warning.m4. Don't worry about files
1015 overwritten by autopoint.
1016 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1017 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1018 rejects them.
1019 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1020 so that we can remove the intl files at a better time.
1021 (intl_files_to_remove): Remove aclocal.m4, since it gets
1022 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1023 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1024 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1025 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1026 Remove datarootdir hack; no longer needed.
1027 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1028 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1029 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1030 strdup.h.
1031 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1032 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1033
1034 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1035
1036 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1037 it with --assume-autoconf='latest-stable'.
1038
1039 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1040
1041 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1042 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1043 YYSTYPE' and `{'.
1044 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1045 those from muscle_tab.c since the old ones are misleading.
1046
1047 2006-07-13 Akim Demaille <akim@epita.fr>
1048
1049 Support %define "KEY" {VALUE}.
1050 * src/scan-code.h, src/scan-code.l (translate_action)
1051 (translate_rule_action, translate_symbol_action, translate_code):
1052 Return char *, not const char *.
1053 * src/parse-gram.y (declaration): Rename as...
1054 (prologue_declaration): this.
1055 (string_content): Remove this nonterminal, use STRING.
1056 (braceless, content, content.opt): New nonterminal.
1057 Use them.
1058 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1059 as value.
1060 * src/scan-gram.l (getargs.h): Don't include it.
1061
1062 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1063
1064 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1065 rather than a for-loop that declares a local bool variable. This
1066 should work around a compatibility problem with a Cray x1e C++
1067 compiler reported by Hung Nguyen in
1068 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1069 The for-loop was introduced in the 2004-11-17 change but I don't
1070 know why it was needed.
1071
1072 2006-07-12 Akim Demaille <akim@epita.fr>
1073
1074 * data/c.m4: Comment changes.
1075
1076 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
1077
1078 * src/complain.c (error_message, ERROR_MESSAGE): New.
1079 To factor...
1080 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1081 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1082
1083 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1084
1085 * NEWS: Instead of %union, you can define and use your own union type
1086 YYSTYPE if your grammar contains at least one <type> tag.
1087 Your YYSTYPE need not be a macro; it can be a typedef.
1088 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1089 (Union Decl, Decl Summary): Document this.
1090 * data/glr.c (YYSTYPE): Implement this.
1091 * data/glr.cc (YYSTYPE): Likewise.
1092 * data/lalr1.cc (YYSTYPE): Likewise.
1093 * data/yacc.c (YYSTYPE): Likewise.
1094 * src/output.c (prepare): Output tag_seen_flag.
1095 * src/parse-gram.y (declaration, grammar_declaration):
1096 Use 'union_seen' rather than 'typed' to determine whether
1097 %union has been seen, since grammars can now be typed without
1098 %union.
1099 (symbol_declaration, type.opt, symbol_def):
1100 Keep track of whether a tag has been seen.
1101 * src/reader.c (union_seen, tag_seen): New vars.
1102 (typed): remove.
1103 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1104 * src/scan-code.l (untyped_var_seen): New variable.
1105 (handle_action_dollar): Adjust to above changes.
1106 (handle_action_dollar, handle_action_at):
1107 Improve overflow checking for outlandish numbers.
1108 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1109 avoid new diagnostics generated by above changes.
1110 * tests/regression.at (YYSTYPE typedef): Add test to check
1111 for type tags without %union.
1112
1113 * src/symlist.c (symbol_list_length): Return int, not unsigned
1114 int, since callers expect int. This may need to get revisited
1115 once we have proper integer overflow checking.
1116
1117 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1118 object is now static.
1119
1120 * src/getargs.c (flags_argmatch): Return void, not int,
1121 to pacify ./configure --enable-gcc-warnings.
1122
1123 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1124 since last_string is already defined to FLEX_PREFIX (last_string).
1125
1126 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1127
1128 Implement --warnings/-W.
1129 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1130 replaced by...
1131 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1132 Adjust callers.
1133 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1134 (warnings_args, warnings_types): New.
1135 (getargs, short_options, long_options): Accept -W/--warnings.
1136 Sort the options by alphabetical order, upper case letter right
1137 before its lower case.
1138
1139 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1140
1141 Change %merge result type clash warnings to errors. Discussed at
1142 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1143 * src/reader.c (record_merge_function_type): Use complain_at.
1144 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1145 declared later): Update test case results.
1146
1147 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1148
1149 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1150 to be in alphabetical order.
1151 (trace_args): Spelling fixes.
1152
1153 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1154
1155 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1156 so they don't collide with user-defined macros.
1157 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1158 this was never guaranteed, and now that we're using gnulib stdint,
1159 which defines int_fast16_t to long int, the problem is exposed.
1160
1161 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1162
1163 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1164 need the full POSIX semantics (and weren't implementing them
1165 anyway).
1166
1167 Adjust to Autoconf 2.60 and today's gnulib.
1168 * bootstrap (gnulib_modules): Add stdint.
1169 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1170 no longer copies it.
1171 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1172 since stdint needs the former and wcwidth (which is now required
1173 by mbswidth) needs the latter.
1174 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1175 work around a compatibility glitch between gettext 0.14.6 and
1176 Autoconf 2.60.
1177 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1178 Do not check for uintptr_t, since new stdint module does the right
1179 thing.
1180 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1181 Add stdint.h, stdint_.h, wcwidth.h.
1182 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1183 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1184 stdint.m4, wchar_t.m4, wcwidth.m4.
1185 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1186 usual order for ../lib/*.h files.
1187 (file_name_split): Use last_component, not base_name, to adjust
1188 to gnulib changes.
1189 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1190 for ../lib/*.h files.
1191 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1192 Define unconditionally, since we now assume the stdint module.
1193 * src/scan-skel.l: Include <dirname.h>.
1194 (BASE_QPUTS): Use last_component, not base_name.
1195 * src/system.h: Include <unlocked-io.h> in the usual order
1196 for ../lib/*.h files. Include <stdint.h> unconditionally,
1197 since we now use the stdint module.
1198 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1199 HAVE_UINTPTR_T, since we now use the stdint module.
1200 (base_name): Remove decl, since files now include <dirname.h>
1201 to get the decl.
1202
1203 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1204
1205 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1206 New, default to 1.
1207 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1208 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1209 default.
1210 * tests/calc.at: Adjust.
1211
1212 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1213
1214 * data/c.m4 (b4_basename): New.
1215 (b4_syncline): Also output the location of its invocation (from
1216 the skeleton).
1217 (b4_user_action, b4_define_user_action, b4_user_actions)
1218 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1219 (b4_user_stype): New.
1220 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1221
1222 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1223
1224 In the grammar file, the first column is 1 not 0 on the first line as
1225 on every other line.
1226 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1227 * tests/input.at (Torturing the Scanner): Update output.
1228
1229 * src/scan-gram.l (scanner_cursor): Declare it static.
1230
1231 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1232
1233 In warnings, say "previous declaration" rather than "first
1234 declaration".
1235 * src/symtab.c (redeclaration): Do that here.
1236 * src/reader.c (record_merge_function_type): In the case of a result
1237 type clash, report the previous declaration rather than the very first
1238 one in the grammar file.
1239 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1240 declared later): Add a third declaration to check this behavior.
1241 * tests/input.at (Incompatible Aliases): Update output.
1242
1243 2006-06-27 Akim Demaille <akim@epita.fr>
1244
1245 * doc/Doxyfile.in: New.
1246 * doc/Makefile.am: Use it.
1247 * src/lalr.h, src/symtab.h: Initial doxygenation.
1248
1249 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1250
1251 Don't miss %merge result type warnings just because the LHS types are
1252 declared after the %merge. This continues the effort of the previous
1253 patch.
1254 * src/reader.c (get_merge_function): Don't set the merger type yet.
1255 (record_merge_function_type): New function for setting the merger type
1256 and checking for clashes.
1257 (grammar_current_rule_merge_set): Set the location of the %merge for
1258 the current rule.
1259 (packgram): Invoke record_merge_function_type for each rule now that
1260 all symbol type declarations have been parsed.
1261 * src/reader.h (merger_list.type_declaration_location): New member
1262 storing the location of the first %merge from which the type for this
1263 merging function was derived.
1264 * src/symlist.h (symbol_list.merger_declaration_location): New member
1265 storing the location of a rule's %merge, if any.
1266 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1267 declared later): New test to catch the error fixed by the above patch.
1268
1269 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1270
1271 Get action warnings (grammar_rule_check) right even when symbol
1272 declarations appear after the rules. Discussed at
1273 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1274 and
1275 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1276 Don't mistake the type of $$ in a midrule to be that of its parent
1277 rule's $$.
1278 * src/reader.c (grammar_current_rule_end): Don't invoke
1279 grammar_rule_check yet since not all symbol declarations may have been
1280 parsed yet.
1281 (grammar_midrule_action): Likewise.
1282 Don't record whether the midrule's $$ has been used yet since actions
1283 haven't been translated yet.
1284 Record the midrule's parent rule and its RHS index within the parent
1285 rule.
1286 (grammar_current_rule_action_append): Don't translate the action yet
1287 since not all symbol declarations may have been parsed yet and, thus,
1288 warnings about types for $$, $n, @$, and @n can't be reported yet.
1289 (packgram): Translate the action and invoke grammar_rule_check now that
1290 all symbol declarations have been parsed.
1291 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1292 after parsing the entire grammar file, the symbol list here in the case
1293 of a midrule is actually the midrule's empty RHS, so reference its
1294 parent rule's RHS where necessary.
1295 On the other hand, now that you can already know it's a midrule, you
1296 aren't forced to think $$ has the same type as its parent rule's $$.
1297 (handle_action_at): In the case of a midrule, reference the parent rule
1298 where necessary.
1299 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1300 members.
1301 (symbol_list_length): Now that this is invoked after all rules have
1302 been parsed, a NULL symbol (rather than a NULL symbol list node)
1303 terminates a rule. symbol_list_print already does this correctly.
1304 * src/symlist.h (symbol_list.midrule_parent_rule,
1305 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1306 remember their relationships with their parents.
1307 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1308 fixed by the above patch.
1309 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1310 implementing...
1311 (Unused values): ... this old test case and...
1312 (Unused values before symbol declarations): ... this new test case.
1313 This one is the same as `Unused values' except that all symbol
1314 declarations appear after the rules in order to catch the rest of the
1315 errors fixed by the above patch.
1316
1317 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1318
1319 More cleanup.
1320 * src/reader.c (current_rule): Declare it static since it's no longer
1321 used outside this file.
1322 (grammar_current_rule_action_append): Remove redundant arguments from
1323 translate_rule_action invocation.
1324 * src/reader.h (current_rule): Remove this unused extern.
1325 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1326 * src/scan-code.l (translate_rule_action): Likewise.
1327
1328 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1329
1330 Clean up yesterday's patch.
1331 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1332 to...
1333 * src/reader.c (grammar_current_rule_action_append): ... here for
1334 consistency with grammar_current_rule_symbol_append.
1335 * tests/regression.at (Braced code in declaration in rules section):
1336 Make yyerror and yylex static as usual.
1337
1338 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1339
1340 Fix bug that mistakes braced code in a declaration in the rules section
1341 to be a rule action. Mentioned at
1342 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1343 * src/scan-gram.l: Move midrule action detection from the start of the
1344 scanning of any braced code to...
1345 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1346 action. For readability, use $2 and @2 rather than the equivalent
1347 global variables.
1348 * tests/regression.at (Braced code in declaration in rules section):
1349 New test to catch the error fixed by the above patch.
1350
1351 Work on code readability some.
1352 * src/scan-code.l (current_rule): Get rid of this misleading and
1353 redundant declaration: it's actually extern'ed in reader.h.
1354 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1355 translate_action): Add a rule argument and use it instead of the global
1356 current_rule.
1357 (translate_rule_action): This already receives current_rule through an
1358 argument, so pass it on to translate_action instead of assigning
1359 current_rule to current_rule.
1360 (translate_symbol_action, translate_code): Pass rule = NULL to
1361 translate_action.
1362
1363 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1364
1365 Rename %before-definitions to %start-header and %after-definitions to
1366 %end-header. Don't use these declarations to separate pre-prologue
1367 blocks from post-prologue blocks. Add new order-independent
1368 declarations %before-header and %after-header as alternatives to the
1369 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1370 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1371 * NEWS (2.3+): Update for these changes.
1372 * data/glr.c (b4_before_definitions): Update to...
1373 (b4_start_header): ... this.
1374 (b4_after_definitions): Update to...
1375 (b4_end_header): ... this.
1376 * data/glr.cc: Likewise.
1377 * data/lalr1.cc: Likewise.
1378 * data/yacc.c: Likewise.
1379 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1380 prologue blocks with %*-header declarations.
1381 (Calc++ Parser): Likewise.
1382 (Bison Declaration Summary): Update names.
1383 (Bison Symbols): Update description.
1384 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1385 (PERCENT_END_HEADER): ... this.
1386 (PERCENT_BEFORE_DEFINITIONS): Update to...
1387 (PERCENT_START_HEADER): ... this.
1388 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1389 (declaration): Update token names and m4 macro names.
1390 When parsing %end-header and %start-header, invoke translate_code
1391 before muscle_code_grow, and no longer set global booleans to remember
1392 whether these declarations have been seen.
1393 Parse new %after-header and %before-header.
1394 * src/reader.c (before_definitions, after_definitions): Remove.
1395 (prologue_augment): Accept a new bool argument to specify whether to
1396 augment the pre-prologue or post-prologue.
1397 * src/reader.h (before_definitions, after_definitions): Remove these
1398 extern's.
1399 (prologue_augment): Add new bool argument.
1400 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1401 (PERCENT_END_HEADER): ... this.
1402 (PERCENT_BEFORE_DEFINITIONS): Update to...
1403 (PERCENT_START_HEADER): ... this.
1404 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1405 * tests/actions.at (Printers and Destructors): Update names.
1406
1407 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1408
1409 Add comparison operators for C++ location classes. Discussed at
1410 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1411 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1412 declaration indicating whether filename_type has an operator==. If
1413 filename_type is `std::string', it defaults to `1', `0' otherwise.
1414 * data/location.cc: Iff b4_define_location_comparison is `1', add
1415 operator== and operator!= for class position and for class location.
1416
1417 Some minor fixes.
1418 * src/scan-action.l: Remove unused file.
1419 * src/symtab.c (symbol_printer_set): Use printer_location not
1420 destructor_location.
1421 * src/symtab.h (struct symbol): Replace incorrect source comment for
1422 printer members.
1423 * tests/input.at (Incompatible Aliases): Update output with correct
1424 printer location.
1425
1426 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1427
1428 Don't put the pre-prologue in the header file. For the yacc.c code
1429 file and the glr.c header and code files, move the pre-prologue before
1430 the token definitions. Add new %before-definitions and
1431 %after-definitions to declare code that will go in both the header file
1432 and code file. Discussed at
1433 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1434 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1435 and
1436 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1437 * NEWS (2.3+): Describe these changes.
1438 * data/glr.c (b4_pre_prologue): Move from within to before...
1439 (b4_shared_declarations): ... this.
1440 Add new b4_before_definitions before b4_token_enums.
1441 Add new b4_after_definitions at the end.
1442 * data/glr.cc (b4_pre_prologue): Replace with...
1443 (b4_before_definitions): ... this in the header file.
1444 (b4_after_definitions): New near the end of the header file.
1445 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1446 code file right before including the header file.
1447 (b4_before_definitions): New in the previous position of
1448 b4_pre_prologue in the header file.
1449 (b4_after_definitions): New near the end of the header file.
1450 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1451 (b4_token_enums_defines): In the code file, move to right before
1452 YYSTYPE for consistency with the header file.
1453 (b4_before_definitions): New right before b4_token_enums_defines in
1454 both the header and code file.
1455 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1456 header and code file.
1457 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1458 of prologues for %union dependencies.
1459 (Bison Declaration Summary): In %defines description, mention the
1460 effect of %before-definitions and %after-definitions on the header
1461 file.
1462 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1463 than in the pre-prologue so that make check succeeds.
1464 (Bison Symbols): Add entries for %before-definitions and
1465 %after-definitions.
1466 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1467 %before-definitions.
1468 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1469 (declaration): Parse those declarations and append to
1470 b4_before_definitions and b4_after_definitions, respectively.
1471 * src/reader.c (before_definitions, after_definitions): New bools to
1472 track whether those declarations have been seen.
1473 (prologue_augment): Add to the post-prologue if %union,
1474 %before-definitions, or %after-definitions has been seen.
1475 * src/reader.h (before_definitions, after_definitions): New extern's.
1476 * src/scan-gram.l: Scan the new declarations.
1477 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1478 prologue block in a %before-definitions or a %after-definitions based
1479 on whether the %union is declared.
1480 * tests/regression.at (Early token definitions with --yacc, Early token
1481 definitions without --yacc): Move tests for token definitions into the
1482 post-prologue since token names are no longer defined in the
1483 pre-prologue.
1484
1485 2006-06-20 Akim Demaille <akim@epita.fr>
1486
1487 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1488 (symbol_get): Use it.
1489 * src/parse-gram.y: Use it.
1490
1491 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1492
1493 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1494 build succeeds when configured with --enable-gcc-warnings.
1495
1496 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1497
1498 * src/parse-gram.y (char_name): New function.
1499 (CHAR, STRING, string_content): For %printer, properly escape.
1500 (ID): Prefer fputs to fprintf.
1501 (id): Reindent to be consistent with other rules.
1502 Properly quote char.
1503
1504 The Translation Project changed its way of publishing translations
1505 to maintainers. I haven't received any responses to my request
1506 for supporting the old way, or for documenting the new way. I
1507 have modified 'bootstrap' to use screen scraping
1508 (in this case, HTML scraping). This is unreliable and inelegant,
1509 but I don't see any better way. Yuck.
1510 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1511 (get_translations): New function, which uses HTML scraping to
1512 deduce locations of latest translations.
1513 Use this function to grab both bison and bison-runtime .po files.
1514 Don't bother priming the pump for the runtime-po domain any more,
1515 as it's now translated better than bison is.
1516
1517 2006-06-19 Akim Demaille <akim@epita.fr>
1518
1519 * src/scan-gram.l: No longer "parse" things after `%union' until
1520 `{'. Rather, return a single "%union" token.
1521 No longer make symbols: return strings, and leave the conversion
1522 to symbols to the parser.
1523 (SC_PRE_CODE, token_type): Remove.
1524 * src/parse-gram.y (%union): New field `character'.
1525 Sort tokens.
1526 (CHAR): New token.
1527 (ID, ID_COLON): Now that the scanner no longer makes them
1528 identifiers, adjust all uses to invoke symbol_get.
1529 (id_colon): New, wraps the conversion from string to symbol.
1530 (%union): Accept a possible union_name.
1531 (symbol): Now can be a char.
1532 * data/c.m4 (b4_union_name): Leave a default value.
1533 * data/glr.c, data/yacc.c: Use it.
1534
1535 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1536
1537 For associating token numbers with token names for "yacc.c", don't use
1538 #define statements unless `--yacc' is specified; always use enum
1539 yytokentype. Most important discussions start at:
1540 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1541 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1542 and
1543 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1544 * NEWS (2.3+): Mention.
1545 * data/c.m4 (b4_yacc_if): New.
1546 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1547 token #define's.
1548 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1549 on token name definitions.
1550 * src/getargs.c (usage): Capitalize `Yacc' in English.
1551 * src/output.c (prepare): Define b4_yacc_flag.
1552 * tests/regression.at (Early token definitions): Test that tokens names
1553 are defined before the pre-prologue not just before the post-prologue.
1554 Remove this test case and copy to...
1555 (Early token definitions with --yacc): ... this to test #define's.
1556 (Early token definitions without --yacc): ... and this to test enums.
1557
1558 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1559
1560 * NEWS: Reword the post-2.3 change to not be so optimistic about
1561 removing the old "look-ahead" spelling.
1562 Update previous look-ahead/lookahead change reports.
1563 * REFERENCES: look-ahead -> lookahead (since that's
1564 what he actually wrote).
1565 * doc/refcard.tex: look ahead -> lookahead,
1566 look-ahead -> lookahead
1567
1568 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1569
1570 For consistency, use `lookahead' instead of `look-ahead' or
1571 `look_ahead'. Discussed starting at
1572 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1573 and then at
1574 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1575 * NEWS: For the next release, note the change to `--report'.
1576 * TODO, doc/bison.1: Update English.
1577 * doc/bison.texinfo: Update English.
1578 (Understanding Your Parser, Bison Options): Document as
1579 `--report=lookahead' rather than `--report=look-ahead'.
1580 * src/conflicts.c: Update English in comments.
1581 (lookahead_set): Rename from look_ahead_set.
1582 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1583 (resolve_sr_conflict): Rename local look_ahead_tokens to
1584 lookahead_tokens, and update other uses.
1585 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1586 count_rr_conflicts, conflicts_free): Update uses.
1587 * src/getargs.c (report_args): Move "lookahead" before alternate
1588 spellings.
1589 (report_types): Update uses.
1590 (usage): For `--report' usage description, state `lookahead' spelling
1591 rather than `look-ahead'.
1592 * src/getargs.h (report.report_lookahead_tokens): Rename from
1593 report_look_ahead_tokens.
1594 * src/lalr.c: Update English in comments.
1595 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1596 (state_lookahead_tokens_count): Rename from
1597 state_look_ahead_tokens_count.
1598 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1599 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1600 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1601 Update other uses.
1602 Update English in output.
1603 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1604 * src/print.c: Update English in comments.
1605 (lookahead_set): Rename from look_ahead_set.
1606 (print_reduction): Rename argument lookahead_token from
1607 look_ahead_token.
1608 (print_core, state_default_rule, print_reductions, print_results):
1609 Update uses.
1610 * src/print_graph.c: Update English in comments.
1611 (print_core): Update uses.
1612 * src/state.c: Update English in comments.
1613 (reductions_new): Update uses.
1614 (state_rule_lookahead_tokens_print): Rename from
1615 state_rule_look_ahead_tokens_print, and update other uses.
1616 * src/state.h: Update English in comments.
1617 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1618 (state_rule_lookahead_tokens_print): Rename from
1619 state_rule_look_ahead_tokens_print.
1620 * src/tables.c: Update English in comments.
1621 (conflict_row, action_row): Update uses.
1622 * tests/glr-regression.at
1623 (Incorrect lookahead during deterministic GLR,
1624 Incorrect lookahead during nondeterministic GLR): Rename
1625 print_look_ahead to print_lookahead.
1626 * tests/torture.at: Update English in comments.
1627 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1628 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1629 (Many lookahead tokens): Update uses.
1630 * data/glr.c: Update English in comments.
1631 * lalr1.cc: Likewise.
1632 * yacc.c: Likewise.
1633 * src/conflicts.h: Likewise.
1634 * src/lalr.h: Likewise.
1635 * src/main.c: Likewise.
1636 * src/output.c: Likewise.
1637 * src/parse-gram.c: Likewise.
1638 * src/tables.h: Likewise.
1639 * tests/calc.at: Likewise.
1640
1641 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1642
1643 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1644
1645 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1646
1647 * TODO: Add request from Nelson H. F. Beebe to be able to install
1648 Bison without installing the yacc script.
1649
1650 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1651
1652 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1653 and yytext if they're already #define'd.
1654 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1655 * src/scan-code-c.c: ... here.
1656 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1657 <config.h>.
1658
1659 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1660
1661 Get Bison to build again when configured with --enable-gcc-warnings.
1662 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1663 missing #include's.
1664 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1665 loc argument as it shadows a global.
1666 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1667 invocation.
1668
1669 * src/.cvsignore: Add scan-code.c.
1670
1671 2006-06-07 Akim Demaille <akim@epita.fr>
1672
1673 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1674 to...
1675 * src/scan-code.l: here.
1676 * tests/input.at (Torturing the Scanner): Fix another location
1677 error.
1678
1679 2006-06-07 Akim Demaille <akim@epita.fr>
1680
1681 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1682
1683 2006-06-06 Akim Demaille <akim@epita.fr>
1684
1685 Extract the parsing of user actions from the grammar scanner.
1686 As a consequence, the relation between the grammar scanner and
1687 parser is much simpler. We can also split "composite tokens" back
1688 into simple tokens.
1689 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1690 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1691 rename as...
1692 * src/location.h, src/location.c (add_column_width)
1693 (location_compute): these.
1694 Fix the column count: the initial column is 0.
1695 (location_print): Be robust to ending column being 0.
1696 * src/location.h (boundary_set): New.
1697 * src/main.c: Adjust to scanner_free being renamed as
1698 gram_scanner_free.
1699 * src/output.c: Include scan-code.h.
1700 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1701 Use boundary_set.
1702 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1703 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1704 which is now, again, a separate token.
1705 Adjust all dependencies.
1706 Whereever actions with $ and @ are used, use translate_code.
1707 (action): Remove this nonterminal which is now useless.
1708 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1709 (grammar_current_rule_action_append): Use translate_code.
1710 (packgram): Bound check ruleno, itemno, and rule_length.
1711 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1712 (last_string, last_braced_code_loc, max_left_semantic_context)
1713 (scanner_initialize, scanner_free, scanner_last_string_free)
1714 (gram_out, gram_lineno, YY_DECL_): Move to...
1715 * src/scan-gram.h: this new file.
1716 (YY_DECL): Rename as...
1717 (GRAM_DECL): this.
1718 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1719 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1720 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1721 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1722 Move these declarations, and...
1723 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1724 these to...
1725 * src/flex-scanner.h: this new file.
1726 * src/scan-gram.l (rule_length, rule_length_overflow)
1727 (increment_rule_length): Remove.
1728 (last_braced_code_loc): Rename as...
1729 (gram_last_braced_code_loc): this.
1730 Adjust to the changes of the parser.
1731 Move all the handling of $ and @ into...
1732 * src/scan-code.l: here.
1733 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1734 (handle_action_dollar, handle_action_at): Move to...
1735 * src/scan-code.l: here.
1736 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1737 scan-code.h, scan-code-c.c, scan-gram.h.
1738 (EXTRA_bison_SOURCES): Add scan-code.l.
1739 (BUILT_SOURCES): Add scan-code.c.
1740 (yacc): Be robust to white spaces.
1741
1742 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1743 * tests/regression.at: Adjust the column numbers.
1744 * tests/regression.at: Adjust the error message.
1745
1746 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1747
1748 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1749 Use Akim's wording from
1750 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1751
1752 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1753
1754 Between Bison releases, manually append `+' to the previous Bison
1755 release number, and use that as a signal to automatically print the
1756 ChangeLog's CVS Id keyword from --version. Discussed starting at
1757 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1758 * ChangeLog: Add Id header.
1759 * configure.ac (AC_INIT): Append `+' to `2.3'.
1760 * src/.cvsignore: Add revision.c.
1761 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1762 (BUILT_SOURCES): Add revision.c.
1763 (revision.c): New target rule. This file defines a new global variable
1764 named revision. It initializes it with either the Id from ChangeLog
1765 or, if VERSION doesn't contain `+', with the empty string.
1766 * src/getargs.c (version): Print the value of revision.
1767 * src/revision.h: Extern revision.
1768
1769 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1770
1771 * NEWS: Version 2.3.
1772 * configure.ac (AC_INIT): Likewise.
1773
1774 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1775
1776 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1777 with no arguments, not as an object-like macro. This is for
1778 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1779 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1780 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1781 Document this.
1782
1783 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1784
1785 * src/getargs.c (usage): Back out yesterday's modification of the
1786 --help output so that we don't have to wait for translation before
1787 releasing 2.3.
1788
1789 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1790
1791 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1792 Problem reported by Akim Demaille.
1793
1794 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1795
1796 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1797
1798 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1799
1800 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1801 generated source code. Problem reported by Frans Englich in
1802 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1803
1804 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1805
1806 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1807 shell, not within 'make', so that 'make' by an ordinary builder
1808 (using GNU make) does not worry about configuring gzip. This also
1809 works around a bug reported independently by Keith Thompson and by
1810 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1811 stderr rather than stdout, messing up the build logs.
1812
1813 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1814
1815 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1816 to make sure that YYID will never be unused. This fixes a 'make
1817 maintainer-check' failure caused by the recent changes to the 'Trivial
1818 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1819 not used.
1820 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1821
1822 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1823
1824 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1825 state before an empty RHS is always resolved here. Only the location
1826 of that state is guaranteed to be resolved, and that's enough. This
1827 fixes the remaining bug reported by Derek M. Jones in
1828 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1829 * tests/glr-regression.at (Uninitialized location when reporting
1830 ambiguity): Test the above case.
1831 Also, the embedded comments in this test case claim it checks the case
1832 of an empty RHS that has inherited the initial location. However, the
1833 corresponding LHS was already resolved, so yyresolveLocations didn't
1834 actually have reason to modify it. Fix this by forcing
1835 nondeterministic operation at the beginning of the parse.
1836
1837 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1838
1839 * data/c.m4 (b4_yy_symbol_print_generate):
1840 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1841 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1842 of the bugs reported today by Derek M Jones in
1843 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1844 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1845 defined to be a type name without parens or brackets.
1846 (Location Type): Similarly for YYLTYPE.
1847 * tests/regression.at (Trivial grammars): Put in a test for this
1848 bug that will be caught by 'make maintainer-check' (though not,
1849 alas, by 'make check' unless your compiler is picky).
1850
1851 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1852
1853 * NEWS: Version 2.2.
1854 * configure.ac (AC_INIT): Likewise.
1855
1856 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1857
1858 * data/glr.c (yyreportTree): Make room in yystates for the state
1859 preceding the RHS. This fixes the segmentation fault reported by Derek
1860 M. Jones in
1861 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1862 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1863 to the user. Reported for yyreportTree by Derek M. Jones later in the
1864 same thread.
1865 * THANKS: Add Derek M. Jones.
1866 Update my email address.
1867 Fix typo in Steve Murphy's name.
1868
1869 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1870
1871 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1872 checking against YYLAST that caused the parser to miss a potential
1873 alternative in its diagnostic.
1874 Problem reported by Maria Jose Moron Fernandez in
1875 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1876 * data/lalr1.cc (yysyntax_error_): Likewise.
1877 * data/yacc.c (yysyntax_error): Likewise.
1878 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1879 tokens, in case we run into an older C compiler.
1880 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1881 Use them to check for the off-by-one error fixed above.
1882
1883 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1884 YYSIZE_T, not size_t.
1885 * tests/regression.at (Trivial grammars): New test, to catch
1886 the error fixed by the above patch.
1887
1888 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1889
1890 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1891 scheme.
1892 Reported by Steve Murphy.
1893
1894 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1895
1896 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1897 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1898
1899 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1900
1901 Implement --trace=m4.
1902 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1903 * src/output.c (output_skeleton): When set, pass -dV to m4.
1904
1905 Factor the handling of flags in m4.
1906 * src/output.c (prepare): Rename the muscle names debug, defines,
1907 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1908 * data/c.m4: Adjust.
1909 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1910 Use b4_define_flag_if to define other b4_FLAG_if macros.
1911 (b4_location_if): As a consequence, rename as...
1912 (b4_locations_if): this, for consistency.
1913 Adjust all the skeletons.
1914
1915 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1916
1917 * etc/bench.pm: Shorten bench names.
1918
1919 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1920
1921 * src/output.h, src/output.c (error_verbose): Move to...
1922 * src/getargs.h, src/getargs.c: here.
1923 Sort the flags.
1924 Adjust dependencies.
1925
1926 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1927
1928 * data/c.m4 (b4_copyright): Put the special exception for Bison
1929 skeletons here, so we don't have to put it in each skeleton. All
1930 uses changed. Suggested by Akim Demaille. Also, wrap the
1931 copyright notice, in case it is longer than 80 columns. Replace
1932 comma by newline after title.
1933
1934 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1935
1936 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1937 incompatibility, not a bug. Mention that it wasn't fixed as of
1938 flex 2.5.33.
1939
1940 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1941
1942 * examples/extexi: Enforce the precedence of concatenation over
1943 >>.
1944 Reported by Tommy Nordgren.
1945
1946 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1947
1948 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1949 with the member "token".
1950 Reported by Martin Nylin.
1951
1952 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1953
1954 * data/glr.c: Switch to Bison 2.2 special-exception language in
1955 the copyright notice. Use more-regular format for titles and
1956 copyright notices.
1957 * data/glr.cc: Likewise.
1958 * data/location.cc: Likewise.
1959 * data/yacc.cc: Likewise.
1960 * doc/bison.texinfo (Conditions): Document this.
1961 * NEWS: likewise. Upgrade version to 2.2.
1962
1963 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1964
1965 * data/glr.cc: Remove dead code.
1966
1967 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1968
1969 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1970 that variable and the line breaks the bootstrap. Problem reported
1971 by Juan M. Guerrero.
1972
1973 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1974
1975 * doc/bison.texinfo (Multiple start-symbols): New.
1976
1977 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1978
1979 * etc/README, etc/bench.pl: New.
1980
1981 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1982
1983 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1984 rule.
1985 Reported by Mickael Labau.
1986 * tests/input.at (Torturing the Scanner): Test it.
1987
1988 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1989
1990 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1991 Problem reported by Bob Rossi.
1992
1993 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1994
1995 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1996 and didn't really work.
1997 For the index, use @ifnotinfo, not @iftex.
1998 Minor cleanups of spacing and terminology.
1999
2000 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2001
2002 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2003 of AT_NAME_PREFIX when %name-prefix is not used.
2004
2005 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2006
2007 Apply --prefix to C++ skeletons too: they change the namespace.
2008 The test suite already exercize these cases.
2009 * data/c++.m4 (b4_namespace): New.
2010 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2011 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2012 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2013 * doc/bison.texinfo: Document it.
2014 (Option Cross Key): Use @multitable in all formats. It looks
2015 nicer, even in TeX outputs.
2016 (Rules): Use the same code whatever the output type is.
2017 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2018 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2019 * tests/calc.at: Use it, instead of hard coding `yy'.
2020
2021 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2022
2023 * TODO: Remove dead items.
2024
2025 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2026
2027 * doc/FAQ: Remove, merged into...
2028 * doc/bison.texinfo (FAQ): this.
2029 * doc/Makefile.am (EXTRA_DIST): Adjust.
2030
2031 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2032
2033 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2034 even if empty.
2035 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2036 * doc/bison.texinfo (Calc++ Scanner): Use it.
2037
2038 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2039
2040 Fix two nits reported by twlevo, plus one more that I discovered.
2041
2042 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2043 this is the usual Bison style.
2044 * src/location.h (location_print): Likewise.
2045
2046 * src/reader.h (token_name): Likewise.
2047
2048 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2049
2050 Fix some nits reported by twlevo.
2051 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2052 and "POSIX". Use more-modern syntax for URLs. Mention C++
2053 and ask for Java. Don't hardwire OS version numbers. Add
2054 copyright notice.
2055 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2056 * src/conflicts.c (solved_conflicts_obstack): Now static.
2057
2058 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2061 page. Say "you can use it" not "you may use it" as on the web page;
2062 we're describing capabilities not granting permission.
2063
2064 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2065
2066 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2067 shadowing warnings. Use usual patter for iterating through RHS.
2068 * tests/glr-regression.at
2069 (Uninitialized location when reporting ambiguity):
2070 Modify yylex so that it uses its argument, rather than trying
2071 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2072 const char -> char const.
2073
2074 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2075 Don't use tabs inside commands; it messes up 'ps'.
2076 Problem reported by twlevo.
2077
2078 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2079
2080 * tests/glr-regression.at (Uninitialized location when reporting
2081 ambiguity): New test case.
2082 * data/glr.c (yyresolveLocations): New function, which uses
2083 YYLLOC_DEFAULT.
2084 (yyresolveValue): Invoke yyresolveLocations before reporting an
2085 ambiguity.
2086 * doc/bison.texinfo (Default Action for Locations): Note
2087 YYLLOC_DEFAULT's usage for ambiguity locations.
2088 (GLR Semantic Actions): Cross-reference those notes.
2089
2090 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2091
2092 * tests/glr-regression.at (Leaked semantic values when reporting
2093 ambiguity): Remove unnecessary union and type declarations.
2094 (Leaked lookahead after nondeterministic parse syntax error): New test
2095 case.
2096 * data/glr.c (yyparse): Check for zero stacks remaining before
2097 attempting to shift the lookahead so that you don't lose it.
2098
2099 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2100
2101 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2102 * tests/glr-regression.at (Leaked semantic values when reporting
2103 ambiguity): New test case.
2104 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2105 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2106 now unnecessary yystackp parameter.
2107 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2108 destructors can be called.
2109
2110 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2111 in existing testcases.
2112
2113 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2114
2115 Don't leak semantic values for parent RHS when a user action cuts the
2116 parser, and clean up related code a bit.
2117 * tests/glr-regression.at (Leaked merged semantic value if user action
2118 cuts parse): Rename to...
2119 (Leaked semantic values if user action cuts parse): ... this. Add check
2120 for leaked parent RHS values.
2121 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2122 between an unresolved state (non-empty chain of semantic options) and
2123 an incomplete one (signaled by an empty chain).
2124 (yyresolveStates): Document the interface. Move all manipulation of a
2125 successfully or unsuccessfully resolved yyGLRState to...
2126 (yyresolveValue): ... here so that yyresolveValue always leaves a
2127 yyGLRState with consistent data and thus is easier to understand.
2128 Remove the yyvalp and yylocp parameters since they are always just
2129 taken from the yys parameter. When reporting a discarded merged value
2130 in debugging output, note that it is incompletely merged. Document the
2131 interface.
2132 (yyresolveAction): If resolving any of the RHS states fails, destroy
2133 them all rather than leaking them. Thus, as long as user actions are
2134 written to clean up the RHS correctly, yyresolveAction always cleans up
2135 the RHS of a semantic option. Document the interface.
2136
2137 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2138
2139 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2140 led to a segmentation fault in GNU Pascal. Problem reported
2141 by Waldek Hebisch.
2142
2143 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2144
2145 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2146 mid-rule action inside a nonterminal symbol in order to declare a
2147 destructor for its semantic value.
2148
2149 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2150
2151 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2152 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2153 __cplusplus && ! defined _STDLIB_H && !
2154 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2155 defined free))]: Include <stdlib.h> rather than rolling our own
2156 declarations of malloc and free, to avoid problems with
2157 incompatible declarations (using 'throw') C++'s stdlib.h. This
2158 should fix Debian bug 340012
2159 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2160 reported by Guillaume Melquiond.
2161
2162 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2163
2164 * NEWS: Clarify symbols versus types in unused-value warnings.
2165
2166 * configure.ac (AC_INIT): Bump version number.
2167
2168 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2169
2170 * NEWS: Version 2.1a.
2171 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2172 since C99 requires this.
2173
2174 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2175
2176 * m4/c-working.m4: New file.
2177 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2178
2179 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2180
2181 * Makefile.maint: Merge from coreutils.
2182
2183 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2184
2185 More portability fixes for problems summarized by Nelson H. F. Beebe.
2186
2187 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2188 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2189 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2190 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2191 messes up because C++ code is compiled in 32-bit mode but linked
2192 in 64-bit mode.
2193
2194 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2195
2196 More portability fixes for problems summarized by Nelson H. F. Beebe.
2197
2198 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2199 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2200
2201 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2202 nodist_PROGRAMS, since we don't need to actually compile the
2203 example if we're just doing a plain 'make'. This avoids bothering
2204 the installer unnecessarily about problems due to weird C++
2205 compilers.
2206
2207 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2208
2209 More portability fixes for problems summarized by Nelson H. F. Beebe.
2210
2211 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2212 than #include "...", and compile with -I'.'. The old method was
2213 not portable, according to Posix and the C standard, and it does
2214 not work with Sun C 5.7, where previous #line directives affect
2215 the working directory used in later #include "..." directives.
2216
2217 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2218
2219 Various DJGGP specific issues in /djgpp
2220
2221 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2222
2223 More portability fixes for problems summarized by Nelson H. F. Beebe.
2224
2225 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2226 '#include <map>' works and that you can apply ++ to iterators.
2227
2228 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2229
2230 Work around portability problems summarized by Nelson H. F. Beebe in
2231 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2232
2233 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2234 that '#include <string>' works.
2235
2236 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2237 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2238 "warning: sorry: semantics of inline function static data `const
2239 unsigned char translate_table[262]' are wrong (you'll wind up with
2240 multiple copies)".
2241
2242 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2243 or, xor to not_, and_, or_, and xor_, respectively. This works
2244 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2245 random system header somewhere that includes the equivalent of
2246 <iso646.h>.
2247
2248 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2249 -E" works; it apparently doesn't work with PathScale EKO Compiler
2250 Suite Version 2.0.
2251
2252 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2253
2254 During deterministic GLR operation, user actions should be able to
2255 influence the parse by changing yychar. To make this easier to fix and
2256 to make glr.c easier to evolve in general, don't maintain yytoken in
2257 parallel with yychar; just compute yytoken when needed.
2258 * tests/glr-regression.at (Incorrect lookahead during deterministic
2259 GLR): Check that setting yychar in a user action has the intended
2260 effect.
2261 * data/glr.c (yyGLRStack): Remove yytokenp member.
2262 (yyclearin): Don't set *yytokenp.
2263 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2264 yychar rather than *yytokenp to determine the current lookahead.
2265 Compute yytoken locally when needed.
2266 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2267 point to.
2268
2269 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2270 after `--report' documentation.
2271
2272 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2273
2274 * src/parse-gram.y (grammar_declaration): Location of printer
2275 symbol is @1, not list->location. Bug reported by twlevo.
2276 * tests/input.at (Incompatible Aliases): Adjust to above change.
2277
2278 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2279
2280 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2281 all the test at once. This makes the output easier to read in the
2282 normal case.
2283
2284 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2285 got from <http://bro-ids.org/download.html>. The bug is that
2286 when two actions appeared in succession, the second one was
2287 scanned before the first one was added to the grammar rule
2288 as a midrule action. Bison then output the incorrect warning
2289 "parse.y:905.17-906.36: warning: unused value: $3".
2290 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2291 associated with a value.
2292 (rhs): Don't invoke grammar_current_rule_action_append.
2293 (action): Invoke it here instead.
2294 * src/reader.c (grammar_midrule_action): Now extern.
2295 (grammar_current_rule_action_append): Don't invoke
2296 grammar_midrule_action; that is now the scanner's job.
2297 * src/reader.h (last_string, last_braced_code_loc):
2298 (grammar_midrule_action): New decls.
2299 * src/scan-gram.l (last_string): Now extern, sigh.
2300 (last_braced_code_loc): New extern variable.
2301 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2302 rule already has an action.
2303 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2304 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2305 Add some tests to check that the above changes fixed the bug.
2306
2307 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2308
2309 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2310 All used changed. Check whether the symbol has a destructor,
2311 not whether it is typed.
2312 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2313 that the values are still reported as unused. All line numbers
2314 adjusted.
2315
2316 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2317
2318 Work around a bug in bro 0.8, which underparenthesizes its
2319 definition of YYLLOC_DEFAULT.
2320 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2321 their arguments.
2322 * data/lalr1.cc: Likewise.
2323 * data/yacc.cc: Likewise.
2324
2325 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2326
2327 Work around a bug in Pike 7.0, and give the Pike folks a
2328 better way to override the usual int widths.
2329 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2330 user can override the types.
2331 (short): #undef, to work around a bug in Pike 7.0.
2332 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2333 (union yyalloc.yyss): Use yytype_int16 rather than short.
2334 All uses changed.
2335 (yysigned_char): Remove.
2336 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2337 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2338 * tests/regression.at (Web2c Actions): Adjust to above changes.
2339
2340 * src/reader.c (check_and_convert_grammar): New function.
2341 (reader): Close the input file even if something went wrong during
2342 parsing. Minor file descriptor leak reported by twlevo.
2343
2344 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2345 to pacify gcc -Wswitch-default.
2346 * src/scan-gram.l (adjust_location): Use a default: break; case
2347 to pacify gcc -Wswitch-default.
2348 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2349 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2350 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2351 Move these decls to scan-skel.l, since they don't need to be
2352 visible elsewhere.
2353 * src/scan-skel.l: Accept the above decls.
2354 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2355 is used.
2356
2357 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2358
2359 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2360 since we don't want to insist on a version number at the start
2361 of the changelog every time.
2362 * Makefile.maint: Sync from coreutils a bit better.
2363 (sc_trailing_blank): Renamed from sc_trailing_space.
2364 All uses changed.
2365 (sc_no_if_have_config_h, sc_require_config_h):
2366 (sc_prohibit_assert_without_use): New rules.
2367 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2368 (sc_dd_max_sym_length): Fix leading spaces in rule.
2369 (sc_system_h_headers): Prefix with @.
2370 (sc_useless_cpp_parens, m4-check): Output line numbers.
2371 (changelog-check): Allow version only in head.
2372 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2373 satisfy new Makefile.maint rule.
2374 * data/glr.c: Likewise.
2375 * data/glr.cc: Likewise.
2376 * data/lalr1.cc: Likewise.
2377 * data/yacc.c: Likewise.
2378 * lib/ebitsetv.c: Likewise.
2379 * lib/lbitset.c: Likewise.
2380 * lib/subpipe.c: Likewise.
2381 * lib/timevar.c: Likewise.
2382 * src/system.h: Likewise.
2383 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2384 * djgpp/Makefile.maint: Add copyright notice.
2385 * djgpp/README.in: Likewise.
2386 * djgpp/config.bat: Likewise.
2387 * djgpp/config.site: Likewise.
2388 * djgpp/config_h.sed: Likewise.
2389 * djgpp/djunpack.bat: Likewise.
2390 * djgpp/config.sed: Fix copyright notice to match standard format.
2391 * djgpp/subpipe.h: Likewise.
2392 * lib/bitsetv-print.c: Likewise.
2393 * lib/bitsetv.c: Likewise.
2394 * lib/subpipe.h: Likewise.
2395 * lib/timevar.c: Likewise.
2396 * lib/timevar.h: Likewise.
2397 * djgpp/subpipe.c: Use standard recipe for config.h.
2398 * lib/abitset.c: Likewise.
2399 * lib/bitset.c: Likewise.
2400 * lib/bitset_stats.c: Likewise.
2401 * lib/bitsetv-print.c: Likewise.
2402 * lib/bitsetv.c: Likewise.
2403 * lib/ebitsetv.c: Likewise.
2404 * lib/get-errno.c: Likewise.
2405 * lib/lbitset.c: Likewise.
2406 * lib/subpipe.c: Likewise.
2407 * lib/timevar.c: Likewise.
2408 * lib/vbitset.c: Likewise.
2409 * tests/local.at: Likewise.
2410 * src/scan-gram.l: Don't include verify.h, since system.h does
2411 that for us.
2412 * .x-sc_require_config_h: New file.
2413 * .x-sc_unmarked_diagnostics: New file.
2414
2415 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2416
2417 Be a bit more systematic about using 'abort'.
2418 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2419 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2420 Put 'default: abort ();' before some other case, to satisfy older
2421 pedantic compilers.
2422 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2423 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2424 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2425 * src/conflicts.c (resolve_sr_conflict): Likewise.
2426 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2427 (get_decision_str, get_orientation_str, get_node_alignment_str):
2428 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2429 (get_linestyle_str, get_arrowstyle_str): Likewise.
2430 * src/conflicts.c (resolve_sr_conflict):
2431 Use a default case rather than one for the one remaining enum
2432 value, to catch invalid enum values as well.
2433 * src/lalr.c (set_goto_map, map_goto):
2434 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2435 * src/nullable.c (nullable_compute, token_definitions_output):
2436 Likewise.
2437 * src/reader.c (packgram, reader): Likewise.
2438 * src/state.c (transitions_to, state_new, state_reduction_find):
2439 Likewise.
2440 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2441 (symbol_pack): Likewise.
2442 * src/tables.c (conflict_row, pack_vector): Likewise.
2443 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2444 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2445 * src/system.h: Don't include <assert.h>.
2446 (assert): New macro.
2447
2448 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2449 (Destructor Decl, Parser Function, Pure Calling):
2450 Describe rules for braces inside C code more carefully.
2451
2452 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2453
2454 Fix some porting glitches found by Nelson H. F. Beebe.
2455 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2456 compilers that don't understand that abort () does not return.
2457 * src/state.c (transitions_to): Likewise.
2458 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2459 that '#include <cstdlib>' works.
2460 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2461 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2462 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2463 for the benefit of some pre-C99 compilers.
2464
2465 * bootstrap: Undo changes to gnulib files that autoreconf made.
2466
2467 Minor fixups to get 'make maintainer-check' to work.
2468 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2469 with the new verify.h implementation.
2470 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2471 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2472 * data/yacc.c (YYUSE): Likewise.
2473 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2474 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2475 * src/parse-gram.y (declaration): Don't pass a string constant
2476 to a function that expects char *, since GCC might complain
2477 about the constant value.
2478 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2479 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2480 before #defining them.
2481 * tests/glr-regression.at
2482 (Incorrectly initialized location for empty right-hand side in GLR):
2483 In yyerror, use the msg arg.
2484 (Corrupted semantic options if user action cuts parse):
2485 (Incorrect lookahead during deterministic GLR):
2486 (Incorrect lookahead during nondeterministic GLR):
2487 Don't name a local var 'index'; it shadows string.h's 'index'.
2488
2489 2006-01-19 Akim Demaille <akim@epita.fr>
2490
2491 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2492 location, not just parts of it.
2493
2494 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2495
2496 * NEWS: Document the fact that multiple %unions are now allowed.
2497 * doc/bison.texinfo (Union Decl): Likewise.
2498 * TODO: This feature is now implemented, so remove it from
2499 the wishlist.
2500
2501 * Makefile.maint: Merge with coreutils Makefile.maint.
2502 (CVS_LIST): Use build-aux version if available.
2503 (VERSION_REGEXP): New macro.
2504 (syntax-check-rules): Add sc_no_if_have_config_h,
2505 sc_prohibit_assert_without_use, sc_require_config_h,
2506 sc_useless_cpp_parens.
2507 (sc_obsolete_symbols): Check for O_NDELAY.
2508 (sc_dd_max_sym_length): Track coreutils.
2509 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2510 (sc_useless_cpp_parens): New rule.
2511 (news-date-check): Look for version or today's date.
2512 (changelog-check): Don't require version number near head.
2513 (copyright-check): Use current year instead of hardwiring 2005.
2514 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2515 (announcement): Add --gpg-key-ID.
2516
2517 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2518 with "file system".
2519
2520 Avoid undefined behavior that addressed just before the start of an
2521 array. Problem reported by twlevo.
2522 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2523 * src/lalr.c (build_relations): Rely on new sentinel.
2524 * src/gram.c (gram_free): Adjust to new sentinel.
2525
2526 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2529 yylookaheadNeeds. All uses updated.
2530 (yysplitStack): Rename local yynewLookaheadStatuses to
2531 yynewLookaheadNeeds.
2532 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2533 GLR): In comments, change `lookahead status' to `lookahead need'.
2534
2535 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2536
2537 * data/glr.c (yysplitStack): A little stylistic rewrite.
2538
2539 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2540
2541 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2542
2543 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2544
2545 * doc/bison.texinfo: Fix some typos.
2546 (GLR Semantic Actions): New subsection discussing special
2547 considerations because GLR semantic actions might be deferred.
2548 (Actions): Mention look-ahead usage of yylval.
2549 (Actions and Locations): Mention look-ahead usage of yylloc.
2550 (Special Features for Use in Actions): Add YYEOF entry and mention it
2551 in the yychar entry.
2552 In the yychar entry, remove mention of the local yychar case (pure
2553 parser) since this is irrelevant information when writing semantic
2554 actions and since it's already discussed in `Bison Symbols' where
2555 yychar is otherwise described as an external variable.
2556 In the yychar entry, don't call it the `current' look-ahead since it
2557 isn't when semantic actions are deferred.
2558 In the yychar and yyclearin entries, add note about deferred semantic
2559 actions.
2560 Add yylloc and yylval entries discussing look-ahead usage.
2561 (Look-Ahead Tokens): When discussing yychar, don't call it the
2562 `current' look-ahead, and do mention yylval and yylloc.
2563 (Error Recovery): Cross-reference `Action Features' when mentioning
2564 yyclearin.
2565 (Bison Symbols): In the yychar entry, don't call it the `current'
2566 look-ahead.
2567 In the yylloc and yylval entries, mention look-ahead usage.
2568
2569 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2570
2571 * tests/glr-regression.at: Update copyright year to 2006.
2572
2573 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2574
2575 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2576 use during nondeterministic operation to track which stacks have
2577 actually needed the current lookahead.
2578 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2579 Allocate, deallocate, resize, and otherwise shuffle space for
2580 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2581 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2582 appropriately during nondeterministic operation.
2583 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2584 members to store the current lookahead to be used by the deferred
2585 user action.
2586 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2587 from which the RHS is taken. Set the lookahead members of the new
2588 yySemanticOption according to the lookahead status for stack yyk.
2589 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2590 yyaddDeferredAction.
2591 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2592 members of yySemanticOption before invoking yyuserAction, and then set
2593 them back to their current values afterward.
2594 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2595 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2596 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2597 titles for consistency.
2598 (Leaked merged semantic value if user action cuts parse): In order to
2599 suppress lint warnings, use arguments in merge function, and assign
2600 char value < 128 in main.
2601 (Incorrect lookahead during deterministic GLR): New test case.
2602 (Incorrect lookahead during nondeterministic GLR): New test case.
2603
2604 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2605
2606 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2607 !yyvaluep as signal that no semantic value is available to print.
2608 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2609 to print a semantic value.
2610
2611 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2612
2613 * tests/glr-regression.at: For consistency with my newer test cases,
2614 don't thank myself.
2615
2616 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2617
2618 * data/glr.c (yyresolveValue): When merging semantic options, if at
2619 least one user action succeeds but a later one cuts the parse, then
2620 destroy the semantic value before returning rather than leaking it.
2621 (yyresolveStates): If a user action cuts the parse and thus
2622 yyresolveValue fails, ignore the (unset) semantic value rather than
2623 corrupting the yyGLRState, and empty the semantic options list since
2624 the user actions should have called all necessary destructors.
2625 Simplify code with YYCHK.
2626 * tests/glr-regression.at (Corrupted semantic options if user action
2627 cuts parse): New test case.
2628 (Undesirable destructors if user action cuts parse): New test case.
2629 Before applying any of this patch, this test case never actually failed
2630 for me... but only because the corrupted semantic options usually
2631 masked this bug.
2632 (Leaked merged semantic value if user action cuts parse): New test
2633 case.
2634
2635 2006-01-05 Akim Demaille <akim@epita.fr>
2636
2637 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2638
2639 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2640
2641 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2642 _MSC_VER. Problem reported by Cenzato Marco.
2643 (b4_c_function_def): Use it.
2644 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2645 b4_c_modern.
2646 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2647 than rolling our own.
2648
2649 2006-01-04 Akim Demaille <akim@epita.fr>
2650
2651 Also warn about non-used mid-rule values.
2652 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2653 member.
2654 (symbol_list_new): Adjust.
2655 * src/reader.c (symbol_typed_p): New.
2656 (grammar_rule_check): Use it.
2657 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2658 Check its rule.
2659 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2660 Use it.
2661 * tests/actions.at (Exotic Dollars): Adjust.
2662
2663 2006-01-04 Akim Demaille <akim@epita.fr>
2664
2665 * src/reader.c (grammar_midrule_action): If $$ is set in a
2666 mid-rule, move the `used' bit to its lhs.
2667 * tests/input.at (Unused values): New.
2668 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2669
2670 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2671
2672 * doc/bison.texinfo (Bison Options): Say more accurately what
2673 --yacc does.
2674 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2675 about declarations in the grammar when in Yacc mode, as POSIX does
2676 not require a diagnostic when the grammar uses extensions.
2677
2678 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2679
2680 Warn about dubious constructions like "%token T T".
2681 Reported by twlevo.
2682 * src/symtab.h (struct symbol.declared): New member.
2683 * src/symtab.c (symbol_new): Initialize it to false.
2684 (symbol_class_set): New arg DECLARING, specifying whether
2685 this is a declaration that we want to warn about, if there
2686 is more than one of them. All uses changed.
2687
2688 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2689 Allow multiple %union directives, whose contents concatenate.
2690 * src/parse-gram.y (grammar_declaration): Likewise.
2691 Use muscle_code_grow, so that we don't need stype_line any more.
2692 All uses changed.
2693
2694 * src/muscle_tab.c (muscle_grow): Fix comment.
2695
2696 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2697 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2698 Update copyright year to 2006.
2699
2700 2006-01-03 Akim Demaille <akim@epita.fr>
2701
2702 Have glr.cc pass (some of) the calc.at tests.
2703 * data/glr.cc (b4_parse_param_orig): New.
2704 (b4_parse_param): Improve its definition, and bound it more
2705 clearly in the skeleton.
2706 (b4_epilogue): Append, instead of prepending, in order to keep
2707 #line consistency.
2708 Simplify the generation of auxiliary functions: locations and
2709 purity are mandated.
2710 (b4_global_tokens_and_yystype): Honor it.
2711 * data/location.cc (c++.m4): Don't include it.
2712 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2713 and AT_SKEL_CC_IF.
2714 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2715 AT_LALR1_CC_IF.
2716 Be sure to initialize the first position's filename.
2717 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2718 mandated anyway.
2719 (AT_CHECK_CALC_GLR_CC): New.
2720 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2721
2722 2006-01-02 Akim Demaille <akim@epita.fr>
2723
2724 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2725 c.m4.
2726 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2727 * data/glr.cc: Do not include stack.hh.
2728
2729 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 * data/glr.c: Reformat whitespace with tabs.
2732 (b4_lpure_formals): Remove this unused m4 macro.
2733 * tests/cxx-type.at: Reformat whitespace with tabs.
2734 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2735 since it's a member. Rename type to isNterm for clarity.
2736
2737 2005-12-29 Akim <akim@sulaco.local>
2738
2739 Let glr.cc catch up with symbol_value_print.
2740 * data/glr.cc (b4_yysymprint_generate): Replace by...
2741 (b4_yy_symbol_print_generate): this.
2742 (yy_symbol_print, yy_symbol_value_print): Declare them.
2743
2744 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2745
2746 * src/location.h (boundary): Note that a line or column equal
2747 to INT_MAX indicates an overflow.
2748 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2749 (rule_length_overflow, increment_rule_length, add_column_width):
2750 New functions.
2751 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2752 (<SC_BRACED_CODE>"}"):
2753 Use increment_rule_length rather than incrementing it by hand.
2754 (adjust_location, handle_syncline): Diagnose overflow.
2755 (handle_action_dollar, handle_action_at):
2756 Fix bug with monstrosities like $-2147483648.
2757 Remove now-unnecessary checks.
2758 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2759 (convert_ucn_to_byte): Verify assumptions.
2760 (handle_syncline): New arg LOC. All callers changed.
2761 Don't store through a value derived from char const * pointer.
2762
2763 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2764 GCC warnings.
2765
2766 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2767
2768 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2769 Remove unnecessary forward static decls.
2770
2771 2005-12-27 Akim Demaille <akim@epita.fr>
2772
2773 * src/reader.c (grammar_current_rule_check): Also check that $$
2774 is used.
2775 Take the rule to check as argument, hence rename as...
2776 (grammar_rule_check): this.
2777 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2778 Rename as...
2779 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2780 (grammar_midrule_action, grammar_symbol_append): Now static.
2781 * tests/torture.at (input): Don't rely on the default action
2782 being always performed.
2783 * tests/calc.at: "Set" $$ even when the action is "cut" with
2784 YYERROR or other.
2785 * tests/actions.at (Exotic Dollars): Instead of using unused
2786 values, check that the warning is issued.
2787
2788 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2789
2790 * NEWS: Improve wording for unused-value warnings.
2791
2792 2005-12-22 Akim Demaille <akim@epita.fr>
2793
2794 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2795 (b4_yysymprint_generate): Rename as...
2796 (b4_yy_symbol_print_generate): this.
2797 Generate yy_symbol_print instead of yysymprint.
2798 Generate also yy_symbol_value_print, and use it.
2799
2800 2005-12-22 Akim Demaille <akim@epita.fr>
2801
2802 * NEWS: Warn about unused values.
2803 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2804 a `used' member.
2805 (symbol_list_n_get, symbol_list_n_used_set): New.
2806 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2807 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2808 * src/reader.c (grammar_current_rule_check): Check that values are
2809 used.
2810 * src/symtab.c (symbol_print): Accept 0.
2811 * tests/existing.at: Remove the type information.
2812 Empty the actions.
2813 Remove useless actions (beware of mid-rule actions: perl -000
2814 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2815 * tests/actions.at (Exotic Dollars): Use unused values.
2816 * tests/calc.at: Likewise.
2817 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2818 Likewise.
2819
2820 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2821 rule_useful_p.
2822
2823 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2824
2825 Undo 2005-12-01 tentative license wording change. The wording is
2826 still being reviewed by the lawyers, and we don't want to wait for
2827 them before publishing a test release. For now, revert to the
2828 previous wording.
2829 * NEWS: Undo 2005-12-01 change.
2830 * data/glr.c: Revert to previous license wording.
2831 * data/glr.cc: Likewise.
2832 * data/lalr1.cc: Likewise.
2833 * data/location.cc: Likewise.
2834 * data/yacc.c: Likewise.
2835
2836 * NEWS: Reword %destructor vs YYABORT etc.
2837 * data/glr.c: Use American spacing, for consistency.
2838 * data/glr.cc: Likewise.
2839 * data/lalr1.cc: Likewise.
2840 * data/yacc.c: Likewise.
2841 * data/yacc.c: Reformat comments slightly.
2842 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2843 for consistency. Fix some spelling errors and reword recently-included
2844 text slightly.
2845 * tests/cxx-type.at: Cast results of malloc, for C++.
2846
2847 2005-12-21 Joel E. Denny <address@hidden>
2848
2849 * tests/cxx-type.at: Construct a tree, count the parents of shared
2850 nodes, and free each node once and only once. Previously, the memory
2851 for semantic values was leaked instead.
2852
2853 2005-12-21 Joel E. Denny <address@hidden>
2854
2855 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2856 (yylval, yylloc): If pure, #define to yystackp->yyval and
2857 yystackp->yyloc similar to yychar and yynerrs.
2858 (yyparse): If pure, remove local yylval and yylloc. Add local
2859 yystackp to accommodate pure definitions of yylval and yylloc.
2860 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2861 yylvalp and yyllocp to &yylval and &yylloc.
2862 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2863 namespace. Previously, nerrs and char were missing, but lval and lloc
2864 weren't necessary.
2865 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2866 yylvalp and yyllocp parameters since, if pure, these are now always
2867 accessible through yystackp. If not pure, they are still accessible
2868 globally.
2869 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2870 `if (YYID (N))' to pacify lint.
2871
2872 2005-12-21 Akim Demaille <akim@epita.fr>
2873
2874 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2875 destroy the RHS symbols of a rule.
2876 * data/yacc.c (yylen): Initialize to 0.
2877 Keep its value to the number of items to possibly shift.
2878 In particular, a regular successful parse that ends on YYFINAL by
2879 a (internal) YYACCEPT must not have yylen != 0.
2880 (yyerrorlab, yyreturn): Pop the RHS.
2881 Reorder a bit to emphasize the `shifting' bits of code.
2882 (YYPOPSTACK): Now accept a number of items to pop.
2883 * data/lalr1.cc: Likewise.
2884 * data/glr.c: Formatting changes.
2885 Use goto instead of fall through.
2886 * doc/bison.texinfo (Destructor Decl): Complete.
2887
2888 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2889
2890 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2891 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2892 * djgpp/config.bat: Replace every occurence of the file name
2893 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2894 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2895 * djgpp/config.sed: Replace every occurence of the file name
2896 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2897 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2898 * djgpp/djunpack.bat: DJGPP specific file.
2899 * djgpp/fnchange.lst: DJGPP specific file.
2900 * djgpp/README.in: Add new information about how to unpack the bison
2901 source on MSDOS and other systems which have 8.3 file name restrictions
2902 using djunpack.bat and fnchange.lst.
2903
2904 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2905
2906 * bootstrap (build_cvs_prefix): Remove; unused.
2907 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2908 when getting gnulib.
2909
2910 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2911
2912 * data/glr.c: Reorder typedef declarations for structs to match order
2913 of struct declarations.
2914 Rename yystack everywhere to yystackp except in yyparse where it's not
2915 a pointer.
2916 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2917 consistency.
2918 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2919 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2920 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2921 lint.
2922
2923 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2924
2925 * tests/sets.at (Accept): Fix typos in regular expression used to
2926 sed out the final state number.
2927
2928 Work around portability problem on Solaris 10: flex-generated
2929 files include <stdio.h> before <config.h>, which messes up
2930 because the latter defines __EXTENSIONS__. Address the problem
2931 by creating two new little files that include <config.h> first,
2932 then include the flex-generated files. Rewrite everyone else
2933 to include <config.h> first, as well.
2934 * lib/timevar.c: Always include "config.h".
2935 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2936 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2937 (EXTRA_bison_SOURCES): New macro.
2938 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2939 * src/system.h: Don't include config.h.
2940 * src/LR0.c: Include <config.h> first.
2941 * src/assoc.c: Likewise.
2942 * src/closure.c: Likewise.
2943 * src/complain.c: Likewise.
2944 * src/conflicts.c: Likewise.
2945 * src/derives.c: Likewise.
2946 * src/files.c: Likewise.
2947 * src/getargs.c: Likewise.
2948 * src/gram.c: Likewise.
2949 * src/lalr.c: Likewise.
2950 * src/location.c: Likewise.
2951 * src/main.c: Likewise.
2952 * src/muscle_tab.c: Likewise.
2953 * src/nullable.c: Likewise.
2954 * src/output.c: Likewise.
2955 * src/parse-gram.y: Likewise.
2956 * src/print.c: Likewise.
2957 * src/print_graph.c: Likewise.
2958 * src/reader.c: Likewise.
2959 * src/reduce.c: Likewise.
2960 * src/relation.c: Likewise.
2961 * src/state.c: Likewise.
2962 * src/symlist.c: Likewise.
2963 * src/symtab.c: Likewise.
2964 * src/tables.c: Likewise.
2965 * src/uniqstr.c: Likewise.
2966 * src/vcg.c: Likewise.
2967
2968 * src/parse-gram.y: Fix minor problems uncovered by lint.
2969 (current_lhs, current_lhs_location): Now static.
2970 (current_assoc): Remove unused variable.
2971
2972 Cleanups so that Bison-generated parsers have less lint.
2973 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2974 Prepend /*ARGSUSED*/, for lint's sake.
2975 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2976 definition if 'lint' is defined.
2977 (YYID): New macro (or function, if lint).
2978 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2979 * data/yacc.c: Likewise.
2980 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2981 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2982 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2983 is C++ only.
2984 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2985 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2986 Use YYID(0) rather than 0, for lint.
2987 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2988 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2989
2990 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2991
2992 * tests/glr-regression.at
2993 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2994 Close memory leak reported by twlevo.
2995
2996 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2997
2998 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2999 all stacks.
3000 (yyparse): Iterate another stack in order to call user destructors.
3001 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3002 New test case.
3003 (Duplicated user destructor for lookahead): This test now is expected
3004 to succeed.
3005
3006 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3007
3008 * NEWS: Document the following change.
3009 * data/yacc.c: Say "parser skeleton" rather than "file", since
3010 it's no longer just a file.
3011 * data/glr.c: Grant a special exception for C GLR parsers, that
3012 reads like the already-existing exception for C LALR(1) parsers.
3013 * data/glr.cc: Likewise.
3014 * data/lalr1.cc: Likewise.
3015 * data/location.cc: Likewise.
3016 * data/yacc.c: Reword the "written by" statement to clarify that
3017 it was the parser skeleton, not the entire output file.
3018 * data/glr.c: Written by Paul Hilfinger.
3019 * data/glr.cc: Written by Akim Demaille.
3020 * data/lalr1.cc: Likewise.
3021
3022 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3023
3024 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3025 Fix typos in previous change that broke 'make check'.
3026 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3027 supported in C.
3028 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3029 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3030 We can revert this once things settle down.
3031
3032 * src/conflicts.c (conflicts_print): Don't print file name twice
3033 when %expect fails because there were no conflicts.
3034 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3035 change.
3036 * tests/conflicts.at (%expect not enough, %expect too much):
3037 (%expect with reduce conflicts): Adjust to new behavior.
3038
3039 2005-11-18 Akim Demaille <akim@epita.fr>
3040
3041 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3042 errors.
3043 * NEWS: Document this.
3044 * doc/bison.texinfo (Expect Decl): Likewise.
3045
3046 2005-11-16 Akim Demaille <akim@epita.fr>
3047
3048 Generalize the display of semantic values and locations in traces.
3049 * data/glr.c (yy_reduce_print): Fix indices (again).
3050 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3051 literal integers.
3052 * data/lalr1.cc (yyreduce_print): Rename as...
3053 (yy_reduce_print): this.
3054 Display values and locations.
3055 * data/yacc.c (yy_reduce_print): Likewise.
3056 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3057 (yysymprint): Move higher to be visible from yy_reduce_print).
3058 (yyparse): Adjust.
3059 * tests/calc.at: Adjust the expected length of the traces.
3060
3061 2005-11-14 Akim Demaille <akim@epita.fr>
3062
3063 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3064 from 1 to N, while values and location start at 0.
3065 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3066
3067 2005-11-14 Akim Demaille <akim@epita.fr>
3068
3069 * data/glr.c (yy_reduce_print): Fix the $ number.
3070
3071 2005-11-14 Akim Demaille <akim@epita.fr>
3072
3073 "Use" parse parameters.
3074 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3075 * data/glr.c, data/glr.cc: Use them.
3076 * data/glr.c (YYUSE): Have a C++ definition that supports
3077 non-pointer types.
3078
3079 2005-11-14 Akim Demaille <akim@epita.fr>
3080
3081 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3082
3083 2005-11-14 Akim Demaille <akim@epita.fr>
3084
3085 * data/glr.cc: New.
3086 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3087
3088 2005-11-12 Akim Demaille <akim@epita.fr>
3089
3090 Let position and location be PODs.
3091 * data/location.cc (position::initialize, location::initialize): New.
3092 (position::position, location::location): Define only if
3093 b4_location_constructors is defined.
3094 * data/lalr1.cc (b4_location_constructors): Define it for backward
3095 compatibility.
3096 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3097
3098 2005-11-12 Akim Demaille <akim@epita.fr>
3099
3100 * data/lalr1.cc: Move the body of the ctor and dtor into the
3101 parser file (instead of the header).
3102 Wrap the implementations in a "namespace yy".
3103
3104 2005-11-12 Akim Demaille <akim@epita.fr>
3105
3106 Have glr.c include its header file when created.
3107 * data/glr.c (b4_shared_declarations): New.
3108 Output them verbatim in the parser if !%defines, otherwise
3109 output then in the header file, and include it instead.
3110
3111 2005-11-11 Akim Demaille <akim@epita.fr>
3112
3113 * data/glr.c: Comment changes.
3114
3115 2005-11-11 Akim Demaille <akim@epita.fr>
3116
3117 When yydebug, report semantic and location values for reductions.
3118 * data/glr.c (yy_reduce_print): Report the semantic values and the
3119 locations.
3120 (YY_REDUCE_PRINT): Adjust.
3121 (yyglrReduce): Use them.
3122 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3123 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3124 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3125 traces.
3126
3127 2005-11-10 Akim Demaille <akim@epita.fr>
3128
3129 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3130 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3131 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3132
3133 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3134
3135 * m4/cxx.m4, examples/Makefile.am: Don't build
3136 examples/calc++ if no C++ compiler is available. (trivial change)
3137
3138 2005-11-09 Akim Demaille <akim@epita.fr>
3139
3140 * src/scan-skel.l: Use a couple of asserts.
3141
3142 2005-11-03 Akim Demaille <akim@epita.fr>
3143
3144 In some (weird) cases, the final state number is incorrect.
3145 Reported by Alexandre Duret-Lutz.
3146 * src/LR0.c (state_list_append): Remove the computation of
3147 final_state.
3148 (save_reductions): Do it here.
3149 (get_state): Alpha conversion.
3150 (generate_states): Use a for loop.
3151 * src/gram.h (item_number_is_rule_number)
3152 (item_number_is_symbol_number): New.
3153 * src/state.c: Use assert.
3154 * src/system.h: Include assert.h.
3155 * tests/sets.at (Accept): New.
3156
3157 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3158
3159 * data/glr.c (yyfill): Adjust comment.
3160 (yyresolveAction): Initialize default location properly
3161 for empty right-hand sides.
3162 (yydoAction): Ditto.
3163 Add comment explaining apparently dead code.
3164 * tests/glr-regression.at
3165 (Incorrectly initialized location for empty right-hand side in GLR):
3166 New test.
3167
3168 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3169
3170 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3171 gnulib when interrupted. This fixes some race conditions and
3172 works around some portability problems (one noted by Paul
3173 Hilfinger).
3174
3175 2005-10-22 Akim <akim@epita.fr>
3176
3177 * Makefile.cfg: Adjust to config -> build-aux.
3178 Reported by twledo.
3179
3180 2005-10-21 Akim Demaille <akim@epita.fr>
3181
3182 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3183 the %parse-params.
3184 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3185 * data/yacc.c (b4_Pure_if): Rename as...
3186 (b4_yacc_pure_if): this.
3187 (YY_SYMBOL_PRINT, yyparse): Adjust.
3188 * doc/bison.texinfo: Formatting changes.
3189
3190 2005-10-21 Akim Demaille <akim@epita.fr>
3191
3192 Finish the transition config -> build-aux.
3193 * configure.ac, Makefile.am: Use build-aux.
3194 * config/prev-version, config/announce-gen, config/Makefile.am:
3195 Move to...
3196 * build-aux/prev-version, build-aux/announce-gen,
3197 * build-aux/Makefile.am: here.
3198
3199 2005-10-14 Akim Demaille <akim@epita.fr>
3200
3201 * examples/calc++/test: Use set -x only when VERBOSE.
3202
3203 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3204
3205 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3206 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3207
3208 2005-10-13 Akim Demaille <akim@epita.fr>
3209
3210 * src/scan-skel.l: Output the base name parts of the parser and
3211 header file names.
3212 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3213 additional checks.
3214 Use this to exercise C++ outputs in subdirs.
3215 Reported by Oleg Smolsky.
3216
3217 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3218
3219 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3220 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3221 Problem reported by John P. Hartmann.
3222 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3223 already defined it.
3224
3225 2005-10-12 Akim Demaille <akim@epita.fr>
3226
3227 * src/parse-gram.y (version_check): Exit 63 to please missing
3228 (stands for "version mismatch).
3229 * tests/input.at, doc/bison.texinfo: Adjust.
3230
3231 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3232
3233 Work around portability problems with Visual Age C compiler
3234 (xlc and xlC_r) reported by John P. Hartmann.
3235 * data/location.cc (initial_column, initial_line): Remove.
3236 All uses replaced by 0 and 1.
3237 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3238 that xlc complains about.
3239 * src/scan-skel.l (skel_wrap): Likewise.
3240 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3241 as __STDC__.
3242 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3243 __STDC_VERSION__. Use it everywhere instead of looking at
3244 __STDC__ and __cplusplus.
3245
3246 2005-10-10 Akim Demaille <akim@epita.fr>
3247
3248 * examples/calc++/test: Be quiet unless VERBOSE.
3249
3250 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3251
3252 * data/c.m4 (yydestruct, yysymprint):
3253 Use YYUSE instead of casting to void.
3254 * data/glr.c (YYUSE): New macro.
3255 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3256 Use it instead of rolling our own.
3257 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3258 (YYCHK1):
3259 Use /*CONSTCOND*/ to suppress lint warnings.
3260 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3261 (YY_STACK_PRINT): Use 'false' not '0'.
3262 (YYUSE): New macro.
3263 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3264 * data/yacc.c (YYUSE): New macro.
3265 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3266 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3267 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3268
3269
3270 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3271 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3272
3273 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3274
3275 Undo the parts of the unlocked-I/O change that substituted
3276 putc or puts for printf. This might hurt performance a bit,
3277 but some people prefer the printf style.
3278 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3279 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3280 All uses replaced by YYFPRINTF and YYDPRINTF.
3281 * data/yacc.c: Likewise.
3282 * lib/bitset.c (bitset_print): Likewise.
3283 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3284 putc and puts.
3285 * lib/lbitset.c (debug_lbitset): Likewise.
3286 * src/closure.c (print_firsts, print_fderives): Likewise.
3287 * src/gram.c (grammar_dump): Likewise.
3288 * src/lalr.c (look_ahead_tokens_print): Likewise.
3289 * src/output.c (escaped_output): Likewise.
3290 (user_actions_output): Break apart two printfs.
3291 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3292 * src/reduce.c (reduce_print): Likewise.
3293 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3294 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3295
3296 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3297 Use assignments rather than casts-to-void to suppress
3298 unused-variable warnings. This pacifies 'lint'.
3299 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3300 unused-variable warnings.
3301
3302 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3303
3304 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3305
3306 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3307
3308 Use unlocked I/O for a minor performance improvement on hosts like
3309 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3310 is to use the gnlib unlocked-io module, and to prefer putc and
3311 puts to printf when either will work (since the latter doesn't
3312 come in an unlocked flavor).
3313 * bootstrap (gnulib_modules): Add unlocked-io.
3314 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3315 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3316 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3317 and similarly for puts and putc and printf.
3318 * data/yacc.c: Likewise.
3319 * lib/bitset.c (bitset_print): Likewise.
3320 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3321 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3322 to printf.
3323 * lib/lbitset.c (debug_lbitset): Likewise.
3324 * src/closure.c (print_firsts, print_fderives): Likewise.
3325 * src/gram.c (grammar_dump): Likewise.
3326 * src/lalr.c (look_ahead_tokens_print): Likewise.
3327 * src/output.c (escaped_output): Likewise.
3328 (user_actions_output): Coalesce two printfs.
3329 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3330 * src/reduce.c (reduce_print): Likewise.
3331 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3332 * src/system.h: Include unlocked-io.h rather than stdio.h.
3333
3334 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3335 this confuses xgettext.
3336
3337 2005-10-02 Akim Demaille <akim@epita.fr>
3338
3339 * bootstrap (gnulib_modules): Add strverscmp.
3340 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3341 * m4/.cvsignore: Add strverscmp.m4.
3342 * src/parse-gram.y (%require): New token, new rule.
3343 (version_check): New.
3344 * src/scan-gram.l (%require): Adjust.
3345 * tests/input.at (AT_REQUIRE): New.
3346 Use it.
3347 * doc/bison.texinfo (Require Decl): New.
3348 (Calc++ Parser): Use %require.
3349
3350 2005-10-02 Akim Demaille <akim@epita.fr>
3351
3352 * data/location.cc: New.
3353
3354 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3355 Akim Demaille <akim@epita.fr>
3356
3357 Make sure -odir/foo.cc creates dir/location.hh etc.
3358 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3359 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3360 (spec_defines_file): Now const.
3361 (dir_prefix): New.
3362 (short_base_name): Remove.
3363 * src/files.c: Adjust.
3364 (dirname.h): Include.
3365 (base_name): Don't prototype it.
3366 (finput): Remove, duplicates gram_in.
3367 (full_base_name, short_base_name): Replace by...
3368 (all_but_ext, all_but_tab_ext): these.
3369 (compute_base_names): Rename as...
3370 (compute_file_name_parts): this.
3371 Update to compute the new variables, including dir_prefix.
3372 Adjust dependencies.
3373 * src/output.c (prepare): Output them.
3374 * src/reader.c: Adjust to use gram_in, not finput.
3375 * src/scan-skel.l (@dir_prefix@): New.
3376
3377 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3378
3379 * lib/subpipe.c: New function end_of_output_subpipe() added
3380 to allow support for non-posix systems. This is a no-op function
3381 for posix systems.
3382
3383 * lib/subpipe.h: New function end_of_output_subpipe() added
3384 to allow support for non-posix systems. This is a no-op function
3385 for posix systems.
3386
3387 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3388 handle the lack of pipe/fork functionality on non-posix systems.
3389
3390 * djgpp/Makefile.maint: DJGPP specific file.
3391
3392 * djgpp/README.in: DJGPP specific file.
3393
3394 * djgpp/config.bat: DJGPP specific configuration file.
3395
3396 * djgpp/config.sed: DJGPP specific configuration file.
3397
3398 * djgpp/config.site: DJGPP specific configuration file.
3399
3400 * djgpp/config_h.sed: DJGPP specific configuration file.
3401
3402 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3403
3404 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3405
3406 2005-10-02 Akim Demaille <akim@epita.fr>
3407
3408 * data/location.cc: New, extract from...
3409 * data/lalr1.cc: here.
3410 (location.hh): Include it after the user prologue, in case the
3411 filename type is defined by the user.
3412 Forward declation location and position before the pre-prologue.
3413 (yyresult_): Rename as...
3414 (yyresult): this, it's a local variable, not an attribute.
3415 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3416
3417 2005-10-01 Akim Demaille <akim@epita.fr>
3418
3419 * examples/extexi: Restore the #line generation.
3420
3421 2005-09-30 Akim Demaille <akim@epita.fr>,
3422 Alexandre Duret-Lutz <adl@gnu.org>
3423
3424 Move the token type and YYSTYPE in the parser class.
3425 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3426 (parser::token): New, from the moved free definition of tokens.
3427 (parser::semantic_value): Now a full definition instead of an
3428 indirection to YYSTYPE.
3429 (b4_post_prologue): No longer included in the header file, but
3430 in the implementation file.
3431 * doc/bison.texi (C+ Language Interface): Update.
3432 * src/parse-gram.y: Support unary %define.
3433 * tests/actions.at: Define global_tokens_and_yystype for backward
3434 compatibility until we update the tests.
3435 * tests/calc.at: Idem.
3436 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3437 to simplify the code.
3438
3439 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3440
3441 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3442 Ah, the good old days! Problem reported by Peter Klein.
3443 * bootstrap (gnulib_modules): Add strerror, strtoul.
3444 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3445 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3446
3447 2005-09-29 Akim Demaille <akim@epita.fr>
3448
3449 * data/c.m4 (b4_error_verbose_if): New.
3450 * data/lalr1.cc: Use it.
3451 (YYERROR_VERBOSE_IF): Remove.
3452 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3453 parser members, replaced by...
3454 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3455 local variables.
3456 (yysyntax_error_): Takes the state number as argument.
3457 (yyreduce_print_): Use the argument yyrule, not the former
3458 attribute yyn_.
3459
3460 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3461
3462 * bootstrap (gnulib_modules): Add verify.
3463 * lib/.cvsignore: Add verify.h.
3464 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3465 * src/system.h (verify): Remove.
3466 Include verify.h instead.
3467 * src/tables.c (tables_generate): Use new API for 'verify'.
3468
3469 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3470
3471 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3472 local variables whose names begin with 'yy'.
3473 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3474 Trivial changes from Joel E. Denny.
3475
3476 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3477 it itself.
3478 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3479 don't use alloca any more.
3480
3481 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3482 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3483 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3484 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3485 to match yacc.c, to test more hosts.
3486
3487 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3488
3489 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3490 doesn't affect behavior.
3491 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3492 Solaris, AIX, MSC.
3493 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3494 This works a bit better with glibc, if user code has already included
3495 stdlib.h.
3496 * doc/bison.texinfo (Bison Parser): Document that users can't
3497 arbitrarily use malloc and free for other purposes. Document
3498 that <alloca.h> and <malloc.h> might be included.
3499 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3500 user must declare alloca.
3501
3502 * HACKING (release): Forwarn the Translation Project about
3503 stable releses.
3504
3505 2005-09-20 Akim Demaille <akim@epita.fr>
3506
3507 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3508
3509 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3510
3511 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3512 (YYSTACK_ALLOC_MAXIMUM): Use it.
3513 (yysyntax_error): New function.
3514 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3515 multiple syntax errors are reported, and alloca is being used.
3516 Instead, reallocate buffers twice as big each time, so that
3517 we waste at most half the allocated memory. Start with a small
3518 (128-byte) buffer that will suffice in most cases anyway.
3519 Use yysyntax_error to do most of the work.
3520
3521 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3522 yynerrs is the number of errors reported, not the number of
3523 errors encountered.
3524
3525 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3526 Mark it as expected to fail.
3527 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3528 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3529 Don't start user-code symbols with "yy", to avoid name space problems.
3530
3531 2005-09-19 Akim Demaille <akim@epita.fr>
3532
3533 Remove the traits, failed experiment.
3534 It never proved useful, and anyway because of the current
3535 definition, it was not possible to have several specialization of
3536 this traits, making it useless.
3537 * data/lalr1.cc (yy:traits): Remove.
3538 Inline its definitions in the parser class.
3539
3540 2005-09-19 Akim Demaille <akim@epita.fr>
3541
3542 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3543 least Mac OSX with a /usr/local install of gettext.
3544
3545 2005-09-19 Akim Demaille <akim@epita.fr>
3546
3547 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3548 and yytoken for similarity with the other skeletons.
3549
3550 2005-09-19 Akim Demaille <akim@epita.fr>
3551
3552 * NEWS, configure.ac: update version number to 2.1a.
3553
3554 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3555
3556 * NEWS: Version 2.1.
3557
3558 * NEWS: Remove notice of yytname change, since it was never in an
3559 official release.
3560 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3561 diagnostic.
3562 * src/output.c (prepare): Likewise.
3563 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3564 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3565 is not defined. This is an awful hack, but it's enough for now.
3566 All callers changed.
3567 * tests/glr-regression-at (make_value): Args are const pointers now,
3568 to avoid GCC warning.
3569 (Duplicated user destructor for lookahead): New test. Currently
3570 skipped. It fails on my host but I'm not sure it'll always fail.
3571
3572 2005-09-16 Akim Demaille <akim@epita.fr>
3573
3574 * src/symtab.h (struct symbol): Declare the printer and destructor
3575 as const, to avoid accidental calls to free.
3576 (symbol_destructor_set, symbol_printer_set): Adjust.
3577 * src/symtab.c: Adjust.
3578
3579 2005-09-16 Akim Demaille <akim@epita.fr>
3580
3581 * data/c.m4 (b4_token_enums): New.
3582 (b4_token_defines): Rename as...
3583 (b4_token_enums_defines): this.
3584 (b4_token_defines): New, output only the #defines.
3585 * data/yacc.c, data/glr.c: Adjust.
3586 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3587 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3588 as default values.
3589
3590 2005-09-16 Akim Demaille <akim@epita.fr>
3591
3592 * data/lalr1.cc (yylex_): Remove, inline its code.
3593 (yyreport_syntax_error_): Remove, replaced by...
3594 (yysyntax_error_): this which returns a string and leaves to the
3595 caller the call to the users' error function.
3596 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3597 Move from members of the parser object...
3598 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3599 to local variables of the parse function.
3600
3601 2005-09-16 Akim Demaille <akim@epita.fr>
3602
3603 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3604 since it's in Bison's name space.
3605
3606 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3607
3608 * data/glr.c (yyresolveValue): Add default case to pacify
3609 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3610
3611 * NEWS: Document when yyparse started to return 2.
3612 * doc/bison.texinfo (Parser Function): Document when yyparse
3613 returns 2.
3614
3615 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3616 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3617 changed.
3618 (class position): file_name -> filename (reverting). All uses changed.
3619
3620 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3621
3622 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3623 do anything if $@ exists. This reverts part of the 2005-07-07
3624 patch.
3625
3626 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3627
3628 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3629 contains obsolete information and isn't worth distributing as a
3630 separate file anyway.
3631 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3632 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3633 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3634 (yyparse): Abort if user code uses longjmp to throw an unexpected
3635 value.
3636
3637 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3638
3639 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3640 Suggested by twlevo@xs4all.nl.
3641
3642 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3643 This avoids a diagnostic from gcc -Wswitch-enum.
3644 Problem reported by twlevo@xs4all.nl.
3645
3646 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3647 standards. Use "file name" or "file" or "name", depending on
3648 the context.
3649 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3650 not to hack/foo.tab.c.
3651 (Calc++ Top Level): 2nd arg of main is not const.
3652 * data/glr.c: b4_filename -> b4_file_name.
3653 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3654 All uses changed.
3655 (class position): filename -> file_name. All uses changed.
3656 * data/yacc.c: b4_filename -> b4_file_name.
3657 * lib/bitset.h: filename -> file_name in local vars.
3658 * lib/bitset_stats.c: Likewise.
3659 * src/files.c: Likewise.
3660 * src/scan-skel.l ("@output ".*\n): Likewise.
3661 * src/files.c (file_name_split): Renamed from filename_split.
3662 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3663
3664 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3665
3666 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3667 to accommodate latest gnulib.
3668
3669 * tests/glr-regression.at (Duplicate representation of merged trees):
3670 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3671
3672 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3673 needed.
3674
3675 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3676
3677 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3678 All uses changed. Invoke user destructor after an error during a
3679 split parse (trivial change from Joel E. Denny).
3680
3681 * tests/glr-regression.at
3682 (User destructor after an error during a split parse): New test case.
3683 Problem reported by Joel E. Denny in:
3684 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3685
3686 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3687
3688 * README-cvs: Give URLs for recommended tools.
3689 Mention Gzip version problem, and bootstrapping issues.
3690 Remove troubleshooting section, as it's somewhat obsolete.
3691
3692 * bootstrap (no_cache): New var, to accommodate different wget
3693 variants. Use it instead of '-C off'. Problem reported by
3694 twlevo@xs4all.nl.
3695
3696 * data/glr.c (yydestroyStackItem): New function.
3697 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3698 debugging information. Problem reported by Joel E. Denny.
3699
3700 2005-08-25 Akim Demaille <akim@epita.fr>
3701
3702 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3703
3704 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3705
3706 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3707 Don't invoke destructor on unresolved entries.
3708 * tests/glr-regression.at
3709 (User destructor for unresolved GLR semantic value): New test case.
3710 Problem reported by Joel E. Denny in:
3711 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3712
3713 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3714
3715 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3716 Add strnlen.c.
3717 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3718 lib-prefix.m4, po.m4.
3719
3720 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3721 in yydestruct diagnostic, since it might not be an error.
3722 Problem reported by Joel Denny near end of
3723 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3724 * data/lalr1.cc (yyerturn): Likewise.
3725 * data/yacc.c (yyreturn): Likewise.
3726 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3727
3728 * src/files.c: Remove obsolete FIXME comment.
3729
3730 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3731 with the other templates, and to fix bogus run-on messages such
3732 as the one reported at the end of
3733 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3734 All callers changed to avoid the newline.
3735 (yyprocessOneStack): Output two lines rather than one, to accommodate
3736 the above change. This changes the debug output format slightly.
3737
3738 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3739 reported by Joel E. Denny in
3740 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3741 (trivial change).
3742 * tests/glr-regression.at (Duplicate representation of merged trees):
3743 New test, from Joel E. Denny in:
3744 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3745 * THANKS: Add Joel E. Denny.
3746
3747 * configure.ac (AC_INIT): Bump to 2.0c.
3748
3749 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3750
3751 * NEWS: Version 2.0b.
3752
3753 * Makefile.am (SUBDIRS): Put examples before tests, so that
3754 "make check" doesn't finish with "All 1 tests passed".
3755
3756 * tests/regression.at (Token definitions): Don't rely on
3757 AT_PARSER_CHECK for data that contains backslashes. It currently
3758 uses 'echo', and 'echo' isn't portable if its argument contains
3759 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3760 that the byte '\0xff' is not printable in the C locale; it is,
3761 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3762 not printable, so use '\0x81' to test.
3763
3764 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3765 version of GCC, since the macro is used with non-GCC compilers.
3766
3767 Fix core dump reported by Pablo De Napoli in
3768 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3769 * tests/regression.at (Invalid inputs with {}): New test.
3770 * src/parse-gram.y (token_name): Translate type before using
3771 it as an index.
3772
3773 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3774 the user's name space. All uses changed to __attribute__
3775 ((__unused__)).
3776 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3777 Add __attribute__ ((__noreturn__)).
3778
3779 * etc/clcommit: Remove. We weren't using it, and it failed
3780 "make maintainer-distcheck".
3781 * Makefile.maint: Merge from coreutils.
3782 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3783 (syntax-check-rules): Change list of rules as described below.
3784 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3785 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3786 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3787 (sc_trailing_space): New rules.
3788 (sc_xalloc_h_in_src): Remove.
3789 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3790 (sc_space_tab, sc_error_exit_success, sc_changelog):
3791 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3792 (makefile-check, po-check, author_mark_check):
3793 (makefile_path_separator_check, copyright-check):
3794 Use grep -n, to make it easier to find violations.
3795 Use CVS_LIST and CVS_LIST_EXCEPT.
3796 (header_regexp, h_re): Remove.
3797 (dd_c): New macro.
3798 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3799 (my-distcheck): Use more-modern GCC flags.
3800 (signatures, %.asc): Remove.
3801 (rel-files, announcement): Remove signatures.
3802 Restore old updating code, even though we don't use it, so
3803 that we're the same as coreutils.
3804 (alpha, beta, major): Depend on news-date-check.
3805 Make the upload commands.
3806
3807 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3808 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3809 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3810 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3811 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3812 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3813 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3814 * tests/sets.at: Likewise.
3815
3816 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3817 we comment out the Autoconf version number.
3818 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3819 it's error-prone and "make maintainer-distcheck" rejects it.
3820
3821 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3822 Indent calls to "error" to pacify "make maintainer-distcheck",
3823 when the calls are not intended to be translated.
3824 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3825
3826 * src/Makefile.am (DEFS): Use +=, to pacify
3827 "make maintainer-distcheck".
3828 (bison_SOURCES): Add scan-skel.h.
3829 (sc_tight_scope): New rule, from coreutils.
3830
3831 * src/files.c (src_extension, header_extension):
3832 Now static, not extern.
3833 * src/getargs.c (short_options): Likewise.
3834 * src/muscle_tab.c (muscle_table): Likewise.
3835 * src/parse-gram.y (current_class, current_type, current_prec):
3836 Likewise.
3837 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3838 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3839 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3840 void, to avoid warning when NLS is disabled.
3841 * src/output.c: Include scan-skel.h.
3842 (scan_skel): Remove decl, since scan-skel.h does this.
3843 (output_skeleton):
3844 Indent calls to "error" to pacify "make maintainer-distcheck".
3845 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3846 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3847 "make maintainer-distcheck".
3848 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3849 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3850 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3851 (skel_lex_destroy, scan_skel): Move these decls to...
3852 * src/scan-skel.h: New file.
3853 * src/uniqstr.c (uniqstr_assert):
3854 Indent calls to "error" to pacify "make maintainer-distcheck".
3855
3856 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3857 not @VAR@.
3858
3859 * tests/torture.at: Revamp to avoid misuse of atoi that
3860 "make maintainer-distcheck" complained about.
3861
3862 * examples/extexi (message): Don't print a message more than once,
3863 and omit line-number decoration that makes Emacs compile think
3864 that informative messages are worth worrying about.
3865
3866 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3867
3868 * configure.ac: Update version number.
3869
3870 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3871 accidentally.
3872 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3873 autogenerated by the maintainer.
3874 * examples/calc++/.cvsignore: Add *.yy.
3875
3876 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3877 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3878 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3879
3880 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3881
3882 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3883 from maintainer-distcheck about casting the argument of 'free'.
3884
3885 * NEWS: Mention recent yytname changes.
3886 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3887
3888 * bootstrap: For translations that have not yet been upgraded to
3889 the new runtime-po domain, prime the pump by extracting the
3890 relevant strings from the obsolete translations. This code can be
3891 removed once the bison-runtime domain has been translated by each
3892 team.
3893
3894 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3895 now that token names are already quoted.
3896
3897 Fix problem reported by Anthony Heading.
3898 * data/glr.c (YYTOKEN_TABLE): New macro.
3899 (yytname): Define if YYTOKEN_TABLE.
3900 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3901 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3902 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3903 * src/output.c (prepare_symbols): Output token_table_flag.
3904
3905 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3906
3907 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3908 again if the first call fails.
3909
3910 * data/glr.c (yytnamerr): New function.
3911 (yyreportSyntaxError): Use it to dequote most string literals.
3912 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3913 with other skeletons. All uses changed.
3914 (yytnameerr_): New function.
3915 (yyreport_syntax_error): Use it to dequote most string literals.
3916 * data/yacc.c (yytnamerr): New function.
3917 (yyerrlab): Use it to decode most string literals.
3918 * doc/bison.texinfo (Decl Summary, Calling Convention):
3919 Clarify quoting convention of yytname.
3920 * src/output.c (prepare_symbols): Quote all names. This undoes
3921 the 2005-04-17 change, which is now accomplished (mostly) via
3922 changes in the parsers as described above.
3923 * tests/regression.at (Token definitions, Web2c Actions):
3924 Undo most 2005-04-17 change here, too.
3925
3926 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3927
3928 Fix more problems reported by twlevo@xs4all.nl.
3929 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3930 remove trailing spaces. This loses the exit status of ./types,
3931 and isn't needed since ./types shouldn't be emitting trailing
3932 spaces.
3933 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3934 as the stack isn't valid in that case.
3935
3936 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3937 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3938 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3939 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3940 is used.
3941 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3942 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3943 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3944 Likewise.
3945
3946 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3947 overly-picky compilers that reject 'char *foo = "bar";'.
3948
3949 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3950 to FILE * parameter, not to stderr. This fixes a typo introduced
3951 in the 2005-07-12 change.
3952
3953 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3954 warnings from GCC 4.
3955
3956 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3957 (yyglrShiftDefer, yysplitStack):
3958 Remove unused parameters b4_pure_formals. All uses changed.
3959 (yyglrShift): Remove unused parameters b4_user_formals.
3960 All uses changed.
3961 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3962
3963 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3964
3965 Destructor cleanups and regularization among the three skeletons.
3966 * NEWS: Document the behavior changes.
3967 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3968 stack before failing, as the cleanup code will do it for us now.
3969 * data/lalr1.cc (yyerrlab): Likewise.
3970 * data/glr.c (yyparse): Pop everything off the stack before
3971 freeing it, so that destructors get called properly.
3972 * data/lalr1.cc (yyreturn): Likewise.
3973 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3974 This is more consistent.
3975 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3976 why destructors might be called. 1.875 -> 2.1.
3977 (Destructor Decl, Decl Summary, Table of Symbols):
3978 Some English-language cleanups for %destructor.
3979 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3980 Add output line for destructor of start symbol.
3981 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3982 because of that same extra output line.
3983
3984 * NEWS: Document minor wording changes in diagnostics of
3985 Bison-generated parsers.
3986 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3987 Remove unused formals. All uses changed.
3988 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3989 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3990 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3991 Rename yyoverflowab to yyexhaustedlab.
3992 When memory exhaustion occurs during syntax-error reporting,
3993 report it separately rather than in a single diagnostic; this
3994 eases translation.
3995 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3996 (Memory Exhausted): Renamed from Parser Stack Overflow.
3997 Revamp wording slightly to prefer "memory exhaustion".
3998 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3999
4000 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4001
4002 Add i18n support to the GLR skeleton. Partially fix the C++
4003 skeleton; a C++ expert needs to finish this. Remove debugging
4004 msgids; there's little point to having them translated, since they
4005 can be understood only by someone who can read the
4006 (English-language) source code.
4007
4008 Generate runtime-po/bison-runtime.pot automatically, so that we
4009 don't have to worry about garbage getting in that file. We'll
4010 make sure after the next official release that old msgids don't
4011 get lost. See
4012 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4013
4014 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4015 Now auto-generated.
4016 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4017 Fix typos in explanations of the runtime file.
4018 * bootstrap: Change gettext keyword from YYI18N to YY_.
4019 Use standard Makefile.in.in in runtime-po, since we'll arrange
4020 for backward-compatible bison-runtime.po files in a different way.
4021 * data/glr.c (YY_): New macro, from yacc.c.
4022 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4023 Translate messages intended for users.
4024 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4025 the wording in the other skeletons. We don't know that the memory
4026 is virtual.
4027 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4028 Use same method that yacc.c uses.
4029 Don't translate debugging messages.
4030 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4031 it doesn't work (yet), and requires C++ expertise to fix.
4032 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4033 Move defn to a more logical place, to be consistent with other
4034 skeletons.
4035 Don't translate debugging messages.
4036 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4037 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4038 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4039 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4040
4041 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4042 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4043 void, not int.
4044 * tests/glr-regression.at (Badly Collapsed GLR States):
4045 Likewise.
4046 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4047 yylex should return 0 at EOF rather than aborting.
4048
4049 Improve tests for stack overflow in GLR parser.
4050 Problem reported by twlevo@xs4all.nl.
4051 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4052 All uses removed.
4053 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4054 can handle the problem.
4055 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4056 (yyparse): New local variable yyresult to record the result.
4057 Use result of setjmp to set it, rather than storing itinto
4058 struct.
4059 (yyDone): Remove label.
4060 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4061 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4062 if YYABORT is used).
4063 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4064 yyparse status; put status > 1 into diagnostic.
4065 Check that status==2 works.
4066 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4067 Use exit status 3 for failure to open (which shouldn't happen).
4068
4069 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4070
4071 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4072 1 on syntax error; just let yyparse do its thing.
4073 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4074 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4075 (Exploding the Stack Size with Alloca):
4076 (Exploding the Stack Size with Malloc):
4077 Expect exit status 2, not 1, since the parser is supposed to blow
4078 its stack. Problem reported by twlevo@xs4all.nl.
4079
4080 * data/glr.c (yyparse): Don't assume that the initial calls
4081 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4082 Print a stack-overflow message and fail instead.
4083 Initialize the line-number information before creating the stack,
4084 so that the stack-overflow message can report line zero safely.
4085
4086 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4087
4088 Fix problems reported by twlevo@xs4all.nl.
4089 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4090 (yyuserMerge): Provide a default case if b4_mergers is empty.
4091 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4092 * tests/glr-regression.at
4093 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4094 Add casts to pacify C++ compilers.
4095 * tests/glr-regression.at (Improper merging of GLR delayed action
4096 sets): Declare yylex before using it.
4097 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4098 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4099 test for valgrind; valgrind is independent of g++.
4100 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4101 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4102 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4103 Use a destructor, so that we can expand the stack. Change
4104 YYSTYPE to char * so that we can free it. Cast result of malloc.
4105
4106 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4107
4108 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4109 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4110
4111 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4112
4113 * PACKAGING: New file, suggested by Bruno Haible and taken from
4114 similar wording in gettext's PACKAGING file.
4115 * NEWS: Mention PACKAGING.
4116 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4117
4118 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4119
4120 * NEWS: Document recent i18n improvements.
4121 * bootstrap: Get runtime translations into runtime-po.
4122 Create runtime-po files automatically, if possible.
4123 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4124 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4125 does not infringe on the user's name space.
4126 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4127 * doc/bison.texinfo (Internationalization): Revamp the English
4128 and Texinfo syntax a bit, to try to make it clearer.
4129 (Bison Options, Option Cross Key): Mention --print-localedir.
4130 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4131 YYENABLE_NLS. Quote a bit more.
4132 * runtime-po/.cvsignore: New file.
4133 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4134 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4135 * runtime-po/quot.sed: Likewise.
4136 * runtime-po/boldquot.sed: Likewise.
4137 * runtime-po/en@quot.header: Likewise.
4138 * runtime-po/en@boldquot.header: Likewise.
4139 * runtime-po/insert-header.sin: Likewise.
4140 * runtime-po/remove-potcdate.sin: Likewise.
4141 * runtime-po/Makevars: Likewise.
4142 * runtime-po/LINGUAS: Likewise.
4143 * runtime-po/de.po: Likewise; we will rely on the translation project
4144 to maintain this, so "bootstrap" should get it.
4145 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4146 its value.
4147 * src/main.c (main): Bind the bison-runtime domain, too.
4148
4149 2005-07-12 Bruno Haible <bruno@clisp.org>
4150
4151 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4152 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4153 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4154 * runtime-po: New directory.
4155 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4156 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4157 * runtime-po/Rules-quot: New file, copied from po/.
4158 * runtime-po/quot.sed: Likewise.
4159 * runtime-po/boldquot.sed: Likewise.
4160 * runtime-po/en@quot.header: Likewise.
4161 * runtime-po/en@boldquot.header: Likewise.
4162 * runtime-po/insert-header.sin: Likewise.
4163 * runtime-po/remove-potcdate.sin: Likewise.
4164 * runtime-po/Makevars: New file.
4165 * runtime-po/POTFILES.in: New file.
4166 * runtime-po/LINGUAS: New file.
4167 * runtime-po/bison-runtime.pot: New file.
4168 * runtime-po/de.po: New file.
4169 * m4/bison.m4: New file.
4170 * Makefile.am (SUBDIRS): Add runtime-po.
4171 (aclocaldir, aclocal_DATA): New variables.
4172 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4173 Define aclocaldir.
4174 * src/getargs.c (usage): Document --print-localedir option.
4175 (PRINT_LOCALEDIR_OPTION): New enum item.
4176 (long_options): Add --print-localedir option.
4177 (getargs): Handle --print-localedir option.
4178 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4179 (Internationalization): New section.
4180
4181 2005-07-12 Akim Demaille <akim@epita.fr>
4182
4183 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4184 for consistency with the rest of the code.
4185 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4186 Add separators.
4187
4188 2005-07-12 Akim Demaille <akim@epita.fr>
4189
4190 * src/parse-gram.y: Use %printer instead of YYPRINT.
4191
4192 2005-07-12 Akim Demaille <akim@epita.fr>
4193
4194 * src/symtab.h, src/symtab.c (symbol_print): New.
4195 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4196 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4197
4198 2005-07-12 Akim Demaille <akim@epita.fr>
4199
4200 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4201 b4_at_dollar and b4_dollar_dollar.
4202
4203 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4204
4205 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4206 and Pennello's paper.
4207
4208 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4209
4210 * data/yacc.c (yyparse): Undo previous patch. Instead,
4211 set yylsp[0] and yyvsp[0] only if the initial action
4212 sets yylloc and yylval, respectively.
4213
4214 * data/yacc.c (yyparse): In the initial action, set
4215 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4216 This avoids the use of undefined variables if the initial
4217 action does not set yylloc and/or yylval.
4218
4219 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4220
4221 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4222 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4223 Remove from CVS. These files are automatically generated.
4224 * examples/extexi: Clarify that this file is now part of Bison,
4225 not GNU M4, and that it works with any POSIX-compatible Awk.
4226 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4227 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4228 so that we also get calc++-parser.yy. Geneate it.
4229 Use $(AWK), not gawk, since any conforming Awk will do.
4230 Put comment before action, since older 'make' can't handle comment
4231 in action.
4232 $(BUILT_SOURCES): List all built sources, not just some of them.
4233 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4234 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4235 $($(calc_sources_generated)): Remove unnecessary test for existence
4236 of target. (This had a shell syntax error anyway; a stray "x".)
4237 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4238 calc++-parser.yy.
4239 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4240
4241 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4242 implied by the other modules.
4243
4244 2005-07-06 Akim Demaille <akim@epita.fr>
4245
4246 Bind examples/calc++ to the package.
4247 * examples/calc++/Makefile: Remove, replaced by...
4248 * examples/calc++/Makefile.am: ... this new file.
4249 * examples/calc++/test: Remove input.
4250 * examples/calc++/compile: Remove.
4251 * examples/Makefile.am: New.
4252 * configure.ac, Makefile.am: Adjust.
4253 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4254
4255 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4256
4257 * data/glr.c (yyFail): Drastically simplify; since the format argument
4258 never had any % directives, we can simply pass it to yyerror.
4259 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4260 be modified later, as that is the usual style in glr.c.
4261 Problems reported by Paul Hilfinger.
4262
4263 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4264 and size overflow errors.
4265 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4266 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4267 (YYSIZEMAX): New macro.
4268 (yystpcpy): New function, taken from yacc.c.
4269 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4270 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4271 so that we don't have to maintain their signatures.
4272 (yyFail): Check for buffer overflow, by using vsnprintf rather
4273 than vsprintf. Allocate a bigger buffer if possible.
4274 Report an error if buffer allocation fails.
4275 (yyStackOverflow): New function.
4276 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4277 the initialization was successful. It might fail if storage was
4278 exhausted.
4279 (yyexpandGLRStack): Add more checks for storage allocation failure.
4280 Use yyStackOverflow to report failures.
4281 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4282 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4283 Don't assume stack number fits in int.
4284 (yysplitStack): Check for storage allocation failure.
4285 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4286 can print diagnostics on storage allocation failure. All callers
4287 changed.
4288 (yyresolveValue): Use yybool for boolean.
4289 (yyreportSyntaxError): Check for size-calculation overflow.
4290 This code is taken from yacc.c.
4291 (yyparse): Check for storage allocation errors when allocating
4292 the initial stack.
4293
4294 2005-07-05 Akim Demaille <akim@epita.fr>
4295
4296 Extract calc++ from the documentation.
4297 * doc/bison.texinfo (Calc++): Add the extraction marks.
4298 * examples/extexi: New, from the aborted GNU Programming 2E.
4299 Separate the different paragraph of a file with empty lines.
4300 * examples/Makefile: Use it to extract the whole calc++ example.
4301
4302 2005-06-24 Akim Demaille <akim@epita.fr>
4303
4304 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4305 class typedefs.
4306
4307 2005-06-22 Akim Demaille <akim@epita.fr>
4308
4309 * doc/bison.texinfo (C++ Language Interface): First stab.
4310 (C++ Parsers): Remove.
4311
4312 2005-06-22 Akim Demaille <akim@epita.fr>
4313
4314 * data/lalr1.cc (yylex_): Honor %lex-param.
4315
4316 2005-06-22 Akim Demaille <akim@epita.fr>
4317
4318 Start a set of simple examples.
4319 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4320 * examples/calc++/calc++-driver.hh,
4321 * examples/calc++/calc++-parser.yy,
4322 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4323 * examples/calc++/compile, examples/calc++/test: New.
4324
4325 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4326
4327 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4328 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4329 which stems from the 2005-05-27 patch.
4330
4331 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4332
4333 * data/glr.c: Modify treatment of unused parameters to permit use
4334 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4335
4336 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4337
4338 Fix infringement on user name space reported by Janos Zoltan Szabo.
4339 * data/yacc.c (yyparse): strlen -> yystrlen.
4340
4341 2005-05-30 Akim Demaille <akim@epita.fr>
4342
4343 * data/lalr1.cc (_): New.
4344 Translate the various messages.
4345
4346 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4347
4348 Fix infringement on user name space reported by Bruno Haible.
4349 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4350 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4351 the user's name space.
4352 (alloca): Include <stdlib.h> to get it, if it's not built in.
4353 (YYMALLOC, YYFREE): Define only if needed.
4354 (malloc, free): Declare, but only if needed, as this infringes on
4355 the user name space.
4356
4357 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4358
4359 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4360 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4361 with %d format.
4362 * lib/ebitset.c (min, max): Undef before defining.
4363 * lib/vbitset.c (min, max): Likewise.
4364 * lib/subpipe.c (create_subpipe): Save local variables in case
4365 vfork clobbers them.
4366
4367 2005-05-24 Bruno Haible <bruno@clisp.org>
4368
4369 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4370 error message syntax used by gcc-4.0.
4371
4372 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4373
4374 * README: Mention m4 1.4.3. Remove obsolete advice about
4375 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4376
4377 * bootstrap: Remove workaround for problem I encountered with
4378 gettext 0.14.1; it seems to be fixed now.
4379
4380 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4381
4382 * NEWS: Version 2.0a.
4383
4384 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4385 the previous change.
4386
4387 Various maintainer cleanups.
4388 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4389 conftest*, for benefit of CVS commands run at the same time as
4390 "configure". Add build-aux, since "bootstrap" now creates it and
4391 its subfiles.
4392 * Makefile.cfg (move_if_change): Remove.
4393 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4394 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4395 (po_repo, do-po-update, po-update, wget_files, get-targets):
4396 (config.guess-url_prefix, config.sub-url_prefix):
4397 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4398 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4399 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4400 Remove.
4401 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4402 this is now the recommended name.
4403 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4404 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4405 ylwrap. These files now go into build-aux.
4406 * config/move-if-change: Remove.
4407 * config/prev-version.txt: Bump from 1.75 to 2.0.
4408
4409 * bootstrap: Add stdio-safer, unistd-safer modules.
4410 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4411 we don't need it).
4412 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4413 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4414 * lib/subpipe.c: Include "unistd-safer.h".
4415 (create_subpipe): Make sure all the newly-created
4416 file descriptors are > 2, so that diagnostics don't
4417 get sent down them (which might cause Bison to hang, in theory).
4418 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4419 * src/files.c (xfopen): Use fopen_safer, not fopen.
4420
4421 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4422 yesterday's yacc.c fix.
4423
4424 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4425
4426 * data/glr.c, data/lalr1.cc: Update copyright date.
4427
4428 Fix a destructor bug reported by Wolfgang Spraul in
4429 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4430 * data/yacc.c (yyabortlab): Don't call destructor, and
4431 don't set yychar to EMPTY.
4432 (yyoverflowlab): Don't call destructor.
4433 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4434 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4435 since we no longer output the message "discarding lookahead token
4436 end of input ()".
4437
4438 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4439
4440 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4441 fix a small glitch in debugging output.
4442 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4443 after YY_SYMBOL_PRINT where needed.
4444
4445 (struct yyGLRState): Add some comments.
4446 (struct yySemanticOption): Add some comments.
4447 (union yyGLRStackItem): Add comment.
4448
4449 (yymergeOptionSets): Correct this to properly perform the union,
4450 avoiding infinite reported by Michael Rosien.
4451 Update comment.
4452
4453 * tests/glr-regression.at: Add test for GLR merging error reported
4454 by M. Rosien.
4455
4456 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4457
4458 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4459 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4460 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4461 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4462 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4463 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4464 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4465 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4466 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4467 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4468 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4469 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4470 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4471 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4472 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4473 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4474 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4475 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4476 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4477 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4478 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4479 src/output.h, src/parse-gram.c, src/parse-gram.h,
4480 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4481 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4482 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4483 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4484 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4485 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4486 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4487 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4488 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4489 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4490 tests/reduce.at, tests/regression.at, tests/sets.at,
4491 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4492 Update FSF postal mail address.
4493
4494 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4495
4496 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4497 Problem reported by Ralf Menzel.
4498
4499 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4500
4501 * tests/actions.at: Test that stack overflow invokes destructors.
4502 From Marcus Holland-Moritz.
4503 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4504 from here....
4505 (yyreturn): to here. That way, destructors are called properly
4506 even if the stack overflows, or the user calls YYACCEPT or
4507 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4508 (yyoverflowlab): Destroy the lookahead.
4509
4510 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4511
4512 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4513
4514 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4515
4516 * NEWS: Bison-generated C parsers no longer quote literal strings
4517 associated with tokens.
4518 * src/output.c (prepare_symbols): Don't escape strings,
4519 since users don't want to see C escapes.
4520 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4521 in diagnostics.
4522 * tests/input.at (Torturing the Scanner): Likewise.
4523 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4524
4525 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4526
4527 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4528 the data size is known to be too small and we can't increase it.
4529 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4530
4531 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4532
4533 * src/parse-gram.y: Include quotearg.h.
4534 (string_as_id): Quote $1 before using it as a key, since the
4535 lexer no longer quotes it for us.
4536 (string_content): Don't strip quotes, since lexer no longer
4537 quotes it for us.
4538 * src/scan-gram.l: Include quotearg.h.
4539 ("\""): Omit quote.
4540 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4541 a key, since the rest of the lexer doesn't quote it.
4542 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4543 * tests/regression.at (Token definitions): Check for backslashes
4544 in token strings.
4545
4546 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4547 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4548 (yyparse): Revamp code to generate long syntax error message, to
4549 make it easier to translate, and to avoid problems with arithmetic
4550 overflow. Change "virtual memory" to "memory" in diagnostic, since
4551 we don't know whether the memory is virtual.
4552
4553 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4554
4555 * NEWS: Bison-generated C parsers now use the _ macro to
4556 translate strings.
4557 * data/yacc.c (_) [!defined _]: New macro.
4558 All English strings wrapped inside this macro.
4559 * doc/bison.texinfo (Bison Parser): Document _.
4560 * po/POTFILES.in: Include src/parse-gram.c, since it now
4561 includes translateable strings that parse-gram.y doesn't.
4562
4563 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4564
4565 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4566 reverting the 2004-10-11 change to this function.
4567 (symbol_check_alias_consistency): Don't call symbol_type_set
4568 if the type name is already correct.
4569 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4570
4571 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4572
4573 * tests/regression.at (Token definitions): Don't use a token named
4574 c, as that generates a "#define c ..." that runs afoul of buggy
4575 stdlib.h that uses the identifier c as a member of struct
4576 drand48_data. Problem reported by Horst Wente.
4577
4578 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4579
4580 * bootstrap: Change translation URL from
4581 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4582 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4583 redirection glitches. Problem reported by twlevo@xs4all.nl.
4584
4585 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4586
4587 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4588 after operands; POSIX says this isn't portable for the c99 command.
4589
4590 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4591
4592 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4593 immediately if a data overrun has occurred; this may help us track
4594 down what may be a spurious failure on MacOS.
4595
4596 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4597
4598 Respond to problems reported by twlevo@xs4all.nl.
4599
4600 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4601
4602 * src/vcg.h: Comment fix.
4603 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4604 (G_CMAX): Change to -1 instead of INT_MAX.
4605
4606 * data/yacc.c (yyparse): Omit spaces before #line.
4607
4608 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4609
4610 * src/tables.c (state_number_to_vector_number): Put it inside an
4611 "#if 0", since it's not currently used. Problem reported by
4612 Roland McGrath.
4613
4614 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4615
4616 * src/output.c (escaped_output): Renamed from
4617 escaped_file_name_output, since we now use it for symbol tags as
4618 well. All uses changed.
4619 (symbol_destructors_output, symbol_printers_output):
4620 Escape symbol tags too.
4621 Problem reported by Matyas Forstner in
4622 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4623
4624 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4625 not needed.
4626 * src/output.c (user_actions_output, token_definitions_output,
4627 symbol_destructors_output, symbol_printers_output): Likewise.
4628 * src/reader.c (prologue_augment): Likewise.
4629 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4630
4631 * src/vcg.c (output_edge): Don't quote linestyle arg.
4632 Problem reported by twlevo@xs4all.nl.
4633
4634 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4635
4636 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4637 example, reported by Derek M Jones. Also, make the example even
4638 more outrageous, to better illustrate how bad the problem is.
4639
4640 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4641
4642 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4643 putsym. Typo reported by Sebastian Piping.
4644
4645 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4646
4647 * doc/bison.texinfo (Language and Grammar): some -> same
4648 (Epilogue): int he -> in the
4649 Typos reported by Sebastian Piping via Justin Pence.
4650
4651 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4652
4653 * tests/glr-regression.at (Improper handling of embedded actions
4654 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4655 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4656 with dollar signs in test names.
4657 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4658 for a similar reason.
4659
4660 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4661
4662 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4663 wants to redefine G_VIEW.
4664
4665 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4666
4667 * src/vcg.c (get_view_str): Remove case for normal_view.
4668 Problem reported by twlevo@xs4all.nl.
4669
4670 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4671
4672 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4673 Problem reported by twlevo@xs4all.nl.
4674
4675 * doc/bison.texinfo: Change @dircategory from "GNU programming
4676 tools" to "Software development". Requested by Richard Stallman
4677 via Karl Berry.
4678
4679 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4680
4681 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4682 Problem reported by twlevo@xs4all.nl.
4683
4684 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4685
4686 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4687 keyword; it's not needed with modern compilers, and it doesn't
4688 affect correctness with older compilers. Suggested by
4689 twlevo@xs4all.nl.
4690
4691 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4692
4693 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4694 gcc -Wswitch-default.
4695 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4696 * data/yacc.c (yyparse): Likewise.
4697
4698 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4699
4700 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4701 already. Let config.h define any nonstandard values.
4702
4703 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4704
4705 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4706 for the benefit of slower hosts. Problem reported by
4707 Nelson H. F. Beebe.
4708
4709 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4710
4711 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4712 being defined and not used.
4713 * data/lalr1.cc (yyparse): Likewise.
4714 Use "if (false)" rather than "if (0)".
4715
4716 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4717
4718 * TODO: Mention that we should allow NUL bytes in tokens.
4719
4720 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4721
4722 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4723 Problem reported by Hans Aberg.
4724
4725 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4726
4727 * src/getargs.c (version): Happy new year; update overall
4728 program copyright date from 2004 to 2005.
4729
4730 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4731 Problem reported by Hans Aberg.
4732 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4733 (Output file names.): Add a test for the case when standard output
4734 is closed.
4735
4736 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4737
4738 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4739 to fix an oversight in the Bison 2.0 manual.
4740
4741 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4742
4743 * NEWS: Version 2.0. Reformat the existing news items since
4744 1.875, so that related items are grouped together.
4745 * configure.ac (AC_INIT): Bump version to 2.0.
4746 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4747
4748 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4749 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4750 otherwise, we're not testing alloca. Unfortunately there's no
4751 simple way to consult HAVE_ALLOCA here.
4752
4753 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4754 for yymsg, too.
4755
4756 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4757 hand. This avoids a warning about comparing int to size_t when
4758 GCC warnings are enabled.
4759
4760 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4761
4762 * NEWS: Bison-generated parsers no longer default to using the
4763 alloca function (when available) to extend the parser stack, due
4764 to widespread problems in unchecked stack-overflow detection.
4765 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4766 responsibility to set it to a positive value. This lets the user
4767 specify a value that is not a preprocessor constant.
4768 * data/yacc.c (YYMAXDEPTH): Likewise.
4769 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4770 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4771 to be a compile-time constant. However, explain the constraints on it.
4772 Also, explain the constraints on YYINITDEPTH.
4773 (Table of Symbols): Explain that alloca is no longer the default.
4774 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4775 to 1.
4776
4777 * doc/bison.texinfo (Location Default Action): Mention that n must
4778 be zero when k is zero. Suggested by Frank Heckenbach.
4779
4780 2004-12-22 Akim Demaille <akim@epita.fr>
4781
4782 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4783 (parser::state_type, parser::semantic_type, parser::location_type):
4784 Private, not public.
4785 (parser::parse): Return ints, not bool.
4786 Returning a bool introduces a problem: 0 corresponds to false, and
4787 it seems weird to return false on success. Returning true changes
4788 the conventions for yyparse.
4789 Alternatively we could return void and send an exception.
4790 There is no clear consensus (yet?).
4791 (state_stack, semantic_stack, location_stack): Rename as...
4792 (state_stack_type, semantic_stack_type, location_stack_type): these.
4793 Private, not public.
4794 * tests/c++.at: New.
4795 * tests/testsuite.at, tests/Makefile.am: Adjust.
4796
4797 2004-12-21 Akim Demaille <akim@epita.fr>
4798
4799 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4800
4801 2004-12-21 Akim Demaille <akim@epita.fr>
4802
4803 Don't impose std::string for filenames.
4804
4805 * data/lalr1.cc (b4_filename_type): New.
4806 (position::filename): Use it.
4807 (parser.hh): Move the inclusion of stack.hh and location.hh below
4808 the user code, so that needed headers for the filename type can be
4809 included first.
4810 Forward declare them before the user code.
4811 * tests/Makefile.am (check-local, installcheck-local): Pass
4812 TESTSUITEFLAGS to the TESTSUITE.
4813
4814 2004-12-20 Akim Demaille <akim@epita.fr>
4815
4816 Use more STL like names: my_class instead of MyClass.
4817
4818 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4819 (SemanticStack, SemanticType, StateStack, StateType)
4820 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4821 (Parser::value): Rename as...
4822 (location_stack, location_type, rhs_number_type, semantic_stack)
4823 (semantic_type, state_stack, state_type, token_number_type, stack)
4824 (slice, traits, parser::yylloc, parser::yylval): these.
4825
4826 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4827
4828 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4829
4830 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4831 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4832
4833 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4834
4835 Remove uses of 'short int' and 'unsigned short int'. This raises
4836 some arbitrary limits. It uses more memory but nowadays that's
4837 not much of an issue.
4838
4839 This change does not affect the generated parsers; that's a different
4840 task, as some users will want to conserve memory there.
4841
4842 Ideally we should use size_t to represent all object counts, and
4843 something like ptrdiff_t to represent signed differences of object
4844 counts; but that will require more code-cleanup than I have the
4845 time to do right now.
4846
4847 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4848 Use size_t, not int or short int, to count objects.
4849 * src/closure.c (nritemset, closure): Likewise.
4850 * src/closure.h (nritemset, closure): Likewise.
4851 * src/nullable.c (nullable_compute): Likewise.
4852 * src/print.c (print_core): Likewise.
4853 * src/print_graph.c (print_core): Likewise.
4854 * src/state.c (state_compare, state_hash): Likewise.
4855 * src/state.h (struct state): Likewise.
4856 * src/tables.c (default_goto, goto_actions): Likewise.
4857
4858 * src/gram.h (rule_number, rule): Use int, not short int.
4859 * src/output.c (prepare_rules): Likewise.
4860 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4861 errs, reductions): Likewise.
4862 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4863 Likewise.
4864 * src/tables.c (vector_number, tally, action_number,
4865 ACTION_NUMBER_MINIMUM): Likewise.
4866 * src/output.c (muscle_insert_short_int_table): Remove.
4867
4868 2004-12-17 Akim Demaille <akim@epita.fr>
4869
4870 * data/lalr1.cc: Extensive Doxygenation.
4871 (error_): Rename as...
4872 (error): this, since it is visible to the user.
4873 Adjust callers.
4874 (Parser::message): Now an automatic variable from...
4875 (Parser::yyreport_syntax_error_): here.
4876 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4877 Parser::error.
4878 * tests/input.at: Escape $.
4879
4880 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4881
4882 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4883 Parenthesize rhs to avoid obscure problems with mistakes like
4884 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4885 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4886 b4_rhs_location): Likewise.
4887 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4888 b4_rhs_location): Likewise.
4889
4890 2004-12-16 Akim Demaille <akim@epita.fr>
4891
4892 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4893 yacc.c: be sure to stay within yycheck_.
4894 * tests/actions.at: Re-enable C++ tests.
4895
4896 2004-12-16 Akim Demaille <akim@epita.fr>
4897
4898 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4899 real.
4900
4901 2004-12-16 Akim Demaille <akim@epita.fr>
4902
4903 Use #define to handle the %name-prefix.
4904
4905 * data/glr.c, data/yacc.c: Comment changes.
4906 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4907 so that one can refer to yylex in the parser file, and have it
4908 renamed, as is the case with other skeletons.
4909
4910 2004-12-16 Akim Demaille <akim@epita.fr>
4911
4912 Move lalr1.cc internals into yy*.
4913
4914 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4915 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4916 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4917 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4918 (empty_, final_, terror_, errcode_, ntokens_)
4919 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4920 (looka_, ilooka_, error_range_, nerrs_):
4921 Rename as...
4922 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4923 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4924 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4925 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4926 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4927 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4928 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4929 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4930 these.
4931
4932 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4933
4934 Fix some problems reported by twlevo at xs4all.
4935 * src/symtab.c (symbol_new): Report an error if the input grammar
4936 contains too many symbols. This is better than calling abort() later.
4937 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4938 (struct node, struct graph):
4939 Rename member expand to stretch. All uses changed.
4940 (struct graph): Remove member layoutalgorithm. All uses removed.
4941 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4942 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4943 All uses changed.
4944 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4945
4946 2004-12-15 Akim Demaille <akim@epita.fr>
4947
4948 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4949 Add more Doxygen comments.
4950 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4951 (report_syntax_error_, translate_): Rename as...
4952 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4953 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4954
4955 2004-12-15 Akim Demaille <akim@epita.fr>
4956
4957 * data/lalr1.cc (lex_): Rename as...
4958 (yylex_): this.
4959 Move the trace here.
4960 Take the %name-prefix into account.
4961 Reported by Alexandre Duret-Lutz.
4962
4963 2004-12-15 Akim Demaille <akim@epita.fr>
4964
4965 Simplify the C++ parser constructor.
4966
4967 * data/lalr1.cc (debug_): Rename as...
4968 (yydebug_): so that the parser's internals are always in the yy*
4969 pseudo namespace.
4970 Adjust uses.
4971 (b4_parse_param_decl): Remove the leading comma as it is now only
4972 called as unique argument list.
4973 (Parser::Parser): Remove the constructor accepting a location and
4974 an initial debugging level.
4975 Remove from the other ctor the argument for the debugging level.
4976 (debug_level_type, debug_level, set_debug_level): New.
4977
4978 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4979 constructor calls.
4980
4981 2004-12-15 Akim Demaille <akim@epita.fr>
4982
4983 Remove b4_root related material: failure experiment
4984 (which goal was to allow to derive from a class).
4985
4986 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4987 definitions and uses.
4988
4989 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4990
4991 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4992 not 2, since it's not portable to subtract 1 from the start of an
4993 array. The new item 0 is never set or used. All uses changed.
4994
4995 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4996 the default definition of YYLLOC_DEFAULT. Problem reported
4997 by Frank Heckenbach.
4998
4999 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5000
5001 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5002 the normal case and one for the error case. Just use the
5003 first one uniformly. Problem reported by Frank Heckenbach.
5004 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5005 use exactly the same macro in both places.
5006 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5007 so that the normal-case YYRHSLOC works for the error case too.
5008 All uses changed.
5009 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5010 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5011 * doc/bison.texinfo (Location Default Action): Don't claim that
5012 we have an array of locations. Use the same macro for both glr
5013 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5014 the index is 0.
5015
5016 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5017
5018 * HACKING: Update email addresses to send announcements to.
5019
5020 * configure.ac (AC_INIT): Bump version to 1.875f.
5021
5022 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5023
5024 * NEWS: Version 1.875e.
5025 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5026
5027 * src/scan-skel.l: Include "complain.h", for "fatal".
5028
5029 * src/relation.h (relation_print, relation_digraph):
5030 Relation sizes are of type relation_node, not size_t (this is
5031 merely a doc fix, since the two types are equivalent).
5032 (relation_transpose): Relation sizes are of type relation_node,
5033 not int.
5034 * src/relation.c: Likewise.
5035 (top, infinity): Now of type relation_node, not int.
5036 (traverse, relation_transpose): Use relation_node, not int.
5037
5038 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5039 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5040 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5041
5042 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5043 specifying whether the test should be skipped. Use it tp
5044 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5045 fail on some hosts, and should be skipped.
5046
5047 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5048
5049 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5050 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5051 unless otherwise specified below.
5052
5053 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5054 to allocate kernel_base, kernel_items, kernel_size, since
5055 they needn't be initialized to 0.
5056 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5057 * src/closure.c (new_closure): Likewise, for itemset.
5058 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5059 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5060 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5061 (build_relations): Likewise for edge, states1, includes.
5062 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5063 * src/reader.c (packgram): Likewise, for ritem, rules.
5064 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5065 * src/relation.c (relation_digraph): Likewise for VERTICES.
5066 (relation_transpose): Likewise for new_R, end_R.
5067 * src/symtab.c (symbols_token_translations_init): Likewise for
5068 token_translations.
5069 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5070 (token_actions): Likewise for yydefact, actrow, conflrow,
5071 conflict_list.
5072 (save_column): Likewise for froms[symno], tos[symno].
5073 (goto_actions): Likewise for state_count.
5074 (pack_table): Likewise for base, pos, check.
5075 (tables_generate): Likewise for width.
5076
5077 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5078 for initial core. Just have a separate core, so we needn't worry
5079 about whether kernel_size and kernel_base are initialized.
5080
5081 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5082 kernel_size, kernel_items): Remove unnecessary initialization.
5083 * src/conflicts.c (conflicts): Likewise.
5084 * src/derives.c (derives): Likewise.
5085 * src/muscle_tablc (muscle_insert): Likewise.
5086 * src/relation.c (relation_digraph): Likewise.
5087 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5088 conflrow, conflict_table, conflict_list, table, check):
5089 Likewise.
5090
5091 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5092 This is because all callers pass unsigned int.
5093 * src/closure.h (new_closure): Likewise.
5094
5095 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5096 (build_relations): Initialize includes[i] in all cases.
5097 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5098 and rules[ruleno].precsym. Initialize members in order.
5099 * src/relation.c (relation_transpose): Always initialize new_R[i]
5100 and end_R[i].
5101 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5102
5103 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5104 conflict_list[0] was always 0, but now it isn't initialized.
5105
5106 * src/table.c (table_grow): When conflict_table grew, the grown
5107 area wasn't cleared. Fix this.
5108
5109 * lib/.cvsignore: Add strdup.c, strdup.h.
5110 * m4/.cvsignore: Add strdup.m4.
5111
5112 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5113
5114 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5115 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5116 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5117 ngotos + 1 without checking for overflow.
5118 (build_relations): Use END_NODE, not -1, to denote end of edges.
5119 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5120 build_relations): Use goto_number, not int, for goto numbers.
5121 * src/tables.c (save_column, default_goto): Likewise.
5122
5123 2004-11-23 Akim Demaille <akim@epita.fr>
5124
5125 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5126 of #defining from yystype.
5127 Don't typedef yystype, C++ does not need it.
5128 This lets it possible to forward declare it as union.
5129
5130 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5131
5132 * bootstrap (gnulib_modules): Add extensions.
5133 Problem reported by Jim Meyering.
5134
5135 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5136
5137 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5138 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5139 src/system.h, src/tables.c: XFREE -> free, to accommodate
5140 recent change to gnulib xalloc.h.
5141 Problem reported by Jim Meyering.
5142
5143 2004-11-17 Akim Demaille <akim@epita.fr>
5144
5145 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5146
5147 2004-11-17 Akim Demaille <akim@epita.fr>,
5148 Alexandre Duret-Lutz <adl@gnu.org>
5149
5150 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5151 changes.
5152 (YYCDEBUG): Adjust.
5153 Use it instead of cdebug_.
5154 (Parser::debug_stream, Parser::set_debug_stream): New.
5155 (Parser::symprint_): Define cdebug_ for temporary backward
5156 compatibility.
5157 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5158 debug_stream ().
5159
5160 2004-11-17 Akim Demaille <akim@epita.fr>
5161
5162 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5163 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5164 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5165 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5166
5167 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5168
5169 * data/glr.c (yyloc_default): Remove; not used.
5170 Problem reported by Frank Heckenbach.
5171
5172 2004-10-25 Akim Demaille <akim@epita.fr>
5173
5174 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5175 Introduce another definition to address simple location arrays.
5176 (yyGLRStack): New member: yyerror_range.
5177 (yyrecoverSyntaxError, yyparse): Update it.
5178 (yyrecoverSyntaxError): Use it when shifting the error token to
5179 have an accurate range, equivalent to the one computed by both
5180 yacc.c and lalr1.cc.
5181 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5182 that column numbers start at column 0, as per GNU Coding
5183 Standards, the others tests, and the doc.
5184 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5185 Adjust to the above change (first column is 0).
5186 And adjust the location of the "<error>", now covering the whole
5187 line.
5188
5189 2004-10-22 Akim Demaille <akim@epita.fr>
5190 and Paul Eggert <eggert@cs.ucla.edu>
5191
5192 Remove some arbitrary limits on goto numbers and relations.
5193 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5194 initial values, since they're never used.
5195 (set_goto_map): ngotos is now unsigned, so test for overflow
5196 by seeing whether it wraps around to zero.
5197 * src/lalr.h (goto_number): Now size_t, not short int.
5198 (GOTO_NUMBER_MAXIMUM): Remove.
5199 * src/relation.c (relation_print, traverse, relation_transpose):
5200 Check for END_NODE rather than looking at sign.
5201 * src/relation.h (END_NODE): New macro.
5202 (relation_node): Now size_t, not short int.
5203
5204 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5205
5206 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5207 keyword, not an identifier. Problem reported by Baron Schwartz in
5208 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5209
5210 2004-10-11 Akim Demaille <akim@epita.fr>
5211
5212 * src/symtab.c (symbol_check_alias_consistency): Also check
5213 type names, destructors, and printers.
5214 Reported by Alexandre Duret-Lutz.
5215 Recode the handling of associativity and precedence in terms
5216 of symbol_precedence_set.
5217 Accept no redeclaration at all, not even equal to the previous
5218 value.
5219 (redeclaration): New.
5220 Use it to factor redeclaration complaints.
5221 (symbol_make_alias): Don't set the type of the alias, let
5222 symbol_check_alias_consistency do it as for other features.
5223 * src/symtab.h (symbol): Add new member prec_location, and
5224 type_location.
5225 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5226 * tests/input.at (Incompatible Aliases): New.
5227
5228 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5229
5230 .cvsignore fixes to accommodate gnulib changes,
5231 and the practice of naming build directories "_build".
5232 * .cvsignore: Add "_*". Sort.
5233 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5234 * m4/.cvsignore: Add "*_gl.m4".
5235
5236 2004-10-06 Akim Demaille <akim@epita.fr>
5237
5238 * src/parse-gram.y (add_param): Fix the truncation of trailing
5239 spaces.
5240
5241 2004-10-05 Akim Demaille <akim@epita.fr>
5242
5243 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5244 whether the reducion was empty or not. This leaves room to
5245 improve the use of YYLLOC_DEFAULT in such a case.
5246 lalr1.cc is still experimental, so changing this is acceptable.
5247 And finally, there are probably not many users who changed the
5248 handling of locations in GLR, so changing is admissible too.
5249
5250 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5251 empty reduction, set @$ to an empty location ending the previously
5252 stacked symbol.
5253 Adjust uses to make sure the code is triggered on empty
5254 reductions.
5255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5256 expected output: empty reductions have empty locations.
5257
5258 2004-09-29 Akim Demaille <akim@epita.fr>
5259
5260 * data/lalr1.cc: Move towards a more standard C++ coding style
5261 for templates: Class < T > -> Class<T>.
5262
5263 2004-09-29 Akim Demaille <akim@epita.fr>
5264
5265 * data/lalr1.cc: Reinstall the former ctor, for sake of
5266 compatibility, but warn it will be removed.
5267 Move towards a more standard C++ coding style (i.e., type *var ->
5268 type* var).
5269
5270 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5271
5272 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5273 since it's less likely to work if NULs are involved in the future.
5274
5275 2004-09-27 Akim Demaille <akim@epita.fr>
5276
5277 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5278
5279 2004-09-27 Akim Demaille <akim@epita.fr>
5280
5281 * data/lalr1.cc (b4_parse_param_decl_1): New.
5282 (b4_parse_param_decl): Use it to have different names between attribute
5283 and argument names.
5284 (b4_cc_constructor_call): Likewise.
5285
5286 2004-09-24 Akim Demaille <akim@epita.fr>
5287
5288 * src/parse-gram.y (add_param): Strip the leading and trailing
5289 blanks from a formal argument declaration.
5290 (YY_LOCATION_PRINT): New.
5291
5292 2004-09-24 Akim Demaille <akim@epita.fr>
5293
5294 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5295 after the location.
5296
5297 2004-09-24 Akim Demaille <akim@epita.fr>
5298
5299 * doc/bison.texinfo (Table of Symbols): Sort.
5300
5301 2004-09-21 Akim Demaille <akim@epita.fr>
5302
5303 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5304 the useless parentheses.
5305 Suggested by Paul Eggert.
5306
5307 2004-09-20 Akim Demaille <akim@epita.fr>
5308
5309 Let the initial-action act on the look-ahead, and use it for the
5310 "initial push" (corresponding to an hypothetical beginning-of-file).
5311 And let lalr1.cc honor %initial-action.
5312
5313 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5314 example.
5315 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5316 (Parser::Parser): Remove the ctor that used to initialize it.
5317 (Parser::parse): Like in the other skeletons, issue the "starting
5318 parse" message before any action.
5319 Honor %initial-action.
5320 Initialize the stacks with the lookahead.
5321 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5322 look-ahead.
5323 Push them in the stacks.
5324 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5325
5326 2004-09-20 Akim Demaille <akim@epita.fr>
5327
5328 * doc/bison.texinfo (Initial Action Decl): New.
5329
5330 2004-09-20 Akim Demaille <akim@epita.fr>
5331
5332 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5333 clearer criterion to define it.
5334 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5335 When reducing on an empty RHS, use the latest stacked location as
5336 location.
5337 yylloc is not always available.
5338 * data/glr.c: Likewise.
5339 Also, honor initial-actions.
5340
5341 2004-09-20 Akim Demaille <akim@epita.fr>
5342
5343 * data/yacc.c (YY_LOCATION_PRINT): New.
5344 Define when we know YYLTYPE's structure, i.e., when the default
5345 YYLLOC_DEFAULT is used.
5346 * data/c.m4 (b4_yysymprint_generate): Use it.
5347 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5348 value of the result.
5349 (error_start_): Replace with...
5350 (error_range_): this location array.
5351 This allows to replace code relying on the implementation of
5352 locations by portable code.
5353 * data/yacc.c (yylerrsp): Replace with...
5354 (yyerror_range): this.
5355 Every time a token is popped, update yyerror_range[0], to have an
5356 accurate location for the error token.
5357 * data/glr.c (YY_LOCATION_PRINT): New.
5358 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5359 deference a pointer.
5360 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5361 report the location in %printers.
5362
5363 * src/scan-skel.l: Instead of abort, report error messages to ease
5364 understanding skeleton scanning failures.
5365
5366 2004-09-16 Akim Demaille <akim@epita.fr>
5367
5368 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5369 (iterator, const_iterator): these, to be more in the C++ spirit.
5370 Also, return reverse iterators so that when displaying the stack
5371 we display its bottom first.
5372 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5373 from yacc.c.
5374 We should probably use vector here though.
5375
5376 2004-09-16 Akim Demaille <akim@epita.fr>
5377
5378 Have more complete shift traces.
5379
5380 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5381 to report Shifts instead of ad hoc YYDPRINTF invocations,
5382 including for the error token.
5383 * data/lalr1.cc (symprint_): Output the location.
5384 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5385 output the location within the %printer.
5386 Activate GLR tests, at least to make sure they compile properly.
5387 They still don't pass though.
5388 * tests/calc.at: Adjust expect verbose output, since now "Entering
5389 state..." is on a different line than the "Shifting" message.
5390
5391 2004-09-08 Akim Demaille <akim@epita.fr>
5392
5393 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5394 Bison directive from the Bison file to the invocation of this
5395 macro, so that these directives are passed to
5396 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5397 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5398 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5399 the extra Bison directives instead of the whole series.
5400 Change the grammar so that there are recoverable errors, and
5401 unrecoverable errors. Now we can have the parser give up before
5402 consuming the whole input. As a result we now can observe that
5403 the lookahead is freed when needed.
5404 Change the parser source to parse argv[1] instead of a hard coded
5405 string.
5406 Simplify yylex, and give a value and location to EOF.
5407 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5408 passed directives already coded in the file.
5409 Add some tests to check the location of "error".
5410 For some tests, the C++ parser is correct, and not yacc.c.
5411 For other tests, they provide different, but unsatisfying, values,
5412 so keep the C++ value so that at least one parser is "correct"
5413 according to the test suite.
5414 (Actions after errors): Remove, this is subsumed by the
5415 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5416
5417 2004-09-06 Akim Demaille <akim@epita.fr>
5418
5419 * data/lalr1.cc: Adjust the indentation of the labels.
5420 (Parser::pop): New.
5421 Use it.
5422
5423 2004-09-06 Akim Demaille <akim@epita.fr>
5424
5425 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5426 argument, an informative message.
5427 Call YY_SYMBOL_PRINT.
5428 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5429 * data/lalr1.cc (destruct_): Likewise.
5430 In addition, no longer depend on b4_yysymprint_generate and
5431 b4_yydestruct_generate to generate these functions, do it "by
5432 hand".
5433
5434 2004-09-03 Akim Demaille <akim@epita.fr>
5435
5436 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5437 invoked, yydestruct the lookahead.
5438 * tests/calc.at (Calculator $1): Update the expected lengths of
5439 traces: there is an added line for the discarded lookahead.
5440 * doc/bison.texinfo (Destructor Decl): Some rewording.
5441 Define "discarded" symbols.
5442
5443 2004-09-02 Akim Demaille <akim@epita.fr>
5444
5445 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5446
5447 2004-09-02 Akim Demaille <akim@epita.fr>
5448
5449 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5450 (YYDSYMPRINTF): Rename as...
5451 (YY_SYMBOL_PRINT): this.
5452 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5453 two.
5454 Use it instead of direct symprint_ calls.
5455 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5456 one.
5457
5458 2004-09-02 Akim Demaille <akim@epita.fr>
5459
5460 * data/lalr1.cc (b4_yysymprint_generate): New.
5461 (symprint_): New member function, defined when YYDEBUG.
5462 Use it consistently instead of token/nterm debugging output by
5463 hand.
5464 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5465 %printer calls to use cdebug_ when using lalr1.cc.
5466
5467 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5468
5469 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5470 with #ifdef YYDEBUG.
5471
5472 2004-08-26 Akim Demaille <akim@epita.fr>
5473
5474 * doc/bison.texinfo (Implementing Loops): Rename as...
5475 (Implementing Gotos/Loops): this.
5476
5477 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5478
5479 Adjust to latest gnulib.
5480 * bootstrap (gnulib_modules): Add xalloc-die.
5481 Set LC_ALL=C so that file names sort consistently.
5482 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5483 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5484 uintmax_t.m4, ulonglong.m4.
5485 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5486 po.m4 since we are now using _gl.m4 instead.
5487
5488 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5489
5490 * src/scan-action.l: Remove. Scanning of semantic actions is
5491 handled in scan-gram.l.
5492
5493 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5494
5495 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5496
5497 * src/location.h (struct): The file member is a uniqstr.
5498 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5499
5500 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5501
5502 Fix bug with non-%union parsers that have printers or destructors,
5503 which led to a Bison core dump. Reported by Peter Fales in
5504 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5505
5506 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5507 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5508 not to our own type.
5509 * src/output.c (symbol_destructors_output, symbol_printers_output):
5510 Don't assume %union.
5511 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5512 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5513 UNION-FLAG. All callers changed.
5514 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5515 Use type char, not unsigned int, when declaring an array of char;
5516 this lets us remove a cast.
5517 (Printers and Destructors): Add non-%union test cases.
5518
5519 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5520
5521 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5522 GLR writeups. E.g., avoid frenchspacing and the future tense,
5523 change "lookahead" to "look-ahead", and change "wrt" to "with
5524 respect to".
5525
5526 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5527
5528 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5529 New sections, split off from the GLR Parsers section. Put the new
5530 Simple GLR Parser near the start of the GLR section, for clarity.
5531 Rewrite connective text.
5532
5533 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5534
5535 * doc/bison.texinfo (Simple GLR Parsers): New section.
5536
5537 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5538
5539 * NEWS, TODO, doc/bison.texinfo:
5540 Use "look-ahead" instead of "lookahead", to be consistent.
5541 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5542 while we're fixing "look-ahead".
5543 * src/conflicts.c (shift_set): Renamed from shiftset.
5544 (look_ahead_set): Renamed from lookaheadset.
5545 * src/print.c: Likewise.
5546 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5547 name for "lookahead".
5548 (report_types, usage): Likewise.
5549 * src/getargs.h (report_look_ahead_tokens): Renamed from
5550 report_lookaheads.
5551 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5552 compute_lookaheads.
5553 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5554 (look_ahead_tokens_print): Renamed from lookaheads_print.
5555 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5556 state_rule_lookaheads_print.
5557 * src/state.h: Likewise.
5558 (reductions.look_ahead_tokens): Renamed from lookaheads.
5559 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5560 AT_DATA_LOOKAHEADS_GRAMMAR.
5561
5562 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5563
5564 * README: Update location of patched M4 distribution.
5565
5566 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5567
5568 Don't assume the C++ compiler takes the same arguments as the C compiler
5569 (trivial change).
5570 * configure.ac (O0CXXFLAGS): New var.
5571 * tests/atlocal.in (CXXFLAGS): Use it.
5572
5573 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5574
5575 Fix some "make check" problems with C++ reported by
5576 Albert Chin-A-Young for Tru64 C++ in this thread:
5577 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5578
5579 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5580 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5581 Output to a .cc file for C++, not to a .c file.
5582 * tests/calc.at (AT_CHECK_CALC): Likewise.
5583 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5584 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5585
5586 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5587
5588 * tests/calc.at, tests/actions.at: Workaround for SGI
5589 C++ compiler. (trivial change)
5590
5591 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5592
5593 Spent a few hours checking out which prerequisite versions the
5594 current sources actually require. I went all the way back to
5595 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5596 a seemingly endless set of combinations of versions more recent
5597 than that. The bottom line is that the current sources require
5598 fairly recent versions of the build tools, and it'll be some work
5599 to change this.
5600 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5601 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5602 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5603 Add comments explaining why those particular versions are
5604 currently needed.
5605
5606 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5607 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5608 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5609
5610 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5611 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5612
5613 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5614
5615 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5616 0.11.5. Suggested by Bruno Haible.
5617 * bootstrap: Remove gettext version checking.
5618
5619 * doc/bison.texinfo (Decl Summary): Also mention that %union
5620 can depend on prerequisite types. Problem reported by Tim
5621 Van Holder.
5622
5623 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5624
5625 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5626 * README-alpha: Don't tell people not to package this.
5627
5628 * bootstrap: Don't assume $(...) works; use `...` instead.
5629 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5630 gettext better.
5631
5632 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5633 put into the -d output file, and mention what to do if YYSTYPE is
5634 defined as a macro.
5635
5636 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5637
5638 Undo change made earlier today: it caused autopoint to not bring
5639 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5640 autopoint's.
5641
5642 * bootstrap: Check that gettext version matches what's in
5643 configure.ac. Warn users to ignore robots.txt ERROR 404.
5644 * bootstrap: Undo today's earlier change (logged below).
5645 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5646
5647 The gettext version checking is causing more trouble than it's
5648 curing; remove it. Problem reported by Paul Hilfinger.
5649
5650 * bootstrap: Issue a warning that one can expect a message
5651 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5652 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5653
5654 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5655
5656 Ensure that the C++ compiler used for testing actually works on a
5657 simple test program; if not, skip the C++-related tests. Problem
5658 reported by Vin Shelton in:
5659 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5660
5661 * m4/cxx.m4: New file.
5662 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5663 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5664 * tests/local.at (AT_COMPILE_CXX): Use it.
5665
5666 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5667
5668 * data/glr.c (yylloc): Output this macro even if locations are not
5669 being generated, as the GLR parser needs it even in that case.
5670 Problem reported by Troy A. Johnson
5671 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5672
5673 * configure.ac (AC_INIT): Update to 1.875e.
5674
5675 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5676
5677 * NEWS: Version 1.875d.
5678 * configure.ac (AC_INIT): Likewise.
5679 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5680
5681 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5682 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5683 lalr1.cc runs afoul of the first, and the last two are no longer
5684 supported by GCC 3.4.0.
5685 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5686 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5687
5688 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5689
5690 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5691 unsigned int, for compatibility with latest gnulib hash module.
5692 * src/state.c (state_hash, state_hasher): Likewise.
5693 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5694 * src/uniqstr.c (hash_uniqstr): Likewise.
5695
5696 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5697
5698 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5699
5700 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5701 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5702 character and string literals.
5703 (unexpected_end): New function.
5704 (unexpected_eof): Use it.
5705 (unexpected_newline): New function.
5706 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5707 actions.
5708
5709 * NEWS: Document %expect-rr.
5710
5711 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5712 Fix typo by replacing $1 with $option.
5713 Remove more 'intl'-related files.
5714 Don't DEFUN AM_INTL_SUBDIR twice.
5715
5716 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5717 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5718 strtoul.c.
5719 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5720 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5721 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5722 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5723 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5724 * src/.cvsignore: Add *.output.
5725
5726 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5727 gets copied to the output file.
5728
5729 2004-04-28 Paul Eggert <eggert@twinsun.com>
5730
5731 Get files from the gnulib and po repositories, instead of relying
5732 on them being in our CVS. Upgrade to latest versions of gnulib
5733 and Automake.
5734
5735 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5736 * bootstrap: Bootstrap from gnulib and po repositories.
5737 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5738 * README-cvs: Document these changes. Remove version numbers from
5739 mentions of build tools, since they change so often. Mention Flex.
5740
5741 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5742 (gl_USE_SYSTEM_EXTENSIONS): Add.
5743 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5744 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5745 does this for us.
5746 (AC_ISC_POSIX): Remove; we no longer support this
5747 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5748 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5749 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5750 Do not check for C89 headers, except for locale.h which is used
5751 by the Yacc library and must port to K&R hosts.
5752 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5753 Do not check for C89 functions, except for setlocale which is
5754 used by the Yacc library.
5755 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5756 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5757 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5758 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5759 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5760 AM_GNU_GETTEXT): Remove; now done by:
5761 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5762 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5763 for us.
5764
5765 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5766 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5767 Define to empty, as gnulib.mk will do the rest for us.
5768 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5769 for us.
5770 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5771 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5772
5773 * src/files.c: Include gnulib's xstrndup.h.
5774
5775 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5776 (REALLOC): Use xnrealloc, for likewise.
5777 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5778 (strnlen, memrchr): Remove decls; functions no longer used.
5779 Include <stpcpy.h>.
5780
5781 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5782 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5783 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5784 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5785 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5786 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5787 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5788 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5789 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5790 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5791 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5792 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5793 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5794 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5795 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5796 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5797 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5798 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5799 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5800 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5801 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5802 Remove, as these files are now generated automatically
5803 by bootstrap or automake.
5804
5805 * po/ChangeLog: Remove: all but one entry was a duplicate
5806 of this file, and I moved that 2000-11-02 entry here.
5807
5808 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5809 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5810 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5811 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5812 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5813 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5814 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5815 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5816 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5817 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5818 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5819 xstrndup.h.
5820 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5821 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5822 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5823 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5824 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5825 * src/.cvsignore: Remove *_.c.
5826
5827
5828 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5829 support it. (The latest stable gzip doesn't.)
5830
5831 2004-04-27 Paul Eggert <eggert@twinsun.com>
5832
5833 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5834 case, as stos_ is now used by destructors due to the 2004-02-09
5835 change.
5836
5837 Remove more K&R C support.
5838 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5839 * lib/subpipe.c (errno): Remove decl.
5840 Include <stdlib.h> unconditionally.
5841 (EXIT_FAILURE): Remove macro.
5842 * src/complain.c (vfprintf, strerror): Remove.
5843 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5844 unconditionally.
5845 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5846 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5847 (strchr, strspn, memchr): Remove decls.
5848 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5849 unconditionally. Do not declare perror.
5850 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5851 unconditionally.
5852
5853 * src/complain.c (_): Remove useless defn, as system.h defines this.
5854
5855 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5856 with latest obstack.h.
5857 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5858 to procedure types, as obstack.h now does that for us.
5859 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5860
5861 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5862 so that this include file can stand alone.
5863 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5864 does this now. Include subpipe.h first after config.h, to
5865 test whether it can stand alone.
5866
5867 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5868 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5869 unused declaration.
5870
5871 * tests/synclines.at (%union synch line): Put a dummy member in
5872 the union, because empty unions aren't allowed in C. Caught
5873 by GCC 3.4.0.
5874
5875 2004-04-13 Jim Meyering <jim@meyering.net>
5876
5877 * src/conflicts.c (conflicts_print): Correct format string typo:
5878 use `%%' to produce literal `%'. (trivial change)
5879
5880 2004-03-30 Paul Eggert <eggert@twinsun.com>
5881
5882 * src/getargs.c (version): Update copyright year to 2004.
5883
5884 * data/c.m4 (b4_int_type): Use 'short int' rather than
5885 'short', and similarly for 'long', 'unsigned', etc.
5886 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5887 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5888 yy_yypstack, yydumpstack): Likewise.
5889 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5890 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5891 Likewise.
5892 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5893 yy_stack_print, yyparse): Likewise.
5894 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5895 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5896 * lib/bitset.c (bitset_print): Likewise.
5897 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5898 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5899 * lib/bitsetv.c (bitsetv_dump): Likewise.
5900 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5901 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5902 Likewise.
5903 * src/LR0.c (allocate_itemsets): Likewise.
5904 * src/gram.h (rule_number, rule): Likewise.
5905 * src/lalr.h (goto_number): Likewise.
5906 * src/nullable.c (nullable_compute): Likewise.
5907 * src/output.c (prepare_rules): Likewise.
5908 * src/relation.c (relation_print, relation_digraph): Likewise.
5909 * src/relation.h (relation_node): Likewise.
5910 * src/state.h (state_number, transitions, errs, reductions,
5911 struct state): Likewise.
5912 * src/symtab.h (symbol_number, struct symbol): Likewise.
5913 * src/tables.c (vector_number, tally, action_number,
5914 default_goto, goto_actions): Likewise.
5915 * tests/existing.at (GNU Cim Grammar): Likewise.
5916 * tests/regression.at (Web2c Actions): Likewise.
5917
5918 * src/output.c (muscle_insert_short_int_table): Renamed from
5919 muscle_insert_short_table. All uses changed.
5920
5921 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5922
5923 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5924 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5925 Add %expect-rr rule.
5926
5927 * src/scan-gram.l: Recognize %expect-rr.
5928
5929 * src/conflicts.h (expected_sr_conflicts): Rename from
5930 expected_conflicts.
5931 (expected_rr_conflicts): Declare.
5932
5933 * src/conflicts.c (expected_sr_conflicts): Rename from
5934 expected_conflicts.
5935 (expected_rr_conflicts): Define.
5936 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5937 for GLR parsers.
5938 Use expected_sr_conflicts in place of expected_conflicts.
5939 Warn if expected_rr_conflicts used in non-GLR parser.
5940
5941 * doc/bison.texinfo: Add documentation for %expect-rr.
5942
5943 2004-03-08 Paul Eggert <eggert@gnu.org>
5944
5945 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5946 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5947
5948 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5949 in lalr1.cc.
5950 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5951 * src/scan-gram.l (scan_integer): New function.
5952 ({int}): Use it.
5953 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5954 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5955 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5956 Say "long int", not "long", for uniformity with GNU style.
5957
5958 2004-02-25 Paul Eggert <eggert@twinsun.com>
5959
5960 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5961 compilers. This fixes a problem with Intel's C++ compiler being
5962 chatty, reported by Guido Trentalancia in
5963 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5964
5965 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5966
5967 Support %destructor and merge error locations in lalr1.cc.
5968
5969 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5970 (Parser::stos_): Define unconditionally.
5971 (Parser::destruct_): New method. Generate its body with
5972 b4_yydestruct_generate.
5973 (Parser::error_start_): New attribute.
5974 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5975 token which are discarded.
5976 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5977 error_start_ when erroneous token are discarded.
5978 (Parser::parse) <yyerrlab1>: Compute the location of the error
5979 token so that it covers all the discarded tokens.
5980 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5981 it can be called with `%skeleton "lalr1.cc"', and do that.
5982
5983 2004-02-02 Paul Eggert <eggert@twinsun.com>
5984
5985 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5986 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5987 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5988 There's no need to mention top_builddir since Automake does that
5989 for us.
5990 (INCLUDES): Remove, as Automake says it's obsolescent.
5991 Contents migrated into AM_CPPFLAGS as described above.
5992 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5993
5994 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5995
5996 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5997 (yyreportSyntaxError): Handle case where lookahead token is
5998 YYEMPTY.
5999
6000 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6001
6002 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6003 resulting parsers are compilable with C++.
6004
6005 2003-12-23 Paul Eggert <eggert@twinsun.com>
6006
6007 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6008 * src/output.c (output_skeleton): Rename local var.
6009 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6010 Bison tokens, as this runs afoul of the 2003-10-07 change that
6011 disallowed NUL bytes in character constants or string literals.
6012
6013 * tests/local.at: Require Autoconf 2.59's Autotest.
6014 * tests/testsuite.at: Don't include local.at, since we now assume
6015 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6016 including it.
6017 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6018 multiple inclusion warnings.
6019
6020 2003-12-02 Akim Demaille <akim@epita.fr>
6021
6022 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6023 conditions.
6024 From Bruno Haible.
6025
6026 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6027
6028 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6029
6030 2003-10-07 Paul Eggert <eggert@twinsun.com>
6031
6032 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6033 if testsuite doesn't exist.
6034
6035 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6036 literals, unfortunately.
6037 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6038 Complain about NUL bytes in character constants or string literals.
6039
6040 2003-10-05 Paul Eggert <eggert@twinsun.com>
6041
6042 * NEWS: Don't document %no-default-prec, as it's still
6043 too experimental.
6044 * doc/bison.texinfo: Document %no-default-prec only if
6045 the defaultprec flag is set. Normally it's not.
6046
6047 2003-10-04 Paul Eggert <eggert@twinsun.com>
6048
6049 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6050 non-modifiable lvalue, instead of a modifiable one.
6051 * doc/bison.texinfo (Actions): Document that $$ can
6052 be assigned to. Do not claim that $$ and $N are
6053 array element references: user code should not rely on this.
6054
6055 2003-10-01 Paul Eggert <eggert@twinsun.com>
6056
6057 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6058 (grammar_declaration): Use it.
6059 * src/scan-gram.l: New token %no-default-prec.
6060 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6061 * NEWS, doc/bison.texinfo: Document the above.
6062
6063 2003-10-01 Akim Demaille <akim@epita.fr>
6064
6065 VCG no longer supports long_straight_phase.
6066
6067 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6068 * src/print_graph.c (print_graph): Adjust.
6069
6070 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
6071 and Paul Eggert <eggert@twinsun.com>
6072
6073 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6074 Table of Symbols): Document %default-prec.
6075 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6076 (grammar_declaration): Set default_prec on %default-prec.
6077 * src/scan-gram.l (%default-prec): New token.
6078 * src/reader.h (default_prec): New flag.
6079 * src/reader.c: Likewise.
6080 (packgram): Handle it.
6081 * tests/conflicts.at (%default-prec without %prec,
6082 %default-prec with %prec, %default-prec 1): New tests.
6083
6084 2003-09-30 Paul Eggert <eggert@twinsun.com>
6085
6086 * tests/testsuite.at: Include local.at, not input.at, fixing
6087 a typo in the 2003-08-25 patch.
6088
6089 2003-08-27 Akim Demaille <akim@epita.fr>
6090
6091 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6092 GCC warnings.
6093
6094 2003-08-26 Akim Demaille <akim@epita.fr>
6095
6096 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6097 "<\#" to avoid magic from Gnus when posting parts of this script.
6098
6099 2003-08-26 Akim Demaille <akim@epita.fr>
6100
6101 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6102 (Parser::parse): here.
6103 Adjust: nerrs and errstatus is now replaced by...
6104 (Parser::nerrs_, Parser::errstatus_): New.
6105
6106 2003-08-25 Akim Demaille <akim@epita.fr>
6107
6108 * config/announce-gen, Makefile.cfg: New.
6109 * Makefile.am: Adjust.
6110 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6111 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6112
6113 2003-08-25 Akim Demaille <akim@epita.fr>
6114
6115 When reducing initial empty rules, Bison parser read an initial
6116 location that is not defined. This results in garbage, and that
6117 affects Bison's own parser. Therefore we need (i) to extend Bison
6118 to support a means to initialize this location, and (ii) to use
6119 this CVS Bison to fix CVS Bison's parser.
6120
6121 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6122 with...
6123 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6124 * src/parse-gram.y: Adjust.
6125 (%initial-action): New.
6126 (%error-verbose): Since we require CVS Bison, there is no reason
6127 not to use it.
6128 * src/scan-gram.l: Adjust.
6129 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6130 * data/yacc.c (yyparse): Use b4_initial_action.
6131
6132 2003-08-25 Akim Demaille <akim@epita.fr>
6133
6134 * doc/bison.texinfo: Don't promote stdout for error messages.
6135
6136 2003-08-25 Akim Demaille <akim@epita.fr>
6137
6138 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6139 From Alexandre Duret-Lutz.
6140
6141 2003-08-25 Akim Demaille <akim@epita.fr>
6142
6143 Version 1.875c.
6144
6145 2003-08-25 Akim Demaille <akim@epita.fr>
6146
6147 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6148 Use them.
6149
6150 2003-08-25 Akim Demaille <akim@epita.fr>
6151
6152 * data/lalr1.cc (Parser::reduce_print_): New.
6153 Use it.
6154
6155 2003-08-25 Akim Demaille <akim@epita.fr>
6156
6157 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6158 error recovery loops. This patch is based on
6159 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6160 Also, augment the similarity between lalr1.cc and yacc.c.
6161 Note: the locations of error recovery rules are not correct yet.
6162
6163 * data/lalr1.cc: Comment changes to augment the similarity between
6164 lalr1.cc and yacc.c.
6165 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6166 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6167 yyerrlab), when hitting EOF, pop the whole stack here instead of
6168 merely falling thru the default error handling mechanism.
6169 (yyerrorlab): New label, with the old contents of YYERROR,
6170 plus the following change: pop the stack of rhs corresponding
6171 to the production that invoked YYERROR. That is how Yacc
6172 behaves (required by POSIX).
6173 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6174 fail.
6175
6176 2003-08-25 Akim Demaille <akim@epita.fr>
6177
6178 Tune local.at so that people can "autom4te -l autotest calc.at -o
6179 calc" for instance, to extract a sub test suite.
6180
6181 * tests/testsuite.at: Move the initialization, Autotest version
6182 requirement, and AT_TESTED invocation into...
6183 * tests/local.at: here.
6184 * tests/testsuite.at: Include it for compatibility with Autoconf
6185 2.57.
6186 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6187 be ignore.
6188
6189 2003-08-04 Paul Eggert <eggert@twinsun.com>
6190
6191 Rework code slightly to avoid gcc -Wtraditional warnings.
6192 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6193 The returned value is now stored in *YY0. All callers changed.
6194 * src/output.c (merge_output): Adjust to the above change.
6195
6196 2003-07-26 Paul Eggert <eggert@twinsun.com>
6197
6198 * data/glr.c (YYASSERT): New macro.
6199 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6200 yyresolveStates, yyprocessOneStack):
6201 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6202 Derived from a suggestion by Frank Heckenbach.
6203
6204 2003-07-25 Paul Eggert <eggert@twinsun.com>
6205
6206 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6207 for portability to K&R C (after ansi2knr, presumably). See
6208 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6209 by Frank Heckenbach, though I have omitted the structure-initialization
6210 part of his glr-knr.diff patch since I recall that the Portable
6211 C Compiler didn't require that change.
6212
6213 Let the user specify how to allocate and free memory.
6214 Derived from a suggestion by Frank Heckenbach in
6215 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6216 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6217 All uses of free, malloc, realloc changed to use these macros,
6218 and unnecessary casts removed.
6219 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6220
6221 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6222
6223 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6224 use s.empty() rather than s == "" to test for empty string; see
6225 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6226 (trivial change)
6227
6228 2003-06-25 Akim Demaille <akim@epita.fr>
6229
6230 * config/depcomp, config/install-sh: Update from masters.
6231
6232 2003-06-20 Paul Eggert <eggert@twinsun.com>
6233
6234 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6235 and return properly parenthesized result.
6236 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6237 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6238 Remove unnecessary parentheses from uses.
6239 * doc/bison.texinfo (Location Default Action): Describe the
6240 conventions for parentheses.
6241
6242 2003-06-19 Paul Eggert <eggert@twinsun.com>
6243
6244 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6245 yyreportTree): Do not assume that size_t is the same width as int,
6246 when printing sizes. Print sizes using an unsigned format.
6247 Problem reported by Frank Heckenbach in
6248 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6249
6250 Port to Forte Developer 7 C compiler.
6251 * data/glr.c (struct YYLTYPE): If locations are not being used,
6252 declare a single dummy member, as empty structs do not conform
6253 to the C standard.
6254 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6255 the Forte Developer 7 C compiler complains that end-of-loop
6256 code is not reached.
6257
6258 2003-06-17 Paul Eggert <eggert@twinsun.com>
6259
6260 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6261 avoid warnings from picky compilers about redefinition of PARAMS.
6262
6263 2003-06-17 Paul Eggert <eggert@twinsun.com>
6264
6265 Version 1.875b.
6266
6267 * NEWS: Document 1.875b.
6268
6269 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6270 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6271 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6272 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6273 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6274 per recent gettext manual's suggestion.
6275 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6276 Use prototypes, not old-style definitions.
6277 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6278 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6279 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6280 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6281 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6282 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6283 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6284 vbitset_or_and_cmp, vbitset_copy): Likewise.
6285
6286 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6287 Do not include <stdlib.h>.
6288 (PARAMS): Define unconditionally for C89.
6289 (ATTRIBUTE_NORETURN): Remove.
6290 (ATTRIBUTE_UNUSED): Define unconditionally.
6291
6292 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6293 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6294 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6295 * lib/vbitset.c, lib/vbitset.h: New files.
6296 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6297 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6298 from libbitset.
6299
6300 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6301 `How Can I Reset @code{yyparse}', since texinfo does not allow
6302 arbitrary @ in node names.
6303
6304 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6305 shouldn't be needed according to the gettext 0.12.1 documentation
6306 but which seem to be needed anyway: codeset.m4 glibc21.m4
6307 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6308 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6309 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6310
6311 * lib/.cvsignore: Add stdbool.h.
6312 * m4/.cvsignore: Add nls.m4, po.m4.
6313
6314 Upgrade to CVS gnulib.
6315 * stdbool_.h: File renamed from stdbool.h.in.
6316 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6317 AC_HEADER_STDBOOL.
6318 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6319 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6320 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6321 (MOSTLYCLEANFILES): New var.
6322 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6323 (stdbool.h): New rule.
6324 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6325 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6326 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6327 m4/quote.m4: Upgrade to today's gnulib.
6328
6329 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6330 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6331 the tests right now.
6332 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6333 yyerror are declared before use; C99 requires this.
6334
6335 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6336
6337 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6338 first.
6339 (yyrecoverSyntaxError): Correct the logic for setting and testing
6340 yyerrState.
6341 Correct comment on handling EOF.
6342 Allow states with only a default reduction, rather than failing
6343 (I can't quite reconstruct why these were not allowed before).
6344
6345 Fixes to avoid problem that $-N rules in GLR parsers can cause
6346 buffer overruns, corrupting state.
6347
6348 * src/output.c (prepare_rules): Output max_left_semantic_context
6349 definition.
6350 * src/reader.h (max_left_semantic_context): New variable declaration.
6351 * src/scan-gram.l (max_left_semantic_context): Define.
6352 (handle_action_dollar): Update max_left_semantic_context.
6353 * data/glr.c (YYMAXLEFT): New definition.
6354 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6355 (yyresolveAction): Ditto.
6356
6357 Fixes to problems with location handling in GLR parsers reported by
6358 Frank Heckenbach (2003/06/05).
6359
6360 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6361 (YYRHSLOC): Add parentheses, and define only if locations used.
6362 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6363 locations not used.
6364 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6365 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6366
6367 * tests/cxx-type.at: Exercise location information; update tests
6368 to differentiate output with and without locations.
6369 Remove forward declarations of yylex and yyerror---caused errors
6370 because default YYLTYPE not yet defined.
6371 Change semantic actions to compute strings, rather than printing
6372 them directly (to test proper passing of semantics values). Change
6373 output to prefix notation and update test data and expected results.
6374 (yylex): Track locations.
6375 (stmtMerge): Return value rather than printing, and include arguments
6376 in value.
6377
6378 2003-06-03 Paul Eggert <eggert@twinsun.com>
6379
6380 Avoid warnings generated by GCC 2.95.4 when Bison is
6381 configured with --enable-gcc-warnings.
6382 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6383 yy::]b4_parser_class_name[::translate_,
6384 yy::Stack::operator[] (unsigned),
6385 yy::Stack::operator[] (unsigned) const,
6386 yy::Slice::operator[] (unsigned),
6387 yy::Slice::operator[] (unsigned) const):
6388 Rename local vars to avoid warnings.
6389 * tests/glr-regression.at (Improper handling of embedded actions
6390 and $-N in GLR parsers): Remove unused local variable from yylex.
6391 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6392 (void) as arg when not pure, since we now assume C89 when building
6393 Bison. Pacify GCC by using parameter.
6394
6395 2003-06-02 Paul Eggert <eggert@twinsun.com>
6396
6397 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6398 yy::Location::lines, yy::Location::columns): Rename arguments
6399 to avoid shadowing; this removes a warning generated by GCC 3.3.
6400
6401 2003-06-01 Paul Eggert <eggert@twinsun.com>
6402
6403 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6404 to g++, as GCC 3.3 complains if you do it.
6405 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6406 everything that WARNING_CFLAGS has, except omit warnings
6407 not suitable for C++.
6408 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6409 * tests/atlocal.in (CXXFLAGS): New var.
6410 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6411
6412 Fix a GLR parser bug I reported in February; see
6413 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6414 The problem was that GLR parsers did not conform to the C standard,
6415 because actions like { $1 = $2 + $3; } expanded to expressions
6416 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6417 to a local variable. The C standard says that expressions
6418 like (var = f ()) + (var = f ()) have undefined behavior.
6419 Another problem was that GCC sometimes issues warnings that
6420 yyfill and its parameters are unused.
6421
6422 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6423 as possibly unused.
6424 (yyfill): New function.
6425 (YYFILL): Use it.
6426 (yyuserAction): Change type of yynormal to bool, so that it matches
6427 the new yyfill signature. Mark it as possibly unused.
6428
6429
6430 Follow up on a bug I reported in February, where a Bison-generated
6431 parser can loop. Provide a test case and a fix for yacc.c. I
6432 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6433 The original bug report is in:
6434 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6435
6436 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6437 macro's size was becoming unwieldy.
6438 (yyerrlab): Do not discard an empty lookahead symbol, as this
6439 might destroy garbage.
6440 (yyerrorlab): New label, with the old contents of YYERROR,
6441 plus the following change: pop the stack of rhs corresponding
6442 to the production that invoked YYERROR. That is how Yacc
6443 behaves, and POSIX requires this behavior.
6444 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6445 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6446 Define 'alarm' to do nothing if unistd.h is not available.
6447 Add a new rule "exp: '-' error;" to test the above change to
6448 data/yacc.c. Use 'alarm' to abort any test taking longer than
6449 10 seconds, as it's probably looping.
6450 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6451 Also, the new yacc.c generates two fewer diagnostics for an
6452 existing test.
6453
6454 2003-05-24 Paul Eggert <eggert@twinsun.com>
6455
6456 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6457 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6458 This fixes a problem reported by John Bowman when the Compaq/HP
6459 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6460 -ansi -Wall -gall).
6461 * data/yacc.c (union yyalloc): Likewise.
6462 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6463
6464 Switch from 'int' to 'bool' where that makes sense.
6465
6466 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6467 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6468 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6469 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6470 Return or accept bool, not int. All callers changed.
6471 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6472 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6473 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6474 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6475 bitset_or_and_cmp_): Likewise.
6476 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6477 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6478 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6479 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6480 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6481 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6482 bitset_stats_or_and_cmp): Likewise.
6483 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6484 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6485 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6486 ebitset_xor_cmp): Likewise.
6487 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6488 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6489 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6490 lbitset_xor_cmp): Likewise.
6491 * lib/bbitset.h: Include <stdbool.h>.
6492 (struct bitset_vtable): The following members now return bool, not
6493 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6494 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6495 or_and_cmp).
6496 * src/conflicts.c (count_rr_conflicts): Likewise.
6497 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6498 All uses changed.
6499 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6500 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6501 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6502 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6503 graph_flag): Likewise.
6504 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6505 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6506 graph_flag): Likewise.
6507 * src/output.c (error_verbose): Likewise.
6508 * src/output.h (error_verbose): Likewise.
6509 * src/reader.c (start_flag, typed): Likewise.
6510 * src/reader.h (typed): Likewise.
6511 * src/getargs.c (LOCATIONS_OPTION): New constant.
6512 (long_options, getargs): Use it.
6513 * src/lalr.c (build_relations): Use bool, not int.
6514 * src/nullable.c (nullable_compute): Likewise.
6515 * src/print.c (print_reductions): Likewise.
6516 * src/tables.c (action_row, pack_vector): Likewise.
6517 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6518 * src/output.c (prepare): Use it.
6519 * src/output.c (token_definitions_output,
6520 symbol_destructors_output, symbol_destructors_output): Use string,
6521 not boolean integer, to keep track of whether to output separator.
6522 * src/print_graph.c (print_core): Likewise.
6523 * src/state.c (state_rule_lookaheads_print): Likewise.
6524
6525 * config/install-sh: Sync from automake 1.7.5.
6526
6527 2003-05-14 Paul Eggert <eggert@twinsun.com>
6528
6529 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6530 semicolon after a grammar declaration, in the interest of possible
6531 future changes to the Bison input language.
6532 Do not allow a stray semicolon at the start of the grammar.
6533 (rhses.1): Allow one or more semicolons after any rule, including
6534 just before "|" as required by POSIX.
6535 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6536 grammar.
6537
6538 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6539
6540 %parse-param support for lalr1.cc.
6541
6542 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6543 b4_cc_constructor_calls, b4_cc_constructor_call,
6544 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6545 definitions.
6546 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6547 parse-param arguments.
6548 (yy::b4_parser_class_name): Declare instance variables to
6549 hold parse-param arguments.
6550 * tests/calc.at: s/value/semantic_value/ because value clashes
6551 with a member of yy::b4_parser_class_name. Adjust C++ code
6552 to handle %parse-param. Enable %parse-param test in C++.
6553
6554 2003-05-12 Paul Eggert <eggert@twinsun.com>
6555
6556 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6557 English a bit. Fix fclose typo. Change "const char" to "char
6558 const", and use ANSI C rather than K&R for "main". Suggest
6559 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6560 and suggest yy_switch_to_buffer.
6561
6562 2003-05-05 Paul Eggert <eggert@twinsun.com>
6563
6564 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6565 C89. This avoids a diagnostic on compilers that define __STDC__
6566 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6567 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6568
6569 2003-05-03 Paul Eggert <eggert@twinsun.com>
6570
6571 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6572 Do not overrun array bounds.
6573 This should fix a bug reported today by Olatunji Oluwabukunmi in
6574 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6575
6576 2003-04-29 Akim Demaille <akim@epita.fr>
6577
6578 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6579 * src/getargs.c, src/getargs.h: here, as bool, not int.
6580 (nondeterministic_parser): New.
6581 * src/parse-gram.y, src/scan-gram.l: Support
6582 %nondeterministic-parser.
6583 * src/output.c (prepare): Use nondeterministic_parser instead
6584 of glr_parser where appropriate.
6585 * src/tables.c (conflict_row, action_row, save_row)
6586 (token_actions, token_actions, pack_vector): Ditto.
6587
6588 2003-04-29 Akim Demaille <akim@epita.fr>
6589
6590 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6591
6592 2003-04-29 Akim Demaille <akim@epita.fr>
6593
6594 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6595 with %pure-parser and %locations to exercise the patch from Yakov
6596 Markovitch below.
6597
6598 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6599
6600 * data/yacc.c: (b4_lex_param): Corrected for the case where
6601 %lex-param is provided and %pure-parser isn't.
6602
6603 2003-04-27 Paul Eggert <eggert@twinsun.com>
6604
6605 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6606 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6607 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6608 if it is not defined.
6609 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6610
6611 2003-04-26 Paul Eggert <eggert@twinsun.com>
6612
6613 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6614 Declare to be of type suitable for the ninf value itself, not of
6615 type suitable for the corresponding table, since the latter might
6616 be unsigned but the ninf value might be negative. This fixes a
6617 bug reported by Alexandre Duret-Lutz in
6618 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6619
6620 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6621 invokes it. We shouldn't invoke it twice because it will attempt
6622 to put error.o in the archive twice. This fixes a glitch reported
6623 by Martin Mokrejs in
6624 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6625
6626 2003-04-21 Paul Eggert <eggert@twinsun.com>
6627
6628 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6629 to gnulib.
6630
6631 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6632
6633 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6634 Fix obvious typo that results in uncompilable GLR parsers
6635 when both %pure-parser and %locations are used. (trivial change)
6636
6637 2003-04-17 Paul Eggert <eggert@twinsun.com>
6638
6639 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6640 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6641 Do not insert the expected token via unput, as this runs afoul
6642 of a POSIX-compatibility bug in flex 2.5.31.
6643 All uses changed to BEGIN the parent state,
6644 since we no longer insert the expected token via unput.
6645 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6646 that is no longer emitted after the above change.
6647
6648 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6649 the first one. This change is from Paul Hilfinger, and it fixes
6650 regression reported by Werner Lemberg in
6651 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6652
6653 (resolve_sr_conflict): Don't invoke state_errs_set
6654 unless one or more tokens have been explicitly made errors.
6655 Otherwise, the above change causes Bison to abort.
6656
6657 * tests/existing.at (GNU pic Grammar): New test case, taken from
6658 Lemberg's email.
6659
6660 2003-03-31 Akim Demaille <akim@epita.fr>
6661
6662 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6663
6664 2003-03-31 Akim Demaille <akim@epita.fr>
6665
6666 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6667 output.
6668
6669 2003-03-31 Akim Demaille <akim@epita.fr>
6670
6671 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6672 From Paul Hilfinger.
6673
6674 2003-03-29 Akim Demaille <akim@epita.fr>
6675
6676 * m4/error.m4: Do not put under dynamic conditions some code which
6677 expansion is under static control.
6678
6679 2003-03-29 Akim Demaille <akim@epita.fr>
6680
6681 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6682
6683 2003-03-29 Akim Demaille <akim@epita.fr>
6684
6685 * doc/bison.texinfo (Strings are Destroyed): New.
6686
6687 2003-03-13 Paul Eggert <eggert@twinsun.com>
6688
6689 * .cvsignore: Add configure.lineno.
6690 * src/.cvsignore: Add yacc.
6691 * tests/.cvsignore: Add testsuite.log.
6692 * doc/fdl.texi: Sync with latest FSF version.
6693
6694 2003-03-12 Paul Eggert <eggert@twinsun.com>
6695
6696 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6697 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6698 cursor, instead of leaving it undefined. This fixes a bug
6699 reported by Tim Van Holder in
6700 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6701 * tests/input.at (Torturing the Scanner): Test the scanner on
6702 an empty input file, which was Tim Van Holder's test case.
6703
6704 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6705 <sys/resource.h> can be included, include sys/time.h and
6706 sys/times.h first, if available. This works around the SunOS
6707 4.1.4 porting bug reported by Bruce Becker in
6708 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6709
6710 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6711 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6712 AC_HEADER_SYS_WAIT.
6713
6714 Merge changes from gnulib. This was prompted because the CVS
6715 snapshot didn't build on Solaris 7 due to strnlen problems.
6716
6717 These changes need to be merged back into gnulib:
6718 * lib/hash.c: Include <stdbool.h> unconditionally.
6719 * m4/onceonly.m4 (m4_quote): New macro.
6720 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6721 Quote AC_FOREACH variable-expansions properly.
6722 The 2003-01-03 obstack.h change also needs merging.
6723 {end of changes requiring merging}
6724
6725 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6726 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6727 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6728 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6729 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6730 New files, imported from gnulib.
6731 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6732 above.
6733
6734 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6735 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6736 gnulib sources.
6737
6738 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6739 Add.
6740 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6741 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6742 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6743 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6744 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6745 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6746 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6747 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6748 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6749 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6750 (jm_PREREQ_ARGMATCH): Remove.
6751 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6752 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6753
6754 * src/system.h: Include <stdbool.h> unconditionally.
6755
6756 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6757 assuming at least C89 in the bitset code for some time now.
6758
6759 2003-03-03 Akim Demaille <akim@epita.fr>
6760
6761 * ro.po: New.
6762
6763 2003-03-02 Akim Demaille <akim@epita.fr>
6764
6765 * doc/bison.texinfo (Table of Symbols): Reactivate the
6766 documentation for %lex-param, and %parse-param.
6767
6768 2003-03-02 Akim Demaille <akim@epita.fr>
6769
6770 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6771 generate verbose error messages.
6772 Use the number of tokens as an upper bound in yytname, as it
6773 cannot be a non terminal.
6774
6775 2003-03-02 Akim Demaille <akim@epita.fr>
6776
6777 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6778 message.
6779
6780 2003-03-02 Akim Demaille <akim@epita.fr>
6781
6782 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6783 Use them to exercise yycheck overrun.
6784 Based on Andrew Suffield's grammar.
6785
6786 2003-03-02 Akim Demaille <akim@epita.fr>
6787
6788 Create tests/local.at for Bison generic testing macros.
6789
6790 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6791 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6792 This new file.
6793 * tests/calc.at (AT_CHECK_CALC): Adjust.
6794 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6795 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6796 * tests/local.at: here.
6797 (AT_COMPILE_CXX): Tags the tests using it as c++.
6798 Ignore the test if CXX is not functional.
6799
6800 2003-03-01 Paul Eggert <eggert@twinsun.com>
6801
6802 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6803 not loc->end, since loc->end might contain garbage and this leads
6804 to undefined behavior on some platforms.
6805 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6806 depend on *loc, so that the reader doesn't give the the false
6807 impression that *loc is initialized.
6808 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6809 does not survive the return.
6810
6811 2003-03-01 Akim Demaille <akim@epita.fr>
6812
6813 * src/scan-gram.l (code_start): Always initialize it when entering
6814 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6815 yylex invocation. An alternative would be making it static, but
6816 then it starts with the second %%'s beginning, instead of its end.
6817
6818 2003-02-28 Paul Eggert <eggert@twinsun.com>
6819
6820 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6821 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6822 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6823
6824 2003-02-26 Paul Eggert <eggert@twinsun.com>
6825
6826 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6827 Remove Sequent/Pyramid discussion (nobody uses them any more).
6828 Merge VMS and MS-DOS discussion; these ports may well be dead
6829 but let's keep mentioning them for now. Put <> around email
6830 addresses. Add copyright notice.
6831
6832 2003-02-24 Paul Eggert <eggert@twinsun.com>
6833
6834 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6835 to avoid collision with flex use of yylineno.
6836 Problem reported by Bruce Lilly in
6837 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6838 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6839 * data/yacc.c (yy_reduce_print): Likewise.
6840
6841 * config/depcomp: Sync with Automake 1.7.3.
6842
6843 2003-02-21 Akim Demaille <akim@epita.fr>
6844
6845 * data/lalr1.cc: Use temporary variables instead of casts to
6846 change integer types.
6847 Suggested by Paul Eggert.
6848
6849 2003-02-21 Akim Demaille <akim@epita.fr>
6850
6851 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6852 to avoid confusions with lalr1.cc's notion of Position.
6853 Suggested by Paul Eggert.
6854
6855 2003-02-20 Akim Demaille <akim@epita.fr>
6856
6857 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6858 before initial_columns.
6859 (location.hh): Use consistent variable names when defining the
6860 operator<<.
6861 Use "last" so that we subtract from Positions, not from unsigned.
6862
6863 2003-02-20 Akim Demaille <akim@epita.fr>
6864
6865 * data/lalr1.cc (position.hh): New subfile, including the extended
6866 and Doxygen'ed documentation of class Position.
6867 (location.hh): Use it.
6868 Document a` la Doxygen.
6869 With the help of Benoit Perrot.
6870
6871 2003-02-20 Akim Demaille <akim@epita.fr>
6872
6873 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6874 AT_YACC_IF.
6875 Redefine AT_YYERROR_SEES_LOC_IF using it.
6876 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6877 not defined.
6878 Don't use the location in yy::Parser::error_ and
6879 yy::Parser::print_ when not %locations.
6880 Activate more lalr1.cc tests.
6881
6882 2003-02-19 Akim Demaille <akim@epita.fr>
6883
6884 * data/lalr1.cc: When displaying a line number, be sure to make it
6885 an int.
6886
6887 2003-02-19 Akim Demaille <akim@epita.fr>
6888
6889 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6890 Remove, useless.
6891 (YYABORT, YYACCEPT, YYERROR): New.
6892 * tests/calc.at: Renable the lalr1.cc test.
6893
6894 2003-02-19 Akim Demaille <akim@epita.fr>
6895
6896 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6897 error recovery, mixing with/without pops and discarding of the
6898 lookahead.
6899 Exercise YYERROR.
6900 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6901
6902 2003-02-17 Paul Eggert <eggert@twinsun.com>
6903
6904 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6905 * tests/testsuite.at (AT_COMPILE): Use them.
6906 This fixes the testsuite problem reported by Robert Lentz in
6907 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6908
6909 2003-02-12 Paul Eggert <eggert@twinsun.com>
6910
6911 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6912 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6913 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6914 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6915 Check for malloc failure, for consistency with yacc.c.
6916 (yytname_size): Remove, for consistency with yacc.c.
6917
6918 The bug still remains in data/lalr1.cc, as I didn't have time
6919 to fix it there.
6920
6921 2003-02-06 Akim Demaille <akim@epita.fr>
6922
6923 * configure.ac (GXX): Rename as...
6924 (CXX): this, to keep the original Autoconf semantics.
6925 Require 2.57.
6926 * data/lalr1.cc: Fix b4_copyright invocations.
6927 If YYDEBUG is not defined, don't depend upon name_ being defined.
6928 (location.hh): Include string and iostream.
6929 (Position::filename): New member.
6930 (Position::Position ()): New.
6931 (operator<< (Position)): New.
6932 (operator- (Position, int)): New.
6933 (Location::first, Location::last): Rename as...
6934 (Location::begin, Location::end): these, to mock the conventional
6935 iterator names.
6936 (operator<< (Location)): New.
6937 * tests/atlocal.in (CXX): New.
6938 * tests/testsuite.at (AT_COMPILE_CXX): New.
6939 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6940 locations in a more synthetic way.
6941 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6942 lalr1.cc is used.
6943 Adjust the C locations to match those from Emacs: first column is
6944 column 0.
6945 Change all the expected results.
6946 Conform to the GCS: simplify the locations when applicable.
6947 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6948 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6949 these CPP macros with the m4 macros new defined by...
6950 (AT_CHECK_PUSHDEFS): this, i.e.:
6951 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6952 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6953 New macros.
6954 (AT_CHECK_POPDEFS): Undefine them.
6955 (AT_CHECK_CALC_LALR1_CC): New.
6956 Use it for the first lalr1.cc test.
6957
6958 2003-02-04 Akim Demaille <akim@epita.fr>
6959
6960 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6961 Location as is defined.
6962
6963 2003-02-04 Akim Demaille <akim@epita.fr>
6964
6965 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6966 name_ being defined.
6967
6968 2003-02-03 Paul Eggert <eggert@twinsun.com>
6969
6970 * src/gram.h (start_symbol): Remove unused decl.
6971
6972 Use more-consistent naming conventions for local vars.
6973
6974 * src/derives.c (derives_compute): Change type of local var from
6975 int to rule_number.
6976 * src/gram.c (grammar_rules_partial_print): Likewise.
6977 * src/print.c (print_core): Likewise.
6978 * src/reduce.c (reduce_grammar_tables): Likewise.
6979
6980 * src/gram.c (grammar_dump): Change name of item_number *
6981 local var from r to rp.
6982 * src/nullable.c (nullable_compute): Likewise.
6983
6984 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6985
6986 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6987 for symbol or symbol_number var.
6988 * src/reader.c (grammar_start_symbol_set): Likewise.
6989 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6990 Likewise.
6991 * src/state.c (transitions_to): Likewise.
6992 * src/state.h: Likewise.
6993 * src/tables.c (symbol_number_to_vector_number): Likewise.
6994
6995 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6996 char * var.
6997
6998 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6999 var.
7000
7001 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7002 var.
7003
7004 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7005 Use str, not s, for char * var. Use ch, not c, for character var.
7006 Use size for size var.
7007
7008 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7009 char * var.
7010 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7011 uniqstr var.
7012 * src/uniqstr.h: Likewise.
7013
7014 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7015 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7016 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7017 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7018 param to have same name as that of enum, so that we don't use
7019 "s" to stand for a non-state.
7020
7021 2003-02-02 Akim Demaille <akim@epita.fr>
7022
7023 * src/scan-skel.l: Scan more than one inert character per yylex
7024 invocation.
7025
7026 2003-02-01 Paul Eggert <eggert@twinsun.com>
7027
7028 Version 1.875a.
7029
7030 * po/LINGUAS: Add ms.
7031
7032 2003-01-30 Akim Demaille <akim@epita.fr>
7033
7034 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7035
7036 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7037
7038 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7039 of $1.
7040
7041 Changes in response to error report by S. Eken: GLR mode does not
7042 handle negative $ indices or $ indices in embedded rules correctly.
7043 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7044
7045 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7046 (b4_rhs_location): Ditto.
7047 (yyfill): New function to copy from stack tree into array
7048 incrementally.
7049 (yyuserAction): Modify to allow incremental move of semantic values
7050 to rhs array when in GLR mode.
7051 Define YYFILL to use in user-defined actions to fill semantic array
7052 as needed.
7053 Remove dummy use of yystack, as there is now a guaranteed use.
7054 (yydoAction): Modify to allow incremental move of semantic values
7055 to rhs array when in GLR mode.
7056 (yyresolveAction): Ditto.
7057 (yyglrShiftDefer): Update comment.
7058 (yyresolveStates): Use X == NULL for pointers, not !X.
7059 (yyglrReduce): Ditto.
7060 (yydoAction): Ditto
7061
7062 * tests/glr-regr1.at: Rename to ...
7063 * tests/glr-regression.at: Add new regression test for the problems
7064 described above (adapted from S. Eken).
7065 Update copyright notice.
7066 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7067 * tests/Makefile.am: Ditto.
7068
7069 2003-01-28 Paul Eggert <eggert@twinsun.com>
7070
7071 * data/lalr1.cc: Do not use @output_header_name@ unless
7072 b4_defines_flag is set. This fixes two bugs reported by
7073 Tim Van Holder in
7074 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7075 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7076
7077 2003-01-21 Paul Eggert <eggert@twinsun.com>
7078
7079 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7080 we don't need to worry about yyerrlab1 being reported as an
7081 "unused label" by non-GCC C compilers. The downside is that if
7082 locations are used then a couple of statements are duplicated each
7083 time YYERROR is invoked, but the upside is that the warnings
7084 should vanish.
7085 (yyerrlab1): Move code to YERROR.
7086 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7087 This reverts some of the 2002-12-27 change.
7088
7089 2003-01-17 Paul Eggert <eggert@twinsun.com>
7090
7091 * src/output.c (symbol_printers_output): Fix typo that led
7092 to core dump. Problem reported by Antonio Rus in
7093 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7094
7095 2003-01-13 Akim Demaille <akim@epita.fr>,
7096 Quoc Peyrot <chojin@lrde.epita.fr>,
7097 Robert Anisko <anisko_r@lrde.epita.fr>
7098
7099 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7100 when the stacks contain one element, as the loop would otherwise
7101 free the last state, and then use the top state (the one we just
7102 popped). This means that the initial elements will not be freed
7103 explicitly, as is the case in yacc.c; it is not a problem, as
7104 these elements have fake values.
7105
7106 2003-01-11 Paul Eggert <eggert@twinsun.com>
7107
7108 * NEWS: %expect-violations are now just warnings, reverting
7109 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7110 bootstrapping problem reported by Matthias Klose; see
7111 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7112 * src/conflicts.c (conflicts_print): Likewise.
7113 * tests/conflicts.at (%expect not enough, %expect too much,
7114 %expect with reduce conflicts): Likewise.
7115 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7116 that the warning is enabled if the number of conflicts changes
7117 (not necessarily increases).
7118
7119 * src/getargs.c (version): Update copyright year.
7120
7121 2003-01-09 Akim Demaille <akim@epita.fr>
7122
7123 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7124
7125 2003-01-08 Paul Eggert <eggert@twinsun.com>
7126
7127 * Makefile.maint (WGETFLAGS):
7128 New macro, containing "-C off" to disable proxy caches.
7129 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7130 (rel-check): Use $(WGET) instead of wget.
7131
7132 2003-01-06 Paul Eggert <eggert@twinsun.com>
7133
7134 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7135 the GLR paper of Scott, Johnstone and Hussain.
7136
7137 2003-01-04 Paul Eggert <eggert@twinsun.com>
7138
7139 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7140 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7141 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7142 (EXTRA_LIBRARIES): New var, for liby.a.
7143 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7144 (EXTRA_SCRIPTS): New var, for yacc.
7145
7146 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7147 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7148 Problem reported by Nelson H. F. Beebe.
7149
7150 2003-01-03 Paul Eggert <eggert@twinsun.com>
7151
7152 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7153 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7154 when compiling Bison 1.875's `bitset bset = obstack_alloc
7155 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7156
7157 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7158 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7159 grow to a huge size with typical invocation.
7160
7161 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7162 Use the pattern recommended by Autoconf 2.57, except also protect
7163 against double-definition.
7164 * src/system.h: Likewise.
7165 Portability issues reported by Nelson H. F. Beebe.
7166
7167 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7168 All uses changed. Provide a definition in both C and C++.
7169 (yytrue, yyfalse): Define even if defined (__cplusplus).
7170
7171 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7172 Reported by Nelson H. F. Beebe.
7173
7174 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7175
7176 2003-01-02 Paul Eggert <eggert@twinsun.com>
7177
7178 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7179 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7180 Bug reported by Nelson H. F. Beebe.
7181
7182 2003-01-01 Paul Eggert <eggert@twinsun.com>
7183
7184 * Version 1.875.
7185
7186 2002-12-30 Paul Eggert <eggert@twinsun.com>
7187
7188 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7189 Moved here from...
7190 (<INITIAL>","): Here. This causes stray "," to be treated
7191 more uniformly.
7192
7193 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7194 last brace in braced code when not in Yacc mode, for compatibility
7195 with Bison 1.35. This resurrects the 2001-12-15 patch to
7196 src/reader.c.
7197
7198 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7199 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7200
7201 2002-12-28 Paul Eggert <eggert@twinsun.com>
7202
7203 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7204 that of SYM's type. This fixes Debian bug 168069, reported by
7205 Thomas Olsson.
7206
7207 2002-12-28 Paul Eggert <eggert@twinsun.com>
7208
7209 Version 1.75f.
7210
7211 Switch back to the Yacc style of conflict reports, undoing some
7212 of the 2002-07-30 change.
7213 * doc/bison.texinfo (Understanding): Use Yacc style for
7214 conflict reports. Also, use new way of locating rules.
7215 * src/conflicts.c (conflict_report):
7216 Renamed from conflict_report_yacc, removing the old
7217 'conflict_report'. Translate the entire conflict report at once,
7218 so that we don't assume that "," has the same interpretation in
7219 all languages.
7220 (conflicts_output): Use Yacc-style conflict report for each state,
7221 instead of our more-complicated style.
7222 (conflicts_print): Use Yacc-style conflict report, except print
7223 the input file name when not emulating Yacc.
7224 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7225 Conflicted Reduction, %expect not enough, %expect too much,
7226 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7227 * tests/existing.at (GNU Cim Grammar): Likewise.
7228 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7229
7230 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7231 fatal): Don't invoke fflush; it's not needed and it might even be
7232 harmful for stdout, as stdout might not be open.
7233 * src/reduce.c (reduce_print): Likewise.
7234
7235 2002-12-27 Paul Eggert <eggert@twinsun.com>
7236
7237 Fix a bug where error locations were not being recorded correctly.
7238 This problem was originally reported by Paul Hilfinger in
7239 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7240
7241 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7242 top of the location stack's error locations.
7243 (yyerrlab): Set it. When discarding a token, push its location
7244 onto yylerrsp so that we don't lose track of the error's end.
7245 (yyerrlab1): Now is only the target of YYERROR, so that we can
7246 properly record the location of the action that failed. For GCC
7247 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7248 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7249 (yyerrlab2): New label, which yyerrlab now falls through to.
7250 Compute the error's location by applying YYLLOC_DEFAULT to
7251 the locations of all the symbols that went into the error.
7252 * doc/bison.texinfo (Location Default Action): Mention that
7253 YYLLOC_DEFAULT is also invoked for syntax errors.
7254 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7255 Error locations include the locations of all the tokens that were
7256 discarded, not just the last token.
7257
7258 2002-12-26 Paul Eggert <eggert@twinsun.com>
7259
7260 * src/files.c: Include quote.h.
7261 (compute_output_file_names): Warn if we detect conflicting
7262 outputs to the same file. This should catch the misunderstanding
7263 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7264
7265 * src/conflicts.c (conflicts_print): If the user specifies
7266 "%expect N", report an error if there are any reduce/reduce
7267 conflicts. This is what the manual says should happen.
7268 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7269 * tests/conflicts.at (%expect with reduce conflicts): New test.
7270
7271 Don't use m4_include on relative file names, as it doesn't work as
7272 desired if there happens to be a file with that name under ".".
7273
7274 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7275 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7276 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7277 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7278 * src/output.c (output_skeleton): Use full path names when
7279 specifying a file to include; don't rely on include path, as
7280 it's unreliable when the working file contains a file with
7281 that name.
7282
7283 2002-12-25 Paul Eggert <eggert@twinsun.com>
7284
7285 Remove obsolete references to bison.simple and bison.hairy.
7286 Problem mentioned by Aubin Mahe in
7287 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7288 * data/glr.c: Comment fix.
7289 * doc/bison.1: Remove references. Also, mention "yacc".
7290
7291 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7292 with -g option.
7293
7294 * src/parse-gram.y (declaration): Use enum "report_states" rather
7295 than its numeric value 1.
7296
7297 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7298 opening a new one. This fixes Debian bug 165349, reported by
7299 Bruce Stephens.
7300
7301 2002-12-24 Paul Eggert <eggert@twinsun.com>
7302
7303 Version 1.75e.
7304
7305 * Makefile.maint (cvs-update): Don't assume that the shell
7306 supports $(...), as Solaris sh doesn't.
7307
7308 * src/parse-gram.y (lloc_default): Remove test for empty
7309 nonterminals at the end, since it didn't change the result.
7310
7311 2002-12-24 Paul Eggert <eggert@twinsun.com>
7312
7313 If the user does not define YYSTYPE as a macro, Bison now declares it
7314 using typedef instead of defining it as a macro. POSIX requires this.
7315 For consistency, YYLTYPE is also declared instead of defined.
7316
7317 %union directives can now have a tag before the `{', e.g., the
7318 directive `%union foo {...}' now generates the C code
7319 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7320 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7321 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7322 instead of `yyltype'.
7323
7324 `yystype' and `yyltype' are now obsolescent macros instead of being
7325 typedefs or tags; they are no longer documented and will be
7326 withdrawn in a future release.
7327
7328 * data/glr.c (b4_location_type): Remove.
7329 (YYSTYPE): Renamed from yystype.
7330 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7331 (struct YYLTYPE): Renamed from struct yyltype.
7332 (YYLTYPE): Renamed from yyltype.
7333 (yyltype, yystype): New (and obsolescent) macros,
7334 for backward compatibility.
7335 * data/yacc.c: Likewise.
7336
7337 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7338 does not specify a union tag. This is for compatibility with
7339 Solaris 9 yacc.
7340
7341 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7342 const *, since it is now modified by stripping surrounding { }.
7343 (current_braced_code): Remove.
7344 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7345 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7346 trailing " {...}". Now of type <chars>.
7347 (grammar_declaration): Adjust to bundled tokens.
7348 (code_content): Remove; stripping is now done by add_param.
7349 (print_token_value): Print contents of bundled tokens.
7350 (token_name): New function.
7351
7352 * src/reader.h (braced_code, current_braced_code): Remove.
7353 (token_name): New decl.
7354
7355 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7356 token_type, not braced_code code_kind. All uses changed.
7357 (SC_PRE_CODE): New state, for scanning after a keyword that
7358 has (or usually has) an immediately-following braced code.
7359 (token_type): New local var, to keep track of which token type
7360 to return when scanning braced code.
7361 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7362 <INITIAL>"%parse-param", <INITIAL>"%printer",
7363 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7364 instead of returning a token type immediately.
7365 (<INITIAL>"{"): Set token type.
7366 (<SC_BRACED_CODE>"}"): Use it.
7367 (handle_action_dollar, handle_action_at): Now returns bool
7368 indicating success. Fail if ! current_rule; this prevents a core dump.
7369 (handle_symbol_code_dollar, handle_symbol_code_at):
7370 Remove; merge body into caller.
7371 (handle_dollar, handle_at): Complain in invalid contexts.
7372
7373 * NEWS, doc/bison.texinfo: Document the above.
7374 * NEWS: Fix years and program names in copyright notice.
7375
7376 2002-12-17 Paul Eggert <eggert@twinsun.com>
7377
7378 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7379 Reporting, Table of Symbols): Omit mentions of %lex-param and
7380 %parse-param from the documentation for now.
7381
7382 2002-12-15 Paul Eggert <eggert@twinsun.com>
7383
7384 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7385 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7386 lookahead symbol, and which sets yychar in parser actions) and it
7387 disagreed with the Bison documentation. Bug
7388 reported by Andrew Walrond.
7389
7390 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7391 as the caller now does that.
7392 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7393 (YYEMPTY): Parenthesize right hand side, since others use it.
7394 (yyparse): Don't assume that our generated code is the only code
7395 that sets yychar.
7396
7397 2002-12-13 Paul Eggert <eggert@twinsun.com>
7398
7399 Version 1.75d.
7400
7401 POSIX requires a "yacc" command.
7402 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7403 (MOSTLYCLEANFILES): Add yacc.
7404 (yacc): New rule.
7405 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7406 as an alias for bison y.
7407
7408 * po/LINGUAS: Add da.
7409
7410 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7411 problem with latest <getopt.h>.
7412 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7413
7414 * doc/fdl.texi: Upgrade to 1.2.
7415 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7416 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7417 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7418 gnulib.
7419 * config/install-sh: Sync with autotools.
7420
7421 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7422 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7423 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7424 locations are requested.
7425 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7426 locations are requested.
7427
7428 2002-12-12 Paul Eggert <eggert@twinsun.com>
7429
7430 Remove unportable casts and storage allocation tricks.
7431 While we're at it, remove almost all casts, since they
7432 usually aren't needed and are a sign of trouble.
7433
7434 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7435
7436 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7437 the pointer DSET returned by malloc; this isn't portable.
7438 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7439 Similarly for DERIVES.
7440 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7441 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7442 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7443
7444 * src/derives.c (derives_compute): Do not bother invoking
7445 int_of_rule_number, since rule numbers are integers.
7446
7447 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7448 rather than XMALLOC (char, N).
7449
7450 * src/files.c (filename_split): Rewrite to avoid cast.
7451
7452 * src/gram.h (symbol_number_as_item_number,
7453 item_number_as_symbol_number, rule_number_as_item_number,
7454 item_number_as_rule_number):
7455 Now inline functions rather than macros, to avoid casts.
7456 * src/state.h (state_number_as_int): Likewise.
7457 * src/tables.c (state_number_to_vector_number,
7458 symbol_number_to_vector_number): Likewise.
7459
7460 * src/gram.h (int_of_rule_number): Remove; no longer used.
7461
7462 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7463 since the resulting storage is always stored into.
7464
7465 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7466 where it's needed.
7467
7468 * src/muscle_tab.c (muscle_m4_output):
7469 Now inline. Return bool, not int.
7470 * src/state.c (state_compare): Likewise.
7471 * src/symtab.c (symbol_check_defined,
7472 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7473 hash_compare_symbol, hash_symbol):
7474 Likewise.
7475 * src/uniqstr.c (uniqstr_print): Likewise.
7476 * src/muscle_tab.c (muscle_m4_output_processor):
7477 New function, to avoid casts.
7478 * src/state.c (state_comparator, stage_hasher): Likewise.
7479 * src/symtab.c (symbol_check_defined_processor,
7480 symbol_check_alias_consistency_processor, symbol_pack_processor,
7481 symbol_translation_processor, hash_symbol_comparator,
7482 hash_symbol_hasher): Likewise.
7483 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7484 * src/muscle_tab.c (muscles_m4_output):
7485 Use new functions instead of casting old functions unportably.
7486 * src/state.c (state_hash_new): Likewise.
7487 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7488 symbols_token_translations_init):
7489 Likewise.
7490 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7491
7492 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7493 var instead of casting to long, to avoid casts.
7494 (prepare_states): Use MALLOC rather than alloca, so that we don't
7495 have to worry about alloca.
7496 * src/state.c (state_hash_lookup): Likewise.
7497
7498 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7499 local var instead of casting to unsigned char, to avoid casts.
7500
7501 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7502 STATE_ALLOC): Remove.
7503 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7504 rather than calloc, and use offsetof to avoid allocating slightly
7505 too much storage.
7506 (state_new): Initialize all members.
7507
7508 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7509
7510 * src/symtab.c (symbol_free): Remove; unused.
7511 (symbol_get): Remove cast in lhs of assignment.
7512 (symbols_do): Now static. Accept generic arguments, not
7513 hashing-related ones.
7514
7515 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7516 (symbol_processor): Remove.
7517 (symbols_do): Remove decl; now static.
7518
7519 * src/system.h (alloca): Remove; decl no longer needed.
7520 (<stddef.h>): Include, for offsetof.
7521 (<inttypes.>, <stdint.h>): Include if available.
7522 (uintptr_t): New type, if system lacks it.
7523 (CALLOC, MALLOC, REALLOC): New macros.
7524 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7525 new macros.
7526
7527 * src/tables.c (table_size): Now int, to pacify GCC.
7528 (table_grow, table_ninf_remap): Use signed table size.
7529 (save_row): Don't bother initializing locals when not needed.
7530 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7531 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7532
7533 * src/vcg.h: Correct misspellings.
7534
7535 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7536
7537
7538 * src/getargs.c (getargs): Don't assume EOF == -1.
7539
7540 2002-12-09 Paul Eggert <eggert@twinsun.com>
7541
7542 Change identifier spellings to avoid collisions with names
7543 that are reserved by POSIX.
7544
7545 Don't use names ending in _t, since POSIX reserves them.
7546 For consistency, remove _e and _s endings -- they're weren't
7547 needed to remove ambiguity. All uses changed.
7548 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7549 turn was just renamed from struniq_t.
7550 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7551 which in turn was just renamed from struniq_processor_t.
7552 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7553 in turn was renamed from hash_compare_struniq_t.
7554 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7555 (state_list): Renamed from state_list_t.
7556 * src/assoc.h (assoc): Renamed from assoc_t.
7557 * src/conflicts.c (enum conflict_resolution): Renamed from
7558 enum conflict_resolution_e.
7559 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7560 (rule_list): Renamed from rule_list_t.
7561 * src/getargs.h (enum trace): Renamed from enum trace_e.
7562 (enum report): Renamed from enum report_e.
7563 * src/gram.h (item_number): Renamed from item_number_t.
7564 (rule_number): Renamed from rule_number_t.
7565 (struct rule_s): Remove the "rule_s" part; not used.
7566 (rule): Renamed from rule_t.
7567 (rule_filter): Renamed from rule_filter_t.
7568 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7569 (goto_list): Renamed from goto_list_t.
7570 * src/lalr.h (goto_number): Renamed from goto_number_t.
7571 * src/location.h (location): Renamed from location_t.
7572 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7573 and moved here from:
7574 * src/muscle_tab.h (muscle_entry_t): here.
7575 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7576 (rule_list): Renamed from rule_list_t.
7577 * src/print_graph.c (static_graph): Renamed from graph.
7578 * src/reader.h (braced_code): Renamed from braced_code_t.
7579 Remove brace_code_e tag.
7580 * src/relation.h (relation_node): Renamed from relation_node_t.
7581 (relation_nodes): Renamed from relation_nodes_t.
7582 (relation): Renamed from relation_t.
7583 * src/state.h (state_number): Renamed from state_number_t.
7584 (struct state): Renamed from struct state_s.
7585 (state): Renamed from state_t.
7586 (transitions): Renamed from transitions_t. Unused (and
7587 misspelled) transtion_s tag removed.
7588 (errs): Renamed from errs_t. Unused errs_s tag removed.
7589 (reductions): Renamed from reductions_t. Unused tag
7590 reductions_s removed.
7591 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7592 (struct symbol_list): Renamed from struct symbol_list_s.
7593 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7594 (struct symbol): Renamed from struct symbol_s.
7595 (symbol): Renamed from symbol_t.
7596 * src/tables.c (vector_number): Renamed from vector_number_t.
7597 (action_number): Renamed from action_t.
7598 * src/tables.h (base_number): Renamed from base_t.
7599 * src/vcg.h (enum color): Renamed from enum color_e.
7600 (enum textmode): Renamed from enum textmode_e.
7601 (enum shape): Renamed from enum shape_e.
7602 (struct colorentry): Renamed from struct colorentry_s.
7603 (struct classname): Renamed from struct classname_s.
7604 (struct infoname): Renamed from struct infoname_s.
7605 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7606 (enum decision): Renamed from enum decision_e.
7607 (enum orientation): Renamed from enum orientation_e.
7608 (enum alignment): Renamed from enum alignment_e.
7609 (enum arrow_mode): Renamed from enum arrow_mode_e.
7610 (enum crossing_type): Renamed from enum crossing_type_e.
7611 (enum view): Renamed from enum view_e.
7612 (struct node): Renamed from struct node_s.
7613 (node): Renamed from node_t.
7614 (enum linestyle): Renamed from enum linestyle_e.
7615 (enum arrowstyle): Renamed from enum arrowstyle_e.
7616 (struct edge): Renamed from struct edge.
7617 (edge): Renamed from edge_t.
7618 (struct graph): Renamed from struct graph_s.
7619 (graph): Renamed from graph_t.
7620 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7621 Rename value_t -> value.
7622 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7623 value_t_as_yystype -> value_as_yystype.
7624
7625 Don't include <errno.h> in the mainstream code, since it
7626 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7627 * lib/get-errno.c, lib/get-errno.h: New files.
7628 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7629 get-errno.c.
7630 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7631 * src/output.c (output_skeleton): Likewise.
7632 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7633 instead of errno.
7634 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7635 Likewise.
7636 (handle_action_dollar, handle_action_at): Likewise.
7637 * src/system.h: Do not include <errno.h>.
7638 (TAB_EXT): Renamed from EXT_TAB.
7639 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7640
7641 Avoid str[a-z]*, since <string.h> reserves that name space.
7642 Change all instances of "struniq" in names to "uniqstr", and
7643 likewise for "STRUNIQ" and "UNIQSTR".
7644 * src/uniqstr.c: Renamed from src/struniq.c.
7645 * src/uniqstr.h: Renamed from src/struniq.h.
7646 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7647 * src/files.c (strsuffix): Remove; unused.
7648 (concat2): Renamed from stringappend. Now static.
7649 * src/files.h (strsuffix, stringappend): Remove; unused.
7650 * src/parse-gram.y (<chars>): Renamed from <string>.
7651 (<uniqstr>): Renamed from <struniq>.
7652 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7653 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7654 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7655 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7656 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7657 (N_EXPAND): Renamed from N_STRETCH.
7658
7659 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7660 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7661 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7662 Remove; unused.
7663 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7664 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7665 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7666 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7667 (BASE_MAXIMUM): Renamed from BASE_MAX.
7668 (BASE_MINIMUM): Renamed from BASE_MIN.
7669 (ACTION_MAX): Remove; unused.
7670 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7671 Unnecessary casts removed from above defines.
7672
7673
7674 Fix misspelling in names.
7675 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7676 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7677 G_NODE_ALIGNEMENT.
7678
7679
7680 * lib/timevar.c (timevar_report): Renamed from time_report,
7681 for consistency with other names.
7682 * lib/timevar.h (timevar_report): New decl.
7683 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7684
7685
7686 Sort include-file uses.
7687
7688 Reorder all include files under src to be in the order "system.h".
7689 then the ../lib include files in angle brackets (alphabetized),
7690 then the . include files in double-quotes (alphabetized). Fix
7691 dependency breakages encountered in this process, as follows:
7692 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7693 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7694 * src/state.h: Include "symtab.h".
7695
7696 2002-12-08 Paul Eggert <eggert@twinsun.com>
7697
7698 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7699 since this causes problems when __file__ contains character
7700 sequences like "@" that are treated specially by src/scan-skel.l.
7701 Instead, just use the file's basename. This fixes the bug
7702 reported by Martin Mokrejs in
7703 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7704
7705 2002-12-06 Paul Eggert <eggert@twinsun.com>
7706
7707 Add support for rules that do not have trailing semicolons, as
7708 POSIX requires. Improve the quality of locations in Bison
7709 diagnostics.
7710
7711 * src/location.c: Include <quotearg.h>.
7712 (empty_location): Now const.
7713 (location_print): New function. Follow the recommendation of the
7714 GNU Coding Standards for locations that span file boundaries.
7715 * src/location.h: Do not include <quotearg.h>; no longer needed.
7716 (boundary): New type.
7717 (location_t): Use it. This allows locations to span file boundaries.
7718 All member uses changed: file -> start.file or end.file (as needed),
7719 first_line -> start.line, first_column -> start.column,
7720 last_line -> end.line, last_column -> end.column.
7721 (equal_boundaries): New function.
7722 (LOCATION_RESET, LOCATION_STEP): Remove.
7723 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7724 (empty_location): Now const.
7725 (location_print): New decl.
7726 * src/parse-gram.y (lloc_default): New function, which handles
7727 empty locations more accurately.
7728 (YYLLOC_DEFAULT): Use it.
7729 (%token COLON): Remove.
7730 (%token ID_COLON): New token.
7731 (rules): Use it.
7732 (declarations, rules): Remove trailing semicolon.
7733 (declaration, rules_or_grammar_declaration):
7734 Allow empty (";") declaration.
7735 (symbol_def): Remove empty actions; no longer needed.
7736 (rules_or_grammar_declaration): Remove trailing semicolon.
7737 (semi_colon.opt): Remove.
7738 * src/reader.h: Include location.h.
7739 (scanner_cursor): New decl.
7740 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7741 rolling our own.
7742 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7743 of *loc.
7744 (STEP): Remove. No longer needed, now that adjust_location does
7745 the work. All uses removed.
7746 (scanner_cursor): New var.
7747 (adjust_location): Renamed from extend_location. It now sets
7748 *loc and adjusts the scanner cursor. All uses changed.
7749 Don't bother testing for CR.
7750 (handle_syncline): Remove location arg; now updates scanner cursor.
7751 All callers changed.
7752 (unexpected_end_of_file): Now accepts start boundary of token or
7753 comment, not location. All callers changed. Update scanner cursor,
7754 not the location.
7755 (SC_AFTER_IDENTIFIER): New state.
7756 (context_state): Renamed from c_context. All uses changed.
7757 (id_loc, code_start, token_start): New local vars.
7758 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7759 processing of Yacc white space and equivalents here.
7760 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7761 instead of returning ID immediately, since we need to search for
7762 a subsequent colon.
7763 (<INITIAL>"'", "\""): Save token_start.
7764 (<INITIAL>"%{", "{", "%%"): Save code_start.
7765 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7766 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7767 BEGIN context_state at end, not INITIAL.
7768 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7769 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7770 Return correct token start.
7771 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7772 the start of a character, string or multiline comment is found.
7773 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7774 Reduction): Adjust reported locations to match the more-precise
7775 results now expected.
7776 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7777 * tests/reduce.at (Useless Rules, Reduced Automaton,
7778 Underivable Rules): Likewise.
7779 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7780 or "|"' now that so many other tokens are allowed by the new grammar.
7781
7782 * src/complain.h (current_file): Remove duplicate decl;
7783 current_file is now owned by files.h.
7784 * src/complain.c, src/scan-gram.l: Include files.h.
7785
7786 2002-12-06 Paul Eggert <eggert@twinsun.com>
7787
7788 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7789 promotes to int; it might be unsigned int.
7790 * data/yacc.c (yy_reduce_print): Likewise.
7791
7792 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7793 be #defined in the prologue, not in the Bison declarations.
7794 This fixes Debian Bug 102878, reported by Shaul Karl.
7795
7796 2002-12-02 Paul Eggert <eggert@twinsun.com>
7797
7798 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7799 * lib/strtoul.c: New file, from gnulib.
7800 This fixes a porting bug reported by Peter Klein in
7801 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7802
7803 2002-11-30 Paul Eggert <eggert@twinsun.com>
7804
7805 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7806 and put only a forward declaration in the prologue. This is for
7807 consistency with the other scanner helper functions.
7808
7809 Type clashes now generate warnings, not errors, since it
7810 appears that POSIX may allow some grammars with type clashes.
7811 * src/reader.c (grammar_current_rule_check): Warn about
7812 type clashes instead of complaining.
7813 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7814
7815 Add Yacc library, since POSIX requires it.
7816 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7817 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7818 * lib/main.c, lib/yyerror.c: New files.
7819
7820 gram_error can be static; it need not be extern.
7821 * src/reader.h (gram_error): Remove decl.
7822 * src/parse-gram.y (gram_error): Now static. Add static decl.
7823 (print_token_value): Omit parameter names from forward decl,
7824 for consistency.
7825
7826 2002-11-29 Paul Eggert <eggert@twinsun.com>
7827
7828 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7829 be declared before being used. E.g., one should typically
7830 declare them in the prologue. Use GNU coding style in examples.
7831 Put "const" consistently after the type it modifies. Mention
7832 that C99 supports "inline". Mention that yyerror traditionally
7833 returns "int".
7834
7835 %parse-param and %lex-param now take just one argument, the
7836 declaration; the argument name is deduced from the declaration.
7837
7838 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7839 Reporting, Table of Symbols): Document this.
7840 * src/parse-gram.y (add_param): New function.
7841 (COMMA): Remove.
7842 (declaration): Implement new rule for %parse-param and %lex-param.
7843 * src/scan-gram.l: "," now elicits a warning, rather than being
7844 a token; this is more compatible with byacc.
7845 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7846
7847 2002-11-27 Paul Eggert <eggert@twinsun.com>
7848
7849 Rename identifiers to avoid real and potential collisions.
7850
7851 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7852 to avoid collision with lex macro described by Bruce Lilly in
7853 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7854 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7855 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7856 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7857 All uses changed.
7858 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7859 The name "yycontrol" violates the name space rules, and this stuff
7860 wasn't being used anyway.
7861 (input): Remove action; this stuff wasn't being used.
7862 (gram_error): Rename local variable yylloc -> loc.
7863 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7864 (YY_DECL): Don't use "yy" at start of local variables.
7865 All uses changed, e.g., yylloc -> loc.
7866 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7867 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7868 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7869 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7870
7871 * src/parse-gram.y (gram_error): loc is now const *.
7872 * src/reader.h (gram_error): Likewise.
7873
7874 2002-11-24 Paul Eggert <eggert@twinsun.com>
7875
7876 Version 1.75c.
7877
7878 * tests/actions.at (Actions after errors): Use an output format
7879 more similar to that of the Printers and Destructors test.
7880 Test the position of the ';' token too.
7881 (Printers and Destructors): Likewise.
7882 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7883 unnecessarily alarming people when the test fails.
7884
7885 * data/yacc.c (yyerrlab1): Move this label down, so that the
7886 parser does not discard the lookahead token if the user code
7887 invokes YYERROR. This change is required for POSIX conformance.
7888
7889 * lib/error.c: Sync with gnulib.
7890
7891 2002-11-22 Paul Eggert <eggert@twinsun.com>
7892
7893 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7894 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7895 * lib/xmalloc.c: Likewise.
7896
7897 2002-11-20 Paul Eggert <eggert@twinsun.com>
7898
7899 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7900
7901 2002-11-20 Paul Eggert <eggert@twinsun.com>
7902
7903 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7904 should use `if (! x) abort ();' rather than `assert (x);', and
7905 anyway it's one less thing to worry about configuring.
7906
7907 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7908 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7909 and replace all instances of assert with abort.
7910 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7911 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7912
7913 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7914 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7915 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7916 hash_find_entry, hash_rehash, hash_insert): Likewise.
7917 * src/conflicts.c (resolve_sr_conflict): Likewise.
7918 * src/lalr.c (set_goto_map, map_goto): Likewise.
7919 * src/nullable.c (nullable_compute): Likewise.
7920 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7921 * src/reader.c (packgram, reader): Likewise.
7922 * src/state.c (state_new, state_free, state_transitions_set,
7923 state_reduction_find): Likewise.
7924 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7925 symbol_pack): Likewise.
7926 * src/tables.c (conflict_row, pack_vector): Likewise.
7927 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7928 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7929 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7930 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7931
7932 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7933 (ARGMATCH_CONSTRAINT): New macro.
7934 (ARGMATCH_ASSERT): Use it.
7935
7936 * src/system.h (verify): New macro.
7937 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7938 rather than assert.
7939 * src/tables.c (tables_generate): Likewise.
7940
7941 * src/struniq.c (struniq_assert): Now returns void, and aborts
7942 if the assertion is false.
7943 (struniq_assert_p): Remove.
7944 * src/struniq.h: Likewise.
7945
7946 2002-11-18 Paul Eggert <eggert@twinsun.com>
7947
7948 * data/glr.c (yygetLRActions): Replace `yyindex' with
7949 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7950 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7951 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7952
7953 2002-11-18 Akim Demaille <akim@epita.fr>
7954
7955 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7956 space.
7957 From Tim Van Holder.
7958
7959 2002-11-17 Paul Eggert <eggert@twinsun.com>
7960
7961 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7962 to "SyntaxError" for consistency with my 2002-11-15 change.
7963
7964 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7965 not define to {}, since this breaks the common use of `YYDPRINTF
7966 ((...));' if a single statement is desired (e.g. before `else').
7967 Work around GCC warnings by surrounding corresponding calls with
7968 {} if needed.
7969 (yyhasResolvedValue): Remove unused function.
7970 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7971 loop body.
7972 (yyreportSyntaxError): Renamed from yyreportParseError.
7973 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7974 All uses changed.
7975 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7976 extern when possible. Remove unused initializations.
7977
7978 2002-11-16 Akim Demaille <akim@epita.fr>
7979
7980 Augment the similarity between GLR and LALR traces.
7981
7982 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7983 (YY_REDUCE_PRINT): New.
7984 (yyparse): Use them.
7985 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7986 YYDPRINT here.
7987 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7988 state reached after the reduction/recovery, since...
7989 (yyparse, yyprocessOneStack): Report the state we are entering in.
7990
7991 2002-11-16 Akim Demaille <akim@epita.fr>
7992
7993 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7994 Add support for --trace=skeleton.
7995 * src/scan-skel.l: %option debug.
7996 Scan strings of non-@ or \n instead of character by character.
7997 (scan_skel): Handle trace_skeleton.
7998 (QPUTS): New.
7999 (@output_parser_name@, @output_header_name@): ``Restore'' their
8000 support (used to be M4 macros).
8001 * data/yacc.c: Quote larger chunks, a la glr.c.
8002 * data/lalr1.cc: Likewise.
8003 The header guards are no longer available, so use some other
8004 string than `YYLSP_NEEDED'.
8005
8006 2002-11-16 Akim Demaille <akim@epita.fr>
8007
8008 Make the ``Printers and Destructors'' test more verbose, taking
8009 `yacc.c''s behavior as (possibly wrong) reference.
8010
8011 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8012 instead of fprint on stdout.
8013 Set and report the last_line of the symbols.
8014 Consistently display values and locations.
8015
8016 2002-11-16 Paul Eggert <eggert@twinsun.com>
8017
8018 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8019
8020 2002-11-15 Paul Eggert <eggert@twinsun.com>
8021
8022 * tests/actions.at (Actions after errors): New test case.
8023
8024 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8025 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8026 tests/action.at, tests/calc.at, tests/conflicts.at,
8027 tests/cxx-type.at, tests/regression.at:
8028 "parse error" -> "syntax error" for POSIX compatibility.
8029 "parsing stack overflow..." -> "parser stack overflow" so
8030 that code matches Bison documentation.
8031
8032 2002-11-15 Akim Demaille <akim@epita.fr>
8033
8034 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8035 take two BRACED_CODE, not two string_content.
8036 Free the scanner's obstack when we are done.
8037 (code_content): New.
8038 * tests/calc.at: Adjust.
8039 * doc/bison.texinfo: Adjust.
8040 Also, make sure to include the `,' for these declarations.
8041
8042 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8043
8044 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8045 definition; avoids potential autoreconf problems.
8046
8047 2002-11-15 Akim Demaille <akim@epita.fr>
8048
8049 Always check the value returned by yyparse.
8050
8051 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8052 returned by yyparse.
8053 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8054 Adjust calls.
8055 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8056 returned by yyparse.
8057
8058 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8059
8060 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8061 on input.at test.
8062
8063 2002-11-14 Paul Eggert <eggert@twinsun.com>
8064
8065 * src/output.c (output_skeleton): Call xfopen instead of
8066 duplicating xfopen's body.
8067
8068 Fix bugs reported by Nelson H. F. Beebe in
8069 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8070
8071 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8072 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8073 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8074 file twice in the grammar, as an extra check.
8075
8076 * tests/input.at (Torturing the Scanner): Surround the
8077 backslash-newline tests with "#if 0", to make it less likely that
8078 we'll run into compiler bugs. Bring back solitary \ inside
8079 comment, but add a closing comment to work around HP C bug. Don't
8080 test backslash-newline in C character constant.
8081
8082 2002-11-14 Akim Demaille <akim@epita.fr>
8083
8084 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8085 status of the compiler.
8086 Calling `exit 1' is no longer needed.
8087 Reported by Nelson H. F. Beebe.
8088
8089 2002-11-14 Akim Demaille <akim@epita.fr>
8090
8091 * tests/atlocal.in (CPPFLAGS): We have config.h.
8092 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8093 New.
8094 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8095 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8096 * tests/regression.at, tests/torture.at: Use them for all the
8097 grammars that are to be compiled.
8098 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8099 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8100 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8101
8102 2002-11-14 Akim Demaille <akim@epita.fr>
8103
8104 * doc/bison.texinfo: Various formatting changes (alignments in
8105 samples, additional @group/@end group, GCS in samples.
8106 Use @deffn instead of simple @table to define the directives,
8107 macros, variables etc.
8108
8109 2002-11-13 Paul Eggert <eggert@twinsun.com>
8110
8111 Fix some bugs reported by Albert Chin-A-Young in
8112 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8113
8114 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8115 -o c"; the HP C compiler chatters during compilation.
8116 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8117 * tests/headers.at (export YYLTYPE): Likewise.
8118
8119 * tests/input.at (Torturing the Scanner): Remove lines containing
8120 solitary backslashes, as they tickle a bug in the HP C compiler.
8121
8122 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8123 comments, since they're not portable. Use GNU coding style.
8124
8125 2002-11-13 Akim Demaille <akim@epita.fr>
8126
8127 * data/yacc.c: Leave bigger chunks of quoted text.
8128 (YYDSYMPRINTF): New.
8129 Use it to report symbol activities.
8130 * data/glr.c (YYDSYMPRINTF): New.
8131 Use it.
8132
8133 2002-11-12 Paul Eggert <eggert@twinsun.com>
8134
8135 Version 1.75b.
8136
8137 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8138 (yyglrReduce): Return yyok, not 0.
8139 This should avoid the enumerated-type warnings reported
8140 by Nelson H. F. Beebe in
8141 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8142
8143 * lib/bbitset.h (BITSET_INLINE): Remove.
8144 * lib/bitset.h [! BITSET_INLINE]: Remove.
8145 (bitset_set, bitset_reset, bitset_test): Rename local vars
8146 to avoid shadowing warnings by GCC.
8147
8148 * data/glr.c (inline): Remove #define. It's the user's
8149 responsibility to #define it away, just like 'const'.
8150 This fixes one of the bugs reported by Nelson H. F. Beebe in
8151 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8152
8153 * Makefile.maint (po-check): Scan .l and .y files instead of the
8154 .c and the .h files that they generate. This fixes the bug
8155 reported by Tim Van Holder in:
8156 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8157 Look for N_ as well as for _. Try to avoid matching #define for
8158 N_ and _.
8159 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8160 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8161 * src/scan-gram.l: Revamp regular expressions so that " and '
8162 do not confuse xgettext.
8163
8164 * src/struniq.h (struniq_new): Do not declare the return type
8165 to be 'const'; this violates the C standard.
8166 * src/struniq.c (struniq_new): Likewise.
8167
8168 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8169
8170 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8171 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8172 linker.
8173
8174 2002-11-12 Akim Demaille <akim@epita.fr>
8175
8176 * Makefile.maint: Sync with Autoconf:
8177 (local_updates): New.
8178
8179 2002-11-12 Akim Demaille <akim@epita.fr>
8180
8181 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8182
8183 2002-11-12 Akim Demaille <akim@epita.fr>
8184
8185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8186 locations.
8187
8188 2002-11-12 Akim Demaille <akim@epita.fr>
8189
8190 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8191 not yyvalue.
8192
8193 2002-11-12 Akim Demaille <akim@epita.fr>
8194
8195 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8196 Use it to test the GLR parser.
8197
8198 2002-11-12 Akim Demaille <akim@epita.fr>
8199
8200 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8201 defines it.
8202 * data/glr.c (yystos): New.
8203 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8204 (YYDSYMPRINT): New.
8205 (yyval): Don't define it, it is handled via M4.
8206 (yyrecoverParseError): Free verbosely the discarded symbols.
8207 * data/yacc.c (yysymprint): Remove, rather...
8208 (b4_yysymprint_generate): invoke.
8209 * data/c.m4 (b4_yysymprint_generate): New.
8210 Accept pointers as arguments, as opposed to the version from
8211 yacc.c.
8212 (b4_yydestruct_generate): Likewise.
8213 * tests/cations.at (Printers and Destructors): Use Bison directives
8214 instead of CPP macros.
8215 Don't rely on internal details.
8216
8217 2002-11-12 Akim Demaille <akim@epita.fr>
8218
8219 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8220 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8221 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8222 it against YYEMPTY and so forth), work on yytoken (i.e., set
8223 it to YYEMPTY etc.).
8224 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8225 (b4_symbol_actions): Remove.
8226 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8227 for 0, end-of-input.
8228
8229 2002-11-12 Akim Demaille <akim@epita.fr>
8230
8231 * doc/bison.texinfo (Destructor Decl): New.
8232
8233 2002-11-12 Akim Demaille <akim@epita.fr>
8234
8235 * src/tables.c (tables_generate): Use free for pointers that
8236 cannot be NULL, not XFREE.
8237 (pack_vector): Use assert, not fatal, for bound violations.
8238 * src/state.c (state_new): Likewise.
8239 * src/reader.c (reader): Likewise.
8240 * src/lalr.c (set_goto_map): Likewise.
8241 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8242 the file name.
8243
8244 2002-11-12 Akim Demaille <akim@epita.fr>
8245
8246 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8247 Restore.
8248 * src/scan-gram.l (last_string): Is global to the file, not to
8249 yylex.
8250 * src/parse-gram.y (input): Don't append the epilogue here,
8251 (epilogue.opt): do it here, and free the scanner's obstack.
8252 * src/reader.c (epilogue_set): Rename as...
8253 (epilogue_augment): this.
8254 * data/c.m4 (b4_epilogue): Defaults to empty.
8255
8256 2002-11-12 Akim Demaille <akim@epita.fr>
8257
8258 * src/getargs.c (long_options): Remove duplicates.
8259 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8260 Remove.
8261 * doc/bison.rnh: Remove.
8262 * doc/bison.texinfo (VMS Invocation): Remove.
8263
8264 2002-11-12 Akim Demaille <akim@epita.fr>
8265
8266 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8267 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8268
8269 Use struniq for symbols.
8270
8271 * src/symtab.h (symbol_t): The tag member is a struniq.
8272 (symbol_type_set): Adjust.
8273 * src/symtab.c (symbol_new): Takes a struniq.
8274 (symbol_free): Don't free the tag member.
8275 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8276 (hash_compare_symbol, hash_symbol): these.
8277 Use the fact that tags as struniqs.
8278 (symbol_get): Use struniq_new.
8279 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8280 Returns a strniq.
8281 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8282 and type members are struniqs.
8283 * src/reader.c (get_merge_function)
8284 (grammar_current_rule_merge_set): Adjust.
8285 (TYPE, current_type): Are struniq.
8286
8287 Use struniq for file names.
8288
8289 * src/files.h, src/files.c (infile): Split into...
8290 (grammar_file, current_file): these.
8291 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8292 * src/reduce.c (reduce_print): Likewise.
8293 * src/getargs.c (getargs): Likewise.
8294 * src/complain.h, src/complain.c: Likewise.
8295 * src/main.c (main): Call struniqs_new early enough to use it for
8296 file names.
8297 Don't free the input file name.
8298
8299 2002-11-12 Akim Demaille <akim@epita.fr>
8300
8301 * src/symtab.c (symbol_free): Remove dead deactivated code:
8302 type_name are properly removed.
8303 Don't use XFREE to free items that cannot be NULL.
8304 * src/struniq.h, src/struniq.c: New.
8305 * src/main.c (main): Initialize/free struniqs.
8306 * src/parse-gram.y (%union): Add astruniq member.
8307 (yyprint): Adjust.
8308 * src/scan-gram.l (<{tag}>): Return a struniq.
8309 Free the obstack bit that used to store it.
8310 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8311
8312 2002-11-11 Paul Eggert <eggert@twinsun.com>
8313
8314 Revamp to fix many (but not all) of the C- and M4-related quoting
8315 problems. Among other things, this fixes the Bison bug reported
8316 by Jan Hubicka when processing the Bash grammar; see:
8317 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8318
8319 Use new @ escapes consistently. Represent brackets with @{ and @}
8320 rather than @<:@ and @:>@, since this works a bit better with dumb
8321 editors like vi. Represent @ with @@, since @ is now consistently
8322 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8323 __ofile__, to avoid unexpected expansions. Similarly, use @output
8324 rather than #output.
8325
8326 * data/c.m4 (b4_copyright): Omit file name from comment, since
8327 the file name could contain "*/".
8328 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8329 be quoted. All uses changed.
8330
8331 * data/glr.c: Use new @ escapes consistently.
8332 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8333 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8334 Remove, since they couldn't handle arbitrary characters in file
8335 names.
8336 * data/lalr1.cc: Likewise.
8337 * data/yacc.c: Likewise.
8338
8339 * src/files.c (output_infix): Remove; all uses removed.
8340 * src/files.h: Likewise.
8341
8342 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8343 mishandled funny characters in file names, and anyway it isn't
8344 needed any more.
8345 * data/yacc.c: Likewise.
8346 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8347
8348 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8349 * data/yacc.c: Likewise.
8350
8351 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8352 strings now.
8353 (muscle_init): Quote filename as a C string.
8354 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8355 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8356 * src/output.c (escaped_file_name_output): New function.
8357 (prepare_symbols): Quote tokens for M4.
8358 (prepare): Don't insert output_infix, output_prefix,
8359 output_parser_name, output_header_name; this is now down by scan-skel.
8360 Insert skeleton as a C string.
8361
8362 * src/output.c (user_actions_output, symbol_destructors_output,
8363 symbol_printers_output): Quote filenames for C and M4.
8364 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8365
8366 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8367 escapes other than \\ and \'; this simplifies the code.
8368 (<SC_STRING>): Likewise, for \\ and \".
8369 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8370 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8371 Use new escapes @{ and @} for [ and ].
8372
8373 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8374 them with auto vars.
8375 Switch to new escape scheme, where @ is the escape character uniformly.
8376 Abort if a stray escape character is found. Avoid unbounded input
8377 buffer when parsing non-escaped text.
8378
8379 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8380 __oline__, #output, $@, and @{ do not have unintended meanings.
8381
8382 2002-11-09 Paul Eggert <eggert@twinsun.com>
8383
8384 Fix the test failure due to GCC warnings described in
8385 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8386 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8387 evaluate to 0 if it's impossible for NINF to be in the respective
8388 table.
8389 (yygetLRActions, yyrecoverParseError): Use them.
8390
8391 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8392 counted in the token inserted at end of file. Now takes
8393 location_t *, not location_t, so that the location can be
8394 adjusted. All uses changed.
8395
8396 * tests/regression.at (Invalid inputs): Adjust wording in
8397 diagnostic to match the new behavior.
8398
8399 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8400 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8401 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8402 abort ();'. This reduces the runtime of the "Many lookaheads"
8403 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8404 GCC 3.2.
8405
8406 2002-11-07 Paul Eggert <eggert@twinsun.com>
8407
8408 * src/parse-gram.y (CHARACTER): Remove unused token.
8409 All uses removed.
8410
8411 * src/scan-gram.l: Remove stack option. We no longer use the
8412 stack, since the stack was never deeper than 1; instead, use the
8413 new auto var c_context to record the stacked value.
8414
8415 Remove nounput option. At an unexpected end of file, we now unput
8416 the minimal input necessary to end cleanly; this simplifies the
8417 code.
8418
8419 Avoid unbounded token sizes where this is easy.
8420
8421 (unexpected_end_of_file): New function.
8422 Use it to systematize the error message on unexpected EOF.
8423 (last-string): Now auto, not static.
8424 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8425 (scanner_last_string_free): Remove; not used.
8426 (percent_percent_count): Move decl to just before use.
8427 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8428 not the (never otherwised-used) CHARACTER.
8429
8430 2002-11-07 Akim Demaille <akim@epita.fr>
8431
8432 Let yyerror always receive the msg as last argument, so that
8433 yyerror can be variadic.
8434
8435 * data/yacc.c (b4_yyerror_args): New.
8436 Use it when calling yyerror.
8437 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8438 Use it when calling yyerror.
8439 * doc/bison.texinfo (Error Reporting): Adjust.
8440 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8441 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8442
8443 2002-11-06 Akim Demaille <akim@epita.fr>
8444
8445 #line should have quoted strings.
8446 Ideally, this should be done by m4_quotearg.
8447
8448 * src/scan-skel.l: Include quotearg.h.
8449 Quote __ofile__.
8450 * src/output.c (symbol_printers_output)
8451 (symbol_destructors_output): Quote the file name.
8452
8453 2002-11-06 Akim Demaille <akim@epita.fr>
8454
8455 * tests/regression.at (Invalid inputs): Adjust to the recent
8456 messages.
8457
8458 2002-11-06 Akim Demaille <akim@epita.fr>
8459
8460 Restore --no-lines.
8461 Reported by Jim Kent.
8462
8463 * data/c.m4 (b4_syncline): New.
8464 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8465 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8466 * src/output.c (user_actions_output): Likewise.
8467 (prepare): Define 'b4_synclines_flag'.
8468 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8469
8470 2002-11-06 Akim Demaille <akim@epita.fr>
8471
8472 * src/main.c (main): Free `infile'.
8473 * src/scan-gram.l (handle_syncline): New.
8474 Recognize `#line'.
8475 * src/output.c (user_actions_output, symbol_destructors_output)
8476 (symbol_printers_output): Use the location's file name, not
8477 infile.
8478 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8479
8480 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8481
8482 * src/tables.c (matching_state): Don't allow states to match if
8483 either has GLR conflict entries.
8484
8485 2002-11-05 Paul Eggert <eggert@twinsun.com>
8486
8487 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8488 "integer out of range" rather than "invalid value".
8489 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8490 accordingly.
8491
8492 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8493 Also, remove one static variable in the scanner.
8494
8495 * src/scan-gram.l (braces_level): Now auto, not static.
8496 Initialize to zero if the compiler is being picky.
8497 (INITIAL): Clear braces_level instead of incrementing it.
8498 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8499 as POSIX 1003.1-2001 requires.
8500 * src/system.h (IF_LINT): New macro, taken from coreutils.
8501 * configure.ac: Define "lint" if --enable-gcc-warnings.
8502
8503 2002-11-05 Akim Demaille <akim@epita.fr>
8504
8505 * src/scan-gram.l: When it starts with `%', complain about the
8506 whole directive, not just that `invalid character: %'.
8507
8508 2002-11-04 Akim Demaille <akim@epita.fr>
8509
8510 * Makefile.maint: Update from Autoconf.
8511 (update, cvs-update, po-update, do-po-update): New.
8512
8513 2002-11-04 Akim Demaille <akim@epita.fr>
8514
8515 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8516 and yyerror.
8517 Have yyerror `use' its arguments.
8518 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8519 returns true when location & yacc & pure & parse-param.
8520 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8521
8522 2002-11-04 Akim Demaille <akim@epita.fr>
8523
8524 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8525 clashes.
8526 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8527 font-lock-mode.
8528 Use complain_at.
8529 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8530 slot 0.
8531
8532 2002-11-03 Paul Eggert <eggert@twinsun.com>
8533
8534 * src/reader.c (get_merge_function, grammar_current_rule_check):
8535 Use consistent diagnostics for reporting type name clashes.
8536 Quote the types with <>, for consistency with Yacc.
8537 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8538
8539 2002-11-03 Akim Demaille <akim@epita.fr>
8540
8541 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8542 New.
8543 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8544 (b4_parse_param): Remove.
8545 Use b4_identification.
8546 Propagate b4_pure_args where needed to pass them to yyerror.
8547 * data/glr.m4 (b4_parse_param): Remove.
8548 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8549 (b4_lpure_formals): New.
8550 Use b4_identification.
8551 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8552 b4_user_formals and b4_user_args.
8553 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8554 (yyreportAmbiguity): When using a pure parser, also need
8555 the location, and the parse-params.
8556 Adjust callers.
8557 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8558 When using a pure parser, also need the parse-params.
8559 Adjust callers.
8560 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8561 (%pure-parser + %parse-param) LALR and GLR parsers.
8562 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8563 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8564 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8565 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8566 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8567 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8568 * doc/bison.texinfo: Untabify the whole file.
8569 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8570 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8571 (Error Reporting): Adjust to these new directives.
8572 Document %error-verbose, deprecate YYERROR_VERBOSE.
8573
8574 2002-11-03 Akim Demaille <akim@epita.fr>
8575
8576 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8577 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8578 command line options.
8579 * tests/cxx-type.at: Formatting changes.
8580
8581 2002-11-03 Paul Eggert <eggert@twinsun.com>
8582
8583 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8584 to count columns correctly, and to check for invalid inputs.
8585
8586 Use mbsnwidth to count columns correctly. Account for tabs, too.
8587 Include mbswidth.h.
8588 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8589 (extend_location): New function.
8590 (YY_LINES): Remove.
8591
8592 Handle CRLF in C code rather than in Lex code.
8593 (YY_INPUT): New macro.
8594 (no_cr_read): New function.
8595
8596 Scan UCNs, even though we don't fully handle them yet.
8597 (convert_ucn_to_byte): New function.
8598
8599 Handle backslash-newline correctly in C code.
8600 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8601 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8602 all uses changed.
8603 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8604 Use {splice} wherever C allows backslash-newline.
8605 YY_STEP after space, newline, vertical-tab.
8606 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8607
8608 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8609
8610 ({int}, handle_action_dollar, handle_action_at): Check for integer
8611 overflow.
8612
8613 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8614
8615 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8616 as well as \000. Check for UCHAR_MAX, not 255.
8617 Allow \x with an arbitrary positive number of digits, as in C.
8618 Check for overflow here.
8619 Allow \? and UCNs, for compatibility with C.
8620
8621 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8622 with quote slot used by complain_at.
8623
8624 * tests/input.at: Add tests for backslash-newline, m4 quotes
8625 in symbols, long literals, and funny escapes in strings.
8626
8627 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8628 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8629 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8630 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8631 * m4/mbswidth.m4: New file, from GNU coreutils.
8632
8633 * doc/bison.texinfo (Grammar Outline): Document // comments.
8634 (Symbols): Document that trigraphs have no special meaning in Bison,
8635 nor is backslash-newline allowed.
8636 (Actions): Document that trigraphs have no special meaning.
8637
8638 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8639 no longer used.
8640
8641 2002-11-02 Paul Eggert <eggert@twinsun.com>
8642
8643 * src/reader.c: Don't include quote.h; not needed.
8644 (get_merge_function): Reword warning to be consistent with
8645 type clash diagnostic in grammar_current_rule_check.
8646
8647 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8648 bug in trigraph handling.
8649
8650 * src/output.c (prepare_symbols): When printing token names,
8651 escape "[" as "@<:@" and likewise for "]".
8652
8653 * src/system.h (errno): Remove declaration, as we are now
8654 assuming C89 or better, and C89 guarantees errno.
8655
8656 2002-10-30 Paul Eggert <eggert@twinsun.com>
8657
8658 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8659 Check for close failures.
8660 * src/files.h (xfclose): Return void, not int, since it always
8661 returned zero.
8662 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8663 indicates one.
8664 * src/output.c (output_skeleton): Use xfclose rather than fclose
8665 and ferror. xfclose now checks ferror.
8666
8667 * data/glr.c (YYLEFTMOST_STATE): Remove.
8668 (yyreportTree): Use a stack-based leftmost state. This avoids
8669 our continuing battles with bogus warnings about initializers.
8670
8671 2002-10-30 Akim Demaille <akim@epita.fr>
8672
8673 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8674 #if.
8675
8676 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8677
8678 * tests/glr-regr1.at: New test for reported regressions.
8679 * tests/testsuite.at: Add glr-regr1.at test.
8680 * tests/Makefile.am: Add glr-regr1.at test.
8681
8682 2002-10-24 Paul Eggert <eggert@twinsun.com>
8683
8684 Version 1.75a.
8685
8686 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8687 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8688 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8689 Don't assume strdup exists; POSIX says its an XSI extension.
8690 Check for buffer overflow on input.
8691
8692 2002-10-24 Akim Demaille <akim@epita.fr>
8693
8694 * src/output.c (output_skeleton): Don't disable M4sugar comments
8695 too soon: it results in comments being expanded.
8696 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8697 first output.
8698
8699 2002-10-24 Akim Demaille <akim@epita.fr>
8700
8701 * data/yacc.c (m4_int_type): New.
8702 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8703 char' as only yacc.c wants K&R portability.
8704 * data/glr.c (yysigned_char): Remove.
8705 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8706 Reported by Quoc Peyrot.
8707
8708 2002-10-23 Paul Eggert <eggert@twinsun.com>
8709
8710 * src/main.c (main): With --trace=time, report times even if a
8711 non-fatal error occurs. Formerly, the times were reported in some
8712 such cases but not in others.
8713 * src/reader.c (reader): Just return if a complaint has been issued,
8714 instead of exiting, so that 'main' can report times.
8715
8716 2002-10-22 Akim Demaille <akim@epita.fr>
8717
8718 * src/system.h: Include sys/types.
8719 Reported by Bert Deknuydt.
8720
8721 2002-10-23 Paul Eggert <eggert@twinsun.com>
8722
8723 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8724 Suggested by Art Haas.
8725
8726 2002-10-22 Paul Eggert <eggert@twinsun.com>
8727
8728 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8729 decl; not needed any more.
8730 * src/main.c (main): Use return to exit, undoing yesterday's change.
8731 The last OS that we could find where this wouldn't work is
8732 SunOS 3.5, and that's too old to worry about now.
8733
8734 * data/glr.c (struct yyltype): Define members even when not
8735 doing locations. This is more consistent with yacc.c, and it
8736 works around the following bug reports:
8737 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8738 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8739
8740 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8741 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8742 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8743
8744 2002-10-22 Akim Demaille <akim@epita.fr>
8745
8746 * data/README: New.
8747
8748 2002-10-21 Paul Eggert <eggert@twinsun.com>
8749
8750 Be consistent about 'bool'; the old code used an enum in one
8751 module and an int in another, and this violates the C standard.
8752 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8753 * configure.ac (AC_HEADER_STDBOOL): Add.
8754 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8755 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8756 * src/symtab.c (hash_compare_symbol_t): Likewise.
8757 * src/system.h (bool, false, true): Use a definition consistent
8758 with ../lib/hash.c. All uses changed.
8759
8760 * src/complain.c (warning_issued): Renamed from warn_message_count,
8761 so that we needn't worry about integer overflow (!).
8762 Now of type bool. All uses changed.
8763 (complaint_issued): Renamed from complain_message_count; likewise.
8764
8765 * src/main.c (main): Use exit to exit with failure.
8766
8767 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8768 rather than 1 and 0.
8769 * src/main.c (main): Likewise.
8770 * src/getargs.c (getargs): Likewise.
8771 * src/reader.c (reader): Likewise.
8772
8773 * src/getarg.c (getargs): Remove duplicate code for
8774 "Try `bison --help'".
8775
8776 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8777 What was that "2" for?
8778
8779 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8780 * src/getargs.c (usage): Likewise.
8781
8782 * src/getargs.c (getargs): When there are too few operands, report
8783 the last one. When there are too many, report the first extra
8784 one. This is how diffutils does it.
8785
8786 2002-10-20 Paul Eggert <eggert@twinsun.com>
8787
8788 Remove K&R vestiges.
8789 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8790 * src/complain.c (VA_START): Remove. Assume prototypes.
8791 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8792 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8793 fatal): Assume prototypes.
8794 * src/complain.h: Assume prototypes.
8795 * src/system.h (PARAMS): Remove.
8796 Include <limits.h> unconditionally, since it's guaranteeed even
8797 for a freestanding C89 compiler.
8798 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8799 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8800
8801 2002-10-20 Akim Demaille <akim@epita.fr>
8802
8803 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8804 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8805 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8806 (yyresolveStates, yyresolveAction, yyresolveStack)
8807 (yyprocessOneStack): Use them.
8808 (yy_reduce_print): New.
8809 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8810
8811 2002-10-20 Akim Demaille <akim@epita.fr>
8812
8813 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8814 arguments and output `void'.
8815 (b4_c_function): Rename as...
8816 (b4_c_function_def): this.
8817 (b4_c_function_decl, b4_c_ansi_function_def)
8818 (b4_c_ansi_function_decl): New.
8819 Change the interpretation of the arguments: before `int, foo', now
8820 `int foo, foo'.
8821 * data/yacc.c (yyparse): Prototype and define thanks to these.
8822 Adjust b4_c_function_def uses.
8823 * data/glr.c (yyparse): Likewise, but ANSI only.
8824
8825 2002-10-20 Akim Demaille <akim@epita.fr>
8826
8827 * src/output.c (prepare): Move the definition of `tokens_number',
8828 `nterms_number', `undef_token_number', `user_token_number_max'
8829 to...
8830 (prepare_tokens): Here.
8831 (prepare_tokens): Rename as...
8832 (prepare_symbols): this.
8833 (prepare): Move the definition of `rules_number' to...
8834 (prepare_rules): here.
8835 (prepare): Move the definition of `last', `final_state_number',
8836 `states_number' to...
8837 (prepare_states): here.
8838 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8839
8840 2002-10-20 Akim Demaille <akim@epita.fr>
8841
8842 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8843
8844 2002-10-20 Akim Demaille <akim@epita.fr>
8845
8846 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8847 * data/c.m4: here.
8848
8849 2002-10-20 Akim Demaille <akim@epita.fr>
8850
8851 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8852 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8853 `pair'.
8854 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8855 `name' to...
8856 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8857 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8858 These.
8859
8860 2002-10-19 Paul Eggert <eggert@twinsun.com>
8861
8862 Do not create a temporary file, as that involves security and
8863 cleanup headaches. Instead, use a pair of pipes.
8864 Derived from a suggestion by Florian Krohm.
8865 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8866 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8867 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8868 (BISON_PREREQ_SUBPIPE): Add.
8869 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8870 Add subpipe.h, subpipe.c.
8871 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8872 * po/POTFILES.in: Add lib/subpipe.c.
8873 * src/output.c: Include "subpipe.h".
8874 (m4_invoke): Remove decl.
8875 (scan_skel): New decl.
8876 (output_skeleton): Use pipe rather than temporary file for m4 input.
8877 Check that m4sugar.m4 is readable, to avoid deadlock.
8878 Check for pipe I/O error.
8879 * src/scan-skel.l (readpipe): Remove decl.
8880 (scan_skel): New function, to be used in place of m4_invoke.
8881 Read from stream rather than file.
8882
8883 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8884 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8885 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8886 this generates a more-accurate value anyway.
8887
8888 * lib/timevar.c (timervar_accumulate): Rename locals to
8889 avoid confusion with similarly-named more-global.
8890 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8891
8892 * src/output.c (prepare): Use xstrdup to convert char const *
8893 to char *, to avoid GCC warning.
8894
8895 2002-10-19 Akim Demaille <akim@epita.fr>
8896
8897 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8898 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8899 Use them to have `calc.y' ready for %pure-parser.
8900 * data/yacc.c (YYLEX): Pass a yylex return type to
8901 b4_c_function_call.
8902
8903 2002-10-19 Akim Demaille <akim@epita.fr>
8904
8905 Prototype support of %lex-param and %parse-param.
8906
8907 * src/parse-gram.y: Add the definition of the %lex-param and
8908 %parse-param tokens, plus their rules.
8909 Drop the `_' version of %glr-parser.
8910 Add the "," token.
8911 * src/scan-gram.l (INITIAL): Scan them.
8912 * src/muscle_tab.c: Comment changes.
8913 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8914 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8915 (muscle_entry_s): The `value' member is no longer const.
8916 Adjust all dependencies.
8917 * src/muscle_tab.c (muscle_init): Adjust: use
8918 MUSCLE_INSERT_STRING.
8919 Initialize the obstack earlier.
8920 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8921 (muscle_pair_list_grow): New.
8922 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8923 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8924 * tests/calc.at: Use %locations, not --locations.
8925 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8926
8927 2002-10-19 Akim Demaille <akim@epita.fr>
8928
8929 * src/getargs.c (usage): Take status as argument and exit
8930 accordingly.
8931 Report the traditional `Try ... --help' message when status != 0.
8932 (usage, version): Don't take a FILE * as arg, it is pointless.
8933 (getargs): When there is an incorrect number of arguments, make it
8934 an error, and report it GNUlically thanks to `usage ()'.
8935
8936 2002-10-18 Paul Eggert <eggert@twinsun.com>
8937
8938 * data/glr.c (yyreportParseError): Don't assume that sprintf
8939 yields the length of the printed string, as this is not true
8940 on SunOS 4.1.4. Reported by Peter Klein.
8941
8942 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8943 * tests/conflicts.at (%nonassoc and eof): Likewise.
8944 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8945
8946 2002-10-17 Akim Demaille <akim@epita.fr>
8947
8948 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8949 * src/getargs.c (trace_types, trace_args): Adjust.
8950 * src/reader.c (grammar_current_rule_prec_set)
8951 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8952 Standardize error messages.
8953 And s/@prec/%prec/!
8954 (reader): Use trace_flag to enable scanner/parser debugging,
8955 instead of an adhoc scheme.
8956 * src/scan-gram.l: Remove trailing debugging code.
8957
8958 2002-10-16 Paul Eggert <eggert@twinsun.com>
8959
8960 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8961 MUSCLE_TAB_H.
8962
8963 * NEWS: Officially drop support for building Bison with K&R C,
8964 since it didn't work anyway and it's not worth worrying about.
8965 * Makefile.maint (wget_files): Remove ansi2knr.c.
8966 (ansi2knr.c-url_prefix): Remove.
8967 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8968 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8969 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8970
8971 2002-10-15 Paul Eggert <eggert@twinsun.com>
8972
8973 Stop using the "enum_" trick for K&R-style function definitions;
8974 it confused me, and I was the author! Instead, assume that people
8975 who want to use K&R C compilers (when using these modules in GCC,
8976 perhaps?) will run ansi2knr.
8977
8978 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8979 All uses of "enum_" changed to "enum ".
8980 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8981 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8982
8983 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8984 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8985 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8986 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8987 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8988 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8989 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8990 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8991 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8992 Use function prototypes; this removes the need for declaring
8993 static functions simply to provide their prototypes.
8994 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8995 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8996 bitset_count_, bitset_create, bitset_dump, bitset_first,
8997 bitset_free, bitset_init, bitset_last, bitset_next,
8998 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8999 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9000 bitset_print, bitset_release_memory, bitset_toggle_,
9001 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9002 debug_bitset): Likewise.
9003 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9004 * lib/bitset_stats.c (bitset_log_histogram_print,
9005 bitset_percent_histogram_print, bitset_stats_and,
9006 bitset_stats_and_cmp, bitset_stats_and_or,
9007 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9008 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9009 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9010 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9011 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9012 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9013 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9014 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9015 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9016 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9017 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9018 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9019 bitset_stats_zero): Likewise.
9020 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9021 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9022 bitsetv_dump, debug_bitsetv): Likewise.
9023 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9024 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9025 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9026 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9027 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9028 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9029 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9030 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9031 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9032 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9033 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9034 Likewise.
9035 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9036 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9037 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9038 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9039 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9040 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9041 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9042 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9043 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9044 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9045 lbitset_xor_cmp, lbitset_zero): Likewise.
9046
9047 2002-10-14 Akim Demaille <akim@epita.fr>
9048
9049 Version 1.75.
9050
9051 2002-10-14 Akim Demaille <akim@epita.fr>
9052
9053 * tests/Makefile.am (maintainer-check-posix): New.
9054
9055 2002-10-14 Akim Demaille <akim@epita.fr>
9056
9057 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9058 member.
9059
9060 2002-10-14 Akim Demaille <akim@epita.fr>
9061
9062 * src/tables.c (table_ninf_remap): base -> tab.
9063 Reported by Matt Rosing.
9064
9065 2002-10-14 Paul Eggert <eggert@twinsun.com>
9066
9067 * tests/action.at, tests/calc.at, tests/conflicts.at,
9068 tests/cxx-type.at, tests/headers.at, tests/input.at,
9069 tests/regression.at, tests/synclines.at, tests/torture.at:
9070 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9071 so that the tests still work even if POSIXLY_CORRECT is set.
9072 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9073
9074 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9075 for portability to K&R hosts. Fix typo: signed char is guaranteed
9076 only to 127, not to 128.
9077 * data/glr.c (yysigned_char): New type.
9078 * data/yacc.c (yysigned_char): Likewise.
9079 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9080
9081 2002-10-13 Paul Eggert <eggert@twinsun.com>
9082
9083 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9084 true due to limited range of data type" warning from GCC.
9085
9086 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9087 by wrapping enum yytokentype's definition inside #ifndef
9088 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9089
9090 2002-10-13 Akim Demaille <akim@epita.fr>
9091
9092 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9093 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9094
9095 2002-10-13 Akim Demaille <akim@epita.fr>
9096
9097 * Makefile.maint: Update from Autoconf 2.54.
9098 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9099
9100 2002-10-13 Akim Demaille <akim@epita.fr>
9101
9102 * src/print.c (print_state): Separate the list of solved conflicts
9103 from the other items.
9104 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9105
9106 2002-10-13 Akim Demaille <akim@epita.fr>
9107
9108 Let nondeterministic skeletons be usable with deterministic
9109 tables.
9110
9111 With the patch, GAWK compiled by GCC without -O2 passes its test
9112 suite using a GLR parser driven by LALR tables. It fails with -O2
9113 because `struct stat' gives two different answers on my machine:
9114 88 (definition of an auto var) and later 96 (memset on this var).
9115 Hence the stack is badly corrumpted. The headers inclusion is to
9116 blame: if I move the awk.h inclusion before GLR's system header
9117 inclusion, the two struct stat have the same size.
9118
9119 * src/tables.c (pack_table): Always create conflict_table.
9120 (token_actions): Always create conflict_list.
9121 * data/glr.c (YYFLAG): Remove, unused.
9122
9123 2002-10-13 Akim Demaille <akim@epita.fr>
9124
9125 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9126 (O0FLAGS): New.
9127 (VALGRIND, GXX): New.
9128 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9129 * tests/bison.in: Run $PREBISON a pre-command.
9130 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9131 (maintainer-check-g++): New.
9132 * Makefile.am (maintainer-check): New.
9133
9134 2002-10-13 Akim Demaille <akim@epita.fr>
9135
9136 * data/glr.c: Formatting changes.
9137 Tweak some trace messages to match yacc.c's.
9138
9139 2002-10-13 Akim Demaille <akim@epita.fr>
9140
9141 GLR parsers sometimes raise parse errors instead of performing the
9142 default reduction.
9143 Reported by Charles-Henry de Boysson.
9144
9145 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9146 check the length of the traces when %glr.
9147 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9148 GLR's traces.
9149 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9150 Test GLR parsers.
9151 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9152 (yyltype): Remove the yy prefix from the member names.
9153 (yytable): Complete its comment.
9154 (yygetLRActions): Map error action number from YYTABLE from
9155 YYTABLE_NINF to 0.
9156 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9157 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9158 not satisfying as we could compare an YYACTION computed from
9159 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9160 only value for error actions.
9161 (yyreportParseError): In verbose parse error messages, don't issue
9162 `error' in the list of expected tokens.
9163 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9164 next action to perform to match glr.c's decoding.
9165 (yytable): Complete its comment.
9166
9167 2002-10-13 Paul Eggert <eggert@twinsun.com>
9168
9169 Fix problem reported by Henrik Grubbstroem in
9170 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9171 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9172 because the Bison parser reads the second action before reducing
9173 the first one.
9174 * src/scan-gram.l (rule_length): New static var.
9175 Use it to keep track of the rule length in the scanner, since
9176 we can't expect the parser to be in lock-step sync with the scanner.
9177 (handle_action_dollar, handle_action_at): Use this var.
9178 * tests/actions.at (Exotic Dollars): Test for the problem.
9179
9180 2002-10-12 Paul Eggert <eggert@twinsun.com>
9181
9182 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9183 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9184 Include <sys/time.h> when checking for clock_t and struct tms.
9185 Use same include order as source.
9186 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9187 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9188
9189 * lib/timevar.c: Update copyright date and clarify comments.
9190 (get_time) [IN_GCC]: Keep the GCC version for reference.
9191
9192 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9193 GCC version as of today, then merge Bison's changes.
9194 Change "GCC" to "Bison" in copyright notice. timevar.def's
9195 author is Akim, so change that too.
9196
9197 * src/reader.c (grammar_current_rule_check):
9198 Don't worry about the default action if $$ is untyped.
9199 Prevents bogus warnings reported by Jim Gifford in
9200 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9201
9202 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9203 * data/glr.c, data/lalr1.cc, data/yacc.c:
9204 Output token definitions before the first part of user declarations.
9205 Fixes compatibility problem reported by Jim Gifford for kbd in
9206 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9207
9208 2002-10-11 Paul Eggert <eggert@twinsun.com>
9209
9210 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9211 (yyparse): here. This undoes some of the 2002-07-25 change.
9212 Compatibility problem reported by Ralf S. Engelschall with
9213 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9214
9215 2002-10-11 Akim Demaille <akim@epita.fr>
9216
9217 * tests/regression.at Characters Escapes): New.
9218 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9219 characters.
9220 Reported by Jan Nieuwenhuizen.
9221
9222 2002-10-11 Akim Demaille <akim@epita.fr>
9223
9224 * po/id.po: New.
9225
9226 2002-10-10 Paul Eggert <eggert@twinsun.com>
9227
9228 Portability fixes for bitsets; this also avoids several GCC
9229 warnings.
9230
9231 * lib/abitset.c: Include <stddef.h>, for offsetof.
9232 * lib/lbitset.c: Likewise.
9233
9234 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9235 properly for vectors of objects. Do not assume that adding a
9236 header size to a multiple of a word size yields a value that is
9237 properly aligned for the whole union.
9238 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9239
9240 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9241 unique names for structures.
9242 * lib/ebitset.c (ebitset_bytes): Likewise.
9243 * lib/lbitset.c (lbitset_bytes): Likewise.
9244
9245 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9246 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9247 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9248 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9249 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9250 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9251 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9252 to improve the type-checking that GCC can do.
9253 * lib/bitset.c (bitset_op4_cmp): Likewise.
9254 * lib/bitset_stats.c (bitset_stats_count,
9255 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9256 bitset_stats_copy, bitset_stats_disjoint_p,
9257 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9258 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9259 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9260 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9261 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9262 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9263 bitset_stats_or_and_cmp): Likewise.
9264 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9265 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9266 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9267 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9268
9269 * lib/abitset.h: Include bitset.h, not bbitset.h.
9270 * lib/ebitset.h: Likewise.
9271 * lib/lbitset.h: Likewise.
9272
9273 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9274 All instances of parameters of type enum bitset_opts are now of
9275 type enum_bitset_opts, to conform to the C Standard, and similarly
9276 for enum_bitset_type.
9277 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9278 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9279
9280 Do not use "struct bitset_struct" to mean different things in
9281 different modules. Not only is this confusing, it violates
9282 the C Standard, which requires that structure types in different
9283 modules must be compatible if one is to be passed to the other.
9284 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9285 All instances of "struct bitset_struct *" replaced with "bitset".
9286 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9287 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9288 struct lbitset_struct, struct bitset_stats_struct): New types.
9289 All uses of struct bitset_struct changed to union bitset_union,
9290 etc.
9291 * lib/abitset.c (struct abitset_struct, abitset,
9292 struct bitset_struct): Remove.
9293 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9294 struct bitset_struct): Remove.
9295 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9296 bitset_struct): Remove.
9297 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9298 Likewise.
9299
9300 Do not call a function of type T using a call that assumes the
9301 function is of a different type U. Standard C requires that a
9302 function must be called with a type that is compatible with its
9303 definition.
9304 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9305 New decls.
9306 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9307 New functions.
9308 * lib/ebitset.c (PFV): Remove.
9309 * lib/lbitset.c (PFV): Likewise.
9310 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9311 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9312 decls.
9313 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9314 (ebitset_vtable): Use them.
9315 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9316 lbitset_xor): New functions.
9317 (lbitset_vtable): Use them.
9318
9319 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9320 Declare.
9321
9322 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9323 GCC warning.
9324 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9325 Use offsetof, for simplicity.
9326
9327 2002-10-06 Paul Eggert <eggert@twinsun.com>
9328
9329 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9330 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9331 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9332 which was inadvertently undone by the 2002-09-30 patch.
9333 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9334 the same width as int.
9335
9336 2002-10-04 Paul Eggert <eggert@twinsun.com>
9337
9338 Version 1.50.
9339
9340 * configure.ac (AC_INIT), NEWS: Increment version number.
9341
9342 * doc/bison.texinfo: Minor spelling, grammar, and white space
9343 fixes.
9344 (Symbols): Mention that any negative value returned from yylex
9345 signifies end-of-input. Warn about negative chars. Mention
9346 the portable Standard C character set.
9347
9348 The GNU coding standard says CFLAGS and YFLAGS are reserved
9349 for the installer to set.
9350 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9351 * src/Makefile.am (AM_CFLAGS): Likewise.
9352 (AM_YFLAGS): Renamed from YFLAGS.
9353
9354 Fix some MAX and MIN problems.
9355 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9356 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9357 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9358 * src/reader.c (reader): Use it.
9359
9360 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9361 POSIX 1003.1-2001 has removed fgrep.
9362
9363 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9364
9365 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9366 interpreted as signed.
9367 * lib/ebitset.c (ebitset_list): Fix bug.
9368
9369 2002-10-01 Paul Eggert <eggert@twinsun.com>
9370
9371 More fixes for 64-bit hosts and large bitsets.
9372
9373 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9374 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9375 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9376 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9377 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9378 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9379 bitset_count_): Likewise.
9380 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9381 bitset_first, bitset_last): Likewise.
9382 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9383 bitset_stats_list_reverse, bitset_stats_size,
9384 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9385 Likewise.
9386 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9387 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9388 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9389 bitsetv_reflexive_transitive_closure): Likewise.
9390 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9391 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9392 Likewise.
9393 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9394 Likewise.
9395
9396 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9397 Use size_t, not unsigned int, to count bytes.
9398 * lib/abitset.h (abitset_bytes): Likewise.
9399 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9400 Likewise.
9401 * lib/bitset.h (bitset_bytes): Likewise.
9402 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9403 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9404 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9405 * lib/ebitset.c (ebitset_bytes): Likewise.
9406 * lib/ebitset.h (ebitset_bytes): Likewise.
9407 * lib/lbitset.c (lbitset_bytes): Likewise.
9408 * lib/lbitset.h (lbitset_bytes): Likewise.
9409
9410 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9411 abitset_subset_p, abitset_disjoint_p, abitset_and,
9412 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9413 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9414 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9415 abitset_or_and, abitset_or_and_cmp):
9416 Use bitset_windex instead of unsigned int.
9417 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9418 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9419 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9420 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9421 Likewise.
9422 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9423
9424 * lib/bitset.c (bitset_print):
9425 Use proper printf formats for widths of integer types.
9426 * lib/bitset_stats.c (bitset_percent_histogram_print,
9427 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9428 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9429 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9430 * lib/lbitset.c (lbitset_bytes): Likewise.
9431
9432 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9433 BITSET_SIZE_MAX): New macros.
9434 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9435 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9436 to BITSET_WINDEX_MAX.
9437
9438 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9439 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9440 since we now return the bitset_bindex type (not int).
9441
9442 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9443 when computing sizes.
9444 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9445
9446 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9447 and avoid cast to unsigned.
9448
9449 2002-09-30 Akim Demaille <akim@epita.fr>
9450
9451 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9452 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9453 Updates from Michael Hayes.
9454
9455 2002-09-30 Art Haas <ahaas@neosoft.com>
9456
9457 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9458 invocations.
9459 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9460 defined.
9461
9462 2002-09-27 Akim Demaille <akim@epita.fr>
9463
9464 Version 1.49c.
9465
9466 2002-09-27 Akim Demaille <akim@epita.fr>
9467
9468 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9469 (Because of AC_LIBSOURCE).
9470
9471 2002-09-27 Akim Demaille <akim@epita.fr>
9472
9473 Playing with Autoscan.
9474
9475 * configure.ac: Remove the old LIBOBJ tweaks.
9476 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9477 * lib/strrchr.c: New.
9478 * lib/strtol.c: New, from the Coreutils 4.5.1.
9479
9480 2002-09-27 Akim Demaille <akim@epita.fr>
9481
9482 Playing with Autoscan.
9483
9484 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9485 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9486 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9487 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9488 Coreutils 4.5.1.
9489
9490 2002-09-24 Akim Demaille <akim@epita.fr>
9491
9492 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9493 (Frequently Asked Questions, Parser Stack Overflow): New.
9494
9495 2002-09-13 Akim Demaille <akim@epita.fr>
9496
9497 Playing with autoscan.
9498
9499 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9500 * src/files.c (skeleton_find): Remove, unused.
9501 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9502 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9503
9504 2002-09-13 Akim Demaille <akim@epita.fr>
9505
9506 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9507 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9508
9509 2002-09-13 Akim Demaille <akim@epita.fr>
9510
9511 * configure.ac: Require 2.54.
9512 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9513 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9514 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9515 Remove, provided by Autoconf macros.
9516
9517 2002-09-12 Akim Demaille <akim@epita.fr>
9518
9519 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9520
9521 2002-09-12 Akim Demaille <akim@epita.fr>
9522
9523 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9524 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9525 Reported by Martin Mokrejs.
9526
9527 2002-09-10 Akim Demaille <akim@epita.fr>
9528
9529 * src/parse-gram.y: Associate a human readable string to each
9530 token type.
9531 * tests/regression.at (Invalid inputs): Adjust.
9532
9533 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9534
9535 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9536 with an Autoconf-2.5x style configure.ac.
9537
9538 2002-09-06 Paul Eggert <eggert@twinsun.com>
9539
9540 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9541 exception applies only to yacc.c. This is a modification of a
9542 patch originally suggested by Akim Demaille.
9543
9544 2002-09-06 Akim Demaille <akim@epita.fr>
9545
9546 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9547 here to...
9548 * data/yacc.c: here.
9549
9550 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9551 LocationType.
9552 (b4_ltype): Default to yy::Location from location.hh.
9553
9554 2002-09-04 Jim Meyering <jim@meyering.net>
9555
9556 * data/yacc.c: Guard the declaration of yytoknum also with
9557 `#ifdef YYPRINT', so it is declared only when used.
9558
9559 2002-09-04 Akim Demaille <akim@epita.fr>
9560
9561 * configure.in: Rename as...
9562 * configure.ac: this.
9563 Bump to 1.49c.
9564
9565 2002-09-04 Akim Demaille <akim@epita.fr>
9566
9567 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9568 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9569 translate maintainer only messages.
9570
9571 2002-08-12 Paul Eggert <eggert@twinsun.com>
9572
9573 Version 1.49b.
9574
9575 * Makefile.am (SUBDIRS): Remove intl.
9576 (DISTCLEANFILES): Remove.
9577 * NEWS: Mention that GNU M4 is now required. Clarify what is
9578 meant by "larger grammars". Mention the pt_BR translation.
9579 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9580 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9581 Bump version from 0.11.2 to 0.11.5.
9582 (BISON_PREREQ_STAGE): Remove.
9583 (AM_GNU_GETTEXT): Use external gettext.
9584 (AC_OUTPUT): Remove intl/Makefile.
9585
9586 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9587
9588 * data/glr.c: Include string.h, for strlen.
9589 (yyreportParseError): Use size_t for yysize.
9590 (yy_yypstack): No longer nested inside yypstates, as nested
9591 functions are not portable. Do not assume size_t is the
9592 same width as int.
9593 (yypstates): Do not assume that ptrdiff_t is the same width
9594 as int, and similarly for yyposn and YYINDEX.
9595
9596 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9597
9598 * lib/Makefile.am (INCLUDES): Do not include from the intl
9599 directory, which has been removed.
9600 * src/Makefile.am (INCLUDES): Likewise.
9601
9602 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9603 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9604 New vars.
9605
9606 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9607 * tests/Makefile.am (EXTRA_DIST): Likewise.
9608
9609 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9610 Do not assume that bitset_windex is the same width as unsigned.
9611
9612 * lib/abitset.c (abitset_unused_clear): Do not assume that
9613 bitset_word is the same width as int.
9614 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9615 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9616 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9617 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9618 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9619
9620 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9621 portability to one's complement hosts!).
9622 * lib/ebitset.c (ebitset_op1): Likewise.
9623 * lib/lbitset.c (lbitset_op1): Likewise.
9624
9625 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9626 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9627 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9628 Sync with fileutils.
9629 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9630 lib/gettext.h: Sync with diffutils.
9631
9632 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9633 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9634
9635 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9636 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9637 check for void *.
9638
9639 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9640 size_t; the old version tried to do this but casted improperly.
9641 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9642 (bitset_test): Now returns int, not unsigned long.
9643
9644 * lib/bitset_stats.c: Include "gettext.h".
9645 (_): New macro.
9646 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9647 name locals "index", as it generates unnecessary warnings on some
9648 hosts that have an "index" function.
9649
9650 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9651 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9652 they need translation.
9653 * src/LR0.c (state_list_append, new_itemsets, get_state,
9654 append_states, generate_states): Likewise.
9655 * src/assoc.c (assoc_to_string): Likewise.
9656 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9657 * src/gram.c (grammar_dump): Likewise.
9658 * src/injections.c (injections_compute): Likewise.
9659 * src/lalr.c (lookaheads_print): Likewise.
9660 * src/relation.c (relation_transpose): Likewise.
9661 * src/scan-gram.l: Likewise.
9662 * src/tables.c (table_grow, pack_vector): Likewise.
9663
9664 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9665 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9666 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9667 * m4/mbstate_t.m4: Sync with fileutils.
9668 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9669
9670 * po/LINGUAS: Add pt_BR.
9671 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9672 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9673 lib/timevar.c.
9674 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9675 manual recommends.
9676 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9677
9678 * src/complain.c (strerror_r): Remove decl; not needed.
9679 (strerror): Use same pattern as ../lib/error.c.
9680
9681 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9682
9683 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9684
9685 * src/main.c (main): Cast result of bindtextdomain and textdomain
9686 to void, to avoid a GCC warning when --disable-nls is in effect.
9687
9688 * src/scan-gram.l: Use strings rather than escapes when possible,
9689 to minimize the number of warnings from xgettext.
9690 (handle_action_dollar, handle_action_at): Don't use isdigit,
9691 as it mishandles negative chars and it may not work as expected
9692 outside the C locale.
9693
9694 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9695 this is a GCC extension and is not portable to other compilers.
9696
9697 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9698 Do not include <ctype.h>; no longer needed.
9699 Do not include <malloc.h>; no longer needed (and generates
9700 warnings on OpenBSD 3.0).
9701
9702 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9703 it's not portable.
9704
9705 * tests/regression.at: Do not use 'cc -c input.c -o input';
9706 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9707
9708 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9709 exit status as failure, not just exit status 1. Sun C exits
9710 with status 2 sometimes.
9711
9712 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9713 Use it for the two large tests.
9714
9715 2002-08-02 Akim Demaille <akim@epita.fr>
9716
9717 * src/conflicts.c (conflicts_output): Don't output rules never
9718 reduced here, since anyway that computation doesn't work.
9719 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9720 (rule_useless_p, rule_never_reduced_p): New.
9721 (grammar_rules_partial_print): Use a filter instead of a range.
9722 Display the title only if needed.
9723 (grammar_rules_print): Adjust.
9724 (grammar_rules_never_reduced_report): New.
9725 * src/tables.c (action_row): Move the computation of rules never
9726 reduced to...
9727 (token_actions): here.
9728 * src/main.c (main): Make the parser before making the report, so
9729 that rules never reduced are computed.
9730 Call grammar_rules_never_reduced_report.
9731 * src/print.c (print_results): Report rules never reduced.
9732 * tests/conflicts.at, tests/reduce.at: Adjust.
9733
9734 2002-08-01 Akim Demaille <akim@epita.fr>
9735
9736 Instead of attaching lookaheads and duplicating the rules being
9737 reduced by a state, attach the lookaheads to the reductions.
9738
9739 * src/state.h (state_t): Remove the `lookaheads',
9740 `lookaheads_rule' member.
9741 (reductions_t): Add a `lookaheads' member.
9742 Use a regular array for the `rules'.
9743 * src/state.c (reductions_new): Initialize the lookaheads member
9744 to 0.
9745 (state_rule_lookaheads_print): Adjust.
9746 * src/state.h, src/state.c (state_reductions_find): New.
9747 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9748 (count_rr_conflicts): Adjust.
9749 * src/lalr.c (LArule): Remove.
9750 (add_lookback_edge): Adjust.
9751 (state_lookaheads_count): New.
9752 (states_lookaheads_initialize): Merge into...
9753 (initialize_LA): this.
9754 (lalr_free): Adjust.
9755 * src/main.c (main): Don't free nullable and derives too early: it
9756 is used by --verbose.
9757 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9758
9759 2002-08-01 Akim Demaille <akim@epita.fr>
9760
9761 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9762 `rule_number_t**'.
9763 (set_derives, free_derives): Rename as...
9764 (derives_compute, derives_free): this.
9765 Adjust all dependencies.
9766 * src/nullable.c (set_nullable, free_nullable): Rename as...
9767 (nullable_compute, nullable_free): these.
9768 (rule_list_t): Store rule_t *, not rule_number_t.
9769 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9770 pointers, instead of their numbers.
9771 * src/main.c (main): Call nullable_free, and derives_free earlier,
9772 as they were lo longer used.
9773
9774 2002-08-01 Akim Demaille <akim@epita.fr>
9775
9776 * lib/timevar.c (get_time): Include children time.
9777 * src/lalr.h (LA, LArule): Don't export them: used with the
9778 state_t.
9779 * src/lalr.c (LA, LArule): Static.
9780 * src/lalr.h, src/lalr.c (lalr_free): New.
9781 * src/main.c (main): Call it.
9782 * src/tables.c (pack_vector): Check whether loc is >= to the
9783 table_size, not >.
9784 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9785 (tables_generate): do it, since that's also it which allocates
9786 them.
9787 Don't free LA and LArule, main does.
9788
9789 2002-07-31 Akim Demaille <akim@epita.fr>
9790
9791 Separate parser tables computation and output.
9792
9793 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9794 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9795 (yydefgoto, yydefact, high): Move to...
9796 * src/tables.h, src/tables.c: here.
9797 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9798 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9799 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9800 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9801 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9802 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9803 (action_row, save_row, token_actions, save_column, default_goto)
9804 (goto_actions, sort_actions, matching_state, pack_vector)
9805 (table_ninf_remap, pack_table, prepare_actions): Move to...
9806 * src/tables.c: here.
9807 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9808 * src/output.c (token_actions, output_base, output_conflicts)
9809 (output_check): Merge into...
9810 (prepare_actions): this.
9811 (actions_output): Rename as...
9812 (user_actions_output): this.
9813 * src/main.c (main): Call tables_generate and tables_free.
9814
9815 2002-07-31 Akim Demaille <akim@epita.fr>
9816
9817 Steal GCC's --time-report support.
9818
9819 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9820 stolen/adjusted from GCC.
9821 * m4/stage.m4: Remove time related checks.
9822 * m4/timevar.m4: New.
9823 * configure.in: Adjust.
9824 * src/system.h: Adjust to using timevar.h.
9825 * src/getargs.h, src/getargs.c: Support trace_time for
9826 --trace=time.
9827 * src/main.c (stage): Remove.
9828 (main): Replace `stage' invocations with timevar calls.
9829 * src/output.c: Insert pertinent timevar calls.
9830
9831 2002-07-31 Akim Demaille <akim@epita.fr>
9832
9833 Let --trace have arguments.
9834
9835 * src/getargs.h (enum trace_e): New.
9836 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9837 (long_options, short_options): --trace/-T takes an optional
9838 argument.
9839 Change all the uses of trace_flag to reflect the new flags.
9840 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9841
9842 Strengthen `stage' portability.
9843
9844 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9845 * configure.in: Use it.
9846 Don't check for malloc.h and sys/times.h.
9847 * src/system.h: Include them when appropriate.
9848 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9849 times and struct tms are available.
9850
9851 2002-07-30 Akim Demaille <akim@epita.fr>
9852
9853 In verbose parse error message, don't report `error' as an
9854 expected token.
9855 * tests/actions.at (Printers and Destructors): Adjust.
9856 * tests/calc.at (Calculator $1): Adjust.
9857 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9858 error message, do not report the parser accepts the error token in
9859 that state.
9860
9861 2002-07-30 Akim Demaille <akim@epita.fr>
9862
9863 Normalize conflict related messages.
9864
9865 * src/complain.h, src/complain.c (warn, complain): New.
9866 * src/conflicts.c (conflicts_print): Use them.
9867 (conflict_report_yacc): New, extracted from...
9868 (conflicts_print): here.
9869 * tests/conflicts.at, tests/existing.at: Adjust.
9870
9871 2002-07-30 Akim Demaille <akim@epita.fr>
9872
9873 Report rules which are never reduced by the parser: those hidden
9874 by conflicts.
9875
9876 * src/LR0.c (save_reductions): Don't make the final state too
9877 different: save its reduction (accept) instead of having a state
9878 without any action (no shift or goto, no reduce).
9879 Note: the final state is now a ``regular'' state, i.e., the
9880 parsers now contain `reduce 0' as default reduction.
9881 Nevertheless, since they decide to `accept' when yystate =
9882 final_state, they still will not reduce rule 0.
9883 * src/print.c (print_actions, print_reduction): Adjust.
9884 * src/output.c (action_row): Track reduced rules.
9885 (token_actions): Report rules never reduced.
9886 * tests/conflicts.at, tests/regression.at: Adjust.
9887
9888 2002-07-30 Akim Demaille <akim@epita.fr>
9889
9890 `stage' was accidently included in a previous patch.
9891 Initiate its autoconfiscation.
9892
9893 * configure.in: Look for malloc.h and sys/times.h.
9894 * src/main.c (stage): Adjust.
9895 Report only when trace_flag.
9896
9897 2002-07-29 Akim Demaille <akim@epita.fr>
9898
9899 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9900 state_number_t.
9901 (errs_t): symbol_t*, not symbol_number_t.
9902 (reductions_t): rule_t*, not rule_number_t.
9903 (FOR_EACH_SHIFT): New.
9904 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9905 * src/print.c, src/print_graph.c: Adjust.
9906
9907 2002-07-29 Akim Demaille <akim@epita.fr>
9908
9909 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9910
9911 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9912 (endtoken, accept): these.
9913 * src/reader.c (reader): Set endtoken's default tag to "$end".
9914 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9915 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9916 Adjust.
9917
9918 2002-07-29 Akim Demaille <akim@epita.fr>
9919
9920 * src/reduce.c (reduce_grammar): When the language is empty,
9921 complain about the start symbol, not the axiom.
9922 Use its location.
9923 * tests/reduce.at (Empty Language): New.
9924
9925 2002-07-26 Akim Demaille <akim@epita.fr>
9926
9927 * src/reader.h, src/reader.c (gram_error): ... can't get
9928 yycontrol without making too strong assumptions on the parser
9929 itself.
9930 * src/output.c (prepare_tokens): Use the real 0th value of
9931 token_translations instead of `0'.
9932 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9933 visible here.
9934 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9935 for the time being: %locations ought to provide it to yyerror.
9936
9937 2002-07-25 Akim Demaille <akim@epita.fr>
9938
9939 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9940 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9941 * tests/regression.at (Web2c Actions): Adjust.
9942
9943 2002-07-25 Akim Demaille <akim@epita.fr>
9944
9945 Stop storing rules from 1 to nrules + 1.
9946
9947 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9948 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9949 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9950 Iterate from 0 to nrules.
9951 Use rule_number_as_item_number and item_number_as_rule_number.
9952 Adjust to `derive' now containing possibly 0.
9953 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9954 Handle the `- 1' part in rule numbers from/to item numbers.
9955 * src/conflicts.c (log_resolution): Fix the message which reversed
9956 shift and reduce.
9957 * src/output.c (action_row): Initialize default_rule to -1.
9958 (token_actions): Adjust.
9959 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9960 expected output.
9961 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9962
9963 2002-07-25 Akim Demaille <akim@epita.fr>
9964
9965 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9966 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9967 (b4_c_knr_arg_decl): New.
9968 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9969 yyreport_parse_error.
9970
9971 2002-07-25 Akim Demaille <akim@epita.fr>
9972
9973 * data/yacc.c (yyreport_parse_error): New, extracted from...
9974 (yyparse): here.
9975 (yydestruct, yysymprint): Move above yyparse.
9976 Be K&R compliant.
9977
9978 2002-07-25 Akim Demaille <akim@epita.fr>
9979
9980 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9981 replace...
9982 (b4_sint_type, b4_uint_type): these.
9983 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9984 * tests/regression.at (Web2c Actions): Adjust.
9985
9986 2002-07-25 Akim Demaille <akim@epita.fr>
9987
9988 * src/gram.h (TIEM_NUMBER_MAX): New.
9989 (item_number_of_rule_number, rule_number_of_item_number): Rename
9990 as...
9991 (rule_number_as_item_number, item_number_as_rule_number): these.
9992 Adjust dependencies.
9993 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9994 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9995 (symbol_number_to_vector_number): New.
9996 (order): Of vector_number_t* type.
9997 (base_t, BASE_MAX, BASE_MIN): New.
9998 (froms, tos, width, pos, check): Of base_t type.
9999 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10000 (actrow): Of action_number_t type.
10001 (conflrow): Of unsigned int type.
10002 (table_ninf, base_ninf): New.
10003 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10004 (muscle_insert_int_table, muscle_insert_base_table)
10005 (muscle_insert_rule_number_table): New.
10006 (prepare_tokens): Output `toknum' as int_table.
10007 (action_row): Returns a rule_number_t.
10008 Use ACTION_MIN, not SHRT_MIN.
10009 (token_actions): yydefact is rule_number_t*.
10010 (table_ninf_remap): New.
10011 (pack_table): Use it for `base' and `table'.
10012 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10013 replaced with...
10014 (YYPACT_NINF, YYTABLE_NINF): these.
10015 (yypact, yytable): Compute their types instead of hard-coded
10016 `short'.
10017 * tests/regression.at (Web2c Actions): Adjust.
10018
10019 2002-07-19 Akim Demaille <akim@epita.fr>
10020
10021 * src/scan-gram.l (id): Can start with an underscore.
10022
10023 2002-07-16 Akim Demaille <akim@epita.fr>
10024
10025 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10026 Adjust all former `associativity' dependencies.
10027 * src/symtab.c (symbol_new): Default associativity is `undef', not
10028 `right'.
10029 (symbol_check_alias_consistence): Adjust.
10030
10031 2002-07-09 Akim Demaille <akim@epita.fr>
10032
10033 * doc/bison.texinfo: Properly set the ``header'' part.
10034 Use @dircategory ``GNU programming tools'' as per Texinfo's
10035 documentation.
10036 Use @copying.
10037
10038 2002-07-09 Akim Demaille <akim@epita.fr>
10039
10040 * lib/quotearg.h: Protect against multiple inclusions.
10041 * src/location.h (location_t): Add a `file' member.
10042 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10043 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10044 `error_one_per_line' support.
10045
10046 2002-07-09 Akim Demaille <akim@epita.fr>
10047
10048 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10049 * src/reader.c (lineno): Remove.
10050 Adjust all dependencies.
10051 (get_merge_function): Take a location and use complain_at.
10052 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10053 * tests/regression.at (Invalid inputs, Mixing %token styles):
10054 Adjust.
10055
10056 2002-07-09 Akim Demaille <akim@epita.fr>
10057
10058 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10059 recovery rule, and forbid extensions when --yacc.
10060 (gram_error): Use complain_at.
10061 * src/reader.c (reader): Exit if there were parse errors.
10062
10063 2002-07-09 Akim Demaille <akim@epita.fr>
10064
10065 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10066 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10067 Reported by R Blake <blakers@mac.com>.
10068
10069 2002-07-09 Akim Demaille <akim@epita.fr>
10070
10071 * data/yacc.c: Output the copyright notive in the header.
10072
10073 2002-07-03 Akim Demaille <akim@epita.fr>
10074
10075 * src/output.c (froms, tos): Are state_number_t.
10076 (save_column): sp, sp1, and sp2 are state_number_t.
10077 (prepare): Rename `final' as `final_state_number', `nnts' as
10078 `nterms_number', `nrules' as `rules_number', `nstates' as
10079 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10080 unused.
10081 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10082 * data/lalr1.cc (nsym_): Remove, unused.
10083
10084 2002-07-03 Akim Demaille <akim@epita.fr>
10085
10086 * src/lalr.h, src/lalr.c (goto_number_t): New.
10087 * src/lalr.c (goto_list_t): New.
10088 Propagate them.
10089 * src/nullable.c (rule_list_t): New.
10090 Propagate.
10091 * src/types.h: Remove.
10092
10093 2002-07-03 Akim Demaille <akim@epita.fr>
10094
10095 * src/closure.c (print_fderives): Use rule_rhs_print.
10096 * src/derives.c (print_derives): Use rule_rhs_print.
10097 (rule_list_t): New, replaces `shorts'.
10098 (set_derives): Add comments.
10099 * tests/sets.at (Nullable, Firsts): Adjust.
10100
10101 2002-07-03 Akim Demaille <akim@epita.fr>
10102
10103 * src/output.c (prepare_actions): Free `tally' and `width'.
10104 (prepare_actions): Allocate and free `order'.
10105 * src/symtab.c (symbols_free): Free `symbols'.
10106 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10107 * src/output.c (m4_invoke): Move to...
10108 * src/scan-skel.l: here.
10109 (<<EOF>>): Close yyout, and free its name.
10110
10111 2002-07-03 Akim Demaille <akim@epita.fr>
10112
10113 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10114
10115 * src/LR0.c (new_state): Merge into...
10116 (state_list_append): this.
10117 (new_states): Merge into...
10118 (generate_states): here.
10119 (set_states): Don't ensure a proper `errs' state member here, do it...
10120 * src/conflicts.c (conflicts_solve): here.
10121 * src/state.h, src/state.c: Comment changes.
10122 (state_t): Rename member `shifts' as `transitions'.
10123 Adjust all dependencies.
10124 (errs_new): For consistency, also take the values as argument.
10125 (errs_dup): Remove.
10126 (state_errs_set): New.
10127 (state_reductions_set, state_transitions_set): Assert that no
10128 previous value was assigned.
10129 (state_free): New.
10130 (states_free): Use it.
10131 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10132 temporary storage: use `errs' and `nerrs' as elsewhere.
10133 (set_conflicts): Allocate and free this `errs'.
10134
10135 2002-07-02 Akim Demaille <akim@epita.fr>
10136
10137 * lib/libiberty.h: New.
10138 * lib: Update the bitset implementation from upstream.
10139 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10140 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10141 * src/main.c: Adjust bitset stats calls.
10142
10143 2002-07-01 Paul Eggert <eggert@twinsun.com>
10144
10145 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10146 char, so that negative chars don't collide with $.
10147
10148 2002-06-30 Akim Demaille <akim@epita.fr>
10149
10150 Have the GLR tests be `warning' checked, and fix the warnings.
10151
10152 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10153 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10154 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10155 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10156 (yyaddDeferredAction): static.
10157 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10158 (yyreportParseError): yyprefix is const.
10159 yytokenp is used only when verbose.
10160 (yy__GNUC__): Replace with __GNUC__.
10161 (yypdumpstack): yyi is size_t.
10162 (yypreference): Un-yy local variables and arguments, to avoid
10163 clashes with `yyr1'. Anyway, we are not in the user name space.
10164 (yytname_size): be an int, as is compared with ints.
10165 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10166 Use them.
10167 * tests/cxx-gram.at: Use quotation to protect $1.
10168 Use AT_COMPILE to enable warnings hunts.
10169 Prototype yylex and yyerror.
10170 `Use' argc.
10171 Include `string.h', not `strings.h'.
10172 Produce and prototype stmtMerge only when used.
10173 yylex takes a location.
10174
10175 2002-06-30 Akim Demaille <akim@epita.fr>
10176
10177 We spend a lot of time in quotearg, in particular when --verbose.
10178
10179 * src/symtab.c (symbol_get): Store a quoted version of the key.
10180 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10181 Adjust all callers.
10182
10183 2002-06-30 Akim Demaille <akim@epita.fr>
10184
10185 * src/state.h (reductions_t): Rename member `nreds' as num.
10186 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10187 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10188
10189 2002-06-30 Akim Demaille <akim@epita.fr>
10190
10191 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10192 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10193 (shifts_to): Rename as...
10194 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10195 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10196 (TRANSITION_IS_DISABLED, transitions_to): these.
10197
10198 2002-06-30 Akim Demaille <akim@epita.fr>
10199
10200 * src/print.c (print_shifts, print_gotos): Merge into...
10201 (print_transitions): this.
10202 (print_transitions, print_errs, print_reductions): Align the
10203 lookaheads columns.
10204 (print_core, print_transitions, print_errs, print_state,
10205 print_grammar): Output empty lines separator before, not after.
10206 (state_default_rule_compute): Rename as...
10207 (state_default_rule): this.
10208 * tests/conflicts.at (Defaulted Conflicted Reduction),
10209 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10210 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10211
10212 2002-06-30 Akim Demaille <akim@epita.fr>
10213
10214 Display items as we display rules.
10215
10216 * src/gram.h, src/gram.c (rule_lhs_print): New.
10217 * src/gram.c (grammar_rules_partial_print): Use it.
10218 * src/print.c (print_core): Likewise.
10219 * tests/conflicts.at (Defaulted Conflicted Reduction),
10220 (Unresolved SR Conflicts): Adjust.
10221 (Unresolved SR Conflicts): Adjust and rename as...
10222 (Resolved SR Conflicts): this, as was meant.
10223 * tests/regression.at (Web2c Report): Adjust.
10224
10225 2002-06-30 Akim Demaille <akim@epita.fr>
10226
10227 * src/print.c (state_default_rule_compute): New, extracted from...
10228 (print_reductions): here.
10229 Pessimize, but clarify the code.
10230 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10231
10232 2002-06-30 Akim Demaille <akim@epita.fr>
10233
10234 * src/output.c (action_row): Let default_rule be always a rule
10235 number.
10236
10237 2002-06-30 Akim Demaille <akim@epita.fr>
10238
10239 * src/closure.c (print_firsts, print_fderives, closure):
10240 Use BITSET_EXECUTE.
10241 * src/lalr.c (lookaheads_print): Likewise.
10242 * src/state.c (state_rule_lookaheads_print): Likewise.
10243 * src/print_graph.c (print_core): Likewise.
10244 * src/print.c (print_reductions): Likewise.
10245 * src/output.c (action_row): Likewise.
10246 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10247
10248 2002-06-30 Akim Demaille <akim@epita.fr>
10249
10250 * src/print_graph.c: Use report_flag.
10251
10252 2002-06-30 Akim Demaille <akim@epita.fr>
10253
10254 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10255 to...
10256 * src/relation.h, src/relation.c (traverse, relation_digraph)
10257 (relation_print, relation_transpose): New.
10258
10259 2002-06-30 Akim Demaille <akim@epita.fr>
10260
10261 * src/state.h, src/state.c (shifts_to): New.
10262 * src/lalr.c (build_relations): Use it.
10263
10264 2002-06-30 Akim Demaille <akim@epita.fr>
10265
10266 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10267 (item_number_of_rule_number, rule_number_of_item_number): New.
10268 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10269 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10270 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10271 Propagate their use.
10272 Much remains to be done, in particular wrt `shorts' from types.h.
10273
10274 2002-06-30 Akim Demaille <akim@epita.fr>
10275
10276 * src/symtab.c (symbol_new): Initialize the `printer' member.
10277
10278 2002-06-30 Akim Demaille <akim@epita.fr>
10279
10280 * src/LR0.c (save_reductions): Remove, replaced by...
10281 * src/state.h, src/state.c (state_reductions_set): New.
10282 (reductions, errs): Rename as...
10283 (reductions_t, errs_t): these.
10284 Adjust all dependencies.
10285
10286 2002-06-30 Akim Demaille <akim@epita.fr>
10287
10288 * src/LR0.c (state_list_t, state_list_append): New.
10289 (first_state, last_state): Now symbol_list_t.
10290 (this_state): Remove.
10291 (new_itemsets, append_states, save_reductions): Take a state_t as
10292 argument.
10293 (set_states, generate_states): Adjust.
10294 (save_shifts): Remove, replaced by...
10295 * src/state.h, src/state.c (state_shifts_set): New.
10296 (shifts): Rename as...
10297 (shifts_t): this.
10298 Adjust all dependencies.
10299 * src/state.h (state_t): Remove the `next' member.
10300
10301 2002-06-30 Akim Demaille <akim@epita.fr>
10302
10303 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10304 escaped in slot 0.
10305
10306 2002-06-30 Akim Demaille <akim@epita.fr>
10307
10308 Use hash.h for the state hash table.
10309
10310 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10311 (allocate_storage): Use state_hash_new.
10312 (free_storage): Use state_hash_free.
10313 (new_state, get_state): Adjust.
10314 * src/lalr.h, src/lalr.c (states): Move to...
10315 * src/states.h (state_t): Remove the `link' member, no longer
10316 used.
10317 * src/states.h, src/states.c: here.
10318 (state_hash_new, state_hash_free, state_hash_lookup)
10319 (state_hash_insert, states_free): New.
10320 * src/states.c (state_table, state_compare, state_hash): New.
10321 * src/output.c (output_actions): Do not free states now, since we
10322 still need to know the final_state number in `prepare', called
10323 afterwards. Do it...
10324 * src/main.c (main): here: call states_free after `output'.
10325
10326 2002-06-30 Akim Demaille <akim@epita.fr>
10327
10328 * src/state.h, src/state.c (state_new): New, extracted from...
10329 * src/LR0.c (new_state): here.
10330 * src/state.h (STATE_ALLOC): Move to...
10331 * src/state.c: here.
10332 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10333 * src/state.h, src/state.c: here.
10334
10335 2002-06-30 Akim Demaille <akim@epita.fr>
10336
10337 * src/reader.c (gensym): Rename as...
10338 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10339 (getsym): Rename as...
10340 (symbol_get): this.
10341
10342 2002-06-30 Akim Demaille <akim@epita.fr>
10343
10344 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10345 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10346 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10347 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10348
10349 2002-06-30 Akim Demaille <akim@epita.fr>
10350
10351 Make the test suite pass with warnings checked.
10352
10353 * tests/actions.at (Printers and Destructors): Improve.
10354 Avoid unsigned vs. signed issues.
10355 * tests/calc.at: Don't exercise the scanner here, do it...
10356 * tests/input.at (Torturing the Scanner): here.
10357
10358 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10359
10360 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10361 reorganize first lines parallel to yacc.c.
10362
10363 2002-06-28 Akim Demaille <akim@epita.fr>
10364
10365 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10366 (b4_token_enum, b4_token_defines): New, factored from...
10367 * data/lalr1.cc, data/yacc.c, glr.c: here.
10368
10369 2002-06-28 Akim Demaille <akim@epita.fr>
10370
10371 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10372 unused variables.
10373 * src/output.c (merger_output): static.
10374
10375 2002-06-28 Akim Demaille <akim@epita.fr>
10376
10377 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10378 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10379 pacify GCC.
10380 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10381
10382 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10383
10384 Accumulated changelog for new GLR parsing features.
10385
10386 * src/conflicts.c (count_total_conflicts): Change name to
10387 conflicts_total_count.
10388 * src/conflicts.h: Ditto.
10389 * src/output.c (token_actions): Use the new name.
10390 (output_conflicts): Change conflp => conflict_list_heads, and
10391 confl => conflict_list for better readability.
10392 * data/glr.c: Use the new names.
10393 * NEWS: Add self to GLR announcement.
10394
10395 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10396
10397 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10398 Akim Demaille.
10399
10400 * data/bison.glr: Change name to glr.c
10401 * data/glr.c: Renamed from bison.glr.
10402 * data/Makefile.am: Add glr.c
10403
10404 * src/getargs.c:
10405
10406 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10407 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10408
10409 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10410
10411 * data/bison.glr: Be sure to restore the
10412 current #line when returning to the skeleton contents after having
10413 exposed the input file's #line.
10414
10415 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10416
10417 * data/bison.glr: Bring up to date with changes to bison.simple.
10418
10419 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10420
10421 * data/bison.glr: Correct definitions that use b4_prefix.
10422 Various reformatting.
10423 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10424 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10425 yytokenp argument; now part of stack.
10426 (yychar): Define to behave as documented.
10427 (yyclearin): Ditto.
10428
10429 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10430
10431 * src/reader.h: Add declaration for free_merger_functions.
10432
10433 * src/reader.c (merge_functions): New variable.
10434 (get_merge_function): New function.
10435 (free_merger_functions): New function.
10436 (readgram): Check for %prec that is not followed by a symbol.
10437 Handle %dprec and %merge declarations.
10438 (packgram): Initialize dprec and merger fields in rules array.
10439
10440 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10441 conflict_list_cnt, conflict_list_free): New variables.
10442 (table_grow): Also grow conflict_table.
10443 (prepare_rules): Output dprec and merger tables.
10444 (conflict_row): New function.
10445 (action_row): Output conflict lists for GLR parser. Don't use
10446 default reduction in conflicted states for GLR parser so that there
10447 are spaces for the conflict lists.
10448 (save_row): Also save conflict information.
10449 (token_actions): Allocate conflict list.
10450 (merger_output): New function.
10451 (pack_vector): Pack conflict table, too.
10452 (output_conflicts): New function to output yyconflp and yyconfl.
10453 (output_check): Allocate conflict_tos.
10454 (output_actions): Output conflict tables, also.
10455 (output_skeleton): Output b4_mergers definition.
10456 (prepare): Output b4_max_rhs_length definition.
10457 Use 'bison.glr' as default skeleton for GLR parsers.
10458
10459 * src/gram.c (glr_parser): New flag.
10460 (grammar_free): Call free_merger_functions.
10461
10462 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10463 all pairs of conflicting reductions, rather than just all tokens
10464 causing conflicts. Needed to size conflict tables.
10465 (conflicts_output): Modify call to count_rr_conflicts for new
10466 interface.
10467 (conflicts_print): Ditto.
10468 (count_total_conflicts): New function.
10469
10470 * src/reader.h (merger_list): New type.
10471 (merge_functions): New variable.
10472
10473 * src/lex.h (tok_dprec, tok_merge): New token types.
10474
10475 * src/gram.h (rule_s): Add dprec and merger fields.
10476 (glr_parser): New flag.
10477
10478 * src/conflicts.h (count_total_conflicts): New function.
10479
10480 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10481
10482 * doc/bison.texinfo (Generalized LR Parsing): New section.
10483 (GLR Parsers): New section.
10484 (Language and Grammar): Mention GLR parsing.
10485 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10486 Correct typo ("tge" -> "the").
10487
10488 * data/bison.glr: New skeleton for GLR parsing.
10489
10490 * tests/cxx-gram.at: New tests for GLR parsing.
10491
10492 * tests/testsuite.at: Include cxx-gram.at.
10493
10494 * tests/Makefile.am: Add cxx-gram.at.
10495
10496 * src/parse-gram.y:
10497
10498 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10499
10500 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10501
10502 2002-06-27 Akim Demaille <akim@epita.fr>
10503
10504 * src/options.h, src/options.c: Remove.
10505 * src/getargs.c (short_options, long_options): New.
10506
10507 2002-06-27 Akim Demaille <akim@epita.fr>
10508
10509 * data/bison.simple, data/bison.c++: Rename as...
10510 * data/yacc.c, data/lalr1.cc: these.
10511 * doc/bison.texinfo (Environment Variables): Remove.
10512
10513 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10514
10515 * src/getargs.c (report_argmatch): Initialize strtok().
10516
10517 2002-06-20 Akim Demaille <akim@epita.fr>
10518
10519 * data/bison.simple (b4_symbol_actions): New, replaces...
10520 (b4_symbol_destructor, b4_symbol_printer): these.
10521 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10522 user token numbers.
10523
10524 2002-06-20 Akim Demaille <akim@epita.fr>
10525
10526 * data/bison.simple (yydestructor): Rename as...
10527 (yydestruct): this.
10528
10529 2002-06-20 Akim Demaille <akim@epita.fr>
10530
10531 * src/symtab.h, src/symtab.c (symbol_type_set)
10532 (symbol_destructor_set, symbol_precedence_set): The location is
10533 the last argument.
10534 Adjust all callers.
10535
10536 2002-06-20 Akim Demaille <akim@epita.fr>
10537
10538 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10539 internals.
10540 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10541 Takes a location.
10542 * src/symtab.h, src/symtab.c (symbol_class_set)
10543 (symbol_user_token_number_set): Likewise.
10544 Adjust all callers.
10545 Promote complain_at.
10546 * tests/input.at (Type Clashes): Adjust.
10547
10548 2002-06-20 Akim Demaille <akim@epita.fr>
10549
10550 * data/bison.simple (YYLEX): Fix the declaration when
10551 %pure-parser.
10552
10553 2002-06-20 Akim Demaille <akim@epita.fr>
10554
10555 * data/bison.simple (yysymprint): Don't print the token number,
10556 just its name.
10557 * tests/actions.at (Destructors): Rename as...
10558 (Printers and Destructors): this.
10559 Also exercise %printer.
10560
10561 2002-06-20 Akim Demaille <akim@epita.fr>
10562
10563 * data/bison.simple (YYDSYMPRINT): New.
10564 Use it to remove many of the #if YYDEBUG/if (yydebug).
10565
10566 2002-06-20 Akim Demaille <akim@epita.fr>
10567
10568 * src/symtab.h, src/symtab.c (symbol_t): printer and
10569 printer_location are new members.
10570 (symbol_printer_set): New.
10571 * src/parse-gram.y (PERCENT_PRINTER): New token.
10572 Handle its associated rule.
10573 * src/scan-gram.l: Adjust.
10574 (handle_destructor_at, handle_destructor_dollar): Rename as...
10575 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10576 * src/output.c (symbol_printers_output): New.
10577 (output_skeleton): Call it.
10578 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10579 since there are already many grammar files with a user `yyprint'.
10580 Replace the calls to YYPRINT to calls to yysymprint.
10581 * tests/calc.at: Adjust.
10582 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10583 taking advantage of parser very internal details (stack size!).
10584
10585 2002-06-20 Akim Demaille <akim@epita.fr>
10586
10587 * src/scan-gram.l: Complete the scanner with the missing patterns
10588 to pacify Flex.
10589 Use `quote' and `symbol_tag_get' where appropriate.
10590
10591 2002-06-19 Akim Demaille <akim@epita.fr>
10592
10593 * tests/actions.at (Destructors): Augment to test locations.
10594 * data/bison.simple (yydestructor): Pass it the current location
10595 if locations are enabled.
10596 Prototype only when __STDC__ or C++.
10597 Change the argument names to move into the yy name space: there is
10598 user code here.
10599
10600 2002-06-19 Akim Demaille <akim@epita.fr>
10601
10602 * data/bison.simple (b4_pure_if): New.
10603 Use it instead of #ifdef YYPURE.
10604
10605 2002-06-19 Akim Demaille <akim@epita.fr>
10606
10607 * data/bison.simple (b4_location_if): New.
10608 Use it instead of #ifdef YYLSP_NEEDED.
10609
10610 2002-06-19 Akim Demaille <akim@epita.fr>
10611
10612 Prepare @$ in %destructor, but currently don't bind it in the
10613 skeleton, as %location use is not cleaned up yet.
10614
10615 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10616 (handle_action_at): New.
10617 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10618 a braced_code_t and a location as additional arguments.
10619 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10620 unquote one when outputting `b4_dollar_dollar'.
10621 Adjust callers.
10622 * data/bison.simple (b4_eval): Remove.
10623 (b4_symbol_destructor): Adjust.
10624 * tests/input.at (Invalid @n): Adjust.
10625
10626 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10627
10628 * doc/bison.texinfo: Document ability to have multiple
10629 prologue sections.
10630
10631 2002-06-18 Akim Demaille <akim@epita.fr>
10632
10633 * src/files.c (compute_base_names): When computing the output file
10634 names from the input file name, strip the directory part.
10635
10636 2002-06-18 Akim Demaille <akim@epita.fr>
10637
10638 * data/bison.simple.new: Comment changes.
10639 Reported by Andreas Schwab.
10640
10641 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10642
10643 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10644 there are no `label `yyoverflowlab' defined but not used' warnings
10645 when yyoverflow is defined.
10646
10647 2002-06-18 Akim Demaille <akim@epita.fr>
10648
10649 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10650 new member.
10651 (symbol_destructor_set): Adjust.
10652 * src/output.c (symbol_destructors_output): Output the destructor
10653 locations.
10654 Output the symbol name.
10655 * data/bison.simple (b4_symbol_destructor): Adjust.
10656
10657 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10658 and Akim Demaille <akim@epita.fr>
10659
10660 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10661 what's left on the stack when the error recovery hits EOF.
10662 * tests/actions.at (Destructors): Complete to exercise this case.
10663
10664 2002-06-17 Akim Demaille <akim@epita.fr>
10665
10666 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10667 arguments is really empty, not only equal to `[]'.
10668 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10669 member.
10670 (symbol_destructor_set): New.
10671 * src/output.c (symbol_destructors_output): New.
10672 * src/reader.h (brace_code_t, current_braced_code): New.
10673 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10674 (handle_dollar): Rename as...
10675 (handle_action_dollar): this.
10676 (handle_destructor_dollar): New.
10677 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10678 (grammar_declaration): Use it.
10679 * data/bison.simple (yystos): Is always defined.
10680 (yydestructor): New.
10681 * tests/actions.at (Destructors): New.
10682 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10683
10684 2002-06-17 Akim Demaille <akim@epita.fr>
10685
10686 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10687 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10688 rule_length only when needed.
10689 * src/output.c (actions_output, token_definitions_output): Output
10690 the full M4 block.
10691 * src/symtab.c: Don't access directly to the symbol tag, use
10692 symbol_tag_get.
10693 * src/parse-gram.y: Use symbol_list_free.
10694
10695 2002-06-17 Akim Demaille <akim@epita.fr>
10696
10697 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10698 (symbol_list_prepend, get_type_name): Move to...
10699 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10700 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10701 Adjust all callers.
10702 (symbol_list_free): New.
10703 * src/scan-gram.l (handle_dollar): Takes a location.
10704 * tests/input.at (Invalid $n): Adjust.
10705
10706 2002-06-17 Akim Demaille <akim@epita.fr>
10707
10708 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10709 (symbol_list_prepend): New.
10710 * src/parse-gram.y (%union): `list' is a new member.
10711 (symbols.1): New, replaces...
10712 (terms_to_prec.1, nterms_to_type.1): these.
10713 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10714 Take a location as additional argument.
10715 Adjust all callers.
10716
10717 2002-06-15 Akim Demaille <akim@epita.fr>
10718
10719 * src/parse-gram.y: Move %token in the declaration section so that
10720 we don't depend upon CVS Bison.
10721
10722 2002-06-15 Akim Demaille <akim@epita.fr>
10723
10724 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10725 * src/print.c (print_core): Use it.
10726
10727 2002-06-15 Akim Demaille <akim@epita.fr>
10728
10729 * src/conflicts.c (log_resolution): Accept the rule involved in
10730 the sr conflicts instead of the lookahead number that points to
10731 that rule.
10732 (flush_reduce): Accept the current lookahead vector as argument,
10733 instead of the index in LA.
10734 (resolve_sr_conflict): Accept the current number of lookahead
10735 bitset to consider for the STATE, instead of the index in LA.
10736 (set_conflicts): Adjust.
10737 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10738
10739 2002-06-15 Akim Demaille <akim@epita.fr>
10740
10741 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10742 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10743 Adjust all dependencies.
10744 * src/lalr.c (initialize_lookaheads): Split into...
10745 (states_lookaheads_count, states_lookaheads_initialize): these.
10746 (lalr): Adjust.
10747
10748 2002-06-15 Akim Demaille <akim@epita.fr>
10749
10750 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10751 out of...
10752 (grammar_rules_print): here.
10753 * src/reduce.c (reduce_output): Use it.
10754 * tests/reduce.at (Useless Rules, Reduced Automaton)
10755 (Underivable Rules): Adjust.
10756
10757 2002-06-15 Akim Demaille <akim@epita.fr>
10758
10759 Copy BYacc's nice way to report the grammar.
10760
10761 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10762 New.
10763 Don't print the rules' location, it is confusing and useless.
10764 (rule_print): Use grammar_rhs_print.
10765 * src/print.c (print_grammar): Use grammar_rules_print.
10766
10767 2002-06-15 Akim Demaille <akim@epita.fr>
10768
10769 Complete and rationalize `useless thing' warnings.
10770
10771 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10772 (symbol_tag_print): New.
10773 Use them everywhere in place of accessing directly the tag member.
10774 * src/gram.h, src/gram.c (rule_print): New.
10775 Use it where a rule used to be printed `by hand'.
10776 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10777 (reduce_grammar_tables): Report the useless rules.
10778 (reduce_print): Useless things are a warning, not an error.
10779 Report it as such.
10780 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10781 (Reduced Automaton, Underivable Rules): Adjust.
10782 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10783 * tests/conflicts.at (Unresolved SR Conflicts)
10784 (Solved SR Conflicts): Adjust.
10785
10786 2002-06-15 Akim Demaille <akim@epita.fr>
10787
10788 Let symbols have a location.
10789
10790 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10791 (getsym): Adjust.
10792 Adjust all callers.
10793 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10794 Use location_t, not int.
10795 * src/symtab.c (symbol_check_defined): Take advantage of the
10796 location.
10797 * tests/regression.at (Invalid inputs): Adjust.
10798
10799 2002-06-15 Akim Demaille <akim@epita.fr>
10800
10801 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10802 (input): Don't try to initialize yylloc here, do it in the
10803 scanner.
10804 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10805 * src/gram.h (rule_t): Change line and action_line into location
10806 and action_location, of location_t type.
10807 Adjust all dependencies.
10808 * src/location.h, src/location.c (empty_location): New.
10809 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10810 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10811 (grammar_current_rule_symbol_append)
10812 (grammar_current_rule_action_append): Expect a location as argument.
10813 * src/reader.c (grammar_midrule_action): Adjust to attach an
10814 action's location as dummy symbol location.
10815 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10816 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10817 the line numbers.
10818
10819 2002-06-14 Akim Demaille <akim@epita.fr>
10820
10821 Grammar declarations may be found in the grammar section.
10822
10823 * src/parse-gram.y (rules_or_grammar_declaration): New.
10824 (declarations): Each declaration may end with a semicolon, not
10825 just...
10826 (grammar_declaration): `"%union"'.
10827 (grammar): Branch to rules_or_grammar_declaration.
10828
10829 2002-06-14 Akim Demaille <akim@epita.fr>
10830
10831 * src/main.c (main): Invoke scanner_free.
10832
10833 2002-06-14 Akim Demaille <akim@epita.fr>
10834
10835 * src/output.c (m4_invoke): Extracted from...
10836 (output_skeleton): here.
10837 Free tempfile.
10838
10839 2002-06-14 Akim Demaille <akim@epita.fr>
10840
10841 * src/parse-gram.y (directives, directive, gram)
10842 (grammar_directives, precedence_directives, precedence_directive):
10843 Rename as...
10844 (declarations, declaration, grammar, grammar_declaration)
10845 (precedence_declaration, precedence_declarator): these.
10846 (symbol_declaration): New.
10847
10848 2002-06-14 Akim Demaille <akim@epita.fr>
10849
10850 * src/files.c (action_obstack): Remove, unused.
10851 (output_obstack): Remove it, and all its dependencies, as it is no
10852 longer needed.
10853 * src/reader.c (epilogue_set): Build the epilogue in the
10854 muscle_obstack.
10855 * src/output.h, src/output.c (muscle_obstack): Move to...
10856 * src/muscle_tab.h, src/muscle_tab.h: here.
10857 (muscle_init): Initialize muscle_obstack.
10858 (muscle_free): New.
10859 * src/main.c (main): Call it.
10860
10861 2002-06-14 Akim Demaille <akim@epita.fr>
10862
10863 * src/location.h: New, extracted from...
10864 * src/reader.h: here.
10865 * src/Makefile.am (noinst_HEADERS): Merge into
10866 (bison_SOURCES): this.
10867 Add location.h.
10868 * src/parse-gram.y: Use location_t instead of Bison's.
10869 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10870 Use location_t instead of ints.
10871
10872 2002-06-14 Akim Demaille <akim@epita.fr>
10873
10874 * data/bison.simple, data/bison.c++: Be sure to restore the
10875 current #line when returning to the skeleton contents after having
10876 exposed the input file's #line.
10877
10878 2002-06-12 Akim Demaille <akim@epita.fr>
10879
10880 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10881 eager.
10882 * tests/actions.at (Exotic Dollars): New.
10883
10884 2002-06-12 Akim Demaille <akim@epita.fr>
10885
10886 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10887 ['"/] too eagerly.
10888 * tests/input.at (Torturing the Scanner): New.
10889
10890 2002-06-11 Akim Demaille <akim@epita.fr>
10891
10892 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10893 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10894 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10895 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10896 * src/reader.c (reader): Use it.
10897
10898 2002-06-11 Akim Demaille <akim@epita.fr>
10899
10900 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10901 Adjust all callers.
10902 (scanner_last_string_free): New.
10903
10904 2002-06-11 Akim Demaille <akim@epita.fr>
10905
10906 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10907 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10908 (last_string, YY_OBS_FREE): New.
10909 Use them when returning an ID.
10910
10911 2002-06-11 Akim Demaille <akim@epita.fr>
10912
10913 Have Bison grammars parsed by a Bison grammar.
10914
10915 * src/reader.c, src/reader.h (prologue_augment): New.
10916 * src/reader.c (copy_definition): Remove.
10917
10918 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10919 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10920 (grammar_current_rule_prec_set, grammar_current_rule_check)
10921 (grammar_current_rule_symbol_append)
10922 (grammar_current_rule_action_append): Export.
10923 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10924 (symbol_list_action_append): Remove.
10925 Hook the routines from reader.
10926 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10927 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10928
10929 * src/reader.c (read_declarations): Remove, unused.
10930
10931 * src/parse-gram.y: Handle the epilogue.
10932 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10933 (grammar_start_symbol_set): this.
10934 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10935 * src/reader.c (readgram): Remove, unused.
10936 (reader): Adjust to insert eoftoken and axiom where appropriate.
10937
10938 * src/reader.c (copy_dollar): Replace with...
10939 * src/scan-gram.h (handle_dollar): this.
10940 * src/parse-gram.y: Remove `%thong'.
10941
10942 * src/reader.c (copy_at): Replace with...
10943 * src/scan-gram.h (handle_at): this.
10944
10945 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10946 New.
10947
10948 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10949 time being.
10950
10951 * src/reader.h, src/reader.c (grammar_rule_end): New.
10952
10953 * src/parse.y (current_type, current_class): New.
10954 Implement `%nterm', `%token' support.
10955 Merge `%term' into `%token'.
10956 (string_as_id): New.
10957 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10958 type name.
10959
10960 * src/parse-gram.y: Be sure to handle properly the beginning of
10961 rules.
10962
10963 * src/parse-gram.y: Handle %type.
10964 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10965
10966 * src/parse-gram.y: More directives support.
10967 * src/options.c: No longer handle source directives.
10968
10969 * src/parse-gram.y: Fix %output.
10970
10971 * src/parse-gram.y: Handle %union.
10972 Use the prologue locations.
10973 * src/reader.c (parse_union_decl): Remove.
10974
10975 * src/reader.h, src/reader.c (epilogue_set): New.
10976 * src/parse-gram.y: Use it.
10977
10978 * data/bison.simple, data/bison.c++: b4_stype is now either not
10979 defined, then default to int, or to the contents of %union,
10980 without `union' itself.
10981 Adjust.
10982 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10983
10984 * src/output.c (actions_output): Don't output braces, as they are
10985 already handled by the scanner.
10986
10987 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10988 characters to themselves.
10989
10990 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10991 that the epilogue has a proper #line.
10992
10993 * src/parse-gram.y: Handle precedence/associativity.
10994
10995 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10996 a terminal.
10997 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10998 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10999 at all to define terminals that cannot be emitted.
11000
11001 * src/scan-gram.l: Escape M4 characters.
11002
11003 * src/scan-gram.l: Working properly with escapes in user
11004 strings/characters.
11005
11006 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11007 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11008 grammar.
11009 Use more modest sizes, as for the time being the parser does not
11010 release memory, and therefore the process swallows a huge amount
11011 of memory.
11012
11013 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11014 stricter %token grammar.
11015
11016 * src/symtab.h (associativity): Add `undef_assoc'.
11017 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11018 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11019
11020 * tests/regression.at (Invalid %directive): Remove, as it is now
11021 meaningless.
11022 (Invalid inputs): Adjust to the new error messages.
11023 (Token definitions): The new grammar doesn't allow too many
11024 eccentricities.
11025
11026 * src/lex.h, src/lex.c: Remove.
11027 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11028 (copy_character, copy_string2, copy_string, copy_identifier)
11029 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11030 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11031 (parse_action): Remove.
11032 * po/POTFILES.in: Adjust.
11033
11034 2002-06-11 Akim Demaille <akim@epita.fr>
11035
11036 * src/reader.c (parse_action): Don't store directly into the
11037 rule's action member: return the action as a string.
11038 Don't require `rule_length' as an argument: compute it.
11039 (grammar_current_rule_symbol_append)
11040 (grammar_current_rule_action_append): New, eved out from
11041 (readgram): here.
11042 Remove `action_flag', `rulelength', unused now.
11043
11044 2002-06-11 Akim Demaille <akim@epita.fr>
11045
11046 * src/reader.c (grammar_current_rule_prec_set).
11047 (grammar_current_rule_check): New, eved out from...
11048 (readgram): here.
11049 Remove `xaction', `first_rhs': useless.
11050 * tests/input.at (Type clashes): New.
11051 * tests/existing.at (GNU Cim Grammar): Adjust.
11052
11053 2002-06-11 Akim Demaille <akim@epita.fr>
11054
11055 * src/reader.c (grammar_midrule_action): New, Eved out from
11056 (readgram): here.
11057
11058 2002-06-11 Akim Demaille <akim@epita.fr>
11059
11060 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11061 New.
11062 (readgram): Use them as replacement of inlined code, crule and
11063 crule1.
11064
11065 2002-06-11 Akim Demaille <akim@epita.fr>
11066
11067 * src/reader.c (grammar_end, grammar_symbol_append): New.
11068 (readgram): Use them.
11069 Make the use of `p' as local as possible.
11070
11071 2002-06-10 Akim Demaille <akim@epita.fr>
11072
11073 GCJ's parser requires the tokens to be defined before the prologue.
11074
11075 * data/bison.simple: Output the token definition before the user's
11076 prologue.
11077 * tests/regression.at (Braces parsing, Duplicate string)
11078 (Mixing %token styles): Check the output from bison.
11079 (Early token definitions): New.
11080
11081 2002-06-10 Akim Demaille <akim@epita.fr>
11082
11083 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11084 assigning twice the same user number to a token, so that we can
11085 use it in...
11086 * src/lex.c (lex): here.
11087 Also use `symbol_class_set' instead of hand written code.
11088 * src/reader.c (parse_assoc_decl): Likewise.
11089
11090 2002-06-10 Akim Demaille <akim@epita.fr>
11091
11092 * src/symtab.c, src/symtab.c (symbol_class_set)
11093 (symbol_user_token_number_set): New.
11094 * src/reader.c (parse_token_decl): Use them.
11095 Use a switch instead of ifs.
11096 Use a single argument.
11097
11098 2002-06-10 Akim Demaille <akim@epita.fr>
11099
11100 Remove `%thong' support as it is undocumented, unused, duplicates
11101 `%token's job, and creates useless e-mail traffic with people who
11102 want to know what it is, why it is undocumented, unused, and
11103 duplicates `%token's job.
11104
11105 * src/reader.c (parse_thong_decl): Remove.
11106 * src/options.c (option_table): Remove "thong".
11107 * src/lex.h (tok_thong): Remove.
11108
11109 2002-06-10 Akim Demaille <akim@epita.fr>
11110
11111 * src/symtab.c, src/symtab.c (symbol_type_set)
11112 (symbol_precedence_set): New.
11113 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11114 (value_components_used): Remove, unused.
11115
11116 2002-06-09 Akim Demaille <akim@epita.fr>
11117
11118 Move symbols handling code out of the reader.
11119
11120 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11121 (axiom): Move to...
11122 * src/symtab.h, src/symtab.c: here.
11123
11124 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11125 * src/reader.c (startval): Rename as...
11126 * src/symtab.h, src/symtab.c (startsymbol): this.
11127 * src/reader.c: Adjust.
11128
11129 * src/reader.c (symbol_check_defined, symbol_make_alias)
11130 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11131 (token_translations_init)
11132 Move to...
11133 * src/symtab.c: here.
11134 * src/reader.c (packsymbols): Move to...
11135 * src/symtab.h, src/symtab.c (symbols_pack): here.
11136 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11137 argument.
11138
11139 2002-06-03 Akim Demaille <akim@epita.fr>
11140
11141 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11142 then statements.
11143
11144 2002-06-03 Akim Demaille <akim@epita.fr>
11145
11146 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11147 structs with non literals.
11148 * src/scan-skel.l: never-interactive.
11149 * src/conflicts.c (enum conflict_resolution_e): No trailing
11150 comma.
11151 * src/getargs.c (usage): Split long literal strings.
11152 Reported by Hans Aberg.
11153
11154 2002-05-28 Akim Demaille <akim@epita.fr>
11155
11156 * data/bison.c++: Use C++ ostreams.
11157 (cdebug_): New member.
11158
11159 2002-05-28 Akim Demaille <akim@epita.fr>
11160
11161 * src/output.c (output_skeleton): Be sure to allocate enough room
11162 for `/' _and_ for `\0' in full_skeleton.
11163
11164 2002-05-28 Akim Demaille <akim@epita.fr>
11165
11166 * data/bison.c++: Catch up with bison.simple:
11167 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11168 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11169 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11170 and popping traces.
11171
11172 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11173
11174 * src/output.c (output_skeleton): Put an explicit path in front of
11175 the skeleton file name, rather than relying on the -I directory,
11176 to partially alleviate effects of having a skeleton file lying around
11177 in the current directory.
11178
11179 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11180
11181 * src/conflicts.c (log_resolution): Correct typo:
11182 obstack_printf should be obstack_fgrow1.
11183
11184 2002-05-26 Akim Demaille <akim@epita.fr>
11185
11186 * src/state.h (state_t): `solved_conflicts' is a new member.
11187 * src/LR0.c (new_state): Set it to 0.
11188 * src/conflicts.h, src/conflicts.c (print_conflicts)
11189 (free_conflicts, solve_conflicts): Rename as...
11190 (conflicts_print, conflicts_free, conflicts_solve): these.
11191 Adjust callers.
11192 * src/conflicts.c (enum conflict_resolution_e)
11193 (solved_conflicts_obstack): New, used by...
11194 (log_resolution): this.
11195 Adjust to attach the conflict resolution to each state.
11196 Complete the description with the precedence/associativity
11197 information.
11198 (resolve_sr_conflict): Adjust.
11199 * src/print.c (print_state): Output its solved_conflicts.
11200 * tests/conflicts.at (Unresolved SR Conflicts)
11201 (Solved SR Conflicts): Exercise --report=all.
11202
11203 2002-05-26 Akim Demaille <akim@epita.fr>
11204
11205 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11206 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11207 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11208 (token_number_t, item_number_as_token_number)
11209 (token_number_as_item_number, muscle_insert_token_number_table):
11210 Rename as...
11211 (symbol_number_t, item_number_as_symbol_number)
11212 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11213 these, since it is more appropriate.
11214
11215 2002-05-26 Akim Demaille <akim@epita.fr>
11216
11217 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11218 `Error:' lines.
11219 * data/bison.simple (yystos) [YYDEBUG]: New.
11220 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11221 error recovery.
11222 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11223
11224 2002-05-25 Akim Demaille <akim@epita.fr>
11225
11226 * doc/bison.texinfo (Debugging): Split into...
11227 (Tracing): this new section, its former contents, and...
11228 (Understanding): this new section.
11229 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11230 by...
11231 (report_flag): this.
11232 Adjust all dependencies.
11233 (report_args, report_types, report_argmatch): New.
11234 (usage, getargs): Report/support -r, --report.
11235 * src/options.h
11236 (struct option_table_struct): Rename as..,
11237 (struct option_table_s): this.
11238 Rename the `set_flag' member to `flag' to match with getopt_long's
11239 struct.
11240 * src/options.c (option_table): Split verbose into an entry for
11241 %verbose, and another for --verbose.
11242 Support --report/-r, so remove -r from the obsolete --raw.
11243 * src/print.c: Attach full item sets and lookaheads reports to
11244 report_flag instead of trace_flag.
11245 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11246
11247 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11248 and Paul Eggert <eggert@twinsun.com>
11249
11250 * data/bison.simple (yyparse): Correct error handling to conform to
11251 POSIX and yacc. Specifically, after syntax error is discovered,
11252 do not reduce further before shifting the error token.
11253 Clean up the code a bit by removing the labels yyerrdefault,
11254 yyerrhandle, yyerrpop.
11255 * NEWS: Document the above.
11256
11257 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11258
11259 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11260 type; it isn't always big enough, since it doesn't necessarily
11261 include non-terminals.
11262 (yytranslate): Expand definition of yy_token_number_type, so that
11263 the latter can be removed.
11264 (yy_token_number_type): Remove, only one use.
11265 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11266 don't use TokenNumberType as element type.
11267
11268 * tests/regression.at: Modify expected output to agree with change
11269 to yyr1 and yytranslate.
11270
11271 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11272
11273 * src/reader.c (parse_action): Use copy_character instead of
11274 obstack_1grow.
11275
11276 2002-05-13 Akim Demaille <akim@epita.fr>
11277
11278 * tests/regression.at (Token definitions): Prototype yylex and
11279 yyerror.
11280
11281 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11282
11283 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11284 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11285 32-bit arithmetic.
11286 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11287
11288 2002-05-07 Akim Demaille <akim@epita.fr>
11289
11290 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11291 avoid GCC warnings.
11292
11293 2002-05-07 Akim Demaille <akim@epita.fr>
11294
11295 Kill GCC warnings.
11296
11297 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11298 over the RHS of each rule.
11299 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11300 * src/state.h (state_t): Member `nitems' is unsigned short.
11301 * src/LR0.c (get_state): Adjust.
11302 * src/reader.c (packgram): Likewise.
11303 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11304 `Type'.
11305 (muscle_insert_int_table): Remove, unused.
11306 (prepare_rules): Remove `max'.
11307
11308 2002-05-06 Akim Demaille <akim@epita.fr>
11309
11310 * src/closure.c (print_firsts): Display of the symbol tags.
11311 (bitmatrix_print): Move to...
11312 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11313 here.
11314 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11315
11316 2002-05-06 Akim Demaille <akim@epita.fr>
11317
11318 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11319 hash_do_for_each.
11320
11321 2002-05-06 Akim Demaille <akim@epita.fr>
11322
11323 * src/LR0.c (new_state, get_state): Instead of using the global
11324 `kernel_size' and `kernel_base', have two new arguments:
11325 `core_size' and `core'.
11326 Adjust callers.
11327
11328 2002-05-06 Akim Demaille <akim@epita.fr>
11329
11330 * src/reader.c (packgram): No longer end `ritem' with a 0
11331 sentinel: it is not used.
11332
11333 2002-05-05 Akim Demaille <akim@epita.fr>
11334
11335 New experimental feature: display the lookaheads in the report and
11336 graph.
11337
11338 * src/print (print_core): When --trace-flag, display the rules
11339 lookaheads.
11340 * src/print_graph.c (print_core): Likewise.
11341 Swap the arguments.
11342 Adjust caller.
11343
11344 2002-05-05 Akim Demaille <akim@epita.fr>
11345
11346 * tests/torture.at (Many lookaheads): New test.
11347
11348 2002-05-05 Akim Demaille <akim@epita.fr>
11349
11350 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11351 (GENERATE_MUSCLE_INSERT_TABLE): this.
11352 (output_int_table, output_unsigned_int_table, output_short_table)
11353 (output_token_number_table, output_item_number_table): Replace with...
11354 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11355 (muscle_insert_short_table, muscle_insert_token_number_table)
11356 (muscle_insert_item_number_table): these.
11357 Adjust all callers.
11358 (prepare_tokens): Don't free `translations', since...
11359 * src/reader.h, src/reader.c (grammar_free): do it.
11360 Move to...
11361 * src/gram.h, src/gram.c (grammar_free): here.
11362 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11363 b4_translate_max.
11364
11365 2002-05-05 Akim Demaille <akim@epita.fr>
11366
11367 * src/output.c (output_unsigned_int_table): New.
11368 (prepare_rules): `i' is unsigned.
11369 `prhs', `rline', `r2' are unsigned int.
11370 Rename muscle `rhs_number_max' as `rhs_max'.
11371 Output muscles `prhs_max', `rline_max', and `r2_max'.
11372 Free rline and r1.
11373 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11374 to compute types instead of constant types.
11375 * tests/regression.at (Web2c Actions): Adjust.
11376
11377 2002-05-04 Akim Demaille <akim@epita.fr>
11378
11379 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11380 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11381 Adjust dependencies.
11382 * src/output.c (token_definitions_output): Be sure not to output a
11383 `#define 'a'' when fed with `%token 'a' "a"'.
11384 * tests/regression.at (Token definitions): New.
11385
11386 2002-05-03 Paul Eggert <eggert@twinsun.com>
11387
11388 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11389 for K&R C.
11390
11391 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11392
11393 * Makefile.am (SUBDIRS): Remove intl.
11394 (EXTRA_DIST): Add config/config.rpath.
11395
11396 2002-05-03 Akim Demaille <akim@epita.fr>
11397
11398 * data/bison.simple (m4_if): Don't output empty enums.
11399 And actually, output valid enum definitions :(.
11400
11401 2002-05-03 Akim Demaille <akim@epita.fr>
11402
11403 * configure.bat: Remove, completely obsolete.
11404 * Makefile.am (EXTRA_DIST): Adjust.
11405 Don't distribute config.rpath...
11406 * config/Makefile.am (EXTRA_DIST): Do it.
11407
11408 2002-05-03 Akim Demaille <akim@epita.fr>
11409
11410 * configure.in (GETTEXT_VERSION): New.
11411 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11412
11413 2002-05-03 Akim Demaille <akim@epita.fr>
11414
11415 * data/bison.simple (b4_token_enum): New.
11416 (b4_token_defines): Use it to output tokens both as #define and
11417 enums.
11418 Suggested by Paul Eggert.
11419 * src/output.c (token_definitions_output): Don't output spurious
11420 white spaces.
11421
11422 2002-05-03 Akim Demaille <akim@epita.fr>
11423
11424 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11425
11426 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11427
11428 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11429 Update the stack class, give a try to deque as the default container.
11430
11431 2002-05-02 Akim Demaille <akim@epita.fr>
11432
11433 * data/bison.simple (yyparse): Do not implement @$ = @1.
11434 (YYLLOC_DEFAULT): Adjust to do it.
11435 * doc/bison.texinfo (Location Default Action): Fix.
11436
11437 2002-05-02 Akim Demaille <akim@epita.fr>
11438
11439 * src/reader.c (parse_braces): Merge into...
11440 (parse_action): this.
11441
11442 2002-05-02 Akim Demaille <akim@epita.fr>
11443
11444 * configure.in (ALL_LINGUAS): Remove.
11445 * po/LINGUAS, hr.po: New.
11446
11447 2002-05-02 Akim Demaille <akim@epita.fr>
11448
11449 Remove the so called hairy (semantic) parsers.
11450
11451 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11452 * src/gram.h, src/gram.c (semantic_parser): Remove.
11453 (rule_t): Remove the guard and guard_line members.
11454 * src/lex.h (token_t): remove tok_guard.
11455 * src/options.c (option_table): Remove %guard and %semantic_parser
11456 support.
11457 * src/output.c, src/output.h (guards_output): Remove.
11458 (prepare): Adjust.
11459 (token_definitions_output): Don't output the `T'
11460 tokens (???).
11461 (output_skeleton): Don't output the guards.
11462 * src/files.c, src/files.c (attrsfile): Remove.
11463 * src/reader.c (symbol_list): Remove the guard and guard_line
11464 members.
11465 Adjust dependencies.
11466 (parse_guard): Remove.
11467 * data/bison.hairy: Remove.
11468 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11469 BISON_HAIRY.
11470
11471 2002-05-02 Akim Demaille <akim@epita.fr>
11472
11473 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11474 (parse_guard): Rename the formal argument `stack_offset' as
11475 `rule_length', which is more readable.
11476 Adjust callers.
11477 (copy_at, copy_dollar): Instead of outputting the hard coded
11478 values of $$, $n and so forth, output invocation to b4_lhs_value,
11479 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11480 Note: this patch partially drops `semantic-parser' support: it
11481 always does `rule_length - n', where semantic parsers ought to
11482 always use `-n'.
11483 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11484 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11485
11486 2002-05-02 Akim Demaille <akim@epita.fr>
11487
11488 * configure.in (AC_INIT): Bump to 1.49b.
11489 (AM_INIT_AUTOMAKE): Short invocation.
11490
11491 2002-05-02 Akim Demaille <akim@epita.fr>
11492
11493 Version 1.49a.
11494
11495 2002-05-01 Akim Demaille <akim@epita.fr>
11496
11497 * src/skeleton.h: Remove.
11498
11499 2002-05-01 Akim Demaille <akim@epita.fr>
11500
11501 * src/skeleton.h: Fix the #endif.
11502 Reported by Magnus Fromreide.
11503
11504 2002-04-26 Paul Eggert <eggert@twinsun.com>
11505
11506 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11507 Define if we define YYSTYPE and YYLTYPE, respectively.
11508 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11509
11510 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11511
11512 * src/scan-skel.l: Postprocess quadrigraphs.
11513
11514 * src/reader.c (copy_character): New function, used to output
11515 single characters while replacing `[' and `]' with quadrigraphs, to
11516 avoid troubles with M4 quotes.
11517 (copy_comment): Output characters with copy_character.
11518 (read_additionnal_code): Likewise.
11519 (copy_string2): Likewise.
11520 (copy_definition): Likewise.
11521
11522 * tests/calc.at: Exercise M4 quoting.
11523
11524 2002-04-25 Akim Demaille <akim@epita.fr>
11525
11526 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11527 between `!' and the command.
11528 Reported by Paul Eggert.
11529
11530 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11531
11532 * tests/calc.at: Exercise prologue splitting.
11533
11534 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11535 `b4_post_prologue' instead of `b4_prologue'.
11536
11537 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11538 muscles.
11539 (output): Free pre_prologue_obstack and post_prologue_obstack.
11540 * src/files.h, src/files.c (attrs_obstack): Remove.
11541 (pre_prologue_obstack, post_prologue_obstack): New.
11542 * src/reader.c (copy_definition): Add a parameter to specify the
11543 obstack to fill, instead of using attrs_obstack unconditionally.
11544 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11545 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11546
11547 2002-04-23 Paul Eggert <eggert@twinsun.com>
11548
11549 * data/bison.simple: Remove unnecessary commentary and white
11550 space differences from 1_29-branch.
11551 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11552
11553 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11554 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11555 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11556 constructors or destructors.
11557
11558 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11559
11560 2002-04-23 Akim Demaille <akim@epita.fr>
11561
11562 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11563 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11564 location with columns.
11565 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11566 All reported by Paul Eggert.
11567
11568 2002-04-22 Akim Demaille <akim@epita.fr>
11569
11570 * src/reduce.c (dump_grammar): Move to...
11571 * src/gram.h, src/gram.c (grammar_dump): here.
11572 Be sure to separate long item numbers.
11573 Don't read the members of a rule's prec if its nil.
11574
11575 2002-04-22 Akim Demaille <akim@epita.fr>
11576
11577 * src/output.c (table_size, table_grow): New.
11578 (MAXTABLE): Remove, replace uses with table_size.
11579 (pack_vector): Instead of dying when the table is too big, grow it.
11580
11581 2002-04-22 Akim Demaille <akim@epita.fr>
11582
11583 * data/bison.simple (yyr1): Its type is that of a token number.
11584 * data/bison.c++ (r1_): Likewise.
11585 * tests/regression.at (Web2c Actions): Adjust.
11586
11587 2002-04-22 Akim Demaille <akim@epita.fr>
11588
11589 * src/reader.c (token_translations_init): 256 is now the default
11590 value for the error token, i.e., it will be assigned another
11591 number if the user assigned 256 to one of her tokens.
11592 (reader): Don't force 256 to error.
11593 * doc/bison.texinfo (Symbols): Adjust.
11594 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11595 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11596 etc. instead of 10, 20, 30 (which was used to `jump' over error
11597 (256) and undefined (2)).
11598
11599 2002-04-22 Akim Demaille <akim@epita.fr>
11600
11601 Propagate more token_number_t.
11602
11603 * src/gram.h (token_number_as_item_number)
11604 (item_number_as_token_number): New.
11605 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11606 Use it to create output_item_number_table and
11607 output_token_number_table.
11608 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11609 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11610 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11611 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11612
11613 2002-04-22 Akim Demaille <akim@epita.fr>
11614
11615 * src/output.h, src/output.c (get_lines_number): Remove.
11616
11617 2002-04-19 Akim Demaille <akim@epita.fr>
11618
11619 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11620 as Lex/Flex'.
11621 (Debugging): More details about enabling the debugging features.
11622 (Table of Symbols): Describe $$, $n, @$, and @n.
11623 Suggested by Tim Josling.
11624
11625 2002-04-19 Akim Demaille <akim@epita.fr>
11626
11627 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11628
11629 2002-04-10 Akim Demaille <akim@epita.fr>
11630
11631 * src/system.h: Rely on HAVE_LIMITS_H.
11632 Suggested by Paul Eggert.
11633
11634 2002-04-09 Akim Demaille <akim@epita.fr>
11635
11636 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11637 full stderr, and strip it according to the bison options, instead
11638 of composing the error message from different bits.
11639 This makes it easier to check for several error messages.
11640 Adjust all the invocations.
11641 Add an invocation exercising the error token.
11642 Add an invocation demonstrating a stupid error message.
11643 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11644 Adjust the tests.
11645 Error message are for stderr, not stdout.
11646
11647 2002-04-09 Akim Demaille <akim@epita.fr>
11648
11649 * src/gram.h, src/gram.c (error_token_number): Remove, use
11650 errtoken->number.
11651 * src/reader.c (reader): Don't specify the user token number (2)
11652 for $undefined, as it uselessly prevents using it.
11653 * src/gram.h (token_number_t): Move to...
11654 * src/symtab.h: here.
11655 (state_t.number): Is a token_number_t.
11656 * src/print.c, src/reader.c: Use undeftoken->number instead of
11657 hard coded 2.
11658 (Even though this 2 is not the same as above: the number of the
11659 undeftoken remains being 2, it is its user token number which
11660 might not be 2).
11661 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11662 `user_token_number_max'.
11663 Output `undef_token_number'.
11664 * data/bison.simple, data/bison.c++: Use them.
11665 Be sure to map invalid yylex return values to
11666 `undef_token_number'. This saves us from gratuitous SEGV.
11667
11668 * tests/conflicts.at (Solved SR Conflicts)
11669 (Unresolved SR Conflicts): Adjust.
11670 * tests/regression.at (Web2c Actions): Adjust.
11671
11672 2002-04-08 Akim Demaille <akim@epita.fr>
11673
11674 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11675 Adding #line.
11676 Remove the duplicate `typedefs'.
11677 (RhsNumberType): Fix the declaration and various other typos.
11678 Use __ofile__.
11679 * data/bison.simple: Use __ofile__.
11680 * src/scan-skel.l: Handle __ofile__.
11681
11682 2002-04-08 Akim Demaille <akim@epita.fr>
11683
11684 * src/gram.h (item_number_t): New, the type of item numbers in
11685 RITEM. Note that it must be able to code symbol numbers as
11686 positive number, and the negation of rule numbers as negative
11687 numbers.
11688 Adjust all dependencies (pretty many).
11689 * src/reduce.c (rule): Remove this `short *' pointer: use
11690 item_number_t.
11691 * src/system.h (MINSHORT, MAXSHORT): Remove.
11692 Include `limits.h'.
11693 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11694 (shortcpy): Remove.
11695 (MAXTABLE): Move to...
11696 * src/output.c (MAXTABLE): here.
11697 (prepare_rules): Use output_int_table to output rhs.
11698 * data/bison.simple, data/bison.c++: Adjust.
11699 * tests/torture.at (Big triangle): Move the limit from 254 to
11700 500.
11701 * tests/regression.at (Web2c Actions): Ajust.
11702
11703 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11704 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11705 passes, but produces negative #line number, once fixed, GCC is
11706 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11707 C), it passes.
11708 * src/state.h (state_h): Code input lines on ints, not shorts.
11709
11710 2002-04-08 Akim Demaille <akim@epita.fr>
11711
11712 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11713 and then the grammar.
11714
11715 2002-04-08 Akim Demaille <akim@epita.fr>
11716
11717 * src/system.h: No longer using strndup.
11718
11719 2002-04-07 Akim Demaille <akim@epita.fr>
11720
11721 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11722 * src/output.c (output_table_data): Return the longest number.
11723 (prepare_tokens): Output `token_number_max').
11724 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11725 New.
11726 Use them to define yy_token_number_type/TokenNumberType.
11727 Use this type for yytranslate.
11728 * tests/torture.at (Big triangle): Push the limit from 124 to
11729 253.
11730 * tests/regression.at (Web2c Actions): Adjust.
11731
11732 2002-04-07 Akim Demaille <akim@epita.fr>
11733
11734 * tests/torture.at (Big triangle): New.
11735 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11736 * tests/existing.at: here.
11737
11738 2002-04-07 Akim Demaille <akim@epita.fr>
11739
11740 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11741 nritems.
11742 Adjust dependencies.
11743
11744 2002-04-07 Akim Demaille <akim@epita.fr>
11745
11746 * src/reader.c: Normalize increments to prefix form.
11747
11748 2002-04-07 Akim Demaille <akim@epita.fr>
11749
11750 * src/reader.c, symtab.c: Remove debugging code.
11751
11752 2002-04-07 Akim Demaille <akim@epita.fr>
11753
11754 Rename all the `bucket's as `symbol_t'.
11755
11756 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11757 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11758 * src/symtab.c, src/symtab.h (bucket): Rename as...
11759 (symbol_t): this.
11760 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11761 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11762 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11763 (buckets_new, buckets_free, buckets_do): Rename as...
11764 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11765 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11766 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11767 (symbols_new, symbols_free, symbols_do): these.
11768
11769 2002-04-07 Akim Demaille <akim@epita.fr>
11770
11771 Use lib/hash for the symbol table.
11772
11773 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11774 EOF.
11775 * src/lex.c (lex): Set the `number' member of new terminals.
11776 * src/reader.c (bucket_check_defined, bucket_make_alias)
11777 (bucket_check_alias_consistence, bucket_translation): New.
11778 (reader, grammar_free, readgram, token_translations_init)
11779 (packsymbols): Adjust.
11780 (reader): Number the predefined tokens.
11781 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11782 for predefined tokens.
11783 * src/symtab.h (bucket): Remove all the hash table related
11784 members.
11785 * src/symtab.c (symtab): Replace by...
11786 (bucket_table): this.
11787 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11788 (buckets_new, buckets_do): New.
11789
11790 2002-04-07 Akim Demaille <akim@epita.fr>
11791
11792 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11793 (start_symbol, max_user_token_number, semantic_parser)
11794 (error_token_number): Initialize.
11795 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11796 Initialize.
11797 (reader): Don't.
11798 (errtoken, eoftoken, undeftoken, axiom): Extern.
11799
11800 2002-04-07 Akim Demaille <akim@epita.fr>
11801
11802 * src/gram.h (rule_s): prec and precsym are now pointers
11803 to the bucket giving the priority/associativity.
11804 Member `associativity' removed: useless.
11805 * src/reduce.c, src/conflicts.c: Adjust.
11806
11807 2002-04-07 Akim Demaille <akim@epita.fr>
11808
11809 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11810 Properly escape the symbols' TAG when outputting them.
11811
11812 2002-04-07 Akim Demaille <akim@epita.fr>
11813
11814 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11815
11816 2002-04-07 Akim Demaille <akim@epita.fr>
11817
11818 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11819 (LArule): this, which is an array to rule_t*.
11820 * src/print.c, src/conflicts.c: Adjust.
11821
11822 2002-04-07 Akim Demaille <akim@epita.fr>
11823
11824 * src/gram.h (rule_t): Rename `number' as `user_number'.
11825 `number' is a new member.
11826 Adjust dependencies.
11827 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11828
11829 2002-04-07 Akim Demaille <akim@epita.fr>
11830
11831 As a result of the previous patch, it is no longer needed
11832 to reorder ritem itself.
11833
11834 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11835
11836 2002-04-07 Akim Demaille <akim@epita.fr>
11837
11838 Be sure never to walk through RITEMS, but use only data related to
11839 the rules themselves. RITEMS should be banished.
11840
11841 * src/output.c (output_token_translations): Rename as...
11842 (prepare_tokens): this.
11843 In addition to `translate', prepare the muscles `tname' and
11844 `toknum', which were handled by...
11845 (output_rule_data): this.
11846 Remove, and move the remainder of its outputs into...
11847 (prepare_rules): this new routines, which also merges content from
11848 (output_gram): this.
11849 (prepare_rules): Be sure never to walk through RITEMS.
11850 (output_stos): Rename as...
11851 (prepare_stos): this.
11852 (output): Always invoke prepare_states, after all, just don't use it
11853 in the output if you don't need it.
11854
11855 2002-04-07 Akim Demaille <akim@epita.fr>
11856
11857 * src/LR0.c (new_state): Display `nstates' as the name of the
11858 newly created state.
11859 Adjust to initialize first_state and last_state if needed.
11860 Be sure to distinguish the initial from the final state.
11861 (new_states): Create the itemset of the initial state, and use
11862 new_state.
11863 * src/closure.c (closure): Now that the initial state has its
11864 items properly set, there is no need for a special case when
11865 creating `ruleset'.
11866
11867 As a result, now the rule 0, reducing to $axiom, is visible in the
11868 outputs. Adjust the test suite.
11869
11870 * tests/conflicts.at (Solved SR Conflicts)
11871 (Unresolved SR Conflicts): Adjust.
11872 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11873 * tests/conflicts.at (S/R in initial): New.
11874
11875 2002-04-07 Akim Demaille <akim@epita.fr>
11876
11877 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11878 the RHS of the rules.
11879 * src/output.c (output_gram): Likewise.
11880
11881 2002-04-07 Akim Demaille <akim@epita.fr>
11882
11883 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11884 bucket.
11885 Adjust all dependencies.
11886 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11887 `number' of the buckets too.
11888 * src/gram.h: Include `symtab.h'.
11889 (associativity): Move to...
11890 * src/symtab.h: here.
11891 No longer include `gram.h'.
11892
11893 2002-04-07 Akim Demaille <akim@epita.fr>
11894
11895 * src/gram.h, src/gram.c (rules_rhs_length): New.
11896 (ritem_longest_rhs): Use it.
11897 * src/gram.h (rule_t): `number' is a new member.
11898 * src/reader.c (packgram): Set it.
11899 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11900 the end of `rules', and count them out of `nrules'.
11901 (reduce_output, dump_grammar): Adjust.
11902 * src/print.c (print_grammar): It is no longer needed to check for
11903 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11904 * tests/reduce.at (Reduced Automaton): New test.
11905
11906 2002-04-07 Akim Demaille <akim@epita.fr>
11907
11908 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11909 lacking `+ 1' to nrules, Bison reported as useless a token if it
11910 was used solely to set the precedence of the last rule...
11911
11912 2002-04-07 Akim Demaille <akim@epita.fr>
11913
11914 * data/bison.c++, data/bison.simple: Don't output the current file
11915 name in #line, to avoid useless diffs between two identical
11916 outputs under different names.
11917
11918 2002-04-07 Akim Demaille <akim@epita.fr>
11919
11920 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11921 Normalize loops to using `< nrules + 1', not `<= nrules'.
11922
11923 2002-04-07 Akim Demaille <akim@epita.fr>
11924
11925 * TODO: Update.
11926
11927 2002-04-07 Akim Demaille <akim@epita.fr>
11928
11929 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11930 bucket.value as bucket.number.
11931
11932 2002-04-07 Akim Demaille <akim@epita.fr>
11933
11934 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11935 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11936 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11937 RHS, instead of being an index in RITEMS.
11938
11939 2002-04-04 Paul Eggert <eggert@twinsun.com>
11940
11941 * doc/bison.texinfo: Update copyright date.
11942 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11943 (Symbols): Warn about running Bison in one character set,
11944 but compiling and/or running in an incompatible one.
11945 Warn about character code 256, too.
11946
11947 2002-04-03 Paul Eggert <eggert@twinsun.com>
11948
11949 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11950 YYERROR_VERBOSE is nonzero, not whether it is defined.
11951
11952 Merge changes from bison-1_29-branch.
11953
11954 2002-03-20 Paul Eggert <eggert@twinsun.com>
11955
11956 Merge fixes from Debian bison_1.34-1.diff.
11957
11958 * configure.in (AC_PREREQ): 2.53.
11959
11960 2002-03-20 Akim Demaille <akim@epita.fr>
11961
11962 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11963
11964 2002-03-19 Paul Eggert <eggert@twinsun.com>
11965
11966 * src/bison.simple (YYCOPY): New macro.
11967 (YYSTACK_RELOCATE): Use it.
11968 Remove Type arg; no longer needed. All callers changed.
11969 (yymemcpy): Remove; no longer needed.
11970
11971 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11972 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11973
11974 2002-03-19 Akim Demaille <akim@epita.fr>
11975
11976 Test and fix the #line outputs.
11977
11978 * tests/atlocal.at (GCC): New.
11979 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11980 (Prologue synch line, %union synch line, Postprologue synch line)
11981 (Action synch line, Epilogue synch line): New tests.
11982 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11983 * data/bison.simple, data/bison.c++: Use it.
11984
11985 2002-03-19 Akim Demaille <akim@epita.fr>
11986
11987 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11988 (Solved SR Conflicts, %expect not enough, %expect right)
11989 (%expect too much): Move to...
11990 * tests/conflicts.at: this new file.
11991
11992 2002-03-19 Akim Demaille <akim@epita.fr>
11993
11994 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11995 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11996 that we can move to enums for instance.
11997 * src/output.c (token_definitions_output): Output a list of
11998 `token-name, token-number' instead of the #define.
11999 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12000
12001 2002-03-14 Akim Demaille <akim@epita.fr>
12002
12003 Use Gettext 0.11.1.
12004
12005 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
12006
12007 * data/bison.c++: Make the user able to add members to the generated
12008 parser by subclassing.
12009
12010 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
12011
12012 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12013 a character.
12014 Reported by Nicolas Tisserand and Nicolas Burrus.
12015
12016 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12017
12018 * src/reader.c: Warn about lacking semi-colons, do not complain.
12019
12020 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12021
12022 * data/bison.c++: Remove a debug line.
12023
12024 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12025
12026 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12027 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12028 provide a default implementation.
12029
12030 2002-03-04 Akim Demaille <akim@epita.fr>
12031
12032 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12033 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12034 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12035 * tests/semantic.at (Parsing Guards): Similarly.
12036 * src/reader.at (readgram): Complain if the last rule is not ended
12037 with a semi-colon.
12038
12039 2002-03-04 Akim Demaille <akim@epita.fr>
12040
12041 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12042 * src/closure.c: here.
12043 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12044 RTC.
12045 * src/warshall.h, src/warshall.c: Remove.
12046 * tests/sets.at (Broken Closure): Adjust.
12047
12048 2002-03-04 Akim Demaille <akim@epita.fr>
12049
12050 * src/output.c (output_skeleton): tempdir is const.
12051 bytes_read is unused.
12052
12053 2002-03-04 Akim Demaille <akim@epita.fr>
12054
12055 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12056 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12057 Update.
12058 From Michael Hayes.
12059
12060 2002-03-04 Akim Demaille <akim@epita.fr>
12061
12062 * src/closure.c (closure): `r' is unused.
12063
12064 2002-03-04 Akim Demaille <akim@epita.fr>
12065
12066 * tests/sets.at (Broken Closure): Add the ending `;'.
12067 * src/reader.at (readgram): Complain if a rule is not ended with a
12068 semi-colon.
12069
12070 2002-03-04 Akim Demaille <akim@epita.fr>
12071
12072 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12073 (count_sr_conflicts): Use bitset_count.
12074 * src/reduce.c (inaccessable_symbols): Ditto.
12075 (bits_size): Remove.
12076 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12077
12078 2002-03-04 Akim Demaille <akim@epita.fr>
12079
12080 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12081 * src/reduce.c: Remove the `bitset_zero's following the
12082 `bitset_create's, as now it is performed by the latter.
12083
12084 2002-03-04 Akim Demaille <akim@epita.fr>
12085
12086 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12087 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12088 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12089 latest sources from Michael.
12090
12091 2002-03-04 Akim Demaille <akim@epita.fr>
12092
12093 * src/output.c (output): Don't free the grammar.
12094 * src/reader.c (grammar_free): New.
12095 * src/main.c (main): Call it and don't free symtab here.
12096
12097 2002-03-04 Akim Demaille <akim@epita.fr>
12098
12099 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12100 before returning.
12101 Reported by Benoit Perrot.
12102
12103 2002-03-04 Akim Demaille <akim@epita.fr>
12104
12105 Use bitset operations when possible, not loops over bits.
12106
12107 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12108 bitset_or.
12109 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12110 * src/reduce.c (useless_nonterminals): Formatting changes.
12111 * src/warshall.c (TC): Use bitset_or.
12112
12113 2002-03-04 Akim Demaille <akim@epita.fr>
12114
12115 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12116 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12117 Ditto.
12118
12119 2002-03-04 Akim Demaille <akim@epita.fr>
12120
12121 * src/lalr.c (F): Now a bitset*.
12122 Adjust all dependencies.
12123
12124 2002-03-04 Akim Demaille <akim@epita.fr>
12125
12126 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12127 Adjust all dependencies.
12128
12129 2002-03-04 Akim Demaille <akim@epita.fr>
12130
12131 * src/L0.c, src/LR0.h (nstates): Be size_t.
12132 Adjust comparisons (signed vs unsigned).
12133 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12134 bitset*.
12135 Adjust all dependencies.
12136
12137 2002-03-04 Akim Demaille <akim@epita.fr>
12138
12139 * src/closure.c (firsts): Now, also a bitset.
12140 Adjust all dependencies.
12141 (varsetsize): Remove, now unused.
12142 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12143
12144 2002-03-04 Akim Demaille <akim@epita.fr>
12145
12146 * src/print.c: Convert to use bitset.h, not hand coded iterations
12147 over ints.
12148
12149 2002-03-04 Akim Demaille <akim@epita.fr>
12150
12151 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12152
12153 2002-03-04 Akim Demaille <akim@epita.fr>
12154
12155 * src/closure.c (ruleset): Be a bitset.
12156 (rulesetsize): Remove.
12157
12158 2002-03-04 Akim Demaille <akim@epita.fr>
12159
12160 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12161 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12162 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12163 * src/closure.c (fderives): Be an array of bitsets.
12164
12165 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
12166
12167 * data/bison.c++: Merge the two generated headers. Insert a copyright
12168 notice in each output file.
12169
12170 2002-02-28 Akim Demaille <akim@epita.fr>
12171
12172 * data/bison.c++: Copy the prologue of bison.simple to fetch
12173 useful M4 definitions, such as b4_header_guard.
12174
12175 2002-02-25 Akim Demaille <akim@epita.fr>
12176
12177 * src/getargs.c (version): Give the name of the authors, and use a
12178 translator friendly scheme for the bgr
12179 copyright notice.
12180
12181 2002-02-25 Akim Demaille <akim@epita.fr>
12182
12183 * src/output.c (header_output): Remove, now handled completely via
12184 M4.
12185
12186 2002-02-25 Akim Demaille <akim@epita.fr>
12187
12188 * m4/m4.m4: New, from CVS Autoconf.
12189 * configure.in: Invoke it.
12190 * src/output.c (output_skeleton): Use its result instead of the
12191 hard coded name.
12192
12193 2002-02-25 Akim Demaille <akim@epita.fr>
12194
12195 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12196 Fileutils 4.1.5.
12197 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12198 * src/output.c (output_skeleton): Use mkstemp to create a real
12199 temporary file.
12200 Move the filling of `skeleton' and its muscle to...
12201 (prepare): here.
12202 (output): Move the definition of the prologue muscle to...
12203 (prepare): here.
12204 * src/system.h (DEFAULT_TMPDIR): New.
12205
12206 2002-02-14 Paul Eggert <eggert@twinsun.com>
12207
12208 Remove the support for C++ namespace cleanliness; it was
12209 causing more problems than it was curing, since it didn't work
12210 properly on some nonstandard C++ compilers. This can wait
12211 for a proper C++ parser.
12212
12213 * NEWS: Document this.
12214 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12215 of C++, as it's treated like C now.
12216 * src/bison.simple (YYSTD): Remove.
12217 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12218 Treat C++ just like Standard C instead of trying to support
12219 namespace cleanliness.
12220
12221 2002-02-14 Akim Demaille <akim@epita.fr>
12222
12223 * tests/regression.at (else): Adjust to Andreas' change.
12224
12225 2002-02-14 Akim Demaille <akim@epita.fr>
12226
12227 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12228
12229 2002-02-13 Andreas Schwab <schwab@suse.de>
12230
12231 * src/output.c (output_rule_data): Don't output NULL, it might
12232 not be defined yet.
12233
12234 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12235
12236 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12237 (Copyright notice): Update.
12238
12239 2002-02-11 Akim Demaille <akim@epita.fr>
12240
12241 * tests/regression.at (%nonassoc and eof): Don't include
12242 nonportable headers.
12243
12244 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12245
12246 * data/bison.c++: Correct error recovery. Make the user able to
12247 initialize the starting location.
12248
12249 2002-02-07 Akim Demaille <akim@epita.fr>
12250
12251 * tests/input.at: New.
12252
12253 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12254
12255 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12256 more consistent when naming methods and variables. Put preprocessor
12257 directives around tables only needed for debugging.
12258
12259 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12260
12261 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12262 C++ parsers.
12263 (yy::b4_name::parse): Use print_.
12264
12265 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12266
12267 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12268
12269 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12270
12271 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12272 C++ parsers.
12273 (yy::b4_name::parse): Build verbose error messages, and use error_.
12274
12275 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12276
12277 * data/bison.c++: Fix m4 quoting in comments.
12278
12279 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12280
12281 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12282 not expanded by m4.
12283
12284 2002-02-05 Akim Demaille <akim@epita.fr>
12285
12286 * data/bison.c++: Adjust to the M4 back end.
12287 More is certainly needed.
12288
12289 2002-02-05 Akim Demaille <akim@epita.fr>
12290
12291 Give a try to M4 as a back end.
12292
12293 * lib/readpipe.c: New, from wdiff.
12294 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12295 BISON_HAIRY.
12296 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12297 specific values. Now it is m4 that performs the lookup.
12298 * src/parse-skel.y: Remove.
12299 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12300 * src/output.c (actions_output, guards_output)
12301 (token_definitions_output): No longer keeps track of the output
12302 line number, hence remove the second argument.
12303 (guards_output): Check against the guard member of a rule, not the
12304 action member.
12305 Adjust callers.
12306 (output_skeleton): Don't look for the skeleton location, let m4 do
12307 that.
12308 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12309 file will be used.
12310 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12311 (prepare): Given that for the time being changesyntax is not
12312 usable in M4, rename the muscles using `-' to `_'.
12313 Define `defines_flag', `output_parser_name' and `output_header_name'.
12314 * src/output.h (actions_output, guards_output)
12315 (token_definitions_output): Adjust prototypes.
12316 * src/scan-skel.l: Instead of scanning the skeletons, it now
12317 processes the output of m4: `__oline__' and `#output'.
12318 * data/bison.simple: Adjust to be used by M4(sugar).
12319 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12320 to date.
12321 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12322 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12323 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12324 shamelessly stolen from CVS Autoconf.
12325
12326 2002-02-05 Akim Demaille <akim@epita.fr>
12327
12328 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12329 * configure.in: Check for the declarations of free and malloc.
12330 * src/muscle_tab.c: Adjust.
12331
12332 2002-02-05 Akim Demaille <akim@epita.fr>
12333
12334 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12335 which have no values.
12336
12337 2002-02-05 Akim Demaille <akim@epita.fr>
12338
12339 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12340 * data/: here.
12341
12342 2002-01-29 Paul Eggert <eggert@twinsun.com>
12343
12344 * src/bison.simple (YYSIZE_T): Do not define merely because
12345 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12346 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12347
12348 2002-01-27 Akim Demaille <akim@epita.fr>
12349
12350 Fix `%nonassoc and eof'.
12351
12352 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12353 which were not properly copied! Replace
12354 memcpy (res->errs, src->errs, src->nerrs);
12355 with
12356 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12357 !!!
12358 * tests/regression.at (%nonassoc and eof): Adjust to newest
12359 Autotest: `.' is not in the PATH.
12360
12361 2002-01-27 Akim Demaille <akim@epita.fr>
12362
12363 * tests/sets.at (AT_EXTRACT_SETS): New.
12364 (Nullable): Use it.
12365 (Firsts): New.
12366
12367 2002-01-26 Akim Demaille <akim@epita.fr>
12368
12369 * tests/actions.at, tests/calc.at, tests/headers.at,
12370 * tests/torture.at: Adjust to the newest Autotest which no longer
12371 forces `.' in the PATH.
12372
12373 2002-01-25 Akim Demaille <akim@epita.fr>
12374
12375 * tests/regression.at (%nonassoc and eof): New.
12376 Suggested by Robert Anisko.
12377
12378 2002-01-24 Akim Demaille <akim@epita.fr>
12379
12380 Bison dumps core when trying to complain about broken input files.
12381 Reported by Cris van Pelt.
12382
12383 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12384 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12385 into...
12386 (Invalid inputs): Strengthen: exercise parse_percent_token.
12387
12388 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12389
12390 * src/Makefile.am: Add bison.c++.
12391 * src/bison.c++: New skeleton.
12392
12393 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12394
12395 * po/it.po: New.
12396
12397 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12398
12399 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12400
12401 2002-01-20 Marc Autret <marc@gnu.org>
12402
12403 * src/files.c (compute_output_file_names): Fix
12404
12405 2002-01-20 Marc Autret <marc@gnu.org>
12406
12407 * tests/output.at: New test.
12408 * src/files.c (compute_base_names): Don't map extensions when
12409 the YACC flag is set, use defaults.
12410 Reported by Evgeny Stambulchik.
12411
12412 2002-01-20 Marc Autret <marc@gnu.org>
12413
12414 * src/system.h: Need to define __attribute__ away for non-GCC
12415 compilers as well (i.e., the vendor C compiler).
12416 Suggested by Albert Chin-A-Young.
12417
12418 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12419
12420 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12421 canonical definition.
12422 * src/system.h: Use the canonical definition for PARAMS (avoids
12423 a conflict with the macro from lib/hash.h).
12424
12425 2002-01-11 Akim Demaille <akim@epita.fr>
12426
12427 * configure.in: Use AC_FUNC_STRNLEN.
12428 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12429
12430 2002-01-09 Akim Demaille <akim@epita.fr>
12431
12432 * src/files.c, src/files.h (output_infix): New.
12433 (tab_extension): Remove.
12434 (compute_base_names): Compute the former, drop the latter.
12435 * src/output.c (prepare): Insert the muscles `output-infix', and
12436 `output-suffix'.
12437 * src/parse-skel.y (string, string.1): New.
12438 (section.header): Use it.
12439 (section.yacc): Remove.
12440 (prefix): Remove too.
12441 * src/scan-skel.l: Adjust.
12442 * src/bison.simple, src/bison.hairy: Adjust.
12443
12444 2002-01-09 Akim Demaille <akim@epita.fr>
12445
12446 * configure.in (WERROR_CFLAGS): Compute it.
12447 * src/Makefile.am (CFLAGS): Pass it.
12448 * tests/atlocal.in (CFLAGS): Idem.
12449 * src/files.c: Fix a few warnings.
12450 (get_extension_index): Remove, unused.
12451
12452 2002-01-08 Akim Demaille <akim@epita.fr>
12453
12454 * src/getargs.c (AS_FILE_NAME): New.
12455 (getargs): Use it to convert DOSish file names.
12456 * src/files.c (base_name): Rename as full_base_name to avoid
12457 clashes with `base_name ()'.
12458 (filename_split): New.
12459 (compute_base_names): N-th rewrite, using filename_split.
12460
12461 2002-01-08 Akim Demaille <akim@epita.fr>
12462
12463 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12464 New, stolen from the Fileutils 4.1.
12465 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12466 * configure.in: Check for the presence of memrchr, and of its
12467 prototype.
12468
12469 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12470
12471 * lib/hash.h (__P): Added definition for this macro.
12472 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12473 BUILT_SOURCES, to ensure they are generated first.
12474 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12475 %error-verbose to allow bootstrapping with bison 1.30x.
12476
12477 2002-01-06 Akim Demaille <akim@epita.fr>
12478
12479 * src/reader.c (parse_braces): Don't fetch the next char, the
12480 convention is to fetch on entry.
12481 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12482 'switch' without a following semicolon.
12483 * tests/regression.at (braces parsing): New.
12484
12485 2002-01-06 Akim Demaille <akim@epita.fr>
12486
12487 Bison is dead wrong in its RR conflict reports.
12488
12489 * tests/torture.at (GNU Cim Grammar): New.
12490 * src/conflicts.c (count_rr_conflicts): Fix.
12491
12492 2002-01-06 Akim Demaille <akim@epita.fr>
12493
12494 Creating package.m4 from configure.ac causes too many problems.
12495
12496 * tests/Makefile.am (package.m4): Create it by hand,
12497 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12498
12499 2002-01-06 Akim Demaille <akim@epita.fr>
12500
12501 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12502 skeleton.h.
12503
12504 2002-01-04 Paul Eggert <eggert@twinsun.com>
12505
12506 * doc/bison.texinfo (Debugging):
12507 Remove YYSTDERR; it's no longer defined or used.
12508 Also, s/cstdio.h/cstdio/.
12509
12510 2002-01-03 Akim Demaille <akim@epita.fr>
12511
12512 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12513
12514 2002-01-03 Akim Demaille <akim@epita.fr>
12515
12516 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12517 tracing code to --trace, wait for a better --trace option, with
12518 args.
12519
12520 2002-01-03 Akim Demaille <akim@epita.fr>
12521
12522 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12523 The ISO C++ standard is extremely clear about it: stderr is
12524 considered a macro, not a regular symbol (see table 94 `Header
12525 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12526 Therefore std:: does not apply to it. It still does with fprintf.
12527 Also, s/cstdio.h/cstdio/.
12528
12529 2002-01-03 Akim Demaille <akim@epita.fr>
12530
12531 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12532 for non system headers.
12533
12534 2002-01-02 Akim Demaille <akim@epita.fr>
12535
12536 Equip the skeleton chain with location tracking, runtime trace,
12537 pure parser and scanner.
12538
12539 * src/parse-skel.y: Request a pure parser, locations, and prefix
12540 renaming.
12541 (%union): Having several members with the same type does not help
12542 type mismatches, simplify.
12543 (YYPRINT, yyprint): New.
12544 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12545 (skel_error): this.
12546 Handle locations.
12547 * src/scan-skel.l: Adjust to these changes.
12548 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12549 (LOCATION_PRINT, skel_control_t): New.
12550
12551 2001-12-30 Akim Demaille <akim@epita.fr>
12552
12553 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12554 replace `gb' with BLANKS.
12555 * src/scan-skel.l: Adjust.
12556
12557 2001-12-30 Akim Demaille <akim@epita.fr>
12558
12559 * src/system.h: We don't need nor want bcopy.
12560 Throw away MS-DOS crap: we don't need getpid.
12561 * configure.in: We don't need strndup. It was even causing
12562 problems: because Flex includes the headers *before* us,
12563 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12564 not visible.
12565 * lib/xstrndup.c: New.
12566 * src/scan-skel.l: Use it.
12567 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12568 * src/parse-skel.y: Use %directives instead of #defines.
12569
12570 2001-12-30 Akim Demaille <akim@epita.fr>
12571
12572 * src/skeleton.h: New.
12573 * src/output.c (output_parser, output_master_parser): Remove, dead
12574 code.
12575 * src/output.h (get_lines_number, actions_output, guards_output)
12576 (token_definitions_output): Prototype them.
12577 * src/parse-skel.y: Add the license notice.
12578 Include output.h and skeleton.h.
12579 (process_skeleton): Returns void, and takes a single parameter.
12580 * src/scan-skel.l: Add the license notice.
12581 Include skeleton.h.
12582 Don't use %option yylineno: it seems that then Flex imagines
12583 REJECT has been used, and therefore it won't reallocate its
12584 buffers (which makes no other sense to me than a bug). It results
12585 in warnings for `unused: yy_flex_realloc'.
12586
12587 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12588
12589 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12590 (MUSCLE_INSERT_PREFIX): ...to there.
12591 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12592 (MUSCLE_INSERT_PREFIX): Move from here...
12593
12594 * src/bison.hairy: Add a section directive. Put braces around muscle
12595 names. This parser skeleton is still broken, but Bison should not
12596 choke on a bad muscle 'syntax'.
12597 * src/bison.simple: Add a section directive. Put braces around muscle
12598 names.
12599
12600 * src/files.h (strsuffix, stringappend): Add declarations.
12601 (tab_extension): Add declaration.
12602 (short_base_name): Add declaration.
12603
12604 * src/files.c (strsuffix, stringappend): No longer static. These
12605 functions are used in the skeleton parser.
12606 (tab_extension): New.
12607 (compute_base_names): Use the computations done in this function
12608 to guess if the generated parsers should have '.tab' in their
12609 names.
12610 (short_base_name): No longer static.
12611
12612 * src/output.c (output_skeleton): New.
12613 (output): Disable call to output_master_parser, and give a try to
12614 a new skeleton handling system.
12615 (guards_output, actions_output): No longer static.
12616 (token_definitions_output, get_lines_number): No longer static.
12617
12618 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12619
12620 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12621 parse-skel.y.
12622
12623 * src/parse-skel.y: New file.
12624 * src/scan-skel.l: New file.
12625
12626 2001-12-29 Akim Demaille <akim@epita.fr>
12627
12628 %name-prefix is broken.
12629
12630 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12631 Adjust all dependencies.
12632 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12633 %name-prefix.
12634
12635 Renaming yylval but not yylloc is not consistent. Now we do.
12636
12637 * src/bison.simple: Prefix yylloc if used.
12638 * doc/bison.texinfo (Decl Summary): Document that.
12639
12640 2001-12-29 Akim Demaille <akim@epita.fr>
12641
12642 * doc/bison.texinfo: Promote `%long-directive' over
12643 `%long_directive'.
12644 Remove all references to fixed-output-files, yacc is enough.
12645
12646 2001-12-29 Akim Demaille <akim@epita.fr>
12647
12648 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12649 user prologue. These are defaults.
12650 * tests/actions.at (Mid-rule actions): Make sure the user can
12651 define YYDEBUG and YYERROR_VERBOSE.
12652
12653 2001-12-29 Akim Demaille <akim@epita.fr>
12654
12655 * src/output.c (header_output): Don't forget to export YYLTYPE and
12656 yylloc.
12657 * tests/headers.at (export YYLTYPE): New, make sure it does.
12658 * tests/regression.at (%union and --defines, Invalid CPP headers):
12659 Move to...
12660 * tests/headers.at: here.
12661
12662 2001-12-29 Akim Demaille <akim@epita.fr>
12663
12664 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12665
12666 2001-12-29 Akim Demaille <akim@epita.fr>
12667
12668 * tests/actions.at (Mid-rule actions): Output on a single line
12669 instead of several.
12670
12671 2001-12-29 Akim Demaille <akim@epita.fr>
12672
12673 * doc/bison.texinfo: Formatting changes.
12674
12675 2001-12-29 Akim Demaille <akim@epita.fr>
12676
12677 Don't store the token defs in a muscle, just be ready to output it
12678 on command. Now possible via `symbols'. Fixes a memory leak.
12679
12680 * src/output.c (token_definitions_output): New.
12681 (output_parser, header_output): Use it.
12682 * src/reader.c (symbols_save): Remove.
12683
12684 2001-12-29 Akim Demaille <akim@epita.fr>
12685
12686 * src/bison.simple: Do not provide a default for YYSTYPE and
12687 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12688 default.
12689
12690 2001-12-29 Akim Demaille <akim@epita.fr>
12691
12692 Mid-rule actions are simply... ignored!
12693
12694 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12695 the empty-rule associated to the dummy symbol, not to the host
12696 rule.
12697 * tests/actions.at (Mid-rule actions): New.
12698
12699 2001-12-29 Akim Demaille <akim@epita.fr>
12700
12701 Memory leak.
12702
12703 * src/reader.c (reader): Free grammar.
12704
12705 2001-12-29 Akim Demaille <akim@epita.fr>
12706
12707 Memory leak.
12708
12709 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12710 since it allocates it for each state, although only one is needed.
12711 (allocate_storage): Do it here.
12712
12713 2001-12-29 Akim Demaille <akim@epita.fr>
12714
12715 * src/options.h, src/options.c (create_long_option_table): Rename
12716 as...
12717 (long_option_table_new): this, with a clearer prototype.
12718 (percent_table): Remove, unused,
12719 * src/getargs.c (getargs): Adjust.
12720
12721 2001-12-29 Akim Demaille <akim@epita.fr>
12722
12723 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12724 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12725 as states.
12726
12727 2001-12-29 Akim Demaille <akim@epita.fr>
12728
12729 * src/lalr.c (build_relations): Rename `states' as `states1'.
12730 Sorry, I don't understand exactly what it is, no better name...
12731
12732 2001-12-29 Akim Demaille <akim@epita.fr>
12733
12734 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12735 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12736 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12737 as rules.
12738
12739 2001-12-29 Akim Demaille <akim@epita.fr>
12740
12741 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12742 ago.
12743
12744 2001-12-29 Akim Demaille <akim@epita.fr>
12745
12746 * src/reader.c, src/reader.h (user_toknums): Remove.
12747 Adjust all users to use symbols[i]->user_token_number.
12748
12749 2001-12-29 Akim Demaille <akim@epita.fr>
12750
12751 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12752 Adjust all users to use symbols[i]->prec or ->assoc.
12753
12754 2001-12-29 Akim Demaille <akim@epita.fr>
12755
12756 * src/reader.c, src/reader.h (tags): Remove.
12757 Adjust all users to use symbols[i]->tag.
12758
12759 2001-12-29 Akim Demaille <akim@epita.fr>
12760
12761 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12762 and rule_table.
12763 * src/reader.c (packsymbols): Fill this table.
12764 Drop sprec.
12765 * src/conflicts.c (resolve_sr_conflict): Adjust.
12766 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12767 single table.
12768 Use symbols[i]->tag instead of tags[i].
12769
12770 2001-12-29 Akim Demaille <akim@epita.fr>
12771
12772 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12773 In addition, put a comment in there, to replace...
12774 * tests/regression.at (%union and C comments): Remove.
12775
12776 2001-12-29 Akim Demaille <akim@epita.fr>
12777
12778 * tests/regression.at (Web2c Actions): Blindly move the actual
12779 output as expected output. The contents *seem* right to me, but I
12780 can't pretend reading perfectly parser tables... Nonetheless, all
12781 the other tests pass correctly, the table look OK, even though the
12782 presence of `$axiom' is to be noted: AFAICS it is useless (but
12783 harmless).
12784
12785 2001-12-29 Akim Demaille <akim@epita.fr>
12786
12787 * src/reader.c (readgram): Don't add the rule 0 if there were no
12788 rules read. In other words, add it _after_ having performed
12789 grammar sanity checks.
12790 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12791
12792 2001-12-29 Akim Demaille <akim@epita.fr>
12793
12794 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12795 visible, and some states have now a different number.
12796
12797 2001-12-29 Akim Demaille <akim@epita.fr>
12798
12799 * src/reader.c (readgram): Bind the initial rule's lineno to that
12800 of the first rule.
12801 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12802 (Solved SR Conflicts): Adjust rule 0's line number.
12803
12804 2001-12-29 Akim Demaille <akim@epita.fr>
12805
12806 Fix the `GAWK Grammar' failure.
12807
12808 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12809 the reductions of the first state which was mistakenly confused
12810 with the final state because precisely final_state was initialized
12811 to 0.
12812 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12813 now noticed by Bison.
12814 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12815 have a reduction on $default.
12816
12817 2001-12-29 Akim Demaille <akim@epita.fr>
12818
12819 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12820 rule line numbers.
12821 * src/closure.c (print_closure): Likewise.
12822 * src/derives.c (print_derives): Likewise.
12823 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12824 now.
12825
12826 2001-12-29 Akim Demaille <akim@epita.fr>
12827
12828 * src/lalr.c (lookaheads_print): New.
12829 (lalr): Call it when --trace-flag.
12830 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12831 are dumped.
12832
12833 2001-12-29 Akim Demaille <akim@epita.fr>
12834
12835 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12836 when walking through ritem, even via rule->rhs.
12837 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12838 (useful_production, useless_nonterminals): Likewise.
12839 (reduce_grammar_tables): Likewise, plus update nritems.
12840 * src/nullable.c (set_nullable): Likewise.
12841 * src/lalr.c (build_relations): Likewise.
12842 * tests/sets.at (Nullable): Adjust.
12843 Fortunately, now, the $axiom is no longer nullable.
12844
12845 2001-12-29 Akim Demaille <akim@epita.fr>
12846
12847 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12848 the 0-sentinel.
12849 * src/gram.c (ritem_longest_rhs): Likewise.
12850 * src/reduce.c (nonterminals_reduce): Likewise.
12851 * src/print_graph.c (print_graph): Likewise.
12852 * src/output.c (output_rule_data): Likewise.
12853 * src/nullable.c (set_nullable): Likewise.
12854
12855 2001-12-29 Akim Demaille <akim@epita.fr>
12856
12857 * src/output.c: Comment changes.
12858
12859 2001-12-27 Paul Eggert <eggert@twinsun.com>
12860
12861 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12862 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12863 Sparc, as they were causing more porting problems than the
12864 (minor) performance improvement was worth.
12865
12866 Also, catch up with 1.31's YYSTD.
12867
12868 2001-12-27 Akim Demaille <akim@epita.fr>
12869
12870 * src/output.c (output_gram): Rely on nritems, not the
12871 0-sentinel. See below.
12872 Use -1 as separator, not 0.
12873 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12874 Rely on -1 as separator in yyrhs, instead of 0.
12875 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12876 twice `Now at end of input', therefore there are two lines less to
12877 expect.
12878
12879 2001-12-27 Akim Demaille <akim@epita.fr>
12880
12881 * tests/regression.at (Unresolved SR Conflicts):
12882 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12883 below.
12884
12885 2001-12-27 Akim Demaille <akim@epita.fr>
12886
12887 * src/LR0.c (new_state): Recognize the final state by the fact it
12888 is reached by eoftoken.
12889 (insert_start_shifting_state, insert_eof_shifting_state)
12890 (insert_accepting_state, augment_automaton): Remove, since now
12891 these states are automatically computed from the initial state.
12892 (generate_states): Adjust.
12893 * src/print.c: When reporting a rule number to the user, substract
12894 1, so that the axiom rule is rule 0, and the first user rule is 1.
12895 * src/reduce.c: Likewise.
12896 * src/print_graph.c (print_core): For the time being, just as for
12897 the report, depend upon --trace-flags to dump the full set of
12898 items.
12899 * src/reader.c (readgram): Once the grammar read, insert the rule
12900 0: `$axiom: START-SYMBOL $'.
12901 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12902 number of the states has changed (the final state is no longer
12903 necessarily the last), catch up.
12904
12905 2001-12-27 Akim Demaille <akim@epita.fr>
12906
12907 Try to make the use of the eoftoken valid. Given that its value
12908 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12909 is used instead of > 0 where appropriate, (ii), depend upon nritems
12910 instead of the 0-sentinel.
12911
12912 * src/gram.h, src/gram.c (nritems): New.
12913 Expected to be duplication of nitems, but for the time being...
12914 * src/reader.c (packgram): Assert nritems and nitems are equal.
12915 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12916 * src/closure.c (print_closure, print_fderives): Likewise.
12917 * src/gram.c (ritem_print): Likewise.
12918 * src/print.c (print_core, print_grammar): Likewise.
12919 * src/print_graph.c: Likewise.
12920
12921 2001-12-27 Akim Demaille <akim@epita.fr>
12922
12923 * src/main.c (main): If there are complains after grammar
12924 reductions, then output the report anyway if requested, then die.
12925 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12926 * src/reader.c (eoftoken): New.
12927 (parse_token_decl): If the token being defined has value `0', it
12928 is the eoftoken.
12929 (packsymbols): No longer hack `tags' to insert `$' by hand.
12930 Be sure to preserve the value of the eoftoken.
12931 (reader): Make sure eoftoken is defined.
12932 Initialize nsyms to 0: now eoftoken is created just like the others.
12933 * src/print.c (print_grammar): Don't special case the eof token.
12934 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12935 lie anyway, albeit pleasant.
12936 * tests/calc.at: Exercise error messages with eoftoken.
12937 Change the grammar so that empty input is invalid.
12938 Adjust expectations.
12939 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12940
12941 2001-12-27 Akim Demaille <akim@epita.fr>
12942
12943 * configure.in: Check the protos of strchr ans strspn.
12944 Replace strchr if needed.
12945 * src/system.h: Provide the protos of strchr, strspn and memchr if
12946 missing.
12947 * lib/strchr.c: New.
12948 * src/reader.c (symbols_save): Use strchr.
12949
12950 2001-12-27 Akim Demaille <akim@epita.fr>
12951
12952 * src/print.c, src/print_graph.c (escape): New.
12953 Use it to quote the TAGS outputs.
12954 * src/print_graph.c (print_state): Now errors are in red, and
12955 reductions in green.
12956 Prefer high to wide: output the state number on a line of its own.
12957
12958 2001-12-27 Akim Demaille <akim@epita.fr>
12959
12960 * src/state.h, src/state.c (reductions_new): New.
12961 * src/LR0.c (set_state_table): Let all the states have a
12962 `reductions', even if reduced to 0.
12963 (save_reductions): Adjust.
12964 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12965 * src/print.c (print_reductions, print_actions): Adjust.
12966 * src/output.c (action_row): Adjust.
12967
12968 2001-12-27 Akim Demaille <akim@epita.fr>
12969
12970 * src/state.h, src/state.c (errs_new, errs_dup): New.
12971 * src/LR0.c (set_state_table): Let all the states have an errs,
12972 even if reduced to 0.
12973 * src/print.c (print_errs, print_reductions): Adjust.
12974 * src/output.c (output_actions, action_row): Adjust.
12975 * src/conflicts.c (resolve_sr_conflict): Adjust.
12976
12977 2001-12-27 Akim Demaille <akim@epita.fr>
12978
12979 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12980
12981 2001-12-27 Akim Demaille <akim@epita.fr>
12982
12983 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12984 * src/print.c: here.
12985 (lookaheadset, shiftset): New, used as additional storage by
12986 print_reductions.
12987 (print_results): Adjust.
12988 (print_shifts, print_gotos, print_errs): New, extracted from...
12989 (print_actions): here.
12990 * src/print_graph.c (print_actions): Remove dead code.
12991
12992 2001-12-27 Akim Demaille <akim@epita.fr>
12993
12994 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12995 `$n' and `@n'.
12996
12997 2001-12-27 Akim Demaille <akim@epita.fr>
12998
12999 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13000 (build_relations): Adjust.
13001
13002 2001-12-27 Akim Demaille <akim@epita.fr>
13003
13004 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13005 duplication.
13006
13007 2001-12-27 Akim Demaille <akim@epita.fr>
13008
13009 * src/reader.c (packgram): Catch nitems overflows.
13010
13011 2001-12-27 Akim Demaille <akim@epita.fr>
13012
13013 * src/files.c, src/files.h (guard_obstack): Remove.
13014 * src/output.c (output): Adjust.
13015 * src/reader.c (parse_braces): New, factoring...
13016 (copy_action, copy_guard): these two which are renamed as...
13017 (parse_action, parse_guard): these.
13018 As a voluntary consequence, using braces around guards is now
13019 mandatory.
13020
13021 2001-12-27 Akim Demaille <akim@epita.fr>
13022
13023 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13024 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13025 members.
13026 (symbol_list_new): Adjust.
13027 (copy_action): action_line is the first line, not the last.
13028 (copy_guard): Just as for actions, store the `action' only, not
13029 the switch/case/break flesh.
13030 Don't parse the user action that might follow the guard, let...
13031 (readgram): do it, i.e., now, there can be an action after a
13032 guard.
13033 In other words the guard is just explicitly optional.
13034 (packgram): Adjust.
13035 * src/output.c (guards_output): New.
13036 (output_parser): Call it when needed.
13037 (output): Also free the guard and attrs obstacks.
13038 * src/files.c, src/files.h (obstack_save): Remove.
13039 (output_files): Remove.
13040 As a result, if one needs the former `.act' file, using an
13041 appropriate skeleton which requires actions and guards is now
13042 required.
13043 * src/main.c (main): Adjust.
13044 * tests/semantic.at: New.
13045 * tests/regression.at: Use `input.y' as input file name.
13046 Avoid 8+3 problems by requiring input.c when the test needs the
13047 parser.
13048
13049 2001-12-27 Akim Demaille <akim@epita.fr>
13050
13051 * src/reader.c (symbol_list_new): Be sure to initialize all the
13052 fields.
13053
13054 2001-12-27 Akim Demaille <akim@epita.fr>
13055
13056 All the hacks using a final pseudo state are now useless.
13057
13058 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13059 * src/lalr.c (nLA): New.
13060 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13061 instead of lookaheadsp from the pseudo state (nstate + 1).
13062
13063 2001-12-27 Akim Demaille <akim@epita.fr>
13064
13065 * src/output.c (action_row, token_actions): Use a state_t instead
13066 of a integer, and nlookaheads instead of the following state's
13067 lookaheadsp.
13068
13069 2001-12-27 Akim Demaille <akim@epita.fr>
13070
13071 * src/conflicts.c (log_resolution, flush_shift)
13072 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13073 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13074 (conflicts_print, print_reductions): Use a state_t instead of an
13075 integer when referring to a state.
13076 As much as possible, depend upon nlookaheads, instead of the
13077 `lookaheadsp' member of the following state (since lookaheads of
13078 successive states are successive, the difference between state n + 1
13079 and n served as the number of lookaheads for state n).
13080 * src/lalr.c (add_lookback_edge): Likewise.
13081 * src/print.c (print_core, print_actions, print_state)
13082 (print_results): Likewise.
13083 * src/print_graph.c (print_core, print_actions, print_state)
13084 (print_graph): Likewise.
13085 * src/conflicts.h: Adjust.
13086
13087 2001-12-27 Akim Demaille <akim@epita.fr>
13088
13089 * src/bison.hairy: Formatting/comment changes.
13090 ANSIfy.
13091 Remove `register' indications.
13092 Add plenty of `static'.
13093
13094 2001-12-27 Akim Demaille <akim@epita.fr>
13095
13096 * src/output.c (prepare): Drop the muscle `ntbase' which
13097 duplicates ntokens.
13098 * src/bison.simple: Formatting/comment changes.
13099 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13100 is an undocumented synonym.
13101
13102 2001-12-22 Akim Demaille <akim@epita.fr>
13103
13104 * src/output.c (output_table_data): Change the prototype to use
13105 `int' for array ranges: some invocations do pass an int, not a
13106 short.
13107 Reported by Wayne Green.
13108
13109 2001-12-22 Akim Demaille <akim@epita.fr>
13110
13111 Some actions of web2c.y are improperly triggered.
13112 Reported by Mike Castle.
13113
13114 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13115 * tests/regression.at (Web2c): Rename as...
13116 (Web2c Report): this.
13117 (Web2c Actions): New.
13118
13119 2001-12-22 Akim Demaille <akim@epita.fr>
13120
13121 Reductions in web2c.y are improperly reported.
13122 Reported by Mike Castle.
13123
13124 * src/conflicts.c (print_reductions): Fix.
13125 * tests/regression.at (Web2c): New.
13126
13127 2001-12-18 Akim Demaille <akim@epita.fr>
13128
13129 Some host fail on `assert (!"foo")', which expands to
13130 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13131 Reported by Nelson Beebee.
13132
13133 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13134 `#define it_succeeded 0' and `assert (it_succeeded)'.
13135
13136 2001-12-17 Marc Autret <autret_m@epita.fr>
13137
13138 * src/bison.simple: Don't hard code the skeleton line and filename.
13139 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13140 New line counter 'skeleton_line' (skeleton-line muscle).
13141
13142 2001-12-17 Paul Eggert <eggert@twinsun.com>
13143
13144 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13145 YYDEBUG must be defined to a nonzero value.
13146
13147 * src/bison.simple (yytname): Do not assume that the user defines
13148 YYDEBUG to a properly parenthesized expression.
13149
13150 2001-12-17 Akim Demaille <akim@epita.fr>
13151
13152 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13153 nlookaheads is a new member.
13154 Adjust all users.
13155 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13156 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13157 state.
13158
13159 2001-12-17 Akim Demaille <akim@epita.fr>
13160
13161 * src/files.h, src/files.c (open_files, close_files): Remove.
13162 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13163 let...
13164 * src/reader.c (reader): Do it.
13165
13166 2001-12-17 Akim Demaille <akim@epita.fr>
13167
13168 * src/conflicts.c (print_reductions): Formatting changes.
13169
13170 2001-12-17 Akim Demaille <akim@epita.fr>
13171
13172 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13173 (flush_reduce): New.
13174 (resolve_sr_conflict): Adjust.
13175
13176 2001-12-17 Akim Demaille <akim@epita.fr>
13177
13178 * src/output.c (output_obstack): Be static and rename as...
13179 (format_obstack): this, to avoid any confusion with files.c's
13180 output_obstack.
13181 * src/reader.h (muscle_obstack): Move to...
13182 * src/output.h: here, since it's defined in output.c.
13183
13184 2001-12-17 Akim Demaille <akim@epita.fr>
13185
13186 * src/output.c (action_row, save_column, default_goto)
13187 (sort_actions, matching_state, pack_vector): Better variable
13188 locality.
13189
13190 2001-12-17 Akim Demaille <akim@epita.fr>
13191
13192 * src/output.c: Various formatting changes.
13193
13194 2001-12-17 Akim Demaille <akim@epita.fr>
13195
13196 * src/files.c (output_files): Free the output_obstack.
13197 * src/main.c (main): Call print and print_graph conditionally.
13198 * src/print.c (print): Work unconditionally.
13199 * src/print_graph.c (print_graph): Work unconditionally.
13200 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13201
13202 2001-12-16 Marc Autret <autret_m@epita.fr>
13203
13204 * src/output.c (actions_output): Fix. When we use %no-lines,
13205 there is one less line per action.
13206
13207 2001-12-16 Marc Autret <autret_m@epita.fr>
13208
13209 * src/bison.simple: Remove a useless #line directive.
13210 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13211 * src/output.c (get_lines_number): New.
13212 (output_parser): Adjust, now takes care about the lines of a
13213 output muscles.
13214 Fix line numbering.
13215 (actions_output): Computes the number of lines taken by actions.
13216 (output_master_parser): Insert new skeleton which is the name of
13217 the output parser file name.
13218
13219 2001-12-15 Marc Autret <autret_m@epita.fr>
13220
13221 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13222
13223 2001-12-15 Marc Autret <autret_m@epita.fr>
13224
13225 * src/output.c (output_gram): Keep track of the hairy one.
13226
13227 2001-12-15 Akim Demaille <akim@epita.fr>
13228
13229 Make `make distcheck' work.
13230
13231 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13232 system.h which uses libgettext.h.
13233
13234 2001-12-15 Akim Demaille <akim@epita.fr>
13235
13236 * src/nullable.c (set_nullable): Useless rules must be skipped,
13237 otherwise, since we range over their symbols, we might look at a
13238 nonterminal which no longer ``exists'', i.e., it is not counted in
13239 `nvars', hence we overflow our arrays.
13240
13241 2001-12-15 Akim Demaille <akim@epita.fr>
13242
13243 The header can also be produced directly, without any obstack!
13244 Yahoo!
13245
13246 * src/files.c, src/files.h (defines_obstack): Remove.
13247 (compute_header_macro): Global.
13248 (defines_obstack_save): Remove.
13249 * src/reader.c (parse_union_decl): No longer output to
13250 defines_obstack: its content can be found in the `stype' muscle
13251 anyway.
13252 (output_token_translations): Merge into...
13253 (symbols_output): this.
13254 Rename as...
13255 (symbols_save): this.
13256 (reader): Adjust.
13257 * src/output.c (header_output): New.
13258 (output): Call it.
13259
13260 2001-12-15 Akim Demaille <akim@epita.fr>
13261
13262 * src/reader.c (parse_union_decl): Instead of handling two obstack
13263 simultaneously, use one to define the `stype' muscle, and use the
13264 value of the latter to fill defines_obstack.
13265 (copy_comment): Remove.
13266 (copy_comment2): Work for a single obstack.
13267 Rename as...
13268 (copy_comment): this.
13269
13270 2001-12-15 Akim Demaille <akim@epita.fr>
13271
13272 * src/lex.c, src/lex.h (xgetc): No longer static.
13273 * src/reader.c (parse_union_decl): Revamp.
13274
13275 2001-12-15 Akim Demaille <akim@epita.fr>
13276
13277 Still making progress in separating Bison into (i) input, (ii)
13278 process, (iii) output: now we can directly output the parser file
13279 without using table_obstack at all.
13280
13281 * src/files.c, src/files.h (table_obstack): Bye bye.
13282 (parser_file_name): New.
13283 * src/files.c (compute_output_file_names): Compute it.
13284 * src/output.c (actions_output, output_parser)
13285 (output_master_parser): To a file instead of an obstack.
13286
13287 2001-12-15 Akim Demaille <akim@epita.fr>
13288
13289 Attach actions to rules, instead of pre-outputting them to
13290 actions_obstack.
13291
13292 * src/gram.h (rule_t): action and action_line are new members.
13293 * src/reader.c (symbol_list): Likewise.
13294 (copy_action): Save the actions within the rule.
13295 (packgram): Save them in rule_table.
13296 * src/output.c (actions_output): New.
13297 (output_parser): Use it on `%%actions'.
13298 (output_rule_data): Don't free rule_table.
13299 (output): Do it.
13300 (prepare): Don't save the `action' muscle.
13301 * src/bison.simple: s/%%action/%%actions/.
13302
13303 2001-12-15 Akim Demaille <akim@epita.fr>
13304
13305 * src/reader.c (copy_action): When --yacc, don't append a `;'
13306 to the user action: let it fail if lacking.
13307 Suggested by Arnold Robbins and Tom Tromey.
13308
13309 2001-12-14 Akim Demaille <akim@epita.fr>
13310
13311 * src/lex.c (literalchar): Simply return the char you decoded, non
13312 longer mess around with obstacks and int pointers.
13313 Adjust all callers.
13314
13315 2001-12-14 Akim Demaille <akim@epita.fr>
13316
13317 * src/lex.c (literalchar): Don't escape the special characters,
13318 just decode them, and keep them as char (before, eol was output as
13319 the 2 char string `\n' etc.).
13320 * src/output.c (output_rule_data): Use quotearg to output the
13321 token strings.
13322
13323 2001-12-13 Paul Eggert <eggert@twinsun.com>
13324
13325 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13326 Do not infringe on the global user namespace when using C++.
13327 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13328 All uses of `fprintf' and `stderr' changed.
13329
13330 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13331
13332 2001-12-13 Akim Demaille <akim@epita.fr>
13333
13334 The computation of nullable is broken: it doesn't handle empty
13335 RHS's properly.
13336
13337 * tests/torture.at (GNU AWK Grammar): New.
13338 * tests/sets.at (Nullable): New.
13339 * src/nullable.c (set_nullable): Instead of blindly looping over
13340 `ritems', loop over the rules, and then over their rhs's.
13341
13342 Work around Autotest bugs.
13343
13344 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13345 frame, because Autotest understand lines starting with a `+' as
13346 traces from the shell. Then, they are not processed properly.
13347 Admittedly an Autotest bug, but we don't have time to wait for
13348 Autotest to catch up.
13349 * tests/regression.at (Broken Closure): Adjust to the new table
13350 frames.
13351 Move to...
13352 * tests/sets.at: here.
13353
13354 2001-12-13 Akim Demaille <akim@epita.fr>
13355
13356 * src/closure.c (closure): Use nrules instead of playing tricks
13357 with BITS_PER_WORD.
13358
13359 2001-12-13 Akim Demaille <akim@epita.fr>
13360
13361 * src/print.c (print_actions): Output the handling of `$' as the
13362 traces do: shifting the token EOF. Before EOF was treated as a
13363 nonterminal.
13364 * tests/regression.at: Adjust some tests.
13365 * src/print_graph.c (print_core): Complete the set of items via
13366 closure. The next-to-final and final states are still unsatisfying,
13367 but that's to be addressed elsewhere.
13368 No longer output the rule numbers, but do output the state number.
13369 A single loop for the shifts + gotos is enough, but picked a
13370 distinct color for each.
13371 (print_graph): Initialize and finalize closure.
13372
13373 2001-12-13 Akim Demaille <akim@epita.fr>
13374
13375 * src/reader.c (readgram): Remove dead code, an strip useless
13376 braces.
13377 (get_type): Remove, unused.
13378
13379 2001-12-12 Akim Demaille <akim@epita.fr>
13380
13381 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13382 on that of lib/error.c.
13383
13384 2001-12-12 Akim Demaille <akim@epita.fr>
13385
13386 Some hosts don't like `/' in includes.
13387
13388 * src/system.h: Include libgettext.h without qualifying the path.
13389 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13390 $(top_srcdir).
13391
13392 2001-12-11 Marc Autret <autret_m@epita.fr>
13393
13394 * src/output.c (output_parser): Remove useless muscle.
13395
13396 2001-12-11 Marc Autret <autret_m@epita.fr>
13397
13398 * src/bison.simple: Remove #line just before %%epilogue. It
13399 is now handled in ...
13400 * src/reader.c (read_additionnal_code): Add the output of a
13401 #line for the epilogue.
13402
13403 2001-12-10 Marc Autret <autret_m@epita.fr>
13404
13405 * src/reader.c (copy_definition): Re-use CPP-outed code which
13406 replace precedent remove.
13407 * src/bison.simple: Remove #line before %%prologue because
13408 %%input-line is wrong at this time.
13409
13410 2001-12-10 Marc Autret <autret_m@epita.fr>
13411
13412 * src/reader.c (symbols_output): Clean up.
13413 * src/output.c (output_gram, output): Clean up.
13414
13415 2001-12-10 Akim Demaille <akim@epita.fr>
13416
13417 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13418 * src/LR0.c (set_state_table): here.
13419 * src/lalr.c (lalr): Call it.
13420
13421 2001-12-10 Akim Demaille <akim@epita.fr>
13422
13423 * src/state.h (shifts): Remove the `number' member: shifts are
13424 attached to state, hence no longer need to be labelled with a
13425 state number.
13426
13427 2001-12-10 Akim Demaille <akim@epita.fr>
13428
13429 Now that states have a complete set of members, the linked list of
13430 shifts is useless: just fill directly the state's shifts member.
13431
13432 * src/state.h (shifts): Remove the `next' member.
13433 * src/LR0.c (first_state, last_state): Remove.
13434 Adjust the callers.
13435 (augment_automaton): Don't look for the shifts that must be added
13436 a shift on EOF: it is those of the state we looked for! But now,
13437 since shifts are attached, it is no longer needed to looking
13438 merely by its id: its number.
13439
13440 2001-12-10 Akim Demaille <akim@epita.fr>
13441
13442 * src/LR0.c (augment_automaton): Better variable locality.
13443 Remove an impossible branch: if there is a state corresponding to
13444 the start symbol being shifted, then there is shift for the start
13445 symbol from the initial state.
13446
13447 2001-12-10 Akim Demaille <akim@epita.fr>
13448
13449 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13450 only when appropriate: when insert_start_shifting_state' is not
13451 invoked.
13452 * tests/regression.at (Rule Line Numbers): Adjust.
13453
13454 2001-12-10 Akim Demaille <akim@epita.fr>
13455
13456 * src/LR0.c (augment_automaton): Now that all states have shifts,
13457 merge the two cases addition shifts to the initial state.
13458
13459 2001-12-10 Akim Demaille <akim@epita.fr>
13460
13461 * src/lalr.c (set_state_table): Move to...
13462 * src/LR0.c: here.
13463 * src/lalr.c (lalr): Don't call it...
13464 * src/LR0.c (generate_states): do it.
13465 * src/LR0.h (first_state): Remove, only the table is used.
13466
13467 2001-12-10 Akim Demaille <akim@epita.fr>
13468
13469 * src/LR0.h (first_shift, first_reduction): Remove.
13470 * src/lalr.c: Don't use first_shift: find shifts through the
13471 states.
13472
13473 2001-12-10 Akim Demaille <akim@epita.fr>
13474
13475 * src/LR0.c: Attach shifts to states as soon as they are
13476 computed.
13477 * src/lalr.c (set_state_table): Instead of assigning shifts to
13478 state, just assert that the mapping was properly done.
13479
13480 2001-12-10 Akim Demaille <akim@epita.fr>
13481
13482 * src/LR0.c (insert_start_shift): Rename as...
13483 (insert_start_shifting_state): this.
13484 (insert_eof_shifting_state, insert_accepting_state): New.
13485 (augment_automaton): Adjust.
13486 Better locality of the variables.
13487 When looking if the start_symbol is shifted from the initial
13488 state, using `while (... symbol != start_symbol ...)' sounds
13489 better than `while (... symbol < start_symbol ...)': If fail
13490 to see how the order between symbols could be relevant!
13491
13492 2001-12-10 Akim Demaille <akim@epita.fr>
13493
13494 * src/getargs.h: Don't declare `spec_name_prefix' and
13495 `spec_file_prefix', declared by src/files.h.
13496 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13497 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13498 * src/output.c (prepare): Adjust.
13499 * src/reader.c (symbols_output): Likewise.
13500 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13501
13502 2001-12-10 Akim Demaille <akim@epita.fr>
13503
13504 * src/muscle_tab.c (muscle_init): NULL is a better default than
13505 `"0"'.
13506
13507 2001-12-10 Akim Demaille <akim@epita.fr>
13508
13509 * src/reader.c (reader): Calling symbols_output once is enough.
13510
13511 2001-12-10 Akim Demaille <akim@epita.fr>
13512
13513 Now that states have a complete set of members, the linked list of
13514 reductions is useless: just fill directly the state's reductions
13515 member.
13516
13517 * src/state.h (struct reductions): Remove member `number' and
13518 `next'.
13519 * src/LR0.c (first_reduction, last_reduction): Remove.
13520 (save_reductions): Don't link the new reductions, store them in
13521 this_state.
13522 * src/lalr.c (set_state_table): No need to attach reductions to
13523 states, it's already done.
13524 * src/output.c (output_actions): No longer free the shifts, then
13525 the reductions, then the states: free all the states and their
13526 members.
13527
13528 2001-12-10 Akim Demaille <akim@epita.fr>
13529
13530 * src/options.c (OPTN, DRTV, BOTH): New.
13531 (option_table): Use them.
13532
13533 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13534 the job of system.h.
13535 * src/options.c: Don't include stdio.h and xalloc.h for the same
13536 reasons.
13537
13538 2001-12-10 Akim Demaille <akim@epita.fr>
13539
13540 * src/output.c (output, prepare): Make sure the values of the
13541 muscles `action' and `prologue' are 0-terminated.
13542
13543 2001-12-10 Akim Demaille <akim@epita.fr>
13544
13545 Clean up GCC warnings.
13546
13547 * src/reader.c (copy_action): `buf' is not used.
13548 (parse_skel_decl): Be static.
13549 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13550 * src/options.h (create_long_option_table): Have a real prototype.
13551 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13552 (hash_delete_at): Return const void *.
13553 Adjust casts to preserve the const.
13554
13555 2001-12-10 Akim Demaille <akim@epita.fr>
13556
13557 * configure.in: Require 2.52g.
13558 M4 is not needed, but AUTOM4TE is.
13559 * m4/m4.m4: Remove.
13560 * tests/Makefile.am: Adjust.
13561
13562 2001-12-10 Akim Demaille <akim@epita.fr>
13563
13564 One structure for states is enough, even though theoretically
13565 there are LR(0) states and LALR(1) states.
13566
13567 * src/lalr.h (state_t): Remove.
13568 (state_table): Be state_t **, not state_t *.
13569 * src/state.h (core, CORE_ALLOC): Rename as...
13570 (state_t, STATE_ALLOC): this.
13571 Add the LALR(1) members: shifts, reductions, errs.
13572 * src/LR0.c (state_table): Rename as...
13573 (state_hash): this, to avoid name clashes with the global
13574 `state_table'.
13575 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13576 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13577
13578 2001-12-10 Akim Demaille <akim@epita.fr>
13579
13580 Bison dumps core on bash.y.
13581 Reported by Pascal Bart.
13582
13583 * src/warshall.c (bitmatrix_print): New.
13584 (TC): Use it.
13585 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13586 j must be the outer loop.
13587 * tests/regression.at (Broken Closure): New.
13588
13589 2001-12-05 Akim Demaille <akim@epita.fr>
13590
13591 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13592 its argument.
13593 Reported by Peter Hamorsky.
13594
13595 2001-12-05 Akim Demaille <akim@epita.fr>
13596
13597 * src/conflicts.c (err_table): Remove.
13598 (resolve_sr_conflict): Adjust.
13599 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13600 Rename as...
13601 (state_t.reductions, state_t.shifts): this.
13602
13603 2001-12-05 Akim Demaille <akim@epita.fr>
13604
13605 * src/reduce.c (reduce_grammar_tables): No longer disable the
13606 removal of useless rules via CPP but via `if (0)', so that the
13607 compiler still check the code is valid.
13608 For instance, it should have noticed `rline' no longer exists: use
13609 the `line' member of rule_t.
13610 * src/gram.c (dummy, rline): Remove, unused.
13611
13612 2001-12-05 Akim Demaille <akim@epita.fr>
13613
13614 * src/output.c (pack_vector): Use assert, not berror.
13615 * src/main.c (berror): Remove, unused.
13616
13617 2001-12-05 Akim Demaille <akim@epita.fr>
13618
13619 New experimental feature: if --verbose --trace output all the
13620 items of a state, not only its kernel.
13621
13622 * src/print.c (print_core): If `trace_flag', then invoke closure
13623 before outputting the items of the state (print_core is no longer
13624 a correct name them).
13625 (print_results): Invoke new_closure/free_closure if needed.
13626
13627 2001-12-05 Akim Demaille <akim@epita.fr>
13628
13629 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13630 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13631 (nitemset): for consistency with the rest of the project.
13632
13633 2001-12-05 Akim Demaille <akim@epita.fr>
13634
13635 * src/closure.c (print_closure): Improve.
13636 (closure): Use it for printing input and output.
13637
13638 2001-12-05 Akim Demaille <akim@epita.fr>
13639
13640 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13641 indexed by nonterminals.
13642
13643 2001-12-05 Akim Demaille <akim@epita.fr>
13644
13645 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13646 what it was!).
13647 * src/warshall.h: Remove accidental duplication of the content.
13648
13649 2001-12-05 Akim Demaille <akim@epita.fr>
13650
13651 * src/closure.c (set_fderives): De-obfuscate.
13652
13653 2001-12-05 Akim Demaille <akim@epita.fr>
13654
13655 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13656
13657 2001-12-05 Akim Demaille <akim@epita.fr>
13658
13659 * src/closure.c (set_firsts): De-obfuscate.
13660
13661 2001-12-05 Akim Demaille <akim@epita.fr>
13662
13663 * src/output.c (action_row): De-obfuscate
13664 using the good o' techniques: arrays not pointers, variable
13665 locality, BITISSET, RESETBIT etc.
13666
13667 2001-12-05 Akim Demaille <akim@epita.fr>
13668
13669 Pessimize the code to simplify it: from now on, all the states
13670 have a valid SHIFTS, which NSHIFTS is possibly 0.
13671
13672 * src/LR0.c (shifts_new): Be global and move to..
13673 * src/state.c, src/state.h: here.
13674 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13675 * src/print_graph: Adjust.
13676
13677 2001-12-05 Akim Demaille <akim@epita.fr>
13678
13679 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13680 * src/conflicts.c: Use it.
13681 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13682 incorrectly ``simplified''.
13683
13684 2001-12-05 Akim Demaille <akim@epita.fr>
13685
13686 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13687 using the good o' techniques: arrays not pointers, variable
13688 locality, BITISSET, RESETBIT etc.
13689
13690 2001-12-05 Akim Demaille <akim@epita.fr>
13691
13692 * src/state.h (SHIFT_SYMBOL): New.
13693 * src/conflicts.c: Use it to deobfuscate.
13694
13695 2001-12-05 Akim Demaille <akim@epita.fr>
13696
13697 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13698 (print_reductions): De-obfuscate using the good o' techniques:
13699 arrays not pointers, variable locality, BITISSET.
13700
13701 2001-12-05 Akim Demaille <akim@epita.fr>
13702
13703 * src/conflicts.c (print_reductions): Arrays, not pointers.
13704 Use BITISSET.
13705
13706 2001-12-05 Akim Demaille <akim@epita.fr>
13707
13708 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13709
13710 2001-12-05 Akim Demaille <akim@epita.fr>
13711
13712 * src/conflicts.c (print_reductions): Improve variable locality.
13713
13714 2001-12-05 Akim Demaille <akim@epita.fr>
13715
13716 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13717
13718 2001-12-05 Akim Demaille <akim@epita.fr>
13719
13720 * src/conflicts.c (print_reductions): Improve variable locality.
13721
13722 2001-12-05 Akim Demaille <akim@epita.fr>
13723
13724 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13725 * src/lalr.c: Use them.
13726
13727 2001-12-05 Akim Demaille <akim@epita.fr>
13728
13729 * src/LR0.c (augment_automaton): Formatting changes.
13730 Better variable locality.
13731
13732 2001-12-05 Akim Demaille <akim@epita.fr>
13733
13734 * src/lalr.c (matrix_print): New.
13735 (transpose): Use it.
13736 Use arrays instead of pointers.
13737
13738 2001-12-05 Akim Demaille <akim@epita.fr>
13739
13740 * src/lalr.c (maxrhs): Move to...
13741 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13742 * src/lalr.c (build_relations): Adjust.
13743
13744 2001-12-05 Akim Demaille <akim@epita.fr>
13745
13746 * src/lalr.c (transpose): Free the memory allocated to the
13747 argument, as it is replaced by the results by the unique caller.
13748 (build_relations): Merely invoke transpose: it handles the memory
13749 deallocation.
13750 Improve variable locality.
13751 Avoid variables used as mere abbreviations.
13752 (compute_lookaheads): Use arrays instead of pointers.
13753
13754 2001-12-05 Akim Demaille <akim@epita.fr>
13755
13756 * src/lalr.c (initialize_F): Improve variable locality.
13757 Avoid variables used as mere abbreviations.
13758
13759 2001-12-05 Akim Demaille <akim@epita.fr>
13760
13761 * src/derives.c (print_derives): Display the ruleno.
13762 * src/lalr.c (initialize_F, transpose): Better variable locality
13763 to improve readability.
13764 Avoid variables used as mere abbreviations.
13765
13766 2001-12-05 Akim Demaille <akim@epita.fr>
13767
13768 * src/lalr.c (traverse): Use arrays instead of pointers.
13769
13770 2001-12-05 Akim Demaille <akim@epita.fr>
13771
13772 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13773 the handling of squeue.
13774 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13775
13776 2001-12-05 Akim Demaille <akim@epita.fr>
13777
13778 Because useless nonterminals are now kept alive (instead of being
13779 `destroyed'), we now sometimes examine them, and store information
13780 related to them. Hence we need to know their number, and adjust
13781 memory allocations.
13782
13783 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13784 static.
13785 * src/LR0.c (allocate_itemsets): The memory allocated to
13786 `symbol_count' was used for two different purpose: once to count
13787 the number of occurrences of each symbol, and later reassigned to
13788 `shift_symbol', containing the symbol that can be shifted from a
13789 given state.
13790 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13791 only, and...
13792 (new_itemsets): Allocate `shift_symbol' here.
13793 (allocate_itemsets): symbol_count includes useless nonterminals.
13794 Make room for them.
13795 (free_storage): Use `free', not `XFREE', for pointers that cannot
13796 be null.
13797
13798 2001-12-05 Akim Demaille <akim@epita.fr>
13799
13800 * src/nullable.c (set_nullable): Deobfuscate the handling of
13801 ritem.
13802 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13803
13804 2001-12-05 Akim Demaille <akim@epita.fr>
13805
13806 * src/gram.c, src/gram.h (ritem_print): New.
13807 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13808 (This useless function was defined only to work around VMS linkers
13809 that can't handle compilation units with variables only).
13810 * src/reduce.c (dump_grammar): Use it to trace the construction of
13811 ritem.
13812
13813 2001-12-04 Paul Eggert <eggert@twinsun.com>
13814
13815 * src/bison.simple (union yyalloc): Change member names
13816 to be the same as the stack names.
13817 (yyparse): yyptr is now union yyalloc *, not char *.
13818 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13819 and may generate better code on some machines.
13820 (yystpcpy): Use prototype if __STDC__ is defined, not just
13821 if __cplusplus is defined.
13822
13823 2001-11-30 Akim Demaille <akim@epita.fr>
13824
13825 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13826 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13827 Gettext doesn't compile cleanly, and dies with -Werror.
13828 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13829 Include WARNING_CFLAGS here.
13830 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13831 before being defined.
13832
13833 2001-11-27 Paul Eggert <eggert@twinsun.com>
13834
13835 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13836 First arg is int, not unsigned.
13837 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13838 (SIZE_MAX, UINT_MAX): New macros.
13839 (quotearg_n_options): Abort if N is negative.
13840 Avoid overflow check on hosts where size_t is 64 bits and int
13841 is 32 bits, as overflow is impossible there.
13842 Fix off-by-one typo that caused unnecessary reallocation.
13843
13844 2001-11-29 Paul Eggert <eggert@twinsun.com>
13845
13846 Name space cleanup in generated parser.
13847
13848 * doc/bison.texinfo (Bison Parser): Discuss system headers
13849 and their effect on the user name space.
13850
13851 * src/bison.simple:
13852 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13853 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13854 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13855
13856 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13857 on user names when possible.
13858
13859 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13860 Simplify test for whather <alloca.h> exists.
13861
13862 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13863
13864 (<stdio.h>): Include if YYDEBUG.
13865
13866 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13867 ! defined (yyoverflow) && ! defined (yymemcpy).
13868
13869 (yymemcpy, yyparse): Rename local variables as needed so that
13870 they all begin with 'yy'.
13871
13872 (yystrlen, yystpcpy): New functions.
13873
13874 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13875 All uses changed.
13876
13877 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13878 instead of relying on string.h functions. Use YYSTACK_ALLOC
13879 and YYSTACK_FREE instead of malloc and free.
13880
13881 2001-11-30 Akim Demaille <akim@epita.fr>
13882
13883 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13884 before their first uses.
13885 (YYBISON, YYPURE): Move to the top of the output.
13886
13887 2001-11-30 Akim Demaille <akim@epita.fr>
13888
13889 * tests/reduce.at (Useless Nonterminals): Fix.
13890
13891 2001-11-30 Akim Demaille <akim@epita.fr>
13892
13893 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13894 if body instead of `;' to pacify GCC's warnings.
13895
13896 2001-11-30 Akim Demaille <akim@epita.fr>
13897
13898 Instead of mapping the LHS of unused rules to -1, keep the LHS
13899 valid, but flag the rules as invalid.
13900
13901 * src/gram.h (rule_t): `useful' is a new member.
13902 * src/print.c (print_grammar): Adjust.
13903 * src/derives.c (set_derives): Likewise.
13904 * src/reader.c (packgram, reduce_output): Likewise.
13905 * src/reduce.c (reduce_grammar_tables): Likewise.
13906 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13907
13908 2001-11-30 Akim Demaille <akim@epita.fr>
13909
13910 * src/reduce.c (reduce_output): Formatting changes.
13911 * src/print.c (print_results, print_grammar): Likewise.
13912 * tests/regression.at (Rule Line Numbers)
13913 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13914
13915 2001-11-30 Akim Demaille <akim@epita.fr>
13916
13917 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13918 useless nonterminals, move them at the end of the symbol arrays.
13919 (reduce_output): Adjust.
13920 * tests/reduce.at (Useless Nonterminals): Adjust.
13921
13922 2001-11-30 Akim Demaille <akim@epita.fr>
13923
13924 * src/reduce.c: Various comment/formatting changes.
13925 (nonterminals_reduce): New, extracted from...
13926 (reduce_grammar_tables): here.
13927 (reduce_grammar): Call nonterminals_reduce.
13928
13929 2001-11-29 Paul Eggert <eggert@twinsun.com>
13930
13931 * src/bison.simple (YYSTACK_REALLOC): Remove.
13932 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13933 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13934 New macros.
13935 (union yyalloc): New type.
13936 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13937 an arbitrary restriction on hosts where size_t is wider than int.
13938
13939 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13940 a parser stack overflow. Allocate just one block of memory for all
13941 three stacks, instead of allocating three blocks; this typically is
13942 faster and reduces fragmentation.
13943
13944 Do not limit the number of items in the stack to a value that fits
13945 in 'int', as this is an arbitrary limit on hosts with 64-bit
13946 size_t and 32-bit int.
13947
13948 2001-11-29 Marc Autret <autret_m@epita.fr>
13949
13950 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13951 of defining YYERROR_VERBOSE.
13952 [AT_DATA]: $4 is now out of C declarations in the prologue.
13953
13954 2001-11-28 Marc Autret <autret_m@epita.fr>
13955
13956 * src/reader.c (parse_dquoted_param): New.
13957 (parse_skel_decl): Use it.
13958 * src/lex.h: Add its prototype.
13959 * src/lex.c (literalchar): Become not static.
13960
13961 2001-11-28 Marc Autret <autret_m@epita.fr>
13962
13963 * src/output.h: And put its extern declaration here.
13964 * src/output.c (error_verbose): Define here.
13965 (prepare): Echo name modification.
13966 * src/getargs.h: Clean its extern declaration.
13967 * src/getargs.c (error_verbose_flag): Remove.
13968 (getargs): Remove case 'e'.
13969 * src/options.c (option_table): 'error-verbose' is now seen as simple
13970 percent option.
13971 Include output.h.
13972
13973 * src/reader.c (read_declarations): Remove case tok_include.
13974 (parse_include_decl): Remove.
13975 * src/lex.h (token_t): Remove tok_include.
13976 * src/options.c (option_table): 'include' is now a simple command line
13977 option.
13978
13979 2001-11-28 Marc Autret <autret_m@epita.fr>
13980
13981 * src/bison.simple: Adjust muscle names.
13982 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13983 * src/output.c (prepare): s/_/-/ for the muscles names.
13984 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13985
13986 2001-11-28 Marc Autret <autret_m@epita.fr>
13987
13988 * src/bison.simple: Fix debug.
13989 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13990
13991 2001-11-28 Akim Demaille <akim@epita.fr>
13992
13993 * src/LR0.c (shifts_new): New.
13994 (save_shifts, insert_start_shift, augment_automaton): Use it.
13995
13996 2001-11-28 Akim Demaille <akim@epita.fr>
13997
13998 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13999 keep ruleno only.
14000
14001 2001-11-28 Akim Demaille <akim@epita.fr>
14002
14003 * src/closure.c (closure): Instead of looping over word in array
14004 then bits in words, loop over bits in array.
14005
14006 2001-11-28 Akim Demaille <akim@epita.fr>
14007
14008 * src/closure.c (closure): No longer optimize the special case
14009 where all the bits of `ruleset[r]' are set to 0, to make the code
14010 clearer.
14011
14012 2001-11-28 Akim Demaille <akim@epita.fr>
14013
14014 * src/closure.c (closure): `r' and `c' are new variables, used to
14015 de-obfuscate accesses to RULESET and CORE.
14016
14017 2001-11-28 Akim Demaille <akim@epita.fr>
14018
14019 * src/reduce.c (reduce_print): Use ngettext.
14020 (dump_grammar): Improve the trace accuracy.
14021
14022 2001-11-28 Akim Demaille <akim@epita.fr>
14023
14024 * src/reduce.c (dump_grammar): Don't translate trace messages.
14025
14026 2001-11-28 Akim Demaille <akim@epita.fr>
14027
14028 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14029 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14030 as all tags are free'ed afterwards.
14031 From Enrico Scholz.
14032
14033 2001-11-27 Paul Eggert <eggert@twinsun.com>
14034
14035 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14036 use alloca when we didn't want to, and vice versa.
14037
14038 2001-11-27 Marc Autret <autret_m@epita.fr>
14039
14040 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14041 initialization.
14042 * src/output.c (prepare): Remove its update.
14043
14044 2001-11-27 Marc Autret <autret_m@epita.fr>
14045
14046 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14047 Use %error-verbose.
14048
14049 2001-11-27 Marc Autret <autret_m@epita.fr>
14050
14051 * src/bison.simple: Remove YYERROR_VERBOSE using.
14052 Use %%error_verbose.
14053 (yyparse): Likewise.
14054 * src/output.c (prepare): Give its final value.
14055 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14056 * src/getargs.h: Add its extern declaration.
14057 * src/getargs.c (error_verbose_flag): New int.
14058 (getargs): Update to catch new case.
14059 * src/options.c (option_table): 'error-verbose' is a new option.
14060 (shortopts): Update.
14061
14062 2001-11-27 Akim Demaille <akim@epita.fr>
14063
14064 * src/system.h: Use intl/libgettext.h.
14065 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14066
14067 2001-11-27 Akim Demaille <akim@epita.fr>
14068
14069 * tests/torture.at (Exploding the Stack Size with Malloc):
14070 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14071
14072 2001-11-27 Akim Demaille <akim@epita.fr>
14073
14074 * src/files.c: Include error.h.
14075 Reported by Hans Aberg.
14076
14077 2001-11-26 Marc Autret <autret_m@epita.fr>
14078
14079 * src/reader.c (parse_include_decl): New, not yet implemented.
14080 (read_declarations): Add case tok_include.
14081 * src/getargs.h (include): Add its extern definition.
14082 * src/getargs.c (include): New const char *.
14083 (getargs): Add case '-I'.
14084 * src/options.c (option_table): Add include as command line and
14085 percent option.
14086 * src/lex.h (token_t): Add tok_include.
14087
14088 2001-11-26 Akim Demaille <akim@epita.fr>
14089
14090 * src/reader.c (readgram): Make sure rules for mid-rule actions
14091 have a lineno equal to that of their host rule.
14092 Reported by Hans Aberg.
14093 * tests/regression.at (Rule Line Numbers): New.
14094
14095 2001-11-26 Akim Demaille <akim@epita.fr>
14096
14097 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14098 size_ts.
14099
14100 2001-11-26 Akim Demaille <akim@epita.fr>
14101
14102 * src/complain.c, src/complain.h (error): Remove, provided by
14103 lib/error.[ch].
14104
14105 2001-11-26 Akim Demaille <akim@epita.fr>
14106
14107 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14108 issue an error message.
14109 * tests/regression.at (Invalid %directive): New.
14110 Reported by Hans Aberg.
14111
14112 2001-11-26 Akim Demaille <akim@epita.fr>
14113
14114 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14115 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14116
14117 2001-11-26 Akim Demaille <akim@epita.fr>
14118
14119 * src/conflicts.c (conflicts_print): Don't complain at all when
14120 there are no reduce/reduce conflicts, and as many shift/reduce
14121 conflicts as expected.
14122 * tests/regression.at (%expect right): Adjust.
14123
14124 2001-11-23 Akim Demaille <akim@epita.fr>
14125
14126 * lib/alloca.c: Update, from fileutils.
14127
14128 2001-11-23 Akim Demaille <akim@epita.fr>
14129
14130 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14131
14132 2001-11-23 Akim Demaille <akim@epita.fr>
14133
14134 * src/system.h: Include alloca.h.
14135 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14136
14137 2001-11-23 Akim Demaille <akim@epita.fr>
14138
14139 * src/print_graph.c (print_actions): Remove `rule', unused.
14140 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14141 pacify GCC's signed < unsigned warnings.
14142 * src/closure.c (itemsetsize): Likewise.
14143 * src/reader.c (symbol_list_new): Static.
14144
14145 2001-11-23 Akim Demaille <akim@epita.fr>
14146
14147 Attaching lineno to buckets is stupid, since only one copy of each
14148 symbol is kept, only the line of the first occurrence is kept too.
14149
14150 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14151 * src/reader.c (rline_allocated): Remove, unused.
14152 (symbol_list): Have a `line' member.
14153 (symbol_list_new): New.
14154 (readgram): Use it.
14155 * src/print.c (print_grammar): Output the rule line numbers.
14156 * tests/regression.at (Solved SR Conflicts)
14157 (Unresolved SR Conflicts): Adjust.
14158 Reported by Hans Aberg.
14159
14160 2001-11-22 Marc Autret <autret_m@epita.fr>
14161
14162 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14163
14164 2001-11-22 Marc Autret <autret_m@epita.fr>
14165
14166 * src/muscle_tab.c (muscle_init): Remove initialization of
14167 skeleton muscle.
14168 * src/output.c (output_master_parser): Do it here.
14169
14170 2001-11-20 Akim Demaille <akim@epita.fr>
14171
14172 * po/sv.po: New.
14173 * configure.in (ALL_LINGUAS): Adjust.
14174 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14175 longer contains strings to translate.
14176
14177 2001-11-19 Akim Demaille <akim@epita.fr>
14178
14179 * src/conflicts.c (conflicts_print): Add a missing \n.
14180
14181 2001-11-19 Akim Demaille <akim@epita.fr>
14182
14183 * src/nullable.c (nullable_print): New.
14184 (set_nullable): Call it when tracing.
14185 Better locality of variables.
14186
14187 2001-11-19 Akim Demaille <akim@epita.fr>
14188
14189 * src/print.c (print_actions): Better locality of variables.
14190
14191 2001-11-19 Akim Demaille <akim@epita.fr>
14192
14193 * src/derives.c (print_derives): Fix and enrich.
14194 * src/closure.c (print_fderives): Likewise.
14195
14196 2001-11-19 Akim Demaille <akim@epita.fr>
14197
14198 * src/closure.c (itemsetend): Remove, replaced with...
14199 (itemsetsize): new.
14200
14201 2001-11-19 Akim Demaille <akim@epita.fr>
14202
14203 * src/LR0.c (kernel_end): Remove, replaced with...
14204 (kernel_size): new.
14205
14206 2001-11-19 Akim Demaille <akim@epita.fr>
14207
14208 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14209 to clarify.
14210
14211 2001-11-19 Akim Demaille <akim@epita.fr>
14212
14213 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14214
14215 2001-11-19 Akim Demaille <akim@epita.fr>
14216
14217 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14218 trace messages.
14219 * src/LR0.c: Likewise.
14220 (allocate_itemsets): Use arrays instead of pointers to clarify.
14221
14222 2001-11-19 Akim Demaille <akim@epita.fr>
14223
14224 * src/getargs.c (statistics_flag): Replace with...
14225 (trace_flag): New.
14226 (longopts): Accept --trace instead of --statistics.
14227 * src/getargs.h, src/options.c: Adjust.
14228 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14229 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14230
14231 2001-11-19 Akim Demaille <akim@epita.fr>
14232
14233 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14234 pointers to clarify the code.
14235 (save_reductions, save_shifts): Factor common parts of alternatives.
14236
14237 2001-11-19 Akim Demaille <akim@epita.fr>
14238
14239 * src/LR0.c (new_state, get_state): Complete TRACE code.
14240 * src/closure.c: Include `reader.h' to get `tags', needed by the
14241 trace code.
14242 Rename the conditional DEBUG as TRACE.
14243 Output consistently TRACEs to stderr, not stdout.
14244 * src/derives.c: Likewise.
14245 * src/reduce.c: (inaccessable_symbols): Using if is better style
14246 than goto.
14247 Use `#if TRACE' instead of `#if 0' for tracing code.
14248
14249 2001-11-19 Akim Demaille <akim@epita.fr>
14250
14251 * src/system.h (LIST_FREE, shortcpy): New.
14252 * src/LR0.c: Use them.
14253 * src/output.c (free_itemsets, free_reductions, free_shifts):
14254 Remove, replaced by LIST_FREE.
14255
14256 2001-11-19 Akim Demaille <akim@epita.fr>
14257
14258 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14259 (REDUCTIONS_ALLOC): New.
14260 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14261 allocation.
14262
14263 2001-11-19 Akim Demaille <akim@epita.fr>
14264
14265 * src/LR0.c (new_state): Complete trace code.
14266 * src/nullable.c (set_nullable): Don't translate traces.
14267
14268 2001-11-19 Akim Demaille <akim@epita.fr>
14269
14270 * src/print_graph.c (print_core): Better locality of variables.
14271 * src/print.c (print_core): Likewise.
14272
14273 2001-11-19 Akim Demaille <akim@epita.fr>
14274
14275 * src/vcg.c: You do the output, so you are responsible of the
14276 handling of VCG syntax, in particular: use quotearg.
14277 * src/print_graph.c: Don't.
14278 (print_actions): Don't output the actions as part of the nodes,
14279 since that's the job of the edges.
14280 (print_state): Don't output by hand: fill the node description,
14281 and ask for its output.
14282
14283 2001-11-19 Akim Demaille <akim@epita.fr>
14284
14285 * src/bison.simple (yyparse): When verbosely reporting an error,
14286 no longer put additional quotes around token names.
14287 * tests/calc.at: Adjust.
14288
14289 2001-11-19 Akim Demaille <akim@epita.fr>
14290
14291 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14292 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14293 * src/output.c: Adjust.
14294
14295 2001-11-19 Akim Demaille <akim@epita.fr>
14296
14297 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14298 (rule_t): this.
14299 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14300
14301 2001-11-19 Akim Demaille <akim@epita.fr>
14302
14303 * src/gram.h (rule_t): New.
14304 (rule_table): New.
14305 (rrhs, rlhs): Remove, part of state_t.
14306 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14307 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14308 * src/reader.c, src/reduce.c: Adjust.
14309
14310 2001-11-19 Akim Demaille <akim@epita.fr>
14311
14312 * src/reader.c (symbols_output): New, extracted from...
14313 (packsymbols): Here.
14314 (reader): Call it.
14315
14316 2001-11-19 Akim Demaille <akim@epita.fr>
14317
14318 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14319 (maxrhs): this new function.
14320
14321 2001-11-19 Akim Demaille <akim@epita.fr>
14322
14323 * src/lalr.c (F): New macro to access the variable F.
14324 Adjust.
14325
14326 2001-11-19 Akim Demaille <akim@epita.fr>
14327
14328 * src/lalr.h (LA): New macro to access the variable LA.
14329 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14330 * src/lalr.c: Adjust.
14331
14332 2001-11-19 Akim Demaille <akim@epita.fr>
14333
14334 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14335 (set_state_table): handle the `lookaheads' members.
14336
14337 2001-11-19 Akim Demaille <akim@epita.fr>
14338
14339 * src/lalr.h (lookaheads): Removed array, whose contents is now
14340 a member of...
14341 (state_t): this structure.
14342 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14343 Adjust.
14344
14345 2001-11-19 Akim Demaille <akim@epita.fr>
14346
14347 * src/lalr.h (consistent): Removed array, whose contents is now
14348 a member of...
14349 (state_t): this structure.
14350 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14351 Adjust.
14352
14353 2001-11-19 Akim Demaille <akim@epita.fr>
14354
14355 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14356 contents are now members of...
14357 (state_t): this structure.
14358 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14359 Adjust.
14360
14361 2001-11-19 Akim Demaille <akim@epita.fr>
14362
14363 * src/lalr.h (state_t): New.
14364 (state_table): Be a state_t * instead of a core **.
14365 (accessing_symbol): Remove, part of state_t.
14366 * src/lalr.c: Adjust.
14367 (set_accessing_symbol): Merge into...
14368 (set_state_table): this.
14369 * src/print_graph.c, src/conflicts.c: Adjust.
14370
14371 2001-11-14 Akim Demaille <akim@epita.fr>
14372
14373 * tests/calc.at, tests/output.at, tests/regression.at,
14374 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14375 now the tests are run in private dirs, therefore AC_CLEANUP and
14376 family can be simplified to 0-ary.
14377 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14378 use abs. path to find config.h.
14379 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14380 stderr, there can be way too much random noise.
14381 Instead pass -Werror to GCC and rely on the exit status.
14382 Reported by Wolfram Wagner.
14383
14384 2001-11-14 Akim Demaille <akim@epita.fr>
14385
14386 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14387 defined only if yyoverflow is defined, to avoid `warning: unused
14388 variable `yyvs1''.
14389 Reported by The Test Suite.
14390
14391 2001-11-14 Akim Demaille <akim@epita.fr>
14392
14393 * src/print.c: Include reduce.h.
14394 Reported by Hans Aberg.
14395
14396 2001-11-14 Akim Demaille <akim@epita.fr>
14397
14398 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14399 Revert a previous patch: these are really const.
14400 * src/conflicts.c (conflict_report): Additional useless pair of
14401 braces to pacify GCC's warnings for `if () if () {} else {}'.
14402 * src/lex.c (parse_percent_token): Replace equal_offset with
14403 arg_offset.
14404 arg is const.
14405 Be sure to strdup `arg' when used, since there is no reason for
14406 token_buffer not to change.
14407
14408 2001-11-14 Akim Demaille <akim@epita.fr>
14409
14410 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14411 definition.
14412 * src/main.c (main): Use them.
14413 Suggested by Hans Aberg.
14414
14415 2001-11-12 Akim Demaille <akim@epita.fr>
14416
14417 * src/system.h (ngettext): Now that we use ngettext, be sure to
14418 provide a default definition when NLS are not used.
14419
14420 2001-11-12 Akim Demaille <akim@epita.fr>
14421
14422 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14423 Use @kbd to denote user input.
14424 (Language and Grammar): ANSIfy the example.
14425 Adjust its layout for info/notinfo.
14426 (Location Tracking Calc): Output error messages to stderr.
14427 Output locations in a more GNUtically correct way.
14428 Fix a couple of Englishos.
14429 Adjust @group/@end group pairs.
14430
14431 2001-11-12 Akim Demaille <akim@epita.fr>
14432
14433 %expect was not functioning at all.
14434
14435 * src/conflicts.c (expected_conflicts): Set to -1.
14436 (conflict_report): Use ngettext.
14437 (conflicts_print): Check %expect and make its violation an error.
14438 * doc/bison.texinfo (Expect Decl): Adjust.
14439 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14440 * tests/regression.at (%expect not enough, %expect right)
14441 (%expect too much): New.
14442
14443 2001-11-12 Akim Demaille <akim@epita.fr>
14444
14445 * tests/regression.at (Conflicts): Rename as...
14446 (Unresolved SR Conflicts): this.
14447 (Solved SR Conflicts): New.
14448
14449 2001-11-12 Akim Demaille <akim@epita.fr>
14450
14451 * src/reduce.c (print_results): Rename as...
14452 (reduce_output): This.
14453 Output to OUT, passed as argument, instead of output_obstack.
14454 (dump_grammar): Likewise.
14455 (reduce_free): New.
14456 Also free V1.
14457 (reduce_grammar): No longer call reduce_output, since...
14458 * src/print.c (print_results): do it.
14459 * src/main.c (main): Call reduce_free;
14460
14461 2001-11-12 Akim Demaille <akim@epita.fr>
14462
14463 * src/conflicts.c (print_reductions): Accept OUT as argument.
14464 Output to it, not to output_obstack.
14465 * src/print.c (print_actions): Adjust.
14466
14467 2001-11-12 Akim Demaille <akim@epita.fr>
14468
14469 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14470 the result instead of using...
14471 (src_total, rrc_total, src_count, rrc_count): Remove.
14472 (any_conflicts): Remove.
14473 (print_conflicts): Split into...
14474 (conflicts_print, conflicts_output): New.
14475 * src/conflicts.h: Adjust.
14476 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14477 * src/print.c (print_grammar): Issue `\n' between two rules.
14478 * tests/regression.at (Conflicts): New.
14479 Reported by Tom Lane.
14480
14481 2001-11-12 Akim Demaille <akim@epita.fr>
14482
14483 * tests/regression.at (Invalid input): Remove, duplicate with
14484 ``Invalid input: 1''.
14485
14486 2001-11-12 Akim Demaille <akim@epita.fr>
14487
14488 * tests/torture.at (AT_DATA_STACK_TORTURE)
14489 (Exploding the Stack Size with Alloca)
14490 (Exploding the Stack Size with Malloc): New.
14491
14492 2001-11-12 Akim Demaille <akim@epita.fr>
14493
14494 * src/bison.simple (YYSTACK_REALLOC): New.
14495 (yyparse) [!yyoverflow]: Use it and free the old stack.
14496 Reported by Per Allansson.
14497
14498 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14499
14500 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14501 define CPP macro, which substitute YYSTYPE by yystype.
14502 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14503 with yyltype/YYLTYPE. This allows inclusion of the generated
14504 header within the parser if the compiler, such as GGC, accepts
14505 multiple equivalent #defines.
14506 From Akim.
14507
14508 2001-11-05 Akim Demaille <akim@epita.fr>
14509
14510 * src/reader.c (symbols_output): New, extracted from...
14511 (packsymbols): here.
14512 (reader): Adjust.
14513
14514 2001-11-05 Akim Demaille <akim@epita.fr>
14515
14516 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14517
14518 2001-11-05 Akim Demaille <akim@epita.fr>
14519
14520 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14521 pattern.
14522
14523 2001-11-05 Akim Demaille <akim@epita.fr>
14524
14525 * src/options.h (struct option_table_struct): set_flags is void*.
14526 * src/options.c (longopts): Support `--output' and `%output'.
14527 (usage): Adjust.
14528 * src/lex.h (tok_setopt): Remove, replaced with...
14529 (tok_intopt, tok_stropt): these new guys.
14530 * src/lex.c (getopt.h): Not needed.
14531 (token_buffer, unlexed_token_buffer): Not const.
14532 (percent_table): Promote `-' over `_' in directive names.
14533 Active `%name-prefix', `file-prefix', and `output'.
14534 (parse_percent_token): Accept possible arguments to directives.
14535 Promote `-' over `_' in directive names.
14536
14537 2001-11-04 Akim Demaille <akim@epita.fr>
14538
14539 * doc/bison.texinfo (Decl Summary): Split the list into
14540 `directives for grammars' and `directives for bison'.
14541 Sort'em.
14542 Add description of `%name-prefix', `file-prefix', and `output'.
14543 Promote `-' over `_' in directive names.
14544 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14545 Simplify the description of `--name-prefix'.
14546 Promote `-' over `_' in directive names.
14547 Promote `--output' over `--output-file'.
14548 Fix the description of `--defines'.
14549 * tests/output.at: Exercise %file-prefix and %output.
14550
14551 2001-11-02 Akim Demaille <akim@epita.fr>
14552
14553 * doc/refcard.tex: Update.
14554
14555 2001-11-02 Akim Demaille <akim@epita.fr>
14556
14557 * src/symtab.h (SUNDEF): New.
14558 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14559 stand for `uninitialized', instead of 0.
14560 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14561 * src/lex.c (lex): Adjust.
14562
14563 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14564 Number it 0.
14565 Let yylex return it instead of a plain 0.
14566 Reported by Dick Streefland.
14567
14568 2001-11-02 Akim Demaille <akim@epita.fr>
14569
14570 * tests/regression.at (Mixing %token styles): New test.
14571
14572 2001-11-02 Akim Demaille <akim@epita.fr>
14573
14574 * src/reader.c (parse_thong_decl): Formatting changes.
14575 (token_translations_init): New, extracted from...
14576 (packsymbols): Here.
14577 Adjust.
14578
14579 2001-11-01 Akim Demaille <akim@epita.fr>
14580
14581 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14582 Check that `9foo.y' produces correct cpp guards.
14583 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14584 guards.
14585 Reported by Wwp.
14586
14587 2001-11-01 Akim Demaille <akim@epita.fr>
14588
14589 * tests/regression.at (Invalid input: 2): New.
14590 * src/lex.c (unlexed_token_buffer): New.
14591 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14592 too.
14593 Reported by Wwp.
14594
14595 2001-11-01 Akim Demaille <akim@epita.fr>
14596
14597 * tests/calc.at: Catch up with 1.30.
14598 * configure.in: Bump to 1.49a.
14599 Adjust to newer Autotest.
14600
14601 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14602
14603 * src/conflicts.c: Move global variables rrc_total and src_total ...
14604 (print_conflicts): here.
14605 * src/output.c (output): Free global variable user_toknums.
14606 * src/lex.c (token_obstack): Become static.
14607
14608 2001-10-18 Akim Demaille <akim@epita.fr>
14609
14610 * tests/atlocal.in (GCC): Add.
14611 * tests/calc.at: s/m4_match/m4_bmatch/.
14612 s/m4_patsubst/m4_bpatsubst/.
14613 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14614 * configure.in: AC_SUBST(GCC).
14615
14616 2001-10-14 Marc Autret <autret_m@epita.fr>
14617
14618 * src/options.c (create_long_option_table): Fix.
14619
14620 2001-10-10 Akim Demaille <akim@epita.fr>
14621
14622 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14623
14624 2001-10-04 Akim Demaille <akim@epita.fr>
14625
14626 * src/reader.c (parse_union_decl): Push the caracters in
14627 union_obstack, not attrs_obstack.
14628
14629 2001-10-04 Akim Demaille <akim@epita.fr>
14630
14631 Merge in the branch 1.29.
14632
14633 * src/reader.c (packsymbols): Use a temporary obstack for
14634 `%%tokendef', since output_stack is already used elsewhere.
14635
14636 2001-10-02 Akim Demaille <akim@epita.fr>
14637
14638 Bump 1.29d.
14639
14640 2001-10-02 Akim Demaille <akim@epita.fr>
14641
14642 Version 1.29c.
14643
14644 2001-10-02 Akim Demaille <akim@epita.fr>
14645
14646 * tests/regression.at (Invalid CPP headers): New.
14647 From Alexander Belopolsky.
14648 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14649
14650 2001-10-02 Akim Demaille <akim@epita.fr>
14651
14652 * tests/regression.at (Invalid input): New.
14653 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14654 Reported by Shura.
14655
14656 2001-10-02 Akim Demaille <akim@epita.fr>
14657
14658 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14659
14660 2001-10-02 Akim Demaille <akim@epita.fr>
14661
14662 * src/output.c (output_parser): Assert `skeleton'.
14663 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14664 systems.
14665 From Shura.
14666
14667 2001-10-01 Marc Autret <autret_m@epita.fr>
14668
14669 * src/lex.h: Echo modifications.
14670 * src/lex.c (unlex): Parameter is now token_t.
14671 From Hans Aberg.
14672
14673 2001-10-01 Marc Autret <autret_m@epita.fr>
14674
14675 * src/main.c: Include lex.h.
14676 From Hans Aberg.
14677
14678 2001-09-29 Akim Demaille <akim@epita.fr>
14679
14680 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14681
14682 2001-09-28 Akim Demaille <akim@epita.fr>
14683
14684 * tests/testsuite.at: Update to newer Autotest.
14685 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14686
14687 2001-09-27 Akim Demaille <akim@epita.fr>
14688
14689 Position independent wrapper.
14690
14691 * tests/bison: Remove.
14692 * tests/bison.in: New.
14693 * configure.in: Adjust.
14694
14695 2001-09-27 Paul Eggert <eggert@twinsun.com>
14696
14697 Port quotearg fixes from tar 1.13.24.
14698
14699 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14700 tm to be declared.
14701 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14702 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14703
14704 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14705 * m4/mbrtowc.m4: New file.
14706 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14707 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14708
14709 2001-09-27 Akim Demaille <akim@epita.fr>
14710
14711 Bump to 1.29c.
14712
14713 2001-09-27 Akim Demaille <akim@epita.fr>
14714
14715 Version 1.29b.
14716
14717 2001-09-25 Akim Demaille <akim@epita.fr>
14718
14719 * src/system.h: Include `xalloc.h'.
14720 Remove it from the C files.
14721 * src/files.c (output_files): Free the obstacks.
14722 * src/lex.c (init_lex): Rename as...
14723 (lex_init): this.
14724 (lex_free): New.
14725 * src/main.c (main): Use it.
14726
14727 2001-09-24 Marc Autret <autret_m@epita.fr>
14728
14729 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14730 to output informations in fout (FILE*).
14731 (open_graph, close_graph): Likewise.
14732 (output_graph, output_edge, output_node): Likewise.
14733 * src/vcg.h: Update function prototypes.
14734 * src/print_graph.c (print_graph): Open output graph file.
14735 (print_actions): Adjust.
14736 * src/files.h: Remove extern declaration.
14737 * src/files.c: Remove graph_obstack declaration.
14738 (open_files): Remove graph_obstack initialization.
14739 (output_files): Remove graph_obstack saving.
14740
14741 2001-09-24 Marc Autret <autret_m@epita.fr>
14742
14743 * src/files.c (compute_output_file_names): Fix.
14744
14745 2001-09-24 Marc Autret <autret_m@epita.fr>,
14746 Akim Demaille <akim@epita.fr>
14747
14748 * src/reader.c (reader): Remove call to free_symtab ().
14749 * src/main.c (main): Call it here.
14750 Include symtab.h.
14751 * src/conflicts.c (initialize_conflicts): Rename as...
14752 (solve_conflicts): this.
14753 * src/print.c (print_core, print_actions, print_state)
14754 (print_grammar): Dump to a file instead a `output_obstack'.
14755 (print_results): Dump `output_obstack', and then proceed with the
14756 FILE *.
14757 * src/files.c (compute_output_file_names, close_files): New.
14758 (output_files): Adjust.
14759 * src/main.c (main): Adjust.
14760
14761 2001-09-23 Marc Autret <autret_m@epita.fr>
14762
14763 * src/files.c (compute_header_macro): Computes header macro name
14764 from spec_defines_file when given.
14765
14766 2001-09-23 Marc Autret <autret_m@epita.fr>
14767
14768 * src/files.c (output_files): Add default extensions.
14769
14770 2001-09-22 Akim Demaille <akim@epita.fr>
14771
14772 * src/conflicts.c (finalize_conflicts): Rename as...
14773 (free_conflicts): this.
14774
14775 2001-09-22 Akim Demaille <akim@epita.fr>
14776
14777 * src/gram.c (gram_free): Rename back as...
14778 (dummy): this.
14779 (output_token_translations): Free `token_translations'.
14780 * src/symtab.c (free_symtab): Free the tag field.
14781
14782 2001-09-22 Akim Demaille <akim@epita.fr>
14783
14784 Remove `translations' as it is always set to true.
14785
14786 * src/gram.h: Adjust.
14787 * src/reader.c (packsymbols, parse_token_decl): Adjust
14788 * src/print.c (print_grammar): Adjust.
14789 * src/output.c (output_token_translations): Adjust.
14790 * src/lex.c (lex): Adjust.
14791 * src/gram.c: Be sure the set pointers to NULL.
14792 (dummy): Rename as...
14793 (gram_free): this.
14794
14795 2001-09-22 Akim Demaille <akim@epita.fr>
14796
14797 * configure.in: Invoke AM_LIB_DMALLOC.
14798 * src/system.h: Use dmalloc.
14799 * src/LR0.c: Be sure to have pointers initialized to NULL.
14800 (allocate_itemsets): Allocate kernel_items only if needed.
14801
14802 2001-09-22 Akim Demaille <akim@epita.fr>
14803
14804 * configure.in: Bump to 1.29b.
14805 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14806 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14807 need xmalloc.c in calc.y.
14808 From Pascal Bart.
14809
14810 2001-09-21 Akim Demaille <akim@epita.fr>
14811
14812 Version 1.29a.
14813 * Makefile.maint, config/config.guess, config/config.sub,
14814 * config/missing: Update from masters.
14815 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14816 upon package.m4.
14817 * configure.in (ALL_LINGUAS): Add `tr'.
14818
14819 2001-09-21 Akim Demaille <akim@epita.fr>
14820
14821 * tests/Makefile.am (package.m4): Move to...
14822 ($(srcdir)/$(TESTSUITE)): here.
14823
14824 2001-09-20 Akim Demaille <akim@epita.fr>
14825
14826 * src/complain.c: No longer try to be standalone: use system.h.
14827 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14828 * src/complain.h: Likewise.
14829 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14830 Remove the unused variable `n'.
14831 From Albert Chin-A-Young.
14832
14833 2001-09-18 Marc Autret <autret_m@epita.fr>
14834
14835 * doc/bison.1: Update.
14836 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14837 descriptions.
14838 (Option Cross Key): Update.
14839 Add --graph.
14840
14841 2001-09-18 Marc Autret <autret_m@epita.fr>
14842
14843 * tests/regression.at: New test (comment in %union).
14844
14845 2001-09-18 Marc Autret <autret_m@epita.fr>
14846
14847 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14848 do that.
14849 Reported by Keith Browne.
14850
14851 2001-09-18 Marc Autret <autret_m@epita.fr>
14852
14853 * tests/output.at: Add tests for --defines and --graph.
14854
14855 2001-09-18 Marc Autret <autret_m@epita.fr>
14856
14857 * tests/output.at: Removes tests of %{header,src}_extension features.
14858
14859 2001-09-18 Akim Demaille <akim@epita.fr>
14860
14861 * tests/Makefile.am (package.m4): New.
14862 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14863 (_AT_CHECK_CALC_ERROR): Likewise.
14864 Factor the `, ' part of verbose error messages.
14865
14866 2001-09-18 Marc Autret <autret_m@epita.fr>
14867
14868 * src/getargs.c (longopts): Declare --defines and --graph as options
14869 with optional arguments.
14870 * src/files.h: Add extern declarations.
14871 * src/files.c (spec_graph_file, spec_defines_file): New.
14872 (output_files): Update.
14873 Remove CPP-outed code.
14874
14875 2001-09-18 Marc Autret <autret_m@epita.fr>
14876
14877 Turn off %{source,header}_extension feature.
14878
14879 * src/files.c (compute_exts_from_gf): Update.
14880 (compute_exts_from_src): Update.
14881 (output_files): CPP-out useless code.
14882 * src/files.h: Remove {header,source}_extension extern declarations.
14883 * src/reader.c (parse_dquoted_param): CPP-out.
14884 (parse_header_extension_decl): Remove.
14885 (parse_source_extension_decl): Remove.
14886 (read_declarations): Remove cases tok_{hdrext,srcext}.
14887 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14888 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14889
14890 2001-09-10 Akim Demaille <akim@epita.fr>
14891
14892 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14893 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14894 (AT_CHECK_OUTPUT): this.
14895 Merely check ls' exit status, its output is useless.
14896
14897 2001-09-10 Akim Demaille <akim@epita.fr>
14898
14899 * tests/calc.at: Use m4_match.
14900 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14901
14902 2001-09-10 Marc Autret <autret_m@epita.fr>,
14903 Akim Demaille <akim@epita.fr>
14904
14905 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14906 enum color_e.
14907 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14908 to `normal'.
14909 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14910 * src/lex.h: Adjust prototype.
14911 (token_t): Add `tok_undef'.
14912 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14913 (parse_percent_token): Now returns token_t.
14914 Add default statement in switch.
14915 (lex): Separate `c' as an input variable, from the token_t result
14916 part.
14917 (unlexed): Is a token_t.
14918
14919 2001-09-10 Akim Demaille <akim@epita.fr>
14920
14921 * configure.in: Bump to 1.29a.
14922
14923 2001-09-07 Akim Demaille <akim@epita.fr>
14924
14925 Version 1.29.
14926
14927 2001-08-30 Akim Demaille <akim@epita.fr>
14928
14929 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14930 * m4/atconfig.m4: Remove.
14931 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14932 * tests/bison: New.
14933 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14934 m4_if, m4_patsubst, and m4_regexp.
14935 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14936 `input' file instead of echo.
14937
14938 2001-08-29 Akim Demaille <akim@epita.fr>
14939
14940 Bump to 1.28e.
14941
14942 2001-08-29 Akim Demaille <akim@epita.fr>
14943
14944 Version 1.28d.
14945
14946 2001-08-29 Paul Eggert <eggert@twinsun.com>
14947
14948 * src/bison.simple (yyparse): Don't take the address of an
14949 item before the start of an array, as that doesn't conform to
14950 the C Standard.
14951
14952 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14953
14954 * doc/bison.texinfo (Location Tracking Calc): New node.
14955
14956 2001-08-29 Paul Eggert <eggert@twinsun.com>
14957
14958 * src/output.c (output): Do not define const, as this now
14959 causes more problems than it cures.
14960
14961 2001-08-29 Akim Demaille <akim@epita.fr>
14962
14963 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14964 the nodes.
14965 Be sure to tag the `detailmenu'.
14966
14967 2001-08-29 Akim Demaille <akim@epita.fr>
14968
14969 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14970 download in a tmp dir.
14971
14972 2001-08-28 Marc Autret <autret_m@epita.fr>
14973
14974 * config/depcomp: New file.
14975
14976 2001-08-28 Marc Autret <autret_m@epita.fr>
14977
14978 * doc/bison.1 (mandoc): Adjust.
14979 From Juan Manuel Guerrero.
14980
14981 2001-08-28 Marc Autret <autret_m@epita.fr>
14982
14983 * src/print_graph.c (print_state): Fix.
14984
14985 2001-08-27 Marc Autret <autret_m@epita.fr>
14986
14987 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14988 char * members.
14989 Echo modifications to the functions prototypes.
14990 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14991
14992 2001-08-27 Marc Autret <autret_m@epita.fr>
14993
14994 * src/vcg.c: Include `xalloc.h'.
14995 (add_colorentry): New.
14996 (add_classname): New.
14997 (add_infoname): New.
14998 * src/vcg.h: Add new prototypes.
14999
15000 2001-08-27 Akim Demaille <akim@epita.fr>
15001
15002 * Makefile.maint: Sync. again with CVS Autoconf.
15003
15004 2001-08-27 Akim Demaille <akim@epita.fr>
15005
15006 * Makefile.maint: Formatting changes.
15007 (po-update, cvs-update, update): New targets.
15008 (AMTAR): Remove.
15009
15010 2001-08-27 Akim Demaille <akim@epita.fr>
15011
15012 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15013 * Makefile.maint: Sync. with CVS Autoconf.
15014
15015 2001-08-27 Marc Autret <autret_m@epita.fr>
15016
15017 * src/vcg.h (struct infoname_s): New.
15018 (struct colorentry_s): New.
15019 (graph_s): New fields {vertical,horizontal}_order in structure.
15020 Add `infoname' field.
15021 Add `colorentry' field;
15022 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15023 (G_HORIZONTAL_ORDER): New.
15024 (G_INFONAME): New.
15025 (G_COLORENTRY): New.
15026 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15027 Add output of `infoname'.
15028 Add output of `colorentry'.
15029
15030 2001-08-27 Marc Autret <autret_m@epita.fr>
15031
15032 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15033 This one shadowed a global parameter.
15034
15035 2001-08-24 Marc Autret <autret_m@epita.fr>
15036
15037 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15038 instead of `unsigned'.
15039 (print_state): Do not call obstack_object_size () in obstack_grow ()
15040 to avoid macro variables shadowing.
15041
15042 2001-08-23 Marc Autret <autret_m@epita.fr>
15043
15044 * src/lex.c (percent_table): Typo: s/naem/name/.
15045 Add graph option.
15046 Normalize new options declarations.
15047
15048 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15049
15050 * tests/suite.at: Exercise %header_extension and %source_extension.
15051
15052 2001-08-16 Marc Autret <autret_m@epita.fr>
15053
15054 * src/reader.c (parse_dquoted_param): New.
15055 (parse_header_extension_decl): Use it.
15056 (parse_source_extension_decl): Likewise.
15057
15058 2001-08-16 Marc Autret <autret_m@epita.fr>
15059
15060 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15061 (get_xxxx_str): Use assert () instead of complain ().
15062 Remove return invokations in default cases.
15063 (get_decision_str): Modify default behaviour. Remove second argument.
15064 Echo modifications on calls.
15065 (output_graph): Fix.
15066
15067 2001-08-16 Marc Autret <autret_m@epita.fr>
15068
15069 * src/getargs.c (usage): Update with ``-g, --graph''.
15070
15071 2001-08-16 Marc Autret <autret_m@epita.fr>
15072
15073 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15074 (Option Cross Key): Likewise.
15075 * doc/bison.1: Update.
15076
15077 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
15078
15079 * src/output.c (output_master_parser): Don't finish action_obstack.
15080 (output_parser): Don't care about the muscle action, here.
15081 (prepare): Copy the action_obstack in the action muscle.
15082 (output): Free action_obstack.
15083
15084 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15085
15086 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15087 will contain `%union' declaration.
15088 (parse_union_decl): Delete #line directive output.
15089 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15090 informations about %union.
15091 (parse_union_decl): Copy the union_obstack in the muscle stype.
15092 * src/bison.simple: Add new #line directive.
15093 Add typdef %%stype YYSTYPE.
15094
15095 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15096
15097 * src/bison.simple: Add new `#line' directive.
15098
15099 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
15100
15101 * src/bison.simple: New `#line' directive.
15102 * src/output.c (output_parser): Support new dynamic muscle input_line.
15103
15104 2001-09-22 Marc Autret <autret_m@epita.fr>
15105
15106 * src/output.c (output_master_parser): New.
15107 (output_parser): Be more re-entrant.
15108
15109 2001-09-21 Marc Autret <autret_m@epita.fr>
15110
15111 * src/reader.c (copy_definition, parse_union_decl): Update and use
15112 `linef' muscle.
15113 (copy_action): Likewise.
15114 Use obstack_1grow ().
15115 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15116
15117 2001-09-21 Marc Autret <autret_m@epita.fr>
15118
15119 * src/options.c (option_table): Adjust.
15120 * src/lex.c (parse_percent_token): Fix.
15121
15122 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15123
15124 * src/options.c (symtab.h): Include it, need by lex.h.
15125
15126 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15127
15128 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15129 is now an option_table_struct*.
15130 (option_strcmp): New function option_strcmp.
15131 (parse_percent_token): Call option_strcmp.
15132 * src/getargs.c (xalloc.h, options.h): Include it.
15133 (getargs): Call create_long_option_table.
15134 (getargs): Free longopts at the end of the function.
15135 (shortopts): Move in options.c.
15136 * src/options.c (create_long_option_table): New function. Convert
15137 information from option_table to option structure.
15138 * src/reader.c (options.h): Include it.
15139
15140 * src/Makefile.am: Adjust.
15141 * src/options.c (option_table): Create from longopts and percent_table.
15142 * src/getargs.c (longopts): Delete.
15143 * src/lex.c (struct percent_table_struct): Delete.
15144 (percent_table): Delete.
15145 (options.h): Include it.
15146 * src/options.c: Create.
15147 * src/options.h: Create.
15148 Declare enum opt_access_e.
15149 Define struct option_table_struct.
15150
15151 2001-09-20 Marc Autret <autret_m@epita.fr>
15152
15153 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15154 sections of Bison.
15155
15156 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
15157
15158 * src/bison.simple: s/%%filename/%%skeleton.
15159 * src/muscle_tab.c (getargs.h): Include it.
15160 (muscle_init): Insert new muscle skeleton.
15161
15162 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
15163
15164 * src/output.c (output_parser): Delete unused variable actions_dumped.
15165
15166 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
15167
15168 * src/output.c (output): Delete call to reader_output_yylsp.
15169 * src/reader.c (reader): Likewise.
15170 * src/reader.h: Delete declaration of reader_output_yylsp.
15171
15172 2001-09-02 Marc Autret <autret_m@epita.fr>
15173
15174 * src/reader.c: Include muscle_tab.h.
15175 (parse_union_decl): Update.
15176 (parse_macro_decl): Rename parse_muscle_decl.
15177 Update to use renamed functions and variable.
15178 (read_declarations, copy_action, read_additionnal_code, : Updated
15179 with correct variables and functions names.
15180 (packsymbols, reader): Likewise.
15181
15182 * src/reader.h (muscle_obstack): Extern declaration update.
15183
15184 * src/output.c: Include muscle_tab.h
15185 In all functions using macro_insert, change by using muscle_insert ().
15186 (macro_obstack): Rename muscle_obstack.
15187 Echo modifications in the whole file.
15188 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15189 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15190 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15191
15192 * src/muscle_tab.h: Update double inclusion macros.
15193 (macro_entry_s): Rename muscle_entry_s.
15194 Update prototypes.
15195
15196 * src/muscle_tab.c: Include muscle_tab.h.
15197 Rename macro_tabble to muscle_table.
15198 (mhash1, mhash2, mcmp): Use muscle_entry.
15199 (macro_init): Rename muscle_init. Update.
15200 (macro_insert): Rename muscle_insert. Update.
15201 (macro_find): Rename muscle_find. Update.
15202
15203 * src/main.c: Include muscle_tab.h.
15204 (main): Call muscle_init ().
15205 * src/Makefile.am (bison_SOURCES): Echo modifications.
15206
15207 2001-09-02 Marc Autret <autret_m@epita.fr>
15208
15209 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15210
15211 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15212
15213 2001-09-02 Marc Autret <autret_m@epita.fr>
15214
15215 * src/macrotab.c, src/macrotab.h: Remove.
15216
15217 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15218
15219 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15220 filename.
15221
15222 2001-09-01 Marc Autret <autret_m@epita.fr>
15223
15224 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15225 to an explicit value to activate the feature. We do it here.
15226
15227 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15228
15229 * src/output.c (prepare): Delete the `filename' muscule insertion.
15230 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15231 (parse_union_decl): Likewise.
15232 * src/macrotab.c (macro_init): Initialize filename by infile.
15233
15234 2001-08-31 Marc Autret <autret_m@epita.fr>
15235
15236 * src/bison.simple (YYLSP_NEEDED): New definition.
15237 * src/output.c (prepare): Add macro insertion of `locations_flag'
15238
15239 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15240
15241 * src/output.c (prepare): Delete insertion of previous muscles,
15242 and insert the `prefix' muscles.
15243 * src/macrotab.c (macro_init): Likewise.
15244 (macro_init): Initialization prefix directive by `yy'.
15245 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15246 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15247 yylval, yydebug, yyerror, yynerrs and yyparse.
15248 New directive `#define' to substitute yydebug, ... with option
15249 name_prefix.
15250
15251 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15252
15253 * src/main.c (main): Standardize.
15254 * src/output.c (output_table_data, output_parser): Likewise.
15255 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15256
15257 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15258
15259 * src/reader.c (read_additionnal_code): Rename %%user_code to
15260 %%epilogue.
15261 * src/output.c (output): Rename %%declarations to %%prologue.
15262 * src/bison.simple: Echo modifications.
15263
15264 2001-08-31 Marc Autret <autret_m@epita.fr>
15265
15266 * src/reader.c (readgram): CleanUp.
15267 (output_token_defines): Likewise.
15268 (packsymbols): Likewise.
15269 (reader): Likewise.
15270 * src/output.c (output): CPP-out useless code.
15271
15272 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15273
15274 * src/reader.c (reader): Delete obsolete call to function
15275 output_trailers and output_headers.
15276 * src/output.h: Remove obsolete functions prototypes of output_headers
15277 and output_trailers.
15278
15279 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15280
15281 * src/main.c: Include macrotab.h.
15282 * src/macrotab.h (macro_entry_s): Constify fields.
15283 Adjust functions prototypes.
15284 * src/macrotab.c (macro_insert): Constify key and value.
15285 (macro_find): Constify key.
15286 (macro_insert): Include 'xalloc.h'
15287 (macro_insert): Use XMALLOC.
15288 (macro_find): Constify return value.
15289 * src/output.c (output_table_data): Rename table to table_data.
15290 (output_parser): Constify macro_key, macro_value.
15291
15292 2001-08-30 Marc Autret <autret_m@epita.fr>
15293
15294 * src/reader.c (parse_skel_decl): New.
15295 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15296 * src/lex.h (token_t): New token `tok_skel'.
15297 * src/lex.c (percent_table): Add skeleton option entry.
15298 Standardize.
15299
15300 2001-08-29 Marc Autret <autret_m@epita.fr>
15301
15302 * src/bison.simple: Add %%user_code directive at the end.
15303 * src/reader.c (read_additionnal_code): New.
15304 (reader): Use it.
15305 * src/output.c (output_program): Remove.
15306 (output): Update.
15307
15308 2001-08-28 Marc Autret <autret_m@epita.fr>
15309
15310 * src/output.c (output_actions): Clean up.
15311 (output_gram): CPP-out useless code.
15312 * src/reader.c (reader): Clean up, CPP-out useless code.
15313
15314 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15315
15316 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15317 directive.
15318 * src/bison.simple: Add `%%definitions'.
15319
15320 2001-08-28 Marc Autret <autret_m@epita.fr>
15321
15322 * config/depcomp: New file.
15323
15324 2001-08-27 Paul Eggert <eggert@twinsun.com>
15325
15326 * src/bison.simple (yyparse): Don't take the address of an
15327 item before the start of an array, as that doesn't conform to
15328 the C Standard.
15329
15330 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15331
15332 * src/output.c (output): Remove the initialization of the macro
15333 obstack. It was done too late here.
15334
15335 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15336 completely wrong.
15337 (reader): Initialize the macro obstack here, since we need it to grow
15338 '%define' directives.
15339
15340 * src/reader.h: Declare the macro obstack as extern.
15341
15342 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15343
15344 * src/output.c (output_parser): Fix. Store single '%' characters in
15345 the output obstack instead of throwing them away.
15346
15347 2001-08-27 Akim Demaille <akim@epita.fr>
15348
15349 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15350
15351 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15352
15353 * lib/Makefile.am: Adjust.
15354
15355 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15356
15357 * src/bison.simple: Update and add '%%' directives.
15358
15359 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15360
15361 * src/reader.c (reader): Remove calls to 'output_headers' and
15362 'output_trailers'. Remove some C output.
15363 (readgram): Disable a piece of code that was writing a default
15364 definition for 'YYSTYPE'.
15365 (reader_output_yylsp): Remove.
15366 (packsymbols): Output token defintions to a macro.
15367 (copy_definition): Disable C output.
15368
15369 * src/reader.c (parse_macro_decl): New function used to parse macro
15370 declarations.
15371 (copy_string2): Put the body of copy_string into this new function.
15372 Add a parameter to let the caller choose whether he wants to copy the
15373 string delimiters or not.
15374 (copy_string): Be a simple call to copy_string2 with the last argument
15375 bound to true.
15376 (read_declarations): Add case for macro definition.
15377 (copy_identifier): New.
15378 (parse_macro_decl): Read macro identifiers using copy_identifier
15379 rather than lex.
15380
15381 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15382
15383 * src/output.c (prepare): Add prefixed names.
15384 (output_parser): Output semantic actions.
15385 (output_parser): Fix bug on '%%line' directives.
15386
15387 * src/output.c (output_headers): Remove. The C code printed by this
15388 function should now be in the skeletons.
15389 (output_trailers): Remove.
15390 (output): Disable call to 'reader_output_yylsp'.
15391 (output_rule_data): Do not output tables to the table obstack.
15392
15393 * src/output.c: Remove some C dedicated output.
15394 Improve the use of macro and output obstacks.
15395 (output_defines): Remove.
15396
15397 * src/output.c (output_token_translations): Associate 'translate'
15398 table with a macro. No output to the table obstack.
15399 (output_gram): Same for 'rhs' and 'prhs'.
15400 (output_stos): Same for 'stos'.
15401 (output_rule_data): Same for 'r1' and 'r2'.
15402 (token_actions): Same for 'defact'.
15403 (goto_actions): Same for 'defgoto'.
15404 (output_base): Same for 'pact' and 'pgoto'.
15405 (output_table): Same for 'table'.
15406 (output_check): Same for 'check'.
15407
15408 * src/output.c (output_table_data): New function.
15409 (output_short_table): Remove.
15410 (output_short_or_char_table): Remove.
15411
15412 * src/output.c (output_parser): Replace most of the skeleton copy code
15413 with something new. Skeletons are now processed character by character
15414 rather than line by line, and Bison looks for '%%' macros. This is the
15415 first step in making Bison's output process (a lot) more flexible.
15416 (output_parser): Use the macro table.
15417
15418 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15419
15420 * src/main.c (main): Initialize the macro table.
15421
15422 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15423
15424 * src/lex.c (percent_table): Add tok_define.
15425 * src/lex.h: Add tok_define.
15426
15427 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15428
15429 * src/macrotab.c: New file.
15430 * src/macrotab.h: New file.
15431 * src/Makefile.am: Update.
15432
15433 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15434
15435 * lib/hash.c: New file.
15436 * lib/hash.h: New file.
15437 * lib/Makefile.am: Update.
15438
15439 2001-08-15 Akim Demaille <akim@epita.fr>
15440
15441 Version 1.28c.
15442
15443 2001-08-15 Marc Autret <autret_m@epita.fr>
15444
15445 * src/reader.c (readgram): Indent output macro YYSTYPE.
15446 (packsymbols): Likewise.
15447 (output_token_defines): Likewise.
15448 * src/files.c: Standardize.
15449 (compute_header_macro): New.
15450 (defines_obstack_save): New. Use compute_header_macro.
15451 (output_files): Update. Use defines_obstack_save.
15452
15453 2001-08-15 Akim Demaille <akim@epita.fr>
15454
15455 * doc/bison.texinfo (Table of Symbols): Document
15456 YYSTACK_USE_ALLOCA.
15457
15458 2001-08-15 Akim Demaille <akim@epita.fr>
15459
15460 * missing: Update from CVS Automake.
15461 * config/config.guess, config/config.sub, config/texinfo.tex:
15462 Update from gnu.org.
15463
15464 2001-08-15 Akim Demaille <akim@epita.fr>
15465
15466 * Makefile.maint: Sync with CVS Autoconf.
15467
15468 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15469
15470 * doc/bison.texinfo: Include GNU Free Documentation License from
15471 `fdl.texi'.
15472 * doc/fdl.texi: Add to package.
15473
15474 2001-08-14 Marc Autret <autret_m@epita.fr>
15475
15476 Turn on %{source,header}_extension features.
15477
15478 * src/lex.c (percent_table): Un-CPP out header_extension and
15479 source_extension.
15480 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15481 (compute_exts_from_src): Remove conditions. It restores priorities
15482 between options.
15483
15484 2001-08-14 Marc Autret <autret_m@epita.fr>
15485
15486 * src/files.c (compute_base_names): Add extensions computing when
15487 `--file-prefix' used.
15488 Standardize function calls.
15489
15490 2001-08-13 Marc Autret <autret_m@epita.fr>
15491
15492 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15493 defining it (defined but null disables alloca).
15494
15495 2001-08-13 Marc Autret <autret_m@epita.fr>
15496
15497 * src/bison.simple (_yy_memcpy): CPP reformat.
15498
15499 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15500
15501 * tests/atconfig.in (CPPFLAGS): Fix.
15502
15503 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15504
15505 * doc/bison.texinfo: Include GNU General Public License from
15506 `gpl.texi'.
15507 * doc/gpl.texi: Add to package.
15508
15509 2001-08-10 Marc Autret <autret_m@epita.fr>
15510
15511 * src/print_graph.h: Fix.
15512 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15513
15514 2001-08-10 Akim Demaille <akim@epita.fr>
15515
15516 * src/system.h: Provide default declarations for stpcpy, strndup,
15517 and strnlen.
15518
15519 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15520
15521 * doc/bison.texinfo (Locations): Update @$ stuff.
15522
15523 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15524
15525 * src/bison.simple (YYLLOC_DEFAULT): Update.
15526 (yyparse): Adjust.
15527
15528 2001-08-08 Marc Autret <autret_m@epita.fr>
15529
15530 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15531 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15532 Reported by Fabrice Bauzac.
15533
15534 2001-08-08 Marc Autret <autret_m@epita.fr>
15535
15536 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15537 * src/vcg.c (output_node): Fix.
15538 * src/vcg.h: Cleanup.
15539 * src/print_graph.c: Add comments.
15540 (node_output_size): New global variable. Simplify the formatting of
15541 the VCG graph output.
15542 (print_actions): Unused code is now used. It notifies the final state
15543 and no action states in the VCG graph. It also give the reduce actions.
15544 The `shift and goto' edges are red and the `go to state' edges are
15545 blue.
15546 Get the current node name and node_obstack by argument.
15547 (node_obstack): New variable.
15548 (print_state): Manage node_obstack.
15549 (print_core): Use node_obstack given by argument.
15550 A node is not only computed here but in print_actions also.
15551 (print_graph): CPP out useless code instead of commenting it.
15552
15553 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15554
15555 * tests/atconfig.in (CPPFLAGS): Fix.
15556
15557 2001-08-07 Akim Demaille <akim@epita.fr>
15558
15559 * src/print_graph.c (quote): New.
15560 (print_core): Use it.
15561
15562 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15563
15564 * src/vcg.c (complain.h): Include it.
15565 Unepitaize `return' invocations.
15566 [NDEBUG] (main): Remove.
15567 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15568 * src/files.c (open_files): Initialize graph_obstack.
15569 * src/print_graph.c (print_actions): CPP out useless code.
15570 (print_core): Don't output the last `\n' in labels.
15571 Use `quote'.
15572 * src/files.c (output_files): Output the VCG file.
15573 * src/main.c (main): Invoke print_graph ();
15574
15575 2001-08-06 Marc Autret <autret_m@epita.fr>
15576
15577 Automaton VCG graph output.
15578 Using option ``-g'' or long option ``--graph'', you can generate
15579 a gram_filename.vcg file containing a VCG description of the LALR (1)
15580 automaton of your grammar.
15581
15582 * src/main.c: Call to print_graph() function.
15583 * src/getargs.h: Update.
15584 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15585 (graph_flag): New flag.
15586 (longopts): Update.
15587 (getargs): Add case `g'.
15588 * src/files.c (graph_obstack): New obstack struct.
15589 (open_files): Initialize new obstack.
15590 (output_files): Saves graph_obstack if required.
15591 * src/files.h (graph_obstack): New extern declaration.
15592 * src/Makefile.am: Add new source files.
15593
15594 2001-08-06 Marc Autret <autret_m@epita.fr>
15595
15596 * src/print_graph.c, src/print_graph.h (graph): New.
15597 * src/vcg.h: New file.
15598 * src/vcg.c: New file, VCG graph handling.
15599
15600 2001-08-06 Marc Autret <autret_m@epita.fr>
15601
15602 Add of %source_extension and %header_extension which specify
15603 the source or/and the header output file extension.
15604
15605 * src/files.c (compute_base_names): Remove initialisation of
15606 src_extension and header_extension.
15607 (compute_exts_from_gf): Update.
15608 (compute_exts_from_src): Update.
15609 (output_files): Update.
15610 * src/reader.c (parse_header_extension_decl): New.
15611 (parse_source_extension_decl): New.
15612 (read_declarations): New case statements for the new tokens.
15613 * src/lex.c (percent_table): Add entries for %source_extension
15614 and %header_extension.
15615 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15616
15617 2001-08-06 Marc Autret <autret_m@epita.fr>
15618
15619 * configure.in: Bump to 1.28c.
15620 * doc/bison.texinfo: Texinfo thingies.
15621
15622 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15623
15624 * tests/atconfig.in (CPPFLAGS): Add.
15625 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15626
15627 2001-08-03 Akim Demaille <akim@epita.fr>
15628
15629 Version 1.28b.
15630
15631 2001-08-03 Akim Demaille <akim@epita.fr>
15632
15633 * tests/Makefile.am (check-local): Ship testsuite.
15634 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15635 Include `string.h'.
15636
15637 2001-08-03 Akim Demaille <akim@epita.fr>
15638
15639 * configure.in: Try using -Wformat when compiling.
15640
15641 2001-08-03 Akim Demaille <akim@epita.fr>
15642
15643 * configure.in: Bump to 1.28b.
15644
15645 2001-08-03 Akim Demaille <akim@epita.fr>
15646
15647 * src/complain.c: Adjust strerror_r portability issues.
15648
15649 2001-08-03 Akim Demaille <akim@epita.fr>
15650
15651 Version 1.28a.
15652
15653 2001-08-03 Akim Demaille <akim@epita.fr>
15654
15655 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15656 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15657 * src/getargs.c: Include complain.h.
15658 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15659 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15660
15661 2001-08-03 Akim Demaille <akim@epita.fr>
15662
15663 * src/reader.c (readgram): Display hidden chars in error messages.
15664
15665 2001-08-03 Akim Demaille <akim@epita.fr>
15666
15667 Update to gettext 0.10.39.
15668
15669 2001-08-03 Akim Demaille <akim@epita.fr>
15670
15671 * lib/strspn.c: New.
15672
15673 2001-08-01 Marc Autret <autret_m@epita.fr>
15674
15675 * doc/bison.texinfo: Update.
15676 * doc/bison.1 (mandoc): Update.
15677 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15678 * src/files.c: Support output files extensions computing.
15679 (src_extension): New static variable.
15680 (header_extension): New static variable.
15681 (tr): New function.
15682 (get_extension_index): New function, gets the index of an extension
15683 filename in a string.
15684 (compute_exts_from_gf): New function, computes extensions from the
15685 grammar file extension.
15686 (compute_exts_from_src): New functions, computes extensions from the
15687 C source file extension, file given by ``-o'' option.
15688 (compute_base_names): Update.
15689 (output_files): Update.
15690
15691 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15692
15693 * doc/bison.texi: Document @$.
15694 (Locations): New section.
15695
15696 2001-07-18 Akim Demaille <akim@epita.fr>
15697
15698 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15699 * config/prev-version.txt, config/move-if-change: New.
15700 * Makefile.am: Adjust.
15701
15702 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15703
15704 * src/bison.simple (yyparse): Suppress warning `comparaison
15705 between signed and unsigned'.
15706
15707 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15708
15709 * src/getargs.h (raw_flag): Remove.
15710 * src/getargs.c: Die on `-r'/`--raw'.
15711 * src/lex.c (parse_percent_token): Die on `%raw'.
15712 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15713 * tests/calc.at: Suppress test with option `--raw'.
15714
15715 2001-07-14 Akim Demaille <akim@epita.fr>
15716
15717 * config/: New.
15718 * configure.in: Require Autoconf 2.50.
15719 Update to gettext 0.10.38.
15720
15721 2001-03-16 Akim Demaille <akim@epita.fr>
15722
15723 * doc/bison.texinfo: ANSIfy the examples.
15724
15725 2001-03-16 Akim Demaille <akim@epita.fr>
15726
15727 * getargs.c (skeleton): New variable.
15728 (longopts): --skeleton is a new option.
15729 (shortopts, getargs): -S is a new option.
15730 * getargs.h: Declare skeleton.
15731 * output.c (output_parser): Use it.
15732
15733 2001-03-16 Akim Demaille <akim@epita.fr>
15734
15735 * m4/strerror_r.m4: New.
15736 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15737 * lib/error.h, lib/error.c: Update.
15738
15739 2001-03-16 Akim Demaille <akim@epita.fr>
15740
15741 * src/getargs.c (longopts): Clean up.
15742
15743 2001-02-21 Akim Demaille <akim@epita.fr>
15744
15745 * src/reader.c (gensym): `gensym_count' is your own.
15746 Use a static buf to create the symbol name, as token_buffer is no
15747 longer a buffer.
15748
15749 2001-02-08 Akim Demaille <akim@epita.fr>
15750
15751 * src/conflicts.c (conflict_report): Be sure not to append to res
15752 between two calls, which could happen if both first sprintf were
15753 skipped, but not the first cp += strlen.
15754
15755 2001-02-08 Akim Demaille <akim@epita.fr>
15756
15757 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15758 New, from fileutils 4.0.37.
15759 * configure.in: Require Autoconf 2.49c. I took some time before
15760 making this decision. This is the only way out for portability
15761 issues in Bison, it would mean way too much duplicate effort to
15762 import in Bison features implemented in 2.49c since 2.13.
15763 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15764
15765 2001-02-02 Akim Demaille <akim@epita.fr>
15766
15767 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15768 * lib/xalloc.h, lib/xmalloc.c: Update.
15769
15770 2001-01-19 Akim Demaille <akim@epita.fr>
15771
15772 Get rid of the ad hoc handling of token_buffer in the scanner: use
15773 the obstacks.
15774
15775 * src/lex.c (token_obstack): New.
15776 (init_lex): Initialize it. No longer call...
15777 (grow_token_buffer): this. Remove it.
15778 Adjust all the places which used it to use the obstack.
15779
15780 2001-01-19 Akim Demaille <akim@epita.fr>
15781
15782 * src/lex.h: Rename all the tokens:
15783 s/\bENDFILE\b/tok_eof/g;
15784 s/\bIDENTIFIER\b/tok_identifier/g;
15785 etc.
15786 Let them be enums, not #define, to ease debugging.
15787 Adjust all the code.
15788
15789 2001-01-18 Akim Demaille <akim@epita.fr>
15790
15791 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15792 * src/lex.c (maxtoken, grow_token_buffer): Static.
15793
15794 2001-01-18 Akim Demaille <akim@epita.fr>
15795
15796 Since we now use obstacks, more % directives can be enabled.
15797
15798 * src/lex.c (percent_table): Also accept `%yacc',
15799 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15800 `%debug'.
15801 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15802 instead of returning a token.
15803 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15804 * src/reader.c (read_declarations): Adjust.
15805 * src/files.c (open_files): Don't call `compute_base_names', don't
15806 compute `attrsfile' since they depend upon data which might be
15807 *in* the input file now.
15808 (output_files): Do it here.
15809 * src/output.c (output_headers): Document the fact that this patch
15810 introduces a guaranteed SEGV for semantic parsers.
15811 * doc/bison.texinfo: Document them.
15812 * tests/suite.at: Exercise these %options.
15813
15814 2000-12-20 Akim Demaille <akim@epita.fr>
15815
15816 Also handle the output file (--verbose) with obstacks.
15817
15818 * files.c (foutput): Remove.
15819 (output_obstack): New.
15820 Adjust all dependencies.
15821 * src/conflicts.c: Return a string.
15822 * src/system.h (obstack_grow_string): Rename as...
15823 (obstack_sgrow): this. Be ready to work with non literals.
15824 (obstack_fgrow4): New.
15825
15826 2000-12-20 Akim Demaille <akim@epita.fr>
15827
15828 * src/files.c (open_files): Fix the computation of short_base_name
15829 in the case of `-o foo.tab.c'.
15830
15831 2000-12-20 Akim Demaille <akim@epita.fr>
15832
15833 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15834 (copy_dollar): Now that everything uses obstacks, get rid of the
15835 FILE * parameters.
15836
15837 2000-12-20 Akim Demaille <akim@epita.fr>
15838
15839 * src/files.c (open_files): Actually the `.output' file is based
15840 on the short_base_name, not base_name.
15841 * tests/suite.at (Checking output file names): Adjust.
15842
15843 2000-12-20 Akim Demaille <akim@epita.fr>
15844
15845 * src/bison.s1: Remove, we now use directly...
15846 * src/bison.simple: this.
15847 * src/Makefile.am: Use pkgdata instead of data.
15848
15849 2000-12-20 Akim Demaille <akim@epita.fr>
15850
15851 * src/files.c (guard_obstack): New.
15852 (open_files): Initialize it.
15853 (output_files): Dump it...
15854 * src/files.h: Export it.
15855 * src/reader.c (copy_guard): Use it.
15856
15857 2000-12-19 Akim Demaille <akim@epita.fr>
15858
15859 * src/files.c (outfile, defsfile, actfile): Removed as global
15860 vars.
15861 (open_files): Don't compute them.
15862 (output_files): Adjust.
15863 (base_name, short_base_name): Be global.
15864 Adjust dependencies.
15865
15866 2000-12-19 Akim Demaille <akim@epita.fr>
15867
15868 * src/files.c (strsuffix): New.
15869 (stringappend): Be just like strcat but allocate.
15870 (base_names): Eve out from open_files.
15871 Try to simplify the rather hairy computation of base_name and
15872 short_base_name.
15873 (open_files): Use it.
15874 * tests/suite.at (Checking output file names): New test.
15875
15876 2000-12-19 Akim Demaille <akim@epita.fr>
15877
15878 * src/system.h (obstack_grow_literal_string): Rename as...
15879 (obstack_grow_string): this.
15880 * src/output.c (output_parser): Recognize `%% actions' instead of
15881 `$'.
15882 * src/bison.s1: s/$/%% actions/.
15883 * src/bison.hairy: Likewise.
15884
15885 2000-12-19 Akim Demaille <akim@epita.fr>
15886
15887 * src/output.c (output_parser): Compute the `#line' lines when
15888 there are.
15889 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15890 Suggested by Hans Aberg.
15891
15892 2000-12-19 Akim Demaille <akim@epita.fr>
15893
15894 Let the handling of the skeleton files be local to the procedures
15895 that use it.
15896
15897 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15898 longer static.
15899 (fparser, open_extra_files): Remove.
15900 (open_files, output_files): Don't take care of fparser.
15901 * src/files.h: Adjust.
15902 * src/output.c (output_parser): Open and close the file to the
15903 skeleton.
15904 * src/reader.c (read_declarations): When %semantic_parser, open
15905 fguard.
15906
15907 2000-12-19 Akim Demaille <akim@epita.fr>
15908
15909 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15910 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15911
15912 2000-12-19 Akim Demaille <akim@epita.fr>
15913
15914 * src/files.c (open_files): Yipee! We no longer need all the code
15915 looking for `/tmp' since we have no tmp file.
15916
15917 2000-12-19 Akim Demaille <akim@epita.fr>
15918
15919 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15920 New macros.
15921 * src/files.c (open_files): Less dependency on MSDOS etc.
15922
15923 2000-12-14 Akim Demaille <akim@epita.fr>
15924
15925 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15926 Provide a default definition.
15927 Use it when executing the default @ action.
15928 * src/reader.c (reader_output_yylsp): No longer include
15929 `timestamp' and `text' in the default YYLTYPE.
15930
15931 2000-12-12 Akim Demaille <akim@epita.fr>
15932
15933 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15934 (copy_guard): Quote the file names.
15935 Reported by Laurent Mascherpa.
15936
15937 2000-12-12 Akim Demaille <akim@epita.fr>
15938
15939 * src/output.c (output_headers, output_program, output): Be sure
15940 to escape special characters when outputting filenames.
15941 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15942 (output_headers): Don't depend on them, Use ACTSTR.
15943
15944 2000-11-17 Akim Demaille <akim@epita.fr>
15945
15946 * lib/obstack.h: Formatting changes.
15947 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15948 prevents type checking.
15949 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15950 cast the value to (void *): assigning a `foo *' to a `void *'
15951 variable is valid.
15952 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15953 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15954 append characters.
15955
15956 2000-11-17 Akim Demaille <akim@epita.fr>
15957
15958 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15959 as...
15960 (suite.m4, regression.m4, calc.m4): these.
15961 * tests/atgeneral.m4: Update from CVS Autoconf.
15962
15963 2000-11-17 Akim Demaille <akim@epita.fr>
15964
15965 * tests/regression.m4 (%union and --defines): New test,
15966 demonstrating a current bug in the obstack implementation.
15967
15968 2000-11-17 Akim Demaille <akim@epita.fr>
15969
15970 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15971 macros.
15972 Use them to declare the variables which are global or local to
15973 `yyparse'.
15974
15975 2000-11-17 Akim Demaille <akim@epita.fr>
15976
15977 * acconfig.h: Remove, no longer used.
15978
15979 2000-11-07 Akim Demaille <akim@epita.fr>
15980
15981 * src: s/Copyright (C)/Copyright/g.
15982
15983 2000-11-07 Akim Demaille <akim@epita.fr>
15984
15985 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15986 defining.
15987 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15988
15989 2000-11-07 Akim Demaille <akim@epita.fr>
15990
15991 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15992 Merge in a single CPP if/else.
15993
15994 2000-11-07 Akim Demaille <akim@epita.fr>
15995
15996 * src/output.c (output): Remove useless variables.
15997 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15998 argument `data' for consistency with the prototypes.
15999 Qualify it `const'.
16000 (obstack_copy, obstack_copy0): Rename the second argument as
16001 `address' for consistency. Qualify it `const'.
16002 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16003 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16004 `const' their input argument (`data' or `address').
16005 Adjust the corresponding macros to include `const' in casts.
16006
16007 2000-11-03 Akim Demaille <akim@epita.fr>
16008
16009 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16010 s/PFILE1/BISON_HAIRY/.
16011 Adjust dependencies.
16012
16013 2000-11-03 Akim Demaille <akim@epita.fr>
16014
16015 For some reason, this was not applied.
16016
16017 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16018 `unlink': it's no longer used.
16019
16020 2000-11-03 Akim Demaille <akim@epita.fr>
16021
16022 * src/files.c (skeleton_find): New function, eved out of...
16023 (open_files, open_extra_files): here.
16024
16025 2000-11-03 Akim Demaille <akim@epita.fr>
16026
16027 Don't use `atexit'.
16028
16029 * src/files.c (obstack_save): New function.
16030 (done): Rename as...
16031 (output_files): this.
16032 Use `obstack_save'.
16033 * src/main.c (main): Don't use `atexit' to register `done', since
16034 it no longer has to remove tmp files, just call `output_files'
16035 when there are no errors.
16036
16037 2000-11-02 Akim Demaille <akim@epita.fr>
16038
16039 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16040 `unlink': it's no longer used.
16041 * src/files.h: Formatting changes.
16042
16043 2000-11-02 Akim Demaille <akim@epita.fr>
16044
16045 Remove the last uses of mktemp and unlink/delete.
16046
16047 * src/files.c (fdefines, ftable): Removed.
16048 (defines_ostack, table_obstack): New.
16049 Adjust dependencies of the former into uses of the latter.
16050 * src/output.c (output_short_or_char_table, output_short_table):
16051 Convert to using obstacks.
16052 * src/reader.c (copy_comment2): Accept one FILE * and two
16053 obstacks.
16054 (output_token_defines, reader_output_yylsp): Use obstacks.
16055 * src/system.h (obstack_fgrow3): New.
16056 * po/POTFILES.in: Adjust.
16057
16058 2000-11-01 Akim Demaille <akim@epita.fr>
16059
16060 Change each use of `fattrs' into a use of `attrs_obstack'.
16061
16062 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16063 * src/files.c (fattrs): Remove.
16064 (attrs_obstack): New.
16065 Adjust all dependencies.
16066 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16067
16068 2000-11-01 Akim Demaille <akim@epita.fr>
16069
16070 Introduce obstacks.
16071 Change each use of `faction' into a use of `action_obstack'.
16072
16073 * lib/obstack.h, lib/obstack.c: New files.
16074 * src/files.c (faction): Remove.
16075 (action_obstack): New.
16076 Adjust all dependencies.
16077
16078 2000-10-20 Akim Demaille <akim@epita.fr>
16079
16080 * lib/quote.h (PARAMS): New macro. Use it.
16081
16082 2000-10-16 Akim Demaille <akim@epita.fr>
16083
16084 * src/output.c (output_short_or_char_table): New function.
16085 (output_short_table, output_token_translations): Use it.
16086 (goto_actions): Use output_short_table.
16087
16088 2000-10-16 Akim Demaille <akim@epita.fr>
16089
16090 * src/symtab.c (bucket_new): New function.
16091 (getsym): Use it.
16092
16093 * src/output.c (output_short_table): New argument to display the
16094 comment associated with the table.
16095 Adjust dependencies.
16096 (output_gram): Use it.
16097 (output_rule_data): Nicer output layout for YYTNAME.
16098
16099 2000-10-16 Akim Demaille <akim@epita.fr>
16100
16101 * src/lex.c (read_typename): New function.
16102 (lex): Use it.
16103 * src/reader.c (copy_dollar): Likewise.
16104
16105 2000-10-16 Akim Demaille <akim@epita.fr>
16106
16107 * src/reader.c (copy_comment2): Expect the input stream to be on
16108 the `/' which is suspected to open a comment, instead of being
16109 called after `//' or `/*' was read.
16110 (copy_comment, copy_definition, parse_union_decl, copy_action)
16111 (copy_guard): Adjust.
16112
16113 2000-10-16 Akim Demaille <akim@epita.fr>
16114
16115 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16116 `read_signed_integer'.
16117
16118 2000-10-16 Akim Demaille <akim@epita.fr>
16119
16120 * src/reader.c (copy_dollar): New function.
16121 (copy_guard, copy_action): Use it.
16122
16123 2000-10-16 Akim Demaille <akim@epita.fr>
16124
16125 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16126 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16127 New files, from Fileutils 4.0.27.
16128 * src/main.c (printable_version): Remove.
16129 * src/lex.c, src/reader.c: Use `quote'.
16130
16131 2000-10-04 Akim Demaille <akim@epita.fr>
16132
16133 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16134
16135 2000-10-04 Akim Demaille <akim@epita.fr>
16136
16137 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16138
16139 2000-10-04 Akim Demaille <akim@epita.fr>
16140
16141 When a literal string is used to define two different tokens,
16142 `bison -v' segfaults.
16143 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16144
16145 * tests/regression.m4: New file.
16146 Include the core of the sample provided by Piotr Gackiewicz.
16147 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16148 properly.
16149
16150 2000-10-04 Akim Demaille <akim@epita.fr>
16151
16152 * src/reader.c (parse_expect_decl): Keep `count' within the size
16153 of `buffer'.
16154 From Neil Booth.
16155
16156 2000-10-02 Paul Eggert <eggert@twinsun.com>
16157
16158 * bison.s1 (yyparse): Assign the default value
16159 unconditionally, to avoid a GCC warning and make the parser a
16160 tad smaller.
16161
16162 2000-10-02 Akim Demaille <akim@epita.fr>
16163
16164 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16165 options.
16166
16167 2000-10-02 Akim Demaille <akim@epita.fr>
16168
16169 * src/derives.c, src/print.c, src/reduce.c: To ease the
16170 translation, move some `\n' out of the translated strings.
16171
16172 2000-10-02 Akim Demaille <akim@epita.fr>
16173
16174 The location tracking mechanism is precious for parse error
16175 messages. Nevertheless, it is enabled only when `@n' is used in
16176 the grammar, which is a different issue (you can use it in error
16177 message, but not in the grammar per se). Therefore, there should
16178 be another means to enable it.
16179
16180 * src/getargs.c (getargs): Support `--locations'.
16181 (usage): Report it.
16182 * src/getargs.h (locationsflag): Export it.
16183 * src/lex.c (percent_table): Support `%locations'.
16184 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16185 with `locationsflag'.
16186 * doc/bison.texinfo: Document `--locations' and `%locations'.
16187 Sort the options.
16188 * tests/calc.m4: Test it.
16189
16190 For regularity of the names, replace each
16191 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16192 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16193 In addition replace each `flag' with `_flag'.
16194
16195 2000-10-02 Akim Demaille <akim@epita.fr>
16196
16197 Also test parse error messages, including with YYERROR_VERBOSE.
16198
16199 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16200 associative).
16201 Use it to check the computations.
16202 Use it to check `nonassoc' is honored.
16203 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16204 `--yyerror-verbose'.
16205 (_AT_CHECK_CALC): Adjust to this option.
16206 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16207
16208 2000-10-02 Akim Demaille <akim@epita.fr>
16209
16210 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16211 the latter demonstrates a flaw in the handling of non debugging
16212 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16213 was used in order to simplify:
16214
16215 #if YYDEBUG
16216 if (yydebug)
16217 {
16218 ...
16219 }
16220 #endif
16221
16222 into
16223
16224 if (yydebug)
16225 {
16226 ...
16227 }
16228
16229 unfortunately this leads to a CPP conflict when
16230 `--name-prefix=foo' is used since it produces `#define yydebug
16231 foodebug'.
16232
16233 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16234 (YYDPRINTF): New macro.
16235 Spread its use.
16236 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16237 the bison options.
16238 Also test `--verbose', `--defines' and `--name-prefix'.
16239
16240 2000-10-02 Akim Demaille <akim@epita.fr>
16241
16242 Improve the readability of the produced parsers.
16243
16244 * src/bison.s1: Formatting changes.
16245 Improve the comment related to the `$' mark.
16246 (yydefault): Don't fall through to `yyresume': `goto' there.
16247 * src/output.c (output_parser): When the `$' is met, skip the end
16248 of its line.
16249 New variable, `number_of_dollar_signs', to check there's exactly
16250 one `$' in the parser skeleton.
16251
16252 2000-10-02 Akim Demaille <akim@epita.fr>
16253
16254 * lib/xstrdup.c: New file, from the fileutils.
16255 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16256 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16257 instead of strlen + xmalloc + strcpy.
16258 * src/symtab.c (copys): Remove, use xstrdup instead.
16259
16260 2000-10-02 Akim Demaille <akim@epita.fr>
16261
16262 * src/gram.h (associativity): New enum type which replaces the
16263 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16264 `right_assoc', `left_assoc' and `non_assoc'.
16265 Adjust all dependencies.
16266 * src/reader.c: Formatting changes.
16267 (LTYPESTR): Don't define it, use it as a literal in
16268 `reader_output_yylsp'.
16269 * src/symtab.h (symbol_class): New enum type which replaces the
16270 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16271 `sunknown', `stoken and `snterm'.
16272
16273 2000-10-02 Akim Demaille <akim@epita.fr>
16274
16275 * src/getargs.c (fixed_outfiles): Rename as...
16276 (yaccflag): for consistency and accuracy.
16277 Adjust dependencies.
16278
16279 2000-10-02 Akim Demaille <akim@epita.fr>
16280
16281 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16282 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16283 difficult and introduced a lot of core dump. It turns out that
16284 Bison used an implementation of `xmalloc' based on `calloc', and
16285 at various places it does depend upon the initialization to 0. I
16286 have not tried to isolate the pertinent places, and all the former
16287 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16288 someone should address this issue.
16289
16290 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16291 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16292 files.
16293 Adjust dependencies.
16294 * src/warshall.h: New file.
16295 Propagate.
16296
16297 2000-10-02 Akim Demaille <akim@epita.fr>
16298
16299 Various anti-`extern in *.c' changes.
16300
16301 * src/system.h: Include `assert.h'.
16302
16303 2000-10-02 Akim Demaille <akim@epita.fr>
16304
16305 * src/state.h (nstates, final_state, first_state, first_shift)
16306 (first_reduction): Move their exportation from here...
16307 * src/LR0.h: to here.
16308 Adjust dependencies.
16309 * src/getargs.c (statisticsflag): New variable.
16310 Add support for `--statistics'.
16311 Adjust dependencies.
16312
16313 Remove a lot of now useless `extern' statements in most files.
16314
16315 2000-10-02 Akim Demaille <akim@epita.fr>
16316
16317 * src/LR0.h: New file.
16318 Propagate its use.
16319
16320 2000-10-02 Akim Demaille <akim@epita.fr>
16321
16322 * src/print.h: New file.
16323 Propagate its use.
16324 * src/print.c: Formatting and ordering changes.
16325 (verbose, terse): Replace with...
16326 (print_results): this new function.
16327 Adjust dependencies.
16328
16329 2000-10-02 Akim Demaille <akim@epita.fr>
16330
16331 * src/conflicts.c (conflict_report): New function.
16332 (conflict_log, verbose_conflict_log): Replace with...
16333 (print_conflicts): this function.
16334 Adjust dependencies.
16335 * src/conflicts.h: New file.
16336 Propagate its inclusion.
16337
16338 2000-10-02 Akim Demaille <akim@epita.fr>
16339
16340 * src/nullable.h: New file.
16341 Propagate its inclusion.
16342 * src/nullable.c: Formatting changes.
16343
16344 2000-10-02 Akim Demaille <akim@epita.fr>
16345
16346 * src/reduce.h: New file.
16347 Propagate its inclusion.
16348 * src/reduce.c: Topological sort and other formatting changes.
16349 (bool, TRUE, FALSE): Move their definition to...
16350 * src/system.h: here.
16351
16352 2000-10-02 Akim Demaille <akim@epita.fr>
16353
16354 * src/files.c: Formatting changes.
16355 (tryopen, tryclose, openfiles): Rename as...
16356 (xfopen, xfclose, open_files): this.
16357 (stringappend): static.
16358 * src/files.h: Complete the list of exported symbols.
16359 Propagate its use.
16360
16361 2000-10-02 Akim Demaille <akim@epita.fr>
16362
16363 * src/reader.h: New file.
16364 Propagate its use instead of tedious list of `extern' and
16365 prototypes.
16366 * src/reader.c: Formatting changes, topological sort,
16367 s/register//.
16368
16369 2000-10-02 Akim Demaille <akim@epita.fr>
16370
16371 * src/lex.h: Prototype `lex.c' exported functions.
16372 * src/reader.c: Adjust.
16373 * src/lex.c: Formatting changes.
16374 (safegetc): Rename as...
16375 (xgetc): this.
16376
16377 2000-10-02 Akim Demaille <akim@epita.fr>
16378
16379 * src/lalr.h: New file.
16380 Propagate its inclusion instead of prototypes and `extern'.
16381 * src/lalr.c: Formatting changes, topological sorting etc.
16382
16383 2000-10-02 Akim Demaille <akim@epita.fr>
16384
16385 * src/output.c (token_actions): Introduce a temporary array,
16386 YYDEFACT, that makes it possible for this function to use
16387 output_short_table.
16388
16389 2000-10-02 Akim Demaille <akim@epita.fr>
16390
16391 `user_toknums' is output as a `short[]' in `output.c', while it is
16392 defined as a `int[]' in `reader.c'. For consistency with the
16393 other output tables, `user_toknums' is now defined as a table of
16394 shorts.
16395
16396 * src/reader.c (user_toknums): Be a short table instead of an int
16397 table.
16398 Adjust dependencies.
16399
16400 Factor the short table outputs.
16401
16402 * src/output.c (output_short_table): New function.
16403 * src/output.c (output_gram, output_stos, output_rule_data)
16404 (output_base, output_table, output_check): Use it.
16405
16406 2000-10-02 Akim Demaille <akim@epita.fr>
16407
16408 * src/output.c (output): Topological sort of the functions, in
16409 order to get rid of the `static' prototypes.
16410 No longer use `register'.
16411 * src/output.h: New file.
16412 Propagate its inclusion in files explicitly prototyping functions
16413 from output.c.
16414
16415 2000-09-21 Akim Demaille <akim@epita.fr>
16416
16417 * src/atgeneral.m4: Update from Autoconf.
16418
16419 2000-09-21 Akim Demaille <akim@epita.fr>
16420
16421 * src/closure.h: New file.
16422 * src/closure.c: Formatting changes, topological sort over the
16423 functions, use of closure.h.
16424 (initialize_closure, finalize_closure): Rename as...
16425 (new_closure, free_closure): these. Adjust dependencies.
16426 * src/LR0.c: Formatting changes, topological sort, use of
16427 cloture.h.
16428 (initialize_states): Rename as...
16429 (new_states): this.
16430 * src/Makefile.am (noinst_HEADERS): Adjust.
16431
16432 2000-09-20 Akim Demaille <akim@epita.fr>
16433
16434 * src/acconfig.h: Don't protect config.h against multiple
16435 inclusion.
16436 Don't define PARAMS.
16437 * src/system.h: Define PARAMS.
16438 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16439 purpose of config.h. system.h must not try to fix wrong
16440 definitions in config.h.
16441
16442 2000-09-20 Akim Demaille <akim@epita.fr>
16443
16444 * src/derives.h: New file.
16445 * src/main.c, src/derives.h: Use it.
16446 Formatting changes.
16447 * src/Makefile.am (noinst_HEADERS): Adjust.
16448
16449 2000-09-20 Akim Demaille <akim@epita.fr>
16450
16451 * tests/atgeneral.m4: Update from Autoconf.
16452 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16453 (AT_CHECK_CALC): New macros.
16454 Use these macros to test bison with options `', `--raw',
16455 `--debug', `--yacc', `--yacc --debug'.
16456
16457 2000-09-19 Akim Demaille <akim@epita.fr>
16458
16459 * src/output.c: Formatting changes.
16460 * src/machine.h: Remove, leaving its contents in...
16461 * src/system.h: here.
16462 Include stdio.h.
16463 Adjust all dependencies on stdio.h and machine.h.
16464 * src/getargs.h: New file.
16465 Let all `extern' declarations about getargs.c be replaced with
16466 inclusion of `getargs.h'.
16467 * src/Makefile.am (noinst_HEADERS): Adjust.
16468
16469 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16470 scope.
16471 (yyerror): Returns void, not int.
16472 * doc/bison.texinfo: Formatting changes.
16473
16474 2000-09-19 Akim Demaille <akim@epita.fr>
16475
16476 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16477 portable.
16478
16479 2000-09-18 Akim Demaille <akim@epita.fr>
16480
16481 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16482 * src/Makefile.am (INCLUDES): Don't.
16483 Be ready to fetch headers in lib/.
16484
16485 2000-09-18 Akim Demaille <akim@epita.fr>
16486
16487 * doc/bison.texinfo: Update the copyright.
16488 ANSIfy and GNUify the examples.
16489 Remove the old menu.
16490
16491 2000-09-18 Akim Demaille <akim@epita.fr>
16492
16493 First set of tests: use the `calc' example from the documentation.
16494
16495 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16496 is defined only when YYDEBUG is.
16497 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16498 * src/files.c (tryopen, tryclose): Formatting changes.
16499 Move to the top and be static.
16500 * src/reader.c (read_signed_integer): Likewise.
16501 * tests/calc.m4: New file.
16502 * Makefile.am, suite.m4: Adjust.
16503 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16504
16505 2000-09-18 Akim Demaille <akim@epita.fr>
16506
16507 Add support for an Autotest test suite for Bison.
16508
16509 * m4/m4.m4, m4/atconfig.m4: New files.
16510 * m4/Makefile.am (EXTRA_DIST): Adjust.
16511 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16512 files.
16513 * src/getargs.c: Display a more standard --version message.
16514 * src/reader.c (reader): Formatting changes.
16515 No longer depend upon VERSION_STRING.
16516 * configure.in: No longer use `dnl'.
16517 Set up the test suite and the new directory `tests/.
16518 (VERSION_STRING): Remove.
16519
16520 2000-04-14 Akim Demaille <akim@epita.fr>
16521
16522 * src/reader.c (copy_comment2): New function, same as former
16523 `copy_comment', but outputs into two FILE *.
16524 (copy_comment): Use it.
16525 (parse_union_decl): Use it.
16526 (get_type, parse_start_decl): Use the same `invalid' message.
16527 (parse_start_decl, parse_union_decl): Use the same `multiple'
16528 message.
16529 (parse_union_decl, copy_guard, copy_action): Use the same
16530 `unmatched' message.
16531 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16532
16533 2000-03-31 Akim Demaille <akim@epita.fr>
16534
16535 * src/files.c (tryopen, tryclose): Move to the top.
16536 Be static.
16537
16538 2000-03-31 Akim Demaille <akim@epita.fr>
16539
16540 * src/main.c (main): Don't call `done', exit does it.
16541
16542 2000-03-31 Akim Demaille <akim@epita.fr>
16543
16544 * allocate.c: s/return (foo)/return foo/.
16545 * lalr.c: Likewise.
16546 * LR0.c: Likewise.
16547 * output.c: Likewise.
16548 * reader.c: Likewise.
16549 * symtab.c: Likewise.
16550 * vmsgetargs.c: Likewise.
16551
16552 2000-03-31 Akim Demaille <akim@epita.fr>
16553
16554 Clean up the error reporting functions.
16555
16556 * src/report.c: New file.
16557 * src/report.h: Likewise.
16558 * src/Makefile.am: Adjust.
16559 * m4/error.m4: New file.
16560 * m4/Makefile.am: Adjust.
16561 * configure.in (jm_PREREQ_ERROR): Call it.
16562 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16563 Remove.
16564 (fatal, fatals): Remove. All callers use complain.c::fatal.
16565 (warn, warni, warns, warnss, warnss): Remove. All callers use
16566 complain.c::complain.
16567 (toomany): Remove, use fatal instead.
16568 * src/files.c (done): No argument, use complain_message_count.
16569 * src/main.c (main): Register `done' to `atexit'.
16570
16571 * src/getargs.c (usage): More `fputs', less `fprintf'.
16572
16573 2000-03-28 Akim Demaille <akim@epita.fr>
16574
16575 * lib/: New directory.
16576 * Makefile.am (SUBDIRS): Adjust.
16577 * configure.in: Adjust.
16578 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16579 useless.
16580 * src/alloca.c: Moved to lib/.
16581 * src/getopt.c: Likewise.
16582 * src/getopt1.c: Likewise.
16583 * src/getopt.h: Likewise.
16584 * src/ansi2knr.c: Likewise.
16585 * src/ansi2knr.1: Likewise.
16586 * src/Makefile.am: Adjust.
16587 * lib/Makefile.am: New file.
16588
16589 2000-03-28 Akim Demaille <akim@epita.fr>
16590
16591 * src/getargs.c (usage): Refresh the help message.
16592
16593 2000-03-17 Akim Demaille <akim@epita.fr>
16594
16595 * src/getopt1.c: Updated from textutils 2.0e
16596 * src/getopt.c: Likewise.
16597 * src/getopt.h: Likewise.
16598
16599 2000-03-17 Akim Demaille <akim@epita.fr>
16600
16601 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16602 the file name, not the whole `#line LINE FILE'.
16603
16604 2000-03-17 Akim Demaille <akim@epita.fr>
16605
16606 On syntax errors, report the token on which we choked.
16607
16608 * src/bison.s1 (yyparse): In the label yyerrlab, when
16609 YYERROR_VERBOSE, add yychar in msg.
16610
16611 2000-03-17 Akim Demaille <akim@epita.fr>
16612
16613 * src/reader.c (copy_at): New function.
16614 (copy_guard): Use it.
16615 (copy_action): Use it.
16616
16617 2000-03-17 Akim Demaille <akim@epita.fr>
16618
16619 Be kind to translators, save some useless translations.
16620
16621 * src/main.c (banner): New function.
16622 (fatal_banner): Use it.
16623 (warn_banner): Use it.
16624
16625 2000-03-17 Akim Demaille <akim@epita.fr>
16626
16627 * src/reader.c (copy_definition): Use copy_string and
16628 copy_comment. Removed now unused `match', `ended',
16629 `cplus_comment'.
16630 (copy_comment, copy_string): Moved, to be visible from
16631 copy_definition.
16632
16633 2000-03-17 Akim Demaille <akim@epita.fr>
16634
16635 * src/reader.c (copy_string): Declare `static inline'. No
16636 problems with inline, since it is checked by configure.
16637 (copy_comment): Likewise.
16638
16639 2000-03-17 Akim Demaille <akim@epita.fr>
16640
16641 * src/reader.c (packsymbols): Formatting changes.
16642
16643 2000-03-17 Akim Demaille <akim@epita.fr>
16644
16645 * src/reader.c (copy_comment): New function, factored out from:
16646 (copy_action): Use it. Removed now unused `match', `ended',
16647 `cplus_comment'.
16648 (copy_guard): Likewise.
16649
16650 2000-03-17 Akim Demaille <akim@epita.fr>
16651
16652 * src/reader.c (copy_string): New function, factored out from:
16653 (copy_action): Use it.
16654 (copy_guard): Likewise.
16655
16656 2000-03-17 Akim Demaille <akim@epita.fr>
16657
16658 Change the handling of @s so that they behave exactly like $s.
16659 There is now a pseudo variable @$ (readble and writable), location
16660 of the lhs of the rule (by default ranging from the location of
16661 the first symbol of the rhs, to the location of the last symbol,
16662 or, if the rhs is empty, YYLLOC).
16663
16664 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16665 yyval.
16666 (yyparse): When providing a default semantic action, provide a
16667 default location action.
16668 (after the $): No longer change `*YYLSP', just stack YYLOC the
16669 same way you stack YYVAL.
16670 * src/reader.c (read_declarations): Use warns.
16671 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16672 (copy_action, case '@'): Likewise.
16673 Use a standard error message, to save useless work from
16674 translators.
16675
16676 2000-03-17 Akim Demaille <akim@epita.fr>
16677
16678 * src/bison.s1: Formatting and cosmetics changes.
16679 * src/reader.c: Likewise.
16680 Update the Copyright notice.
16681
16682 2000-03-17 Akim Demaille <akim@epita.fr>
16683
16684 * src/bison.s1 (#line): All set to `#line' only, since the
16685 Makefile now handles them.
16686
16687 2000-03-16 Akim Demaille <akim@epita.fr>
16688
16689 * src/output.c (output_rule_data): Output the documentation of
16690 some of the tables.
16691 (Copyright notice): Update.
16692 Formatting changes.
16693
16694 2000-03-16 Akim Demaille <akim@epita.fr>
16695
16696 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16697 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16698 One `#if YYDEBUG' remains, since it uses variables which are
16699 defined only if `YYDEBUG != 0'.
16700
16701 2000-03-16 Akim Demaille <akim@epita.fr>
16702
16703 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16704 and related variables so that the similarities are highlighted.
16705
16706 2000-03-16 Akim Demaille <akim@epita.fr>
16707
16708 * src/bison.s1: Properly indent CPP directives.
16709
16710 2000-03-16 Akim Demaille <akim@epita.fr>
16711
16712 * src/bison.s1: Properly indent the `alloca' CPP section.
16713
16714 2000-03-16 Akim Demaille <akim@epita.fr>
16715
16716 Do not hard code values of directories in `configure.in'.
16717 Update the `configure' tool chain.
16718
16719 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16720 src/makefile.am.
16721 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16722 (AC_OUTPUT): Add m4/Makefile.
16723 Bump to bison 1.28a, 1.29 has never been released.
16724 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16725 handled via src/Makefile.am.
16726 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16727 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16728 autoheader.
16729 * Makefile.am (SUBDIRS): Add m4.
16730 (ACLOCAL_AM_FLAGS): New variable.
16731 (AUTOMAKE_OPTIONS): Add check-news.
16732 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16733 the proper line number and file name.
16734 (DEFS): Propagate the location of bison library files and of the
16735 locale files.
16736 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16737 builddir.
16738 * acinclude.m4: Remove, replaced by the directory m4.
16739 * m4/Makefile.am (EXTRA_DIST): New variable.
16740 * m4/gettext.m4: New file, from the fileutils.
16741 * m4/lcmessage.m4: Likewise
16742 * m4/progtest.m4: Likewise.
16743 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16744
16745 2000-03-10 Akim Demaille <akim@epita.fr>
16746
16747 * src/closure.c:
16748 Formatting changes of various comments.
16749 Respect the GNU coding standards at various places.
16750 Don't use `_()' when no translation is needed.
16751
16752 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16753
16754 * src/files.c:
16755 OS/2 honors TMPDIR environment variable.
16756
16757 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16758
16759 * doc/bison.texinfo: Tweaked spelling and grammar.
16760 Updated ISBN.
16761 Removed reference to price of printed copy.
16762 Mention BISON_SIMPLE and BISON_HAIRY.
16763
16764 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16765
16766 * configure.in, NEWS:
16767 Bison 1.29 released.
16768
16769 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16770
16771 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16772 Added reference card.
16773
16774 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16775
16776 * po/ru.po: Added Russian translation.
16777
16778 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16779
16780 * configure.in: Added Russian translation.
16781
16782 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16783
16784 * configure.in, NEWS, README:
16785 Released version 1.28.
16786
16787 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16788
16789 * src/system.h:
16790 Squashed redefinition warning on some systems.
16791
16792 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16793 Have configure build version string instead of relying on ANSI string
16794 concatentation.
16795
16796 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16797
16798 * po/POTFILES.in: Got rid of version.c.
16799
16800 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16801
16802 * acconfig.h, configure.in:
16803 Have configure build version string instead of relying on ANSI string
16804 concatentation.
16805
16806 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16807
16808 * doc/bison.1:
16809 Dropped mention of `+' for long-named options.
16810
16811 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16812
16813 * src/files.c: Added <unistd.h> for unlink().
16814
16815 * src/Makefile.am, src/system.h:
16816 I18n fixes.
16817
16818 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16819
16820 * README: Added a FAQ list.
16821
16822 * configure.in, acconfig.h:
16823 I18n fixes.
16824
16825 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16826
16827 * doc/FAQ, doc/Makefile.am:
16828 Added a FAQ list.
16829
16830 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16831
16832 * src/alloc.h, src/symtab.h, src/version.c:
16833 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16834
16835 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16836
16837 * src/.cvsignore, src/Makefile.am:
16838 Reorganized: sources in `src', documentation in `doc'.
16839
16840 * src/lex.c (literalchar):
16841 fixed the code for escaping double quotes (thanks
16842 Jonathan Czisny.)
16843
16844 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16845
16846 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16847 Adjusted paths to reflect directory reorganization.
16848
16849 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16850
16851 * doc/.cvsignore, doc/Makefile.am:
16852 Reorganized: sources in `src', documentation in `doc'.
16853
16854 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16855
16856 * configure.in:
16857 Updated AC_INIT file to reflect directory reorganization.
16858
16859 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16860 Reorganized: sources in `src', documentation in `doc'.
16861
16862 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16863
16864 * src/allocate.c:
16865 Don't declare calloc() and realloc() if not necessary.
16866
16867 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16868
16869 * configure.in, acconfig.h, acinclude.m4:
16870 Don't declare calloc() and realloc() if not necessary.
16871
16872 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16873
16874 * po/.cvsignore: Added i18n support.
16875
16876 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16877
16878 * acconfig.h, configure.in, Makefile.am:
16879 Added i18n support.
16880
16881 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16882
16883 * src/bison.s1: Fixed #line numbers.
16884
16885 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16886
16887 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16888 Added PO files from Translation Project.
16889
16890 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16891
16892 * Makefile.am:
16893 Added support for non-ANSI compilers (ansi2knr).
16894
16895 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16896
16897 * configure.in: Bumped version number to 1.27.
16898
16899 * Makefile.am:
16900 Added `bison.simple' to list of files removed by `make distclean'.
16901
16902 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16903
16904 * src/files.c, src/files.h:
16905 Defined locations of parser files in config.h instead of Makefile.
16906
16907 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16908
16909 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16910 Defined locations of parser files in config.h instead of Makefile.
16911
16912 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16913
16914 * Makefile.am:
16915 Removed inappropriate use of $< macro.
16916
16917 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16918
16919 * po/Makefile.in.in, po/POTFILES.in:
16920 Add `po' directory skeleton.
16921
16922 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16923
16924 * README: Document help-bison list.
16925
16926 * configure.in: Add check for mkstemp().
16927
16928 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16929
16930 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16931 Hush a few compiler warnings.
16932
16933 * src/files.c:
16934 Add tryclose(), which verifies that fclose was successful.
16935 Hush a couple of compiler warnings.
16936
16937 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16938
16939 * Makefile.am, OChangeLog:
16940 ChangeLog is now automatically generated. Include the old version as
16941 OChangeLog.
16942
16943 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16944
16945 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
16946 Update FSF address.
16947
16948 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16949
16950 * doc/bison.texinfo: Fix formatting glitch.
16951
16952 * doc/bison.texinfo: Update FSF address.
16953
16954 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16955
16956 * acconfig.h: Update FSF address.
16957
16958 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16959
16960 * src/system.h:
16961 Don't define PACKAGE here, since config.h defines it.
16962
16963 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16964
16965 * src/reader.c: Update copyright date.
16966
16967 * src/main.c:
16968 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16969 favor of output directly to stderr (avoids buffer overruns).
16970
16971 * src/reader.c: Some checks for premature EOF.
16972
16973 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
16974 Use prototypes if the compiler understands them.
16975
16976 * src/files.c: Honor TMPDIR on Unix hosts.
16977 Use prototypes if the compiler understands them.
16978
16979 * src/reader.c:
16980 Fix a couple of buffer overrun bugs.
16981 Use prototypes if the compiler understands them.
16982
16983 * src/system.h: Include unistd.h and ctype.h.
16984 Use #ifdef instead of #if for NLS symbols.
16985
16986 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16987
16988 * doc/bison.texinfo:
16989 Delete comment "consider using @set for edition number, etc..." since
16990 we now are doing so.
16991
16992 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16993
16994 * configure.in:
16995 Use prototypes if the compiler understands them.
16996
16997 * NEWS: Document 1.26 highlights.
16998
16999 * Makefile.am: Require Automake 1.3 or later.
17000
17001 * acconfig.h:
17002 Use prototypes if the compiler understands them.
17003
17004 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17005
17006 * src/version.c:
17007 Use VERSION symbol from automake for version number.
17008
17009 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17010
17011 * acconfig.h, configure.in, version.cin:
17012 Use VERSION symbol from automake for version number.
17013
17014 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17015
17016 * Makefile.am:
17017 Distribute original version of simple parser (bison.s1), not built
17018 version (bison.simple).
17019
17020 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17021
17022 * doc/bison.texinfo: Add info dir entry.
17023
17024 * doc/bison.texinfo:
17025 Let automake put version number into documentation.
17026
17027 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17028
17029 * src/bison.cld, src/build.com, src/vmshlp.mar:
17030 Add non-RCS files from /gd/gnu/bison.
17031
17032 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17033
17034 * doc/bison.1:
17035 Document the BISON_HAIRY and BISON_SIMPLE variables.
17036
17037 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17038
17039 * src/version.c: Build version.c automatically.
17040
17041 * src/reader.c:
17042 Fix token numbering (used to start at 258, not 257).
17043
17044 * src/system.h: Include config.h.
17045
17046 * src/getargs.c: Update bug report address.
17047
17048 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17049 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17050
17051 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17052
17053 * Makefile.am:
17054 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17055
17056 * configure.in, version.cin:
17057 Build version.c automatically.
17058
17059 * AUTHORS: Add AUTHORS file.
17060
17061 * README: Update bug report address.
17062
17063 * bison.simple:
17064 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17065
17066 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17067 Add automake stuff.
17068
17069 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17070
17071 * doc/bison.texinfo: Clean up some formatting.
17072
17073 1998-05-05 Richard Stallman <rms@gnu.org>
17074
17075 * doc/bison.texinfo:
17076 Explain better why to make a pure parser.
17077
17078 1998-01-05 Richard Stallman <rms@gnu.org>
17079
17080 * src/files.c (openfiles):
17081 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17082 find a temporary directory, if possible. Do not unlink files while
17083 they are open.
17084
17085 1997-08-25 Richard Stallman <rms@gnu.org>
17086
17087 * src/reader.c (stack_offset;):
17088 Change some warni to warns.
17089
17090 * src/lex.c (literalchar): Use warns, not warni.
17091
17092 1997-06-28 Richard Stallman <rms@gnu.org>
17093
17094 * src/bison.s1: Add a Bison version comment.
17095
17096 * src/main.c (fatal, warn, berror):
17097 Use program_name.
17098
17099 1997-06-28 Richard Stallman <rms@gnu.org>
17100
17101 * Makefile.in (bison_version): New variable.
17102 (dist): Use that variable.
17103 (bison.s1): Substitute the Bison version into bison.simple.
17104
17105 * bison.simple: Add a Bison version comment.
17106
17107 1997-06-18 Richard Stallman <rms@gnu.org>
17108
17109 * src/main.c (fatal, warn, berror):
17110 Make error messages standard.
17111 (toomany): Improve error message text.
17112
17113 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
17114 new.h renamed to alloc.h.
17115
17116 1997-06-18 Richard Stallman <rms@gnu.org>
17117
17118 * Makefile.in: new.h renamed to alloc.h.
17119
17120 1997-05-24 Richard Stallman <rms@gnu.org>
17121
17122 * src/lex.c (literalchar):
17123 Fix the code for escaping \, " and '.
17124
17125 (lex): Avoid trouble when there are many chars
17126 to discard in a char literal with just several chars in it.
17127
17128 1997-05-17 Richard Stallman <rms@gnu.org>
17129
17130 * src/bison.s1:
17131 Use malloc, if using alloca is troublesome.
17132 (YYSTACK_USE_ALLOCA): New flag macro.
17133 Define it for some systems and compilers.
17134 (YYSTACK_ALLOC): New macro.
17135 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17136 If it was malloc'd, free it.
17137
17138 1997-05-17 Richard Stallman <rms@gnu.org>
17139
17140 * bison.simple:
17141 Use malloc, if using alloca is troublesome.
17142 (YYSTACK_USE_ALLOCA): New flag macro.
17143 Define it for some systems and compilers.
17144 (YYSTACK_ALLOC): New macro.
17145 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17146 If it was malloc'd, free it.
17147
17148 1997-04-23 Richard Stallman <rms@gnu.org>
17149
17150 * src/bison.s1:
17151 (alloca) [__hpux]: Always define as __builtin_alloca.
17152
17153 1997-04-23 Richard Stallman <rms@gnu.org>
17154
17155 * bison.simple:
17156 (alloca) [__hpux]: Always define as __builtin_alloca.
17157
17158 1997-04-22 Richard Stallman <rms@gnu.org>
17159
17160 * src/bison.s1:
17161 [__hpux]: Include alloca.h (right for HPUX 10)
17162 instead of declaring alloca (right for HPUX 9).
17163
17164 * src/bison.s1 (__yy_memcpy):
17165 Declare arg `count' as unsigned int.
17166 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17167
17168 1997-04-22 Richard Stallman <rms@gnu.org>
17169
17170 * bison.simple:
17171 [__hpux]: Include alloca.h (right for HPUX 10)
17172 instead of declaring alloca (right for HPUX 9).
17173
17174 * bison.simple (__yy_memcpy):
17175 Declare arg `count' as unsigned int.
17176 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17177
17178 1997-01-03 Richard Stallman <rms@gnu.org>
17179
17180 * src/allocate.c: [__STDC__ or _MSC_VER]:
17181 Declare calloc and realloc to return void *.
17182
17183 1997-01-02 Richard Stallman <rms@gnu.org>
17184
17185 * src/system.h:
17186 [_MSC_VER]: Include stdlib.h and process.h.
17187 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17188
17189 * src/main.c (main): Return FAILURE as a value.
17190 (printable_version): Declare arg as int, not char.
17191
17192 1997-01-02 Richard Stallman <rms@gnu.org>
17193
17194 * Makefile.in (dist):
17195 Explicitly check for symlinks, and copy them.
17196
17197 1996-12-19 Richard Stallman <rms@gnu.org>
17198
17199 * src/files.c:
17200 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17201
17202 1996-12-18 Paul Eggert <eggert@gnu.org>
17203
17204 * src/bison.s1 (yyparse):
17205 If __GNUC__ and YYPARSE_PARAM are both defined,
17206 declare yyparse to have a void * argument.
17207
17208 1996-12-18 Paul Eggert <eggert@gnu.org>
17209
17210 * bison.simple (yyparse):
17211 If __GNUC__ and YYPARSE_PARAM are both defined,
17212 declare yyparse to have a void * argument.
17213
17214 1996-12-17 Richard Stallman <rms@gnu.org>
17215
17216 * src/reduce.c (nbits): Add some casts.
17217
17218 1996-08-12 Richard Stallman <rms@gnu.org>
17219
17220 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17221
17222 1996-08-12 Richard Stallman <rms@gnu.org>
17223
17224 * bison.simple: Test _MSDOS as well as _MSDOS_.
17225
17226 1996-07-31 Richard Stallman <rms@gnu.org>
17227
17228 * src/bison.s1:
17229 [__sun && __i386]: Include alloca.h.
17230
17231 1996-07-31 Richard Stallman <rms@gnu.org>
17232
17233 * bison.simple:
17234 [__sun && __i386]: Include alloca.h.
17235
17236 1996-07-30 Richard Stallman <rms@gnu.org>
17237
17238 * src/bison.s1: Comment change.
17239
17240 * src/bison.s1: Test _MSDOS_, not MSDOS.
17241
17242 1996-07-30 Richard Stallman <rms@gnu.org>
17243
17244 * bison.simple: Comment change.
17245
17246 * bison.simple: Test _MSDOS_, not MSDOS.
17247
17248 1996-06-01 Richard Stallman <rms@gnu.org>
17249
17250 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
17251 Insert `_' macro around many string constants.
17252
17253 * src/main.c:
17254 Insert `_' macro around many string constants.
17255
17256 (main): Call setlocale, bindtextdomain and textdomain.
17257
17258 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17259 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17260 [ENABLE_NLS]: Include libintl.h.
17261 [ENABLE_NLS] (gettext): Define.
17262 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17263 (N_, PACKAGE, LOCALEDIR): New macros.
17264
17265 1996-06-01 Richard Stallman <rms@gnu.org>
17266
17267 * POTFILES.in: New file.
17268
17269 * Makefile.in (allocate.o):
17270 Define target explicitly.
17271
17272 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17273 (LDFLAGS): Set to @LDFLAGS@.
17274 (configure): Run autoconf only if preceding `cd' succeeds.
17275 (bison.s1): Redirect output to temporary file then move the
17276 temporary to the target, rather than redirecting directly to bison.s1.
17277 (clean): Remove config.status and config.log.
17278 (distclean): Don't remove config.status here.
17279
17280 1996-05-12 Richard Stallman <rms@gnu.org>
17281
17282 * src/bison.s1:
17283 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17284
17285 1996-05-12 Richard Stallman <rms@gnu.org>
17286
17287 * bison.simple:
17288 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17289
17290 1996-05-11 Richard Stallman <rms@gnu.org>
17291
17292 * src/bison.s1 (__yy_memcpy):
17293 Really reorder the args, as was supposedly done on Feb 14 1995.
17294 (yyparse): Calls changed accordingly.
17295
17296 1996-05-11 Richard Stallman <rms@gnu.org>
17297
17298 * Makefile.in (dist): Don't use $(srcdir).
17299
17300 * bison.simple (__yy_memcpy):
17301 Really reorder the args, as was supposedly done on Feb 14 1995.
17302 (yyparse): Calls changed accordingly.
17303
17304 1996-01-27 Richard Stallman <rms@gnu.org>
17305
17306 * src/output.c (output_rule_data):
17307 Test YYERROR_VERBOSE in the conditional
17308 around the definition of ttyname.
17309
17310 1995-12-29 Richard Stallman <rms@gnu.org>
17311
17312 * src/bison.s1:
17313 Fix line numbers in #line commands.
17314
17315 1995-12-29 Richard Stallman <rms@gnu.org>
17316
17317 * bison.simple:
17318 Fix line numbers in #line commands.
17319
17320 1995-12-27 Richard Stallman <rms@gnu.org>
17321
17322 * src/bison.s1 (YYPARSE_PARAM_DECL):
17323 In C++, make it always null.
17324 (YYPARSE_PARAM_ARG): New macro.
17325 (yyparse): Use YYPARSE_PARAM_ARG.
17326
17327 1995-12-27 Richard Stallman <rms@gnu.org>
17328
17329 * bison.simple (YYPARSE_PARAM_DECL):
17330 In C++, make it always null.
17331 (YYPARSE_PARAM_ARG): New macro.
17332 (yyparse): Use YYPARSE_PARAM_ARG.
17333
17334 1995-11-29 Richard Stallman <rms@gnu.org>
17335
17336 * doc/bison.texinfo:
17337 Describe literal string tokens, %raw, %no_lines, %token_table.
17338
17339 1995-11-29 Daniel Hagerty <hag@gnu.org>
17340
17341 * doc/bison.texinfo: Fixed update date
17342
17343 1995-10-16 Richard Stallman <rms@gnu.org>
17344
17345 * src/version.c: Version 1.25.
17346
17347 1995-10-16 Richard Stallman <rms@gnu.org>
17348
17349 * NEWS: *** empty log message ***
17350
17351 1995-10-16 Richard Stallman <rms@gnu.org>
17352
17353 * doc/bison.1, doc/bison.rnh:
17354 Add new options.
17355
17356 1995-10-15 Richard Stallman <rms@gnu.org>
17357
17358 * src/vmsgetargs.c, src/getargs.c:
17359 Added -n, -k, and -raw switches.
17360 (noparserflag, toknumflag, rawtoknumflag): New variables.
17361
17362 * src/symtab.h (SALIAS):
17363 New #define for adding aliases to %token.
17364 (struct bucket): Added `alias' field.
17365
17366 * src/reduce.c (reduce_grammar):
17367 Revise error message.
17368 (print_notices): Remove final `.' from error message.
17369
17370 * src/reader.c (reader_output_yylsp):
17371 New function.
17372 (readgram): Use `#if 0' around code that accepted %command
17373 inside grammar rules: The documentation doesn't allow it,
17374 and it will fail since the %command processors scan for the next %.
17375 (parse_token_decl): Extended the %token
17376 declaration to allow a multi-character symbol as an alias.
17377 (parse_thong_decl): New function.
17378 (read_declarations): Added %thong declarations.
17379 (read_declarations): Handle NOOP to deal with allowing
17380 % declarations as another means to specify the flags.
17381 (readgram): Allow %prec prior to semantics embedded in a rule.
17382 (skip_to_char, read_declarations, copy_definition)
17383 (parse_token_decl, parse_start_decl, parse_type_decl)
17384 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17385 (get_type_name, copy_guard, copy_action, readgram)
17386 (get_type, packsymbols): Revised most error messages.
17387 Changed `fatal' to `warnxxx' to avoid aborting for error.
17388 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17389 (read_declarations): Improve the error message for
17390 an invalid character. Do not abort.
17391 (read_declarations, copy_guard, copy_action): Use
17392 printable_version to avoid unprintable characters in printed output.
17393 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17394 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17395 Allow the type of a non-terminal can be given
17396 more than once, as long as all specifications give the same type.
17397
17398 * src/output.c:
17399 (output_headers, output_trailers, output, output_gram)
17400 (output_rule_data): Implement noparserflag variable.
17401 Implement toknumflag variable.
17402 (output): Call reader_output_yylsp to output LTYPESTR.
17403
17404 * src/main.c (main):
17405 If reader sees an error, don't process the grammar.
17406 (fatals): Updated to not use VARARGS1.
17407 (printable_version, int_to_string, warn, warni, warns, warnss)
17408 (warnsss): New error reporting functions. Avoid abort for error.
17409
17410 * src/lex.h:
17411 Added THONG and NOOP for alias processing.
17412 Added SETOPT for the new code that allows setting options with %flags.
17413
17414 * src/lex.c:
17415 Include getopt.h. Add some extern decls.
17416 (safegetc): New function to deal with EOF gracefully.
17417 (literalchar); new function to deal with reading \ escapes.
17418 (lex): Use literalchar.
17419 (lex): Implemented "..." tokens.
17420 (literalchar, lex, parse_percent_token): Made tokenbuffer
17421 always contain the token. This includes growing the token
17422 buffer while reading an integer.
17423 (parse_percent_token): Replaced if-else statement with percent_table.
17424 (parse_percent_token): Added % declarations as another
17425 way to specify the flags -n, -l, and -r. Also added hooks for
17426 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17427 major changes to files.c.
17428 (lex) Retain in the incoming stream a character following
17429 an incorrect '/'.
17430 (skip_white_space, lex): Revised most error messages
17431 and changed fatal to warn to avoid aborting.
17432 (percent_table): Added %thong declarations.
17433
17434 * src/gram.h: Comment changes.
17435
17436 * src/files.c (openfiles, open_extra_files, done):
17437 Add faction flag
17438 and actfile file. Handle noparserflag. Both for -n switch.
17439
17440 * src/conflicts.c (resolve_sr_conflict):
17441 Remove use of alloca.
17442
17443 1995-06-01 Jim Meyering <meyering@gnu.org>
17444
17445 * doc/bison.texinfo: *** empty log message ***
17446
17447 1995-05-06 Richard Stallman <rms@gnu.org>
17448
17449 * src/bison.s1: Comment change.
17450
17451 1995-05-06 Richard Stallman <rms@gnu.org>
17452
17453 * bison.simple: Comment change.
17454
17455 1995-05-03 Richard Stallman <rms@gnu.org>
17456
17457 * src/version.c: Version now 1.24.
17458
17459 * src/bison.s1: Change distribution terms.
17460
17461 * src/version.c: Version now 1.23.
17462
17463 1995-05-03 Richard Stallman <rms@gnu.org>
17464
17465 * doc/bison.texinfo:
17466 Rewrite "Conditions for Using Bison".
17467 Update version to 1.24.
17468
17469 1995-05-03 Richard Stallman <rms@gnu.org>
17470
17471 * bison.simple: Change distribution terms.
17472
17473 1995-02-23 Richard Stallman <rms@gnu.org>
17474
17475 * src/files.c: Test __VMS_POSIX as well as VMS.
17476
17477 1995-02-14 Jim Meyering <meyering@gnu.org>
17478
17479 * src/bison.s1 (__yy_memcpy):
17480 Renamed from __yy_bcopy to avoid
17481 confusion. Reverse FROM and TO arguments to be consistent with
17482 those of memcpy.
17483
17484 1995-02-14 Jim Meyering <meyering@gnu.org>
17485
17486 * bison.simple (__yy_memcpy):
17487 Renamed from __yy_bcopy to avoid
17488 confusion. Reverse FROM and TO arguments to be consistent with
17489 those of memcpy.
17490
17491 1994-11-10 David J. MacKenzie <djm@gnu.org>
17492
17493 * NEWS: reformat
17494
17495 * NEWS: New file.
17496
17497 * Makefile.in (DISTFILES): Include NEWS.
17498
17499 * Makefile.in (DISTFILES):
17500 Include install-sh, not install.sh.
17501
17502 * configure.in: Update to Autoconf v2 macro names.
17503
17504 1994-10-05 David J. MacKenzie <djm@gnu.org>
17505
17506 * Makefile.in: fix typo
17507
17508 * Makefile.in (prefix, exec_prefix):
17509 Let configure set them.
17510
17511 1994-09-28 David J. MacKenzie <djm@gnu.org>
17512
17513 * Makefile.in: Set datadir to $(prefix)/share.
17514
17515 1994-09-15 Richard Stallman <rms@gnu.org>
17516
17517 * src/bison.s1:
17518 Update copyright notice and GPL version.
17519
17520 1994-09-15 Richard Stallman <rms@gnu.org>
17521
17522 * bison.simple:
17523 Update copyright notice and GPL version.
17524
17525 1994-07-12 Richard Stallman <rms@gnu.org>
17526
17527 * src/reduce.c, src/reader.c:
17528 entered into RCS
17529
17530 1994-05-05 David J. MacKenzie <djm@gnu.org>
17531
17532 * Makefile.in: entered into RCS
17533
17534 1994-03-26 Richard Stallman <rms@gnu.org>
17535
17536 * src/bison.s1: entered into RCS
17537
17538 1994-03-26 Richard Stallman <rms@gnu.org>
17539
17540 * bison.simple: entered into RCS
17541
17542 1994-03-25 Richard Stallman <rms@gnu.org>
17543
17544 * src/main.c: entered into RCS
17545
17546 1994-03-24 Richard Stallman <rms@gnu.org>
17547
17548 * src/conflicts.c: entered into RCS
17549
17550 1994-01-02 Richard Stallman <rms@gnu.org>
17551
17552 * Makefile.in: *** empty log message ***
17553
17554 1993-11-21 Richard Stallman <rms@gnu.org>
17555
17556 * src/bison.s1: *** empty log message ***
17557
17558 1993-11-21 Richard Stallman <rms@gnu.org>
17559
17560 * doc/bison.texinfo: entered into RCS
17561
17562 * doc/bison.texinfo: *** empty log message ***
17563
17564 1993-11-21 Richard Stallman <rms@gnu.org>
17565
17566 * bison.simple: *** empty log message ***
17567
17568 1993-10-25 David J. MacKenzie <djm@gnu.org>
17569
17570 * doc/bison.texinfo: *** empty log message ***
17571
17572 1993-10-19 Richard Stallman <rms@gnu.org>
17573
17574 * src/bison.s1: *** empty log message ***
17575
17576 1993-10-19 Richard Stallman <rms@gnu.org>
17577
17578 * bison.simple: *** empty log message ***
17579
17580 1993-10-14 Richard Stallman <rms@gnu.org>
17581
17582 * src/bison.s1: *** empty log message ***
17583
17584 1993-10-14 Richard Stallman <rms@gnu.org>
17585
17586 * bison.simple: *** empty log message ***
17587
17588 1993-09-14 David J. MacKenzie <djm@gnu.org>
17589
17590 * doc/bison.texinfo: *** empty log message ***
17591
17592 1993-09-13 Noah Friedman <friedman@gnu.org>
17593
17594 * Makefile.in: *** empty log message ***
17595
17596 1993-09-10 Richard Stallman <rms@gnu.org>
17597
17598 * src/conflicts.c: *** empty log message ***
17599
17600 * src/system.h: entered into RCS
17601
17602 1993-09-10 Richard Stallman <rms@gnu.org>
17603
17604 * doc/bison.1: entered into RCS
17605
17606 1993-09-06 Noah Friedman <friedman@gnu.org>
17607
17608 * src/version.c: entered into RCS
17609
17610 1993-09-06 Noah Friedman <friedman@gnu.org>
17611
17612 * Makefile.in: *** empty log message ***
17613
17614 1993-07-30 David J. MacKenzie <djm@gnu.org>
17615
17616 * Makefile.in: *** empty log message ***
17617
17618 1993-07-24 Richard Stallman <rms@gnu.org>
17619
17620 * src/bison.s1: *** empty log message ***
17621
17622 1993-07-24 Richard Stallman <rms@gnu.org>
17623
17624 * bison.simple: *** empty log message ***
17625
17626 1993-07-08 David J. MacKenzie <djm@gnu.org>
17627
17628 * Makefile.in: *** empty log message ***
17629
17630 1993-07-04 Richard Stallman <rms@gnu.org>
17631
17632 * src/bison.s1: *** empty log message ***
17633
17634 1993-07-04 Richard Stallman <rms@gnu.org>
17635
17636 * bison.simple: *** empty log message ***
17637
17638 1993-06-26 David J. MacKenzie <djm@gnu.org>
17639
17640 * src/getargs.c: entered into RCS
17641
17642 1993-06-26 David J. MacKenzie <djm@gnu.org>
17643
17644 * doc/bison.texinfo: *** empty log message ***
17645
17646 * doc/bison.1: New file.
17647
17648 1993-06-25 Richard Stallman <rms@gnu.org>
17649
17650 * src/getargs.c: New file.
17651
17652 1993-06-16 Richard Stallman <rms@gnu.org>
17653
17654 * src/bison.s1: *** empty log message ***
17655
17656 1993-06-16 Richard Stallman <rms@gnu.org>
17657
17658 * bison.simple: *** empty log message ***
17659
17660 1993-06-03 Richard Stallman <rms@gnu.org>
17661
17662 * src/bison.s1: New file.
17663
17664 1993-06-03 Richard Stallman <rms@gnu.org>
17665
17666 * doc/bison.texinfo: *** empty log message ***
17667
17668 1993-06-03 Richard Stallman <rms@gnu.org>
17669
17670 * bison.simple: New file.
17671
17672 1993-05-19 Richard Stallman <rms@gnu.org>
17673
17674 * doc/bison.texinfo: New file.
17675
17676 1993-05-07 Noah Friedman <friedman@gnu.org>
17677
17678 * Makefile.in: *** empty log message ***
17679
17680 1993-04-28 Noah Friedman <friedman@gnu.org>
17681
17682 * src/reader.c: *** empty log message ***
17683
17684 1993-04-23 Noah Friedman <friedman@gnu.org>
17685
17686 * src/alloc.h: entered into RCS
17687
17688 1993-04-20 David J. MacKenzie <djm@gnu.org>
17689
17690 * src/version.c: *** empty log message ***
17691
17692 * src/files.c, src/allocate.c:
17693 entered into RCS
17694
17695 * src/reader.c: *** empty log message ***
17696
17697 * src/lex.c: entered into RCS
17698
17699 * src/conflicts.c: New file.
17700
17701 * src/symtab.c: entered into RCS
17702
17703 * src/alloc.h: New file.
17704
17705 * src/LR0.c: entered into RCS
17706
17707 1993-04-18 Noah Friedman <friedman@gnu.org>
17708
17709 * src/reader.c: New file.
17710
17711 * src/version.c: *** empty log message ***
17712
17713 1993-04-18 Noah Friedman <friedman@gnu.org>
17714
17715 * Makefile.in: *** empty log message ***
17716
17717 1993-04-17 Noah Friedman <friedman@gnu.org>
17718
17719 * Makefile.in: *** empty log message ***
17720
17721 1993-04-15 Richard Stallman <rms@gnu.org>
17722
17723 * src/main.c, src/files.c:
17724 New file.
17725
17726 1993-04-15 Noah Friedman <friedman@gnu.org>
17727
17728 * configure.in: entered into RCS
17729
17730 * configure.in: *** empty log message ***
17731
17732 * configure.in: New file.
17733
17734 1993-04-14 Richard Stallman <rms@gnu.org>
17735
17736 * Makefile.in: New file.
17737
17738 1993-04-13 Richard Stallman <rms@gnu.org>
17739
17740 * src/version.c: New file.
17741
17742 1993-03-25 Richard Stallman <rms@gnu.org>
17743
17744 * src/output.c: entered into RCS
17745
17746 1992-09-25 Richard Stallman <rms@gnu.org>
17747
17748 * configure.bat: entered into RCS
17749
17750 1992-06-22 Richard Stallman <rms@gnu.org>
17751
17752 * src/vmsgetargs.c: entered into RCS
17753
17754 1992-06-22 Richard Stallman <rms@gnu.org>
17755
17756 * doc/bison.rnh: entered into RCS
17757
17758 1992-04-20 David J. MacKenzie <djm@gnu.org>
17759
17760 * README: entered into RCS
17761
17762 1992-01-22 Richard Stallman <rms@gnu.org>
17763
17764 * src/machine.h: entered into RCS
17765
17766 1991-12-21 Richard Stallman <rms@gnu.org>
17767
17768 * src/lalr.c, src/closure.c:
17769 entered into RCS
17770
17771 1991-12-20 Richard Stallman <rms@gnu.org>
17772
17773 * src/state.h: entered into RCS
17774
17775 1991-12-18 Richard Stallman <rms@gnu.org>
17776
17777 * src/print.c, src/nullable.c, src/derives.c:
17778 entered into RCS
17779
17780 1991-11-03 David J. MacKenzie <djm@gnu.org>
17781
17782 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17783 entered into RCS
17784
17785 1988-09-09 Richard Stallman <rms@gnu.org>
17786
17787 * src/bison.hairy: entered into RCS
17788
17789 1987-12-16 Richard Stallman <rms@gnu.org>
17790
17791 * REFERENCES: entered into RCS
17792
17793
17794 -----
17795
17796 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17797 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17798 Software Foundation, Inc.
17799
17800 Copying and distribution of this file, with or without
17801 modification, are permitted provided the copyright notice and this
17802 notice are preserved.
17803
17804 $Id$