1 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3 Don't let %prec take a nonterminal.
4 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6 * tests/input.at (%prec takes a token): New test checking that %prec
7 won't take a nonterminal.
9 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
11 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
13 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
14 grammar is maintained with Bison's highest standards.
15 * src/getargs.c: Fix some typos in Doxygen comments.
17 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
19 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
20 later. Reported by Paul Eggert in
21 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
22 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
23 * src/scan-code.l (translate_action): Don't bother invoking
24 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
25 (code_scanner_free): Instead of invoking
26 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
28 * src/scan-gram.l (gram_scanner_free): Likewise.
29 * src/scan-skel.l (scan_skel): Likewise.
31 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
33 * src/files.c (tr): Change return type to void.
34 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
35 has been called previously for the same key.
36 (muscle_find): Return storage instead of value so that
37 --enable-gcc-warnings doesn't produce warnings that the return discards
38 const. aver that the value and storage are the same since storage
39 could potentially be NULL when value is not.
40 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
43 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
45 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
46 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
47 us a slightly cleaner distribution, and also works.
48 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
51 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
52 and Paul Eggert <eggert@cs.ucla.edu>
54 Don't let Bison leak memory except when it complains.
55 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
56 (spec_defines_file, dir_prefix): Now char *, not const char *,
58 * src/files.c: Likewise.
59 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
61 (tr): Now operates in-place. All uses changed.
62 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
64 (compute_file_name_parts, compute_output_file_names): Don't store
65 read-only data in variables that will be freed.
66 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
67 src_extension, and header_extension.
68 (output_file_names_free): New public function to free
69 spec_verbose_file, spec_graph_file, spec_defines_file,
70 parser_file_name, and dir_prefix.
71 * src/getargs.c (getargs): Don't store read-only data in variables that
73 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
74 (which previously existed but was unused), and quotearg_free.
75 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
76 * src/muscle_tab.c: Likewise.
77 (muscle_entry): Make the value char const *,
78 and add a new storage member that is char * and can be freed.
79 (muscle_entry_free): New private function.
80 (muscle_init): Use it instead of free.
81 (muscle_insert, muscle_grow): Update and use new storage member.
82 (muscle_code_grow): Free the string passed to muscle_grow
83 since it's not needed anymore.
84 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
85 add a new `char *code' member.
86 ("{...}"): Declare semantic type as code.
87 * src/scan-code.h (translate_rule_action):
88 (translate_symbol_action, translate_code, translate_action): Return
89 `char const *' rather than `char *' since external code should not free
91 * src/scan-code.l: Likewise.
92 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
93 which is "{...}" in the parser.
94 * tests/Makefile.am (maintainer-check-valgrind): Set
95 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
97 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
99 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
100 expecting a non-zero exit status sets --leak-check=summary and
101 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
102 this case, and we don't want to hear about it.
104 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
106 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
107 instead of from the template, to simplify configuration a bit.
108 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
109 and m4/wint_t.m4, as they are needed with the latest gnulib.
111 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
113 Disable unset/unused mid-rule value warnings by default, and recognize
114 --warnings=midrule-values to enable them. Discussed starting at
115 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
116 * NEWS (2.3a+): Mention.
117 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
118 warnings): Add entry for midrule-values subargument.
119 * src/reader.c (symbol_should_be_used): Don't return true just because
120 the value is a set/used mid-rule value unless
121 --warnings=midrule-values was specified.
122 * tests/input.at (Unused values, Unused values before symbol
123 declarations): Run tests with and without --warnings=midrule-values.
125 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
126 than LIST_FREE directly.
128 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
130 Finish implementing --warnings=error, which should not be implied by
131 --warnings=all (or by its synonyms -W and --warnings without
133 * src/complain.c (set_warning_issued): New function to report that
134 warnings are being treated as errors and to record an error if so.
136 (warn_at, warn): ... here.
137 * src/getargs.c (warnings_args, warnings_types): Reorder so that
138 "error - warnings are errors" does not appear above "all - all of the
140 (getargs): For -W and --warnings without subarguments, don't let
141 FLAGS_ARGMATCH set warnings_error in warnings_flag.
142 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
144 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
146 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
147 empty subargument list. For example: `bison --warnings= parser.y'.
149 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
151 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
152 the parser header file so that gcc doesn't warn.
154 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
156 Split the default %destructor/%printer into two kinds: <*> and <!>.
157 Discussed starting at
158 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
159 * NEWS (2.3a+): Mention.
160 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
161 previous change today related to mid-rules.
162 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
163 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
164 (TYPE_TAG_ANY): Add as <*>.
165 (TYPE_TAG_NONE): Add as <!>.
166 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
168 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
169 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
170 * src/symlist.c (symbol_list_default_new): Split into tagged and
172 (symbol_list_destructor_set, symbol_list_printer_set): Split
173 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
174 SYMLIST_DEFAULT_TAGLESS.
175 * src/symlist.h: Update symbol_list_default*_new prototypes.
176 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
177 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
178 * src/symtab.c (default_destructor, default_destructor_location,
179 default_printer, default_printer_location): Split each into tagged and
181 (symbol_destructor_get, symbol_destructor_location_get,
182 symbol_printer_get, symbol_printer_location_get): Implement tagged
183 default and tagless default cases.
184 (default_destructor_set, default_printer_set): Split each into tagged
185 and tagless versions.
186 * src/symtab.h: Update prototypes.
187 * tests/actions.at (Default %printer and %destructor): Rename to...
188 (Default tagless %printer and %destructor): ... this, and extend.
189 (Per-type %printer and %destructor): Rename to...
190 (Default tagged and per-type %printer and %destructor): ... this, and
192 (Default %printer and %destructor for user-defined end token): Extend.
193 (Default %printer and %destructor are not for error or $undefined):
195 (Default %printer and %destructor are not for $accept): Update.
196 (Default %printer and %destructor for mid-rule values): Extend.
197 * tests/input.at (Default %printer and %destructor redeclared): Extend.
198 (Unused values with default %destructor): Extend.
200 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
202 Don't apply the default %destructor/%printer to an unreferenced midrule
204 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
205 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
206 like $@n instead of just @n so that the default %destructor/%printer
207 logic doesn't see them as user-defined symbols.
208 (symbol_is_dummy): Check for both forms of the name.
209 * src/reader.c (packgram): Remove the `$' from each midrule symbol
210 name for which the midrule value is referenced in any action.
211 * tests/actions.at (Default %printer and %destructor for mid-rule
213 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
214 for change to dummy symbol names.
216 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
218 Warn about unset midrule $$ if the corresponding $n is used.
219 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
221 (packgram): Before invoking grammar_rule_check on any rule, make sure
222 all actions have already been scanned in order to set `used' flags.
223 Otherwise, checking that a midrule's $$ is set will not always work
224 properly because the midrule check must forward-reference the midrule's
226 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
229 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
231 More improvements to the documentation of the prologue alternatives:
232 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
234 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
235 some text to clarify the relative importance of the new directives and
236 to show how these directives may be viewed as code labels.
238 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
240 Similar to the recently removed %before-header, add %code-top as the
241 alternative to the pre-prologue. Mentioned at
242 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
243 Also, let the prologue alternatives appear in the grammar section.
244 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
245 (prologue_declaration): Move the existing prologue alternatives to...
246 (grammar_declaration): ... here and add %code-top.
247 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
249 Clean up and extend documentation for the prologue alternatives.
250 * NEWS (2.3a+): Describe prologue alternatives.
251 * doc/bison.texinfo (Prologue): Move discussion of prologue
253 (Prologue Alternatives): ... this new section, and extend it to discuss
254 all 4 directives in detail.
255 (Bison Symbols): Clean up discussion of prologue alternatives and add
258 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
260 DJGPP specific issues.
262 * djgpp/config.bat: config.hin has been moved to lib. Adjust
263 config.bat accordingly.
264 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
265 * djgpp/config.site: Likewise.
267 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
269 Replace %*-header with %provides, %requires, %code. See discussion at
270 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
272 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
273 (b4_user_start_header): Remove.
274 * data/glr.c: Use new macros instead of b4_*start_header
276 * data/glr.cc: Likewise.
277 * data/lalr1.cc: Likewise.
278 * data/push.c: Likewise.
279 * data/yacc.c: Likewise.
281 * doc/bison.texinfo: Remove %before-header, rename
282 %{start,end,after}-header to %requires, %provides, %code.
284 * src/parse-gram.y: Likewise (also rename token names accordingly).
285 * src/scan-gram.l: Likewise.
286 * tests/actions.at: Likewise.
288 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
290 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
291 Problem reported by Joel E. Denny.
293 2006-10-14 Jim Meyering <jim@meyering.net>
295 (Sync from coreutils.)
296 Work also when the working directory (with e.g. coreutils sources)
297 is version controlled with git, rather than CVS.
298 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
300 In messages and comments, say e.g., "checked-out sources",
301 rather than "CVS sources".
302 (version_controlled_file): New function. Work for git as well as
303 for CVS. Don't use grep's -q option.
304 (slurp): Call it here, in place of CVS-specific code.
306 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
308 Fix testsuite for ./configure --enable-gcc-warnings:
309 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
310 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
311 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
312 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
313 * test/regression.at (Diagnostic that expects two alternatives):
316 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
318 * bootstrap.conf (gnulib_modules): Add config-h.
319 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
320 worry about HAVE_CONFIG_H.
321 * lib/abitset.c: Likewise.
322 * lib/bitset.c: Likewise.
323 * lib/bitset_stats.c: Likewise.
324 * lib/bitsetv-print.c: Likewise.
325 * lib/bitsetv.c: Likewise.
326 * lib/ebitset.c: Likewise.
327 * lib/get-errno.c: Likewise.
328 * lib/lbitset.c: Likewise.
329 * lib/subpipe.c: Likewise.
330 * lib/timevar.c: Likewise.
331 * lib/vbitset.c: Likewise.
332 * lib/bitset.c: Include "bitset.h" first, to test interface.
333 * lib/bitset_stats.c: Include "bitset_stats.h" first.
334 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
335 * lib/bitsetv.c: Include "bitsetv.h" first.
336 * lib/get-errno.c: Include "get-errno.h" first.
337 * m4/.cvsignore: Add config-h.m4.
338 * tests/actions.at (Default %printer and %destructor for ...):
339 Adjust expected line numbers in output to reflect removal of #if
341 * tests/glr-regression.at (Missed %merge type warnings when ...):
343 * tests/regression.at (Braced code in declaration in rules section):
345 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
346 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
347 Include <config.h> unconditionally.
349 * bootstrap: Sync from coreutils, as follows:
351 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
353 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
354 variable was sometimes used without being initialized. This
355 messed up the installation of the INSTALL file in some cases.
357 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
359 * bootstrap (usage, main program, symlink_to_gnulib): Add option
360 --copy. Inspired by a suggestion from Bruno Haible.
362 2006-10-03 Jim Meyering <jim@meyering.net>
364 * bootstrap: Undo last change to this file, since now gnulib-tool
365 sticks with the automake default in generating dependencies.
367 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
369 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
370 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
372 * doc/bison.1: Add copyright notice.
374 * data/glr.c: Don't include <stdarg.h>; not used.
376 * NEWS: The -g and --graph options now output graphs in Graphviz
377 DOT format, not VCG format.
378 * doc/bison.1: Likewise.
379 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
380 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
382 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
383 * TODO: Remove Graphviz entry.
384 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
385 remove vcg.c, vcg.h, vcg_defaults.h.
386 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
387 * src/graphviz.c, src/graphviz.h: New files.
388 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
389 * src/files.h: Make comment more generic.
390 * src/main.c (main): Likewise.
391 * src/print_graph.h: Likewise.
392 * src/getargs.c (usage): Make usage description more generic.
393 * src/print_graph.c: Include graphviz.h rather than vcg.h.
394 (static_graph, fgraph): Remove. All uses changed to pass
395 arguments instead of sharing a static var.
396 (print_core, print_actions, print_state, print_graph):
397 Output graphviz format rather than VCG format.
398 * tests/.cvsignore: Remove *.vcg; add *.dot.
399 * tests/output.at: Expect *.dot files, not *.vcg files.
401 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
402 accommodates the 2006-10-08 change.
404 2006-10-11 Bob Rossi <bob@brasko.net>
406 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
407 (b4_yyssa, b4_yyerror_range): New macros.
408 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
409 (yypvarsinit): Remove init of removed fields.
410 (yypushparse): Remove use of removed fields; use new macros instead.
412 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
414 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
415 in a push parser. Reindent slightly to match yacc.c better.
417 2006-10-11 Bob Rossi <bob@brasko.net>
419 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
421 (yypvarsinit, yypushparse): Remove init of removed fields.
422 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
424 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
426 * THANKS: Add Paolo Bonzini and Bob Rossi.
428 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
430 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
431 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
432 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
433 b4_define_user_cde and uses): Remove.
434 (b4_comment, b4_prefix, b4_sync_start): New.
435 * data/bison.m4: New file, with most of the content removed from c.m4.
436 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
437 * src/output.c (output_skeleton): Pass bison.m4.
438 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
441 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
443 Fix test failure reported by Tom Lane in
444 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
445 and try to make such failures easier to catch in the future.
446 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
447 that's now the caller's responsibility.
448 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
449 Set yychar = YYEOF if it's negative.
450 * tests/actions.at (yylex): Abort if asked to read past EOF.
451 * tests/conflicts.at (yylex): Likewise.
452 * tests/cxx-type.at (yylex): Likewise.
453 * tests/glr-regression.at (yylex): Likewise.
454 * tests/input.at (yylex): Likewise.
455 * tests/regression.at (yylex): Likewise.
456 * tests/torture.at (yylex): Likewise.
458 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
460 Fix problems with translating English-language diagnostics.
461 * bootstrap: Fix bug introduced in recent bootstrap changes, with
462 respect to bison-runtime pot generation. The YY_ stuff
463 wasn't being captured.
464 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
465 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
466 * runtime-po/POTFILES.in: Add data/push.c.
468 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
470 Merge bootstrap changes from coreutils.
472 2006-09-28 Jim Meyering <jim@meyering.net>
474 Automatically generated dependencies are important even
475 when all of the sources in a directory come from gnulib.
476 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
477 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
479 2006-09-23 Jim Meyering <jim@meyering.net>
481 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
483 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
485 * bootstrap: Add support for --force.
486 (usage): New function. Describe usage less tersely.
487 (CVS_only_file): New var.
489 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
491 * data/push.c (YYPUSH_MORE): Make it an enum instead.
492 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
493 Adjust white space and comments to match GNU style better.
495 2006-09-20 Bob Rossi <bob@brasko.net>
497 * data/push.c (yyresult_get): Remove function.
498 (YYPUSH_MORE): Add #define.
499 (yypushparse): Modify return value.
501 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
503 * stamp-h.in: Remove; no longer needed.
504 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
505 Remove config.h, config.hin, intl (no longer created).
506 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
509 Sync bootstrap from coreutils, as follows:
511 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
513 * bootstrap (symlink_to_gnulib): New function.
514 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
516 (cp_mark_as_generated, slurp, gnulib_files):
517 Avoid making a copy if it's the same as the old version.
518 (gnulib_files): Add support for this variable (used by Bison).
520 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
522 * src/getargs.c (usage): Rework to use conventions similar to
523 coreutils, to make translation a bit easier and the code a bit
524 smaller. Problem reported by Tim Van Holder.
526 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
528 Use some of gnulib's new modules, taken from coreutils.
530 * bootstrap: Sync from coreutils, except add support for gnulib_files.
531 * bootstrap.conf: New file.
532 (gnulib_modules): Add configmake, inttypes, unistd.
533 (XGETTEXT_OPTIONS): Add complain, complain_at,
534 fatal, fatal_at, warn, warn_at, unexpected_end.
535 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
536 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
538 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
540 (GNULIB_AUTOCONF_SNIPPET): Remove.
541 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
543 * lib/.cvsignore: Add inttypes_.h.
544 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
545 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
546 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
547 no-longer-necessary initializations.
548 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
549 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
550 use the unistd module.
551 * src/system.h: Likewise.
552 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
553 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
554 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
555 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
556 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
557 * src/system.h: Include inttypes.h unconditionally, now that we
558 use the inttypes module. Don't bother to include stdint.h, since
559 inttypes.h now does that for us.
560 (LOCALEDIR): Remove, now that we use the configmake module.
561 * src/getargs.c: Include configmake.h.
562 * src/main.c: Likewise.
563 * src/output.c: Likewise.
564 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
565 not from $abs_top_builddir, since config.h moved.
568 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
569 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
571 * src/parse-gram.y (symbol_declaration): Don't put statements
572 before declarations; it's not portable to C89.
573 * src/scan-code.l (handle_action_at): Likewise.
575 * src/scan-code.l: Always initialize braces_level; the old code
576 left it uninitialized and therefore had undefined behavior.
578 Don't attempt to redefine 'assert', since it runs afoul of
579 systems where standard headers (mistakenly) include <assert.h>.
580 Instead, define and use our own alternative, called 'aver'.
581 * src/reader.c: Don't include assert.h, since we no longer
583 * src/scan-code.l: Likewise.
584 * src/system.h (assert): Remove, replacing with....
585 (aver): New function, taking a bool arg. All uses changed.
586 * src/tables.c (pack_vector): Ensure that aver arg is bool,
587 not merely an integer.
589 2006-09-15 Bob Rossi <bob@brasko.net>
591 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
592 * data/c.m4 (YYPUSH): New.
593 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
594 * src/getargs.c (push_parser): New var.
595 * src/getargs.h (push_parser): New declaration.
596 * src/output.c (prepare): Add macro insertion of `push_flag'.
597 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
598 (prologue_declaration): Parse %push-parser.
599 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
600 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
601 list of removed lines from the traces observed.
602 (AT_CHECK_CALC_LALR): Added push parser tests.
604 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
606 * NEWS: Version 2.3a.
607 * configure.ac (AC_INIT): Likewise.
609 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
610 "#define YYSTYPE int" that caused "make maintainer-check" to fail
611 due to header ordering dependencies. I don't know why the #define
614 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
615 runtime cost when YYDEBUG is not defined, and so that some tests
616 that used to fail now work. Problem and initial suggestion by
618 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
619 * data/glr.cc (b4_parser_class_name):
620 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
621 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
622 (yydebug_) [YYDEBUG]: New member.
623 (yycdebug_): Now defined only if YYDEBUG.
624 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
625 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
626 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
628 (debug_stream, set_debug_stream, debug_level, set_debug_level):
629 Define only if YYDEBUG.
630 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
632 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
633 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
634 AT_CHECK_CALC_GLR_CC that are working now.
636 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
638 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
639 We don't need them in glr.cc, and glr.c defines them.
640 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
641 assumes that defining it to anything is the same as defining
642 it to 1. Problem reported by Paolo Bonzini.
644 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
646 * data/c.m4 (b4_null, b4_case): Define.
647 * src/output.c (prepare_symbols): Use b4_null.
648 (user_actions_output): Use b4_case.
650 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
652 * data/glr.c (b4_shared_declarations): Put start-header first,
653 before any #includes that we generate, so that feature-test
654 macros work. Problem reported by Michael Deutschmann in
655 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
656 * data/lalr1.cc: Likewise.
657 * doc/bison.texinfo (Prologue): Document that feature-test macros
658 should be defined before any Bison declarations.
659 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
660 that depend on location.hh after, not before, Bison decls, since
661 we now include location.hh after the first user prologue.
663 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
664 Sander Brandenburg in
665 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
666 Also, fix minor white space and comment issues.
667 (Prologue): Mention that it's better to define feature-test macros
668 before Bison declarations. Problem reported by Michael Deutschmann.
670 * README-cvs: Fix typo: "&" should be "&&". Problem reported
672 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
673 This adjusts to recent gnulib changes.
675 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
677 Finish implementation of per-type %destructor/%printer. Discussed
679 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
681 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
682 * NEWS (2.3+): Add a description of this feature to the default
683 %destructor/%printer description.
684 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
685 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
686 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
687 list node contains a semantic type.
688 * src/symtab.c, src/symtab.h: Extend with a table that associates
689 semantic types with their %destructor's and %printer's.
690 (semantic_type_from_uniqstr, semantic_type_get,
691 semantic_type_destructor_set, semantic_type_printer_set): New functions
692 composing the public interface of that table.
693 (symbol_destructor_get, symbol_destructor_location_get,
694 symbol_printer_get, symbol_printer_location_get): If there's no
695 per-symbol %destructor/%printer, look up the per-type before trying
697 * tests/actions.at (Per-type %printer and %destructor): New test case.
698 * tests/input.at (Default %printer and %destructor redeclared):
699 Extend to check that multiple occurrences of %symbol-default in a
700 single %destructor/%printer declaration is an error.
701 (Per-type %printer and %destructor redeclared, Unused values with
702 per-type %destructor): New test cases.
704 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
706 Require default %destructor/%printer to be declared using
707 %symbol-default instead of an empty symbol list, and start working on
708 new per-type %destructor/%printer. Discussed at
709 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
710 * NEWS (2.3+): Add %symbol-default to example.
711 * bison.texinfo (Freeing Discarded Symbols): Likewise.
712 (Bison Symbols): Add entry for %symbol-default.
713 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
714 (generic_symlist, generic_symlist_item): New nonterminals for creating
715 a list in which each item is a symbol, semantic type, or
717 (grammar_declaration): Use generic_symlist in %destructor and %printer
718 declarations instead of symbols.1 or an empty list.
719 (symbol_declaration, precedence_declaration, symbols.1): Update actions
720 for changes to symbol_list.
721 * src/reader.c: Update for changes to symbol_list.
722 * src/scan-code.l: Likewise.
723 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
724 * src/symlist.c, src/symlist.h: Extend such that a list node may
725 represent a semantic type or a %symbol-default in addition to just an
726 ordinary symbol. Add switched functions for setting %destructor's and
728 * tests/actions.at, tests/input.at: Add %symbol-default to all default
729 %destructor/%printer declarations.
731 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
733 Whether the default %destructor/%printer applies to a particular symbol
734 isn't a question of whether the user *declares* that symbol (in %token,
735 for example). It's a question of whether the user by any means
736 *defines* the symbol at all (by simply using a char token, for
737 example). $end is defined by Bison whereas any other token with token
738 number 0 is defined by the user. The error token is always defined by
739 Bison regardless of whether the user declares it with %token, but we
740 may one day let the user define error as a nonterminal instead.
741 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
742 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
743 the meaning of "user-defined".
744 * tests/actions.at (Default %printer and %destructor for user-declared
745 end token): Rename to...
746 (Default %printer and %destructor for user-defined end token): ...
749 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
750 computation of whether to apply the default, don't maintain a list of
751 every Bison-defined symbol. Instead, just check for a first character
752 of '$', which a user symbol cannot have, and check for the error token.
754 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
756 Don't apply the default %destructor or %printer to the error token,
757 $undefined, or $accept. This change fits the general rule that the
758 default %destructor and %printer are only for user-declared symbols,
759 and it solves several difficulties that are described in the new test
761 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
762 * tests/actions.at (Default %printer and %destructor are not for error
763 or $undefined, Default %printer and %destructor are not for $accept):
766 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
768 Allow %start after the first rule.
769 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
770 when parsing the first rule.
771 (check_and_convert_grammar): Search for it here after all grammar
772 declarations have been parsed. Skip midrules, which have dummy LHS
774 * src/symtab.c (symbol_is_dummy): New function.
775 * src/symtab.h (symbol_is_dummy): Declare it.
776 * tests/input.at (%start after first rule): New test.
778 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
780 Redo some of the previous commit: add back the ability to use
781 non-aliased/undeclared string literals since it might be useful to
782 those declaring %token-table.
783 * src/reader.c (check_and_convert_grammar): Undo changes in previous
784 commit: don't worry about complaints from symbols_pack.
785 * src/symtab.c (symbol_new, symbol_class_set,
786 symbol_check_alias_consistency): Undo changes in previous commit: count
787 each string literal as a new symbol and token, assign it a symbol
788 number, and don't complain about non-aliased string literals.
789 (symbols_pack): Since symbol_make_alias still does not decrement symbol
790 and token counts but does still set aliased tokens to the same number,
791 symbol_pack_processor now leaves empty slots in the symbols array.
793 * tests/regression.at (Undeclared string literal): Remove test case
794 added in previous commit since non-aliased string literals are allowed
796 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
797 remove unnecessary string literal declarations.
798 * tests/sets.at (Firsts): Likewise.
800 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
802 Don't allow an undeclared string literal, but allow a string literal to
803 be used before its declaration.
804 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
805 symbols_pack complained.
806 * src/symtab.c (symbol_new): Don't count a string literal as a new
808 (symbol_class_set): Don't count a string literal as a new token, and
809 don't assign it a symbol number since symbol_make_alias does that.
810 (symbol_make_alias): It's not necessary to decrement the symbol and
811 token counts anymore. Don't assume that an alias declaration occurs
812 before any uses of the identifier or string, and thus don't assert that
813 one of them has the highest symbol number so far.
814 (symbol_check_alias_consistency): Complain if there's a string literal
815 that wasn't declared as an alias.
816 (symbols_pack): Bail if symbol_check_alias_consistency failed since
817 symbol_pack asserts that every token has been assigned a symbol number
818 although undeclared string literals have not.
819 * tests/regression.at (String alias declared after use, Undeclared
820 string literal): New test cases.
821 (Characters Escapes, Web2c Actions): Declare string literals as
823 * tests/sets.at (Firsts): Likewise.
825 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
827 In the grammar scanner, STRING_FINISH unclosed constructs and return
828 them to the parser in order to improve error messages.
829 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
830 SC_BRACED_CODE, SC_PROLOGUE): Implement.
831 * tests/input.at (Unclosed constructs): New test case.
832 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
835 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
838 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
840 Handle string aliases for character tokens correctly.
841 * src/symtab.c (symbol_user_token_number_set): If the token has an
842 alias, check and set its alias's user token number instead of its own,
843 which is set to indicate the alias. Previously, every occurrence of
844 the character token in the grammar overwrote that alias indicator with
846 * tests/input.at (String aliases for character tokens): New test.
848 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
850 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
852 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
854 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
855 to prevent failures when building on older platforms.
856 Check for autopoint failure.
857 Set XGETTEXT_OPTIONS to values that check for C format strings,
858 so that translators are warned about them (this also helps
861 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
862 function, since it simplifies our code a bit.
864 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
865 rather than -W, so we don't get bogus warnings about sign comparisons.
866 Add -Wpointer-arith, since that warning is useful (it reports code
867 that does not conform to C89 and that some compilers reject).
868 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
869 since it's no longer needed.
871 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
873 Clean up scanners a bit.
874 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
875 definitions so gcc won't warn when obstack_for_string is unused.
876 * src/scan-code.l: config.h and system.h are already #include'd by
877 scan-code-c.c, so get rid of them here.
878 * src/scan-gram.l: Likewise.
879 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
880 definitions rather than duplicating the rest of it.
881 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
883 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
885 Suppress signed/unsigned comparison warnings for yycheck.
886 * data/c.m4 (b4_safest_int_type): New macro.
887 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
888 a signed int type, cast it to b4_safest_int_type first.
889 * data/yacc.c: Likewise.
890 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
893 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
895 * doc/bison.texinfo: Fix some typos.
897 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
899 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
900 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
902 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
903 the latest gnulib does this a different way.
904 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
905 translation was patched, so stop omitting it.
907 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
909 Enable declaration of default %printer/%destructor. Make the parser
910 use these for all user-declared grammar symbols for which the user does
911 not declare a specific %printer/%destructor. Thus, the parser uses it
912 for token 0 if the user declares it but not if Bison generates it as
913 $end. Discussed starting at
914 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
915 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
917 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
918 * NEWS (2.3+): Mention.
919 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
920 declare a %destructor for a mid-rule's semantic value. It's just
921 impossible to declare one specific to it.
922 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
923 code. Describe default %destructor form.
924 * src/parse-gram.y (grammar_declaration): Parse default
925 %printer/%destructor declarations.
926 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
927 and symbol_destructor_location_get rather than accessing the destructor
928 and destructor_location members of struct symbol.
929 (symbol_printers_output): Likewise but for %printer's.
930 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
932 * src/symtab.c (default_destructor, default_destructor_location,
933 default_printer, default_printer_location): New static global
934 variables to record the default %destructor and %printer.
935 (symbol_destructor_get, symbol_destructor_location_get,
936 symbol_printer_get, symbol_printer_location_get): New functions to
937 compute the appropriate %destructor and %printer for a symbol.
938 (default_destructor_set, default_printer_set): New functions to set the
939 default %destructor and %printer.
940 * src/symtab.h: Prototype all those new functions.
941 * tests/actions.at (Default %printer and %destructor): New test to
942 check that the right %printer and %destructor are called, that they're
943 not called for $end, and that $$ and @$ work correctly.
944 (Default %printer and %destructor for user-declared end token): New
945 test to check that the default %printer and %destructor are called for
946 a user-declared end token.
947 * tests/input.at (Default %printer and %destructor redeclared, Unused
948 values with default %destructor): New tests to check related grammar
951 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
953 Clean up handling of %destructor for the end token (token 0).
954 Discussed starting at
955 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
957 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
959 Make the skeletons consistent in how they pop the end token and invoke
961 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
962 state, which has token number 0, since this would invoke the
963 %destructor for the end token.
964 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
965 until after shifting the end token, or else it won't be popped.
966 * data/yacc.c (yyparse): Likewise.
968 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
969 it's the end token. Upon termination, destroy an unshifted lookahead
970 even when it's the end token.
971 * data/lalr1.cc (yy::parser::parse): Likewise.
972 * data/yacc.c (yyparse): Likewise.
974 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
975 value warnings for the end token when the user gives the end token a
978 * tests/actions.at (Printers and Destructors): Test all the above.
980 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
982 Update to latest gnulib and gettext versions.
983 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
985 (gnulib_files): Add m4/warning.m4. Don't worry about files
986 overwritten by autopoint.
987 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
988 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
990 Don't use autoreconf; instead, invoke autopoint etc. by hand,
991 so that we can remove the intl files at a better time.
992 (intl_files_to_remove): Remove aclocal.m4, since it gets
993 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
994 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
995 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
996 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
997 Remove datarootdir hack; no longer needed.
998 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
999 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1000 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1002 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1003 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1005 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1007 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1008 it with --assume-autoconf='latest-stable'.
1010 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1012 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1013 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1015 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1016 those from muscle_tab.c since the old ones are misleading.
1018 2006-07-13 Akim Demaille <akim@epita.fr>
1020 Support %define "KEY" {VALUE}.
1021 * src/scan-code.h, src/scan-code.l (translate_action)
1022 (translate_rule_action, translate_symbol_action, translate_code):
1023 Return char *, not const char *.
1024 * src/parse-gram.y (declaration): Rename as...
1025 (prologue_declaration): this.
1026 (string_content): Remove this nonterminal, use STRING.
1027 (braceless, content, content.opt): New nonterminal.
1029 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1031 * src/scan-gram.l (getargs.h): Don't include it.
1033 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1035 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1036 rather than a for-loop that declares a local bool variable. This
1037 should work around a compatibility problem with a Cray x1e C++
1038 compiler reported by Hung Nguyen in
1039 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1040 The for-loop was introduced in the 2004-11-17 change but I don't
1041 know why it was needed.
1043 2006-07-12 Akim Demaille <akim@epita.fr>
1045 * data/c.m4: Comment changes.
1047 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
1049 * src/complain.c (error_message, ERROR_MESSAGE): New.
1051 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1052 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1054 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1056 * NEWS: Instead of %union, you can define and use your own union type
1057 YYSTYPE if your grammar contains at least one <type> tag.
1058 Your YYSTYPE need not be a macro; it can be a typedef.
1059 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1060 (Union Decl, Decl Summary): Document this.
1061 * data/glr.c (YYSTYPE): Implement this.
1062 * data/glr.cc (YYSTYPE): Likewise.
1063 * data/lalr1.cc (YYSTYPE): Likewise.
1064 * data/yacc.c (YYSTYPE): Likewise.
1065 * src/output.c (prepare): Output tag_seen_flag.
1066 * src/parse-gram.y (declaration, grammar_declaration):
1067 Use 'union_seen' rather than 'typed' to determine whether
1068 %union has been seen, since grammars can now be typed without
1070 (symbol_declaration, type.opt, symbol_def):
1071 Keep track of whether a tag has been seen.
1072 * src/reader.c (union_seen, tag_seen): New vars.
1074 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1075 * src/scan-code.l (untyped_var_seen): New variable.
1076 (handle_action_dollar): Adjust to above changes.
1077 (handle_action_dollar, handle_action_at):
1078 Improve overflow checking for outlandish numbers.
1079 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1080 avoid new diagnostics generated by above changes.
1081 * tests/regression.at (YYSTYPE typedef): Add test to check
1082 for type tags without %union.
1084 * src/symlist.c (symbol_list_length): Return int, not unsigned
1085 int, since callers expect int. This may need to get revisited
1086 once we have proper integer overflow checking.
1088 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1089 object is now static.
1091 * src/getargs.c (flags_argmatch): Return void, not int,
1092 to pacify ./configure --enable-gcc-warnings.
1094 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1095 since last_string is already defined to FLEX_PREFIX (last_string).
1097 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1099 Implement --warnings/-W.
1100 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1102 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1104 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1105 (warnings_args, warnings_types): New.
1106 (getargs, short_options, long_options): Accept -W/--warnings.
1107 Sort the options by alphabetical order, upper case letter right
1108 before its lower case.
1110 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1112 Change %merge result type clash warnings to errors. Discussed at
1113 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1114 * src/reader.c (record_merge_function_type): Use complain_at.
1115 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1116 declared later): Update test case results.
1118 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1120 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1121 to be in alphabetical order.
1122 (trace_args): Spelling fixes.
1124 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1126 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1127 so they don't collide with user-defined macros.
1128 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1129 this was never guaranteed, and now that we're using gnulib stdint,
1130 which defines int_fast16_t to long int, the problem is exposed.
1132 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1134 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1135 need the full POSIX semantics (and weren't implementing them
1138 Adjust to Autoconf 2.60 and today's gnulib.
1139 * bootstrap (gnulib_modules): Add stdint.
1140 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1141 no longer copies it.
1142 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1143 since stdint needs the former and wcwidth (which is now required
1144 by mbswidth) needs the latter.
1145 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1146 work around a compatibility glitch between gettext 0.14.6 and
1148 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1149 Do not check for uintptr_t, since new stdint module does the right
1151 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1152 Add stdint.h, stdint_.h, wcwidth.h.
1153 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1154 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1155 stdint.m4, wchar_t.m4, wcwidth.m4.
1156 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1157 usual order for ../lib/*.h files.
1158 (file_name_split): Use last_component, not base_name, to adjust
1160 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1161 for ../lib/*.h files.
1162 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1163 Define unconditionally, since we now assume the stdint module.
1164 * src/scan-skel.l: Include <dirname.h>.
1165 (BASE_QPUTS): Use last_component, not base_name.
1166 * src/system.h: Include <unlocked-io.h> in the usual order
1167 for ../lib/*.h files. Include <stdint.h> unconditionally,
1168 since we now use the stdint module.
1169 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1170 HAVE_UINTPTR_T, since we now use the stdint module.
1171 (base_name): Remove decl, since files now include <dirname.h>
1174 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1176 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1178 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1179 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1181 * tests/calc.at: Adjust.
1183 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1185 * data/c.m4 (b4_basename): New.
1186 (b4_syncline): Also output the location of its invocation (from
1188 (b4_user_action, b4_define_user_action, b4_user_actions)
1189 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1190 (b4_user_stype): New.
1191 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1193 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1195 In the grammar file, the first column is 1 not 0 on the first line as
1196 on every other line.
1197 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1198 * tests/input.at (Torturing the Scanner): Update output.
1200 * src/scan-gram.l (scanner_cursor): Declare it static.
1202 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1204 In warnings, say "previous declaration" rather than "first
1206 * src/symtab.c (redeclaration): Do that here.
1207 * src/reader.c (record_merge_function_type): In the case of a result
1208 type clash, report the previous declaration rather than the very first
1209 one in the grammar file.
1210 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1211 declared later): Add a third declaration to check this behavior.
1212 * tests/input.at (Incompatible Aliases): Update output.
1214 2006-06-27 Akim Demaille <akim@epita.fr>
1216 * doc/Doxyfile.in: New.
1217 * doc/Makefile.am: Use it.
1218 * src/lalr.h, src/symtab.h: Initial doxygenation.
1220 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1222 Don't miss %merge result type warnings just because the LHS types are
1223 declared after the %merge. This continues the effort of the previous
1225 * src/reader.c (get_merge_function): Don't set the merger type yet.
1226 (record_merge_function_type): New function for setting the merger type
1227 and checking for clashes.
1228 (grammar_current_rule_merge_set): Set the location of the %merge for
1230 (packgram): Invoke record_merge_function_type for each rule now that
1231 all symbol type declarations have been parsed.
1232 * src/reader.h (merger_list.type_declaration_location): New member
1233 storing the location of the first %merge from which the type for this
1234 merging function was derived.
1235 * src/symlist.h (symbol_list.merger_declaration_location): New member
1236 storing the location of a rule's %merge, if any.
1237 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1238 declared later): New test to catch the error fixed by the above patch.
1240 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1242 Get action warnings (grammar_rule_check) right even when symbol
1243 declarations appear after the rules. Discussed at
1244 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1246 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1247 Don't mistake the type of $$ in a midrule to be that of its parent
1249 * src/reader.c (grammar_current_rule_end): Don't invoke
1250 grammar_rule_check yet since not all symbol declarations may have been
1252 (grammar_midrule_action): Likewise.
1253 Don't record whether the midrule's $$ has been used yet since actions
1254 haven't been translated yet.
1255 Record the midrule's parent rule and its RHS index within the parent
1257 (grammar_current_rule_action_append): Don't translate the action yet
1258 since not all symbol declarations may have been parsed yet and, thus,
1259 warnings about types for $$, $n, @$, and @n can't be reported yet.
1260 (packgram): Translate the action and invoke grammar_rule_check now that
1261 all symbol declarations have been parsed.
1262 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1263 after parsing the entire grammar file, the symbol list here in the case
1264 of a midrule is actually the midrule's empty RHS, so reference its
1265 parent rule's RHS where necessary.
1266 On the other hand, now that you can already know it's a midrule, you
1267 aren't forced to think $$ has the same type as its parent rule's $$.
1268 (handle_action_at): In the case of a midrule, reference the parent rule
1270 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1272 (symbol_list_length): Now that this is invoked after all rules have
1273 been parsed, a NULL symbol (rather than a NULL symbol list node)
1274 terminates a rule. symbol_list_print already does this correctly.
1275 * src/symlist.h (symbol_list.midrule_parent_rule,
1276 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1277 remember their relationships with their parents.
1278 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1279 fixed by the above patch.
1280 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1282 (Unused values): ... this old test case and...
1283 (Unused values before symbol declarations): ... this new test case.
1284 This one is the same as `Unused values' except that all symbol
1285 declarations appear after the rules in order to catch the rest of the
1286 errors fixed by the above patch.
1288 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1291 * src/reader.c (current_rule): Declare it static since it's no longer
1292 used outside this file.
1293 (grammar_current_rule_action_append): Remove redundant arguments from
1294 translate_rule_action invocation.
1295 * src/reader.h (current_rule): Remove this unused extern.
1296 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1297 * src/scan-code.l (translate_rule_action): Likewise.
1299 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1301 Clean up yesterday's patch.
1302 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1304 * src/reader.c (grammar_current_rule_action_append): ... here for
1305 consistency with grammar_current_rule_symbol_append.
1306 * tests/regression.at (Braced code in declaration in rules section):
1307 Make yyerror and yylex static as usual.
1309 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1311 Fix bug that mistakes braced code in a declaration in the rules section
1312 to be a rule action. Mentioned at
1313 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1314 * src/scan-gram.l: Move midrule action detection from the start of the
1315 scanning of any braced code to...
1316 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1317 action. For readability, use $2 and @2 rather than the equivalent
1319 * tests/regression.at (Braced code in declaration in rules section):
1320 New test to catch the error fixed by the above patch.
1322 Work on code readability some.
1323 * src/scan-code.l (current_rule): Get rid of this misleading and
1324 redundant declaration: it's actually extern'ed in reader.h.
1325 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1326 translate_action): Add a rule argument and use it instead of the global
1328 (translate_rule_action): This already receives current_rule through an
1329 argument, so pass it on to translate_action instead of assigning
1330 current_rule to current_rule.
1331 (translate_symbol_action, translate_code): Pass rule = NULL to
1334 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1336 Rename %before-definitions to %start-header and %after-definitions to
1337 %end-header. Don't use these declarations to separate pre-prologue
1338 blocks from post-prologue blocks. Add new order-independent
1339 declarations %before-header and %after-header as alternatives to the
1340 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1341 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1342 * NEWS (2.3+): Update for these changes.
1343 * data/glr.c (b4_before_definitions): Update to...
1344 (b4_start_header): ... this.
1345 (b4_after_definitions): Update to...
1346 (b4_end_header): ... this.
1347 * data/glr.cc: Likewise.
1348 * data/lalr1.cc: Likewise.
1349 * data/yacc.c: Likewise.
1350 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1351 prologue blocks with %*-header declarations.
1352 (Calc++ Parser): Likewise.
1353 (Bison Declaration Summary): Update names.
1354 (Bison Symbols): Update description.
1355 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1356 (PERCENT_END_HEADER): ... this.
1357 (PERCENT_BEFORE_DEFINITIONS): Update to...
1358 (PERCENT_START_HEADER): ... this.
1359 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1360 (declaration): Update token names and m4 macro names.
1361 When parsing %end-header and %start-header, invoke translate_code
1362 before muscle_code_grow, and no longer set global booleans to remember
1363 whether these declarations have been seen.
1364 Parse new %after-header and %before-header.
1365 * src/reader.c (before_definitions, after_definitions): Remove.
1366 (prologue_augment): Accept a new bool argument to specify whether to
1367 augment the pre-prologue or post-prologue.
1368 * src/reader.h (before_definitions, after_definitions): Remove these
1370 (prologue_augment): Add new bool argument.
1371 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1372 (PERCENT_END_HEADER): ... this.
1373 (PERCENT_BEFORE_DEFINITIONS): Update to...
1374 (PERCENT_START_HEADER): ... this.
1375 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1376 * tests/actions.at (Printers and Destructors): Update names.
1378 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1380 Add comparison operators for C++ location classes. Discussed at
1381 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1382 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1383 declaration indicating whether filename_type has an operator==. If
1384 filename_type is `std::string', it defaults to `1', `0' otherwise.
1385 * data/location.cc: Iff b4_define_location_comparison is `1', add
1386 operator== and operator!= for class position and for class location.
1389 * src/scan-action.l: Remove unused file.
1390 * src/symtab.c (symbol_printer_set): Use printer_location not
1391 destructor_location.
1392 * src/symtab.h (struct symbol): Replace incorrect source comment for
1394 * tests/input.at (Incompatible Aliases): Update output with correct
1397 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1399 Don't put the pre-prologue in the header file. For the yacc.c code
1400 file and the glr.c header and code files, move the pre-prologue before
1401 the token definitions. Add new %before-definitions and
1402 %after-definitions to declare code that will go in both the header file
1403 and code file. Discussed at
1404 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1405 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1407 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1408 * NEWS (2.3+): Describe these changes.
1409 * data/glr.c (b4_pre_prologue): Move from within to before...
1410 (b4_shared_declarations): ... this.
1411 Add new b4_before_definitions before b4_token_enums.
1412 Add new b4_after_definitions at the end.
1413 * data/glr.cc (b4_pre_prologue): Replace with...
1414 (b4_before_definitions): ... this in the header file.
1415 (b4_after_definitions): New near the end of the header file.
1416 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1417 code file right before including the header file.
1418 (b4_before_definitions): New in the previous position of
1419 b4_pre_prologue in the header file.
1420 (b4_after_definitions): New near the end of the header file.
1421 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1422 (b4_token_enums_defines): In the code file, move to right before
1423 YYSTYPE for consistency with the header file.
1424 (b4_before_definitions): New right before b4_token_enums_defines in
1425 both the header and code file.
1426 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1427 header and code file.
1428 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1429 of prologues for %union dependencies.
1430 (Bison Declaration Summary): In %defines description, mention the
1431 effect of %before-definitions and %after-definitions on the header
1433 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1434 than in the pre-prologue so that make check succeeds.
1435 (Bison Symbols): Add entries for %before-definitions and
1437 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1438 %before-definitions.
1439 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1440 (declaration): Parse those declarations and append to
1441 b4_before_definitions and b4_after_definitions, respectively.
1442 * src/reader.c (before_definitions, after_definitions): New bools to
1443 track whether those declarations have been seen.
1444 (prologue_augment): Add to the post-prologue if %union,
1445 %before-definitions, or %after-definitions has been seen.
1446 * src/reader.h (before_definitions, after_definitions): New extern's.
1447 * src/scan-gram.l: Scan the new declarations.
1448 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1449 prologue block in a %before-definitions or a %after-definitions based
1450 on whether the %union is declared.
1451 * tests/regression.at (Early token definitions with --yacc, Early token
1452 definitions without --yacc): Move tests for token definitions into the
1453 post-prologue since token names are no longer defined in the
1456 2006-06-20 Akim Demaille <akim@epita.fr>
1458 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1459 (symbol_get): Use it.
1460 * src/parse-gram.y: Use it.
1462 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1464 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1465 build succeeds when configured with --enable-gcc-warnings.
1467 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1469 * src/parse-gram.y (char_name): New function.
1470 (CHAR, STRING, string_content): For %printer, properly escape.
1471 (ID): Prefer fputs to fprintf.
1472 (id): Reindent to be consistent with other rules.
1473 Properly quote char.
1475 The Translation Project changed its way of publishing translations
1476 to maintainers. I haven't received any responses to my request
1477 for supporting the old way, or for documenting the new way. I
1478 have modified 'bootstrap' to use screen scraping
1479 (in this case, HTML scraping). This is unreliable and inelegant,
1480 but I don't see any better way. Yuck.
1481 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1482 (get_translations): New function, which uses HTML scraping to
1483 deduce locations of latest translations.
1484 Use this function to grab both bison and bison-runtime .po files.
1485 Don't bother priming the pump for the runtime-po domain any more,
1486 as it's now translated better than bison is.
1488 2006-06-19 Akim Demaille <akim@epita.fr>
1490 * src/scan-gram.l: No longer "parse" things after `%union' until
1491 `{'. Rather, return a single "%union" token.
1492 No longer make symbols: return strings, and leave the conversion
1493 to symbols to the parser.
1494 (SC_PRE_CODE, token_type): Remove.
1495 * src/parse-gram.y (%union): New field `character'.
1498 (ID, ID_COLON): Now that the scanner no longer makes them
1499 identifiers, adjust all uses to invoke symbol_get.
1500 (id_colon): New, wraps the conversion from string to symbol.
1501 (%union): Accept a possible union_name.
1502 (symbol): Now can be a char.
1503 * data/c.m4 (b4_union_name): Leave a default value.
1504 * data/glr.c, data/yacc.c: Use it.
1506 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1508 For associating token numbers with token names for "yacc.c", don't use
1509 #define statements unless `--yacc' is specified; always use enum
1510 yytokentype. Most important discussions start at:
1511 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1512 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1514 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1515 * NEWS (2.3+): Mention.
1516 * data/c.m4 (b4_yacc_if): New.
1517 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1519 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1520 on token name definitions.
1521 * src/getargs.c (usage): Capitalize `Yacc' in English.
1522 * src/output.c (prepare): Define b4_yacc_flag.
1523 * tests/regression.at (Early token definitions): Test that tokens names
1524 are defined before the pre-prologue not just before the post-prologue.
1525 Remove this test case and copy to...
1526 (Early token definitions with --yacc): ... this to test #define's.
1527 (Early token definitions without --yacc): ... and this to test enums.
1529 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1531 * NEWS: Reword the post-2.3 change to not be so optimistic about
1532 removing the old "look-ahead" spelling.
1533 Update previous look-ahead/lookahead change reports.
1534 * REFERENCES: look-ahead -> lookahead (since that's
1535 what he actually wrote).
1536 * doc/refcard.tex: look ahead -> lookahead,
1537 look-ahead -> lookahead
1539 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1541 For consistency, use `lookahead' instead of `look-ahead' or
1542 `look_ahead'. Discussed starting at
1543 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1545 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1546 * NEWS: For the next release, note the change to `--report'.
1547 * TODO, doc/bison.1: Update English.
1548 * doc/bison.texinfo: Update English.
1549 (Understanding Your Parser, Bison Options): Document as
1550 `--report=lookahead' rather than `--report=look-ahead'.
1551 * src/conflicts.c: Update English in comments.
1552 (lookahead_set): Rename from look_ahead_set.
1553 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1554 (resolve_sr_conflict): Rename local look_ahead_tokens to
1555 lookahead_tokens, and update other uses.
1556 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1557 count_rr_conflicts, conflicts_free): Update uses.
1558 * src/getargs.c (report_args): Move "lookahead" before alternate
1560 (report_types): Update uses.
1561 (usage): For `--report' usage description, state `lookahead' spelling
1562 rather than `look-ahead'.
1563 * src/getargs.h (report.report_lookahead_tokens): Rename from
1564 report_look_ahead_tokens.
1565 * src/lalr.c: Update English in comments.
1566 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1567 (state_lookahead_tokens_count): Rename from
1568 state_look_ahead_tokens_count.
1569 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1570 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1571 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1573 Update English in output.
1574 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1575 * src/print.c: Update English in comments.
1576 (lookahead_set): Rename from look_ahead_set.
1577 (print_reduction): Rename argument lookahead_token from
1579 (print_core, state_default_rule, print_reductions, print_results):
1581 * src/print_graph.c: Update English in comments.
1582 (print_core): Update uses.
1583 * src/state.c: Update English in comments.
1584 (reductions_new): Update uses.
1585 (state_rule_lookahead_tokens_print): Rename from
1586 state_rule_look_ahead_tokens_print, and update other uses.
1587 * src/state.h: Update English in comments.
1588 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1589 (state_rule_lookahead_tokens_print): Rename from
1590 state_rule_look_ahead_tokens_print.
1591 * src/tables.c: Update English in comments.
1592 (conflict_row, action_row): Update uses.
1593 * tests/glr-regression.at
1594 (Incorrect lookahead during deterministic GLR,
1595 Incorrect lookahead during nondeterministic GLR): Rename
1596 print_look_ahead to print_lookahead.
1597 * tests/torture.at: Update English in comments.
1598 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1599 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1600 (Many lookahead tokens): Update uses.
1601 * data/glr.c: Update English in comments.
1602 * lalr1.cc: Likewise.
1604 * src/conflicts.h: Likewise.
1605 * src/lalr.h: Likewise.
1606 * src/main.c: Likewise.
1607 * src/output.c: Likewise.
1608 * src/parse-gram.c: Likewise.
1609 * src/tables.h: Likewise.
1610 * tests/calc.at: Likewise.
1612 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1614 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1616 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1618 * TODO: Add request from Nelson H. F. Beebe to be able to install
1619 Bison without installing the yacc script.
1621 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1623 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1624 and yytext if they're already #define'd.
1625 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1626 * src/scan-code-c.c: ... here.
1627 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1630 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1632 Get Bison to build again when configured with --enable-gcc-warnings.
1633 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1635 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1636 loc argument as it shadows a global.
1637 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1640 * src/.cvsignore: Add scan-code.c.
1642 2006-06-07 Akim Demaille <akim@epita.fr>
1644 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1646 * src/scan-code.l: here.
1647 * tests/input.at (Torturing the Scanner): Fix another location
1650 2006-06-07 Akim Demaille <akim@epita.fr>
1652 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1654 2006-06-06 Akim Demaille <akim@epita.fr>
1656 Extract the parsing of user actions from the grammar scanner.
1657 As a consequence, the relation between the grammar scanner and
1658 parser is much simpler. We can also split "composite tokens" back
1660 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1661 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1663 * src/location.h, src/location.c (add_column_width)
1664 (location_compute): these.
1665 Fix the column count: the initial column is 0.
1666 (location_print): Be robust to ending column being 0.
1667 * src/location.h (boundary_set): New.
1668 * src/main.c: Adjust to scanner_free being renamed as
1670 * src/output.c: Include scan-code.h.
1671 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1673 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1674 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1675 which is now, again, a separate token.
1676 Adjust all dependencies.
1677 Whereever actions with $ and @ are used, use translate_code.
1678 (action): Remove this nonterminal which is now useless.
1679 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1680 (grammar_current_rule_action_append): Use translate_code.
1681 (packgram): Bound check ruleno, itemno, and rule_length.
1682 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1683 (last_string, last_braced_code_loc, max_left_semantic_context)
1684 (scanner_initialize, scanner_free, scanner_last_string_free)
1685 (gram_out, gram_lineno, YY_DECL_): Move to...
1686 * src/scan-gram.h: this new file.
1687 (YY_DECL): Rename as...
1689 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1690 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1691 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1692 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1693 Move these declarations, and...
1694 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1696 * src/flex-scanner.h: this new file.
1697 * src/scan-gram.l (rule_length, rule_length_overflow)
1698 (increment_rule_length): Remove.
1699 (last_braced_code_loc): Rename as...
1700 (gram_last_braced_code_loc): this.
1701 Adjust to the changes of the parser.
1702 Move all the handling of $ and @ into...
1703 * src/scan-code.l: here.
1704 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1705 (handle_action_dollar, handle_action_at): Move to...
1706 * src/scan-code.l: here.
1707 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1708 scan-code.h, scan-code-c.c, scan-gram.h.
1709 (EXTRA_bison_SOURCES): Add scan-code.l.
1710 (BUILT_SOURCES): Add scan-code.c.
1711 (yacc): Be robust to white spaces.
1713 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1714 * tests/regression.at: Adjust the column numbers.
1715 * tests/regression.at: Adjust the error message.
1717 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1719 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1720 Use Akim's wording from
1721 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1723 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1725 Between Bison releases, manually append `+' to the previous Bison
1726 release number, and use that as a signal to automatically print the
1727 ChangeLog's CVS Id keyword from --version. Discussed starting at
1728 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1729 * ChangeLog: Add Id header.
1730 * configure.ac (AC_INIT): Append `+' to `2.3'.
1731 * src/.cvsignore: Add revision.c.
1732 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1733 (BUILT_SOURCES): Add revision.c.
1734 (revision.c): New target rule. This file defines a new global variable
1735 named revision. It initializes it with either the Id from ChangeLog
1736 or, if VERSION doesn't contain `+', with the empty string.
1737 * src/getargs.c (version): Print the value of revision.
1738 * src/revision.h: Extern revision.
1740 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1742 * NEWS: Version 2.3.
1743 * configure.ac (AC_INIT): Likewise.
1745 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1747 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1748 with no arguments, not as an object-like macro. This is for
1749 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1750 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1751 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1754 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1756 * src/getargs.c (usage): Back out yesterday's modification of the
1757 --help output so that we don't have to wait for translation before
1760 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1762 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1763 Problem reported by Akim Demaille.
1765 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1767 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1769 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1771 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1772 generated source code. Problem reported by Frans Englich in
1773 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1775 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1777 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1778 shell, not within 'make', so that 'make' by an ordinary builder
1779 (using GNU make) does not worry about configuring gzip. This also
1780 works around a bug reported independently by Keith Thompson and by
1781 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1782 stderr rather than stdout, messing up the build logs.
1784 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1786 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1787 to make sure that YYID will never be unused. This fixes a 'make
1788 maintainer-check' failure caused by the recent changes to the 'Trivial
1789 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1791 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1793 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1795 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1796 state before an empty RHS is always resolved here. Only the location
1797 of that state is guaranteed to be resolved, and that's enough. This
1798 fixes the remaining bug reported by Derek M. Jones in
1799 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1800 * tests/glr-regression.at (Uninitialized location when reporting
1801 ambiguity): Test the above case.
1802 Also, the embedded comments in this test case claim it checks the case
1803 of an empty RHS that has inherited the initial location. However, the
1804 corresponding LHS was already resolved, so yyresolveLocations didn't
1805 actually have reason to modify it. Fix this by forcing
1806 nondeterministic operation at the beginning of the parse.
1808 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1810 * data/c.m4 (b4_yy_symbol_print_generate):
1811 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1812 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1813 of the bugs reported today by Derek M Jones in
1814 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1815 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1816 defined to be a type name without parens or brackets.
1817 (Location Type): Similarly for YYLTYPE.
1818 * tests/regression.at (Trivial grammars): Put in a test for this
1819 bug that will be caught by 'make maintainer-check' (though not,
1820 alas, by 'make check' unless your compiler is picky).
1822 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1824 * NEWS: Version 2.2.
1825 * configure.ac (AC_INIT): Likewise.
1827 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1829 * data/glr.c (yyreportTree): Make room in yystates for the state
1830 preceding the RHS. This fixes the segmentation fault reported by Derek
1832 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1833 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1834 to the user. Reported for yyreportTree by Derek M. Jones later in the
1836 * THANKS: Add Derek M. Jones.
1837 Update my email address.
1838 Fix typo in Steve Murphy's name.
1840 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1842 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1843 checking against YYLAST that caused the parser to miss a potential
1844 alternative in its diagnostic.
1845 Problem reported by Maria Jose Moron Fernandez in
1846 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1847 * data/lalr1.cc (yysyntax_error_): Likewise.
1848 * data/yacc.c (yysyntax_error): Likewise.
1849 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1850 tokens, in case we run into an older C compiler.
1851 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1852 Use them to check for the off-by-one error fixed above.
1854 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1855 YYSIZE_T, not size_t.
1856 * tests/regression.at (Trivial grammars): New test, to catch
1857 the error fixed by the above patch.
1859 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1861 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1863 Reported by Steve Murphy.
1865 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1867 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1868 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1870 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1872 Implement --trace=m4.
1873 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1874 * src/output.c (output_skeleton): When set, pass -dV to m4.
1876 Factor the handling of flags in m4.
1877 * src/output.c (prepare): Rename the muscle names debug, defines,
1878 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1879 * data/c.m4: Adjust.
1880 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1881 Use b4_define_flag_if to define other b4_FLAG_if macros.
1882 (b4_location_if): As a consequence, rename as...
1883 (b4_locations_if): this, for consistency.
1884 Adjust all the skeletons.
1886 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1888 * etc/bench.pm: Shorten bench names.
1890 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1892 * src/output.h, src/output.c (error_verbose): Move to...
1893 * src/getargs.h, src/getargs.c: here.
1895 Adjust dependencies.
1897 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1899 * data/c.m4 (b4_copyright): Put the special exception for Bison
1900 skeletons here, so we don't have to put it in each skeleton. All
1901 uses changed. Suggested by Akim Demaille. Also, wrap the
1902 copyright notice, in case it is longer than 80 columns. Replace
1903 comma by newline after title.
1905 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1907 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1908 incompatibility, not a bug. Mention that it wasn't fixed as of
1911 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1913 * examples/extexi: Enforce the precedence of concatenation over
1915 Reported by Tommy Nordgren.
1917 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1919 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1920 with the member "token".
1921 Reported by Martin Nylin.
1923 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1925 * data/glr.c: Switch to Bison 2.2 special-exception language in
1926 the copyright notice. Use more-regular format for titles and
1928 * data/glr.cc: Likewise.
1929 * data/location.cc: Likewise.
1930 * data/yacc.cc: Likewise.
1931 * doc/bison.texinfo (Conditions): Document this.
1932 * NEWS: likewise. Upgrade version to 2.2.
1934 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1936 * data/glr.cc: Remove dead code.
1938 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1940 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1941 that variable and the line breaks the bootstrap. Problem reported
1942 by Juan M. Guerrero.
1944 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1946 * doc/bison.texinfo (Multiple start-symbols): New.
1948 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1950 * etc/README, etc/bench.pl: New.
1952 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1954 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1956 Reported by Mickael Labau.
1957 * tests/input.at (Torturing the Scanner): Test it.
1959 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1961 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1962 Problem reported by Bob Rossi.
1964 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1966 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1967 and didn't really work.
1968 For the index, use @ifnotinfo, not @iftex.
1969 Minor cleanups of spacing and terminology.
1971 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1973 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1974 of AT_NAME_PREFIX when %name-prefix is not used.
1976 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1978 Apply --prefix to C++ skeletons too: they change the namespace.
1979 The test suite already exercize these cases.
1980 * data/c++.m4 (b4_namespace): New.
1981 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1982 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1983 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1984 * doc/bison.texinfo: Document it.
1985 (Option Cross Key): Use @multitable in all formats. It looks
1986 nicer, even in TeX outputs.
1987 (Rules): Use the same code whatever the output type is.
1988 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1989 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1990 * tests/calc.at: Use it, instead of hard coding `yy'.
1992 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1994 * TODO: Remove dead items.
1996 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1998 * doc/FAQ: Remove, merged into...
1999 * doc/bison.texinfo (FAQ): this.
2000 * doc/Makefile.am (EXTRA_DIST): Adjust.
2002 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2004 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2006 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2007 * doc/bison.texinfo (Calc++ Scanner): Use it.
2009 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2011 Fix two nits reported by twlevo, plus one more that I discovered.
2013 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2014 this is the usual Bison style.
2015 * src/location.h (location_print): Likewise.
2017 * src/reader.h (token_name): Likewise.
2019 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2021 Fix some nits reported by twlevo.
2022 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2023 and "POSIX". Use more-modern syntax for URLs. Mention C++
2024 and ask for Java. Don't hardwire OS version numbers. Add
2026 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2027 * src/conflicts.c (solved_conflicts_obstack): Now static.
2029 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2031 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2032 page. Say "you can use it" not "you may use it" as on the web page;
2033 we're describing capabilities not granting permission.
2035 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2037 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2038 shadowing warnings. Use usual patter for iterating through RHS.
2039 * tests/glr-regression.at
2040 (Uninitialized location when reporting ambiguity):
2041 Modify yylex so that it uses its argument, rather than trying
2042 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2043 const char -> char const.
2045 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2046 Don't use tabs inside commands; it messes up 'ps'.
2047 Problem reported by twlevo.
2049 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2051 * tests/glr-regression.at (Uninitialized location when reporting
2052 ambiguity): New test case.
2053 * data/glr.c (yyresolveLocations): New function, which uses
2055 (yyresolveValue): Invoke yyresolveLocations before reporting an
2057 * doc/bison.texinfo (Default Action for Locations): Note
2058 YYLLOC_DEFAULT's usage for ambiguity locations.
2059 (GLR Semantic Actions): Cross-reference those notes.
2061 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2063 * tests/glr-regression.at (Leaked semantic values when reporting
2064 ambiguity): Remove unnecessary union and type declarations.
2065 (Leaked lookahead after nondeterministic parse syntax error): New test
2067 * data/glr.c (yyparse): Check for zero stacks remaining before
2068 attempting to shift the lookahead so that you don't lose it.
2070 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2072 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2073 * tests/glr-regression.at (Leaked semantic values when reporting
2074 ambiguity): New test case.
2075 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2076 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2077 now unnecessary yystackp parameter.
2078 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2079 destructors can be called.
2081 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2082 in existing testcases.
2084 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2086 Don't leak semantic values for parent RHS when a user action cuts the
2087 parser, and clean up related code a bit.
2088 * tests/glr-regression.at (Leaked merged semantic value if user action
2089 cuts parse): Rename to...
2090 (Leaked semantic values if user action cuts parse): ... this. Add check
2091 for leaked parent RHS values.
2092 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2093 between an unresolved state (non-empty chain of semantic options) and
2094 an incomplete one (signaled by an empty chain).
2095 (yyresolveStates): Document the interface. Move all manipulation of a
2096 successfully or unsuccessfully resolved yyGLRState to...
2097 (yyresolveValue): ... here so that yyresolveValue always leaves a
2098 yyGLRState with consistent data and thus is easier to understand.
2099 Remove the yyvalp and yylocp parameters since they are always just
2100 taken from the yys parameter. When reporting a discarded merged value
2101 in debugging output, note that it is incompletely merged. Document the
2103 (yyresolveAction): If resolving any of the RHS states fails, destroy
2104 them all rather than leaking them. Thus, as long as user actions are
2105 written to clean up the RHS correctly, yyresolveAction always cleans up
2106 the RHS of a semantic option. Document the interface.
2108 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2110 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2111 led to a segmentation fault in GNU Pascal. Problem reported
2114 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2116 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2117 mid-rule action inside a nonterminal symbol in order to declare a
2118 destructor for its semantic value.
2120 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2122 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2123 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2124 __cplusplus && ! defined _STDLIB_H && !
2125 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2126 defined free))]: Include <stdlib.h> rather than rolling our own
2127 declarations of malloc and free, to avoid problems with
2128 incompatible declarations (using 'throw') C++'s stdlib.h. This
2129 should fix Debian bug 340012
2130 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2131 reported by Guillaume Melquiond.
2133 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2135 * NEWS: Clarify symbols versus types in unused-value warnings.
2137 * configure.ac (AC_INIT): Bump version number.
2139 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2141 * NEWS: Version 2.1a.
2142 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2143 since C99 requires this.
2145 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2147 * m4/c-working.m4: New file.
2148 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2150 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2152 * Makefile.maint: Merge from coreutils.
2154 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2156 More portability fixes for problems summarized by Nelson H. F. Beebe.
2158 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2159 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2160 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2161 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2162 messes up because C++ code is compiled in 32-bit mode but linked
2165 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2167 More portability fixes for problems summarized by Nelson H. F. Beebe.
2169 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2170 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2172 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2173 nodist_PROGRAMS, since we don't need to actually compile the
2174 example if we're just doing a plain 'make'. This avoids bothering
2175 the installer unnecessarily about problems due to weird C++
2178 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2180 More portability fixes for problems summarized by Nelson H. F. Beebe.
2182 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2183 than #include "...", and compile with -I'.'. The old method was
2184 not portable, according to Posix and the C standard, and it does
2185 not work with Sun C 5.7, where previous #line directives affect
2186 the working directory used in later #include "..." directives.
2188 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2190 Various DJGGP specific issues in /djgpp
2192 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2194 More portability fixes for problems summarized by Nelson H. F. Beebe.
2196 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2197 '#include <map>' works and that you can apply ++ to iterators.
2199 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2201 Work around portability problems summarized by Nelson H. F. Beebe in
2202 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2204 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2205 that '#include <string>' works.
2207 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2208 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2209 "warning: sorry: semantics of inline function static data `const
2210 unsigned char translate_table[262]' are wrong (you'll wind up with
2213 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2214 or, xor to not_, and_, or_, and xor_, respectively. This works
2215 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2216 random system header somewhere that includes the equivalent of
2219 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2220 -E" works; it apparently doesn't work with PathScale EKO Compiler
2223 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2225 During deterministic GLR operation, user actions should be able to
2226 influence the parse by changing yychar. To make this easier to fix and
2227 to make glr.c easier to evolve in general, don't maintain yytoken in
2228 parallel with yychar; just compute yytoken when needed.
2229 * tests/glr-regression.at (Incorrect lookahead during deterministic
2230 GLR): Check that setting yychar in a user action has the intended
2232 * data/glr.c (yyGLRStack): Remove yytokenp member.
2233 (yyclearin): Don't set *yytokenp.
2234 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2235 yychar rather than *yytokenp to determine the current lookahead.
2236 Compute yytoken locally when needed.
2237 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2240 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2241 after `--report' documentation.
2243 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2245 * src/parse-gram.y (grammar_declaration): Location of printer
2246 symbol is @1, not list->location. Bug reported by twlevo.
2247 * tests/input.at (Incompatible Aliases): Adjust to above change.
2249 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2251 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2252 all the test at once. This makes the output easier to read in the
2255 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2256 got from <http://bro-ids.org/download.html>. The bug is that
2257 when two actions appeared in succession, the second one was
2258 scanned before the first one was added to the grammar rule
2259 as a midrule action. Bison then output the incorrect warning
2260 "parse.y:905.17-906.36: warning: unused value: $3".
2261 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2262 associated with a value.
2263 (rhs): Don't invoke grammar_current_rule_action_append.
2264 (action): Invoke it here instead.
2265 * src/reader.c (grammar_midrule_action): Now extern.
2266 (grammar_current_rule_action_append): Don't invoke
2267 grammar_midrule_action; that is now the scanner's job.
2268 * src/reader.h (last_string, last_braced_code_loc):
2269 (grammar_midrule_action): New decls.
2270 * src/scan-gram.l (last_string): Now extern, sigh.
2271 (last_braced_code_loc): New extern variable.
2272 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2273 rule already has an action.
2274 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2275 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2276 Add some tests to check that the above changes fixed the bug.
2278 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2280 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2281 All used changed. Check whether the symbol has a destructor,
2282 not whether it is typed.
2283 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2284 that the values are still reported as unused. All line numbers
2287 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2289 Work around a bug in bro 0.8, which underparenthesizes its
2290 definition of YYLLOC_DEFAULT.
2291 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2293 * data/lalr1.cc: Likewise.
2294 * data/yacc.cc: Likewise.
2296 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2298 Work around a bug in Pike 7.0, and give the Pike folks a
2299 better way to override the usual int widths.
2300 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2301 user can override the types.
2302 (short): #undef, to work around a bug in Pike 7.0.
2303 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2304 (union yyalloc.yyss): Use yytype_int16 rather than short.
2306 (yysigned_char): Remove.
2307 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2308 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2309 * tests/regression.at (Web2c Actions): Adjust to above changes.
2311 * src/reader.c (check_and_convert_grammar): New function.
2312 (reader): Close the input file even if something went wrong during
2313 parsing. Minor file descriptor leak reported by twlevo.
2315 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2316 to pacify gcc -Wswitch-default.
2317 * src/scan-gram.l (adjust_location): Use a default: break; case
2318 to pacify gcc -Wswitch-default.
2319 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2320 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2321 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2322 Move these decls to scan-skel.l, since they don't need to be
2324 * src/scan-skel.l: Accept the above decls.
2325 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2328 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2330 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2331 since we don't want to insist on a version number at the start
2332 of the changelog every time.
2333 * Makefile.maint: Sync from coreutils a bit better.
2334 (sc_trailing_blank): Renamed from sc_trailing_space.
2336 (sc_no_if_have_config_h, sc_require_config_h):
2337 (sc_prohibit_assert_without_use): New rules.
2338 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2339 (sc_dd_max_sym_length): Fix leading spaces in rule.
2340 (sc_system_h_headers): Prefix with @.
2341 (sc_useless_cpp_parens, m4-check): Output line numbers.
2342 (changelog-check): Allow version only in head.
2343 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2344 satisfy new Makefile.maint rule.
2345 * data/glr.c: Likewise.
2346 * data/glr.cc: Likewise.
2347 * data/lalr1.cc: Likewise.
2348 * data/yacc.c: Likewise.
2349 * lib/ebitsetv.c: Likewise.
2350 * lib/lbitset.c: Likewise.
2351 * lib/subpipe.c: Likewise.
2352 * lib/timevar.c: Likewise.
2353 * src/system.h: Likewise.
2354 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2355 * djgpp/Makefile.maint: Add copyright notice.
2356 * djgpp/README.in: Likewise.
2357 * djgpp/config.bat: Likewise.
2358 * djgpp/config.site: Likewise.
2359 * djgpp/config_h.sed: Likewise.
2360 * djgpp/djunpack.bat: Likewise.
2361 * djgpp/config.sed: Fix copyright notice to match standard format.
2362 * djgpp/subpipe.h: Likewise.
2363 * lib/bitsetv-print.c: Likewise.
2364 * lib/bitsetv.c: Likewise.
2365 * lib/subpipe.h: Likewise.
2366 * lib/timevar.c: Likewise.
2367 * lib/timevar.h: Likewise.
2368 * djgpp/subpipe.c: Use standard recipe for config.h.
2369 * lib/abitset.c: Likewise.
2370 * lib/bitset.c: Likewise.
2371 * lib/bitset_stats.c: Likewise.
2372 * lib/bitsetv-print.c: Likewise.
2373 * lib/bitsetv.c: Likewise.
2374 * lib/ebitsetv.c: Likewise.
2375 * lib/get-errno.c: Likewise.
2376 * lib/lbitset.c: Likewise.
2377 * lib/subpipe.c: Likewise.
2378 * lib/timevar.c: Likewise.
2379 * lib/vbitset.c: Likewise.
2380 * tests/local.at: Likewise.
2381 * src/scan-gram.l: Don't include verify.h, since system.h does
2383 * .x-sc_require_config_h: New file.
2384 * .x-sc_unmarked_diagnostics: New file.
2386 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2388 Be a bit more systematic about using 'abort'.
2389 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2390 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2391 Put 'default: abort ();' before some other case, to satisfy older
2393 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2394 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2395 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2396 * src/conflicts.c (resolve_sr_conflict): Likewise.
2397 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2398 (get_decision_str, get_orientation_str, get_node_alignment_str):
2399 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2400 (get_linestyle_str, get_arrowstyle_str): Likewise.
2401 * src/conflicts.c (resolve_sr_conflict):
2402 Use a default case rather than one for the one remaining enum
2403 value, to catch invalid enum values as well.
2404 * src/lalr.c (set_goto_map, map_goto):
2405 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2406 * src/nullable.c (nullable_compute, token_definitions_output):
2408 * src/reader.c (packgram, reader): Likewise.
2409 * src/state.c (transitions_to, state_new, state_reduction_find):
2411 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2412 (symbol_pack): Likewise.
2413 * src/tables.c (conflict_row, pack_vector): Likewise.
2414 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2415 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2416 * src/system.h: Don't include <assert.h>.
2417 (assert): New macro.
2419 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2420 (Destructor Decl, Parser Function, Pure Calling):
2421 Describe rules for braces inside C code more carefully.
2423 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2425 Fix some porting glitches found by Nelson H. F. Beebe.
2426 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2427 compilers that don't understand that abort () does not return.
2428 * src/state.c (transitions_to): Likewise.
2429 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2430 that '#include <cstdlib>' works.
2431 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2432 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2433 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2434 for the benefit of some pre-C99 compilers.
2436 * bootstrap: Undo changes to gnulib files that autoreconf made.
2438 Minor fixups to get 'make maintainer-check' to work.
2439 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2440 with the new verify.h implementation.
2441 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2442 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2443 * data/yacc.c (YYUSE): Likewise.
2444 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2445 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2446 * src/parse-gram.y (declaration): Don't pass a string constant
2447 to a function that expects char *, since GCC might complain
2448 about the constant value.
2449 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2450 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2451 before #defining them.
2452 * tests/glr-regression.at
2453 (Incorrectly initialized location for empty right-hand side in GLR):
2454 In yyerror, use the msg arg.
2455 (Corrupted semantic options if user action cuts parse):
2456 (Incorrect lookahead during deterministic GLR):
2457 (Incorrect lookahead during nondeterministic GLR):
2458 Don't name a local var 'index'; it shadows string.h's 'index'.
2460 2006-01-19 Akim Demaille <akim@epita.fr>
2462 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2463 location, not just parts of it.
2465 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2467 * NEWS: Document the fact that multiple %unions are now allowed.
2468 * doc/bison.texinfo (Union Decl): Likewise.
2469 * TODO: This feature is now implemented, so remove it from
2472 * Makefile.maint: Merge with coreutils Makefile.maint.
2473 (CVS_LIST): Use build-aux version if available.
2474 (VERSION_REGEXP): New macro.
2475 (syntax-check-rules): Add sc_no_if_have_config_h,
2476 sc_prohibit_assert_without_use, sc_require_config_h,
2477 sc_useless_cpp_parens.
2478 (sc_obsolete_symbols): Check for O_NDELAY.
2479 (sc_dd_max_sym_length): Track coreutils.
2480 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2481 (sc_useless_cpp_parens): New rule.
2482 (news-date-check): Look for version or today's date.
2483 (changelog-check): Don't require version number near head.
2484 (copyright-check): Use current year instead of hardwiring 2005.
2485 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2486 (announcement): Add --gpg-key-ID.
2488 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2491 Avoid undefined behavior that addressed just before the start of an
2492 array. Problem reported by twlevo.
2493 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2494 * src/lalr.c (build_relations): Rely on new sentinel.
2495 * src/gram.c (gram_free): Adjust to new sentinel.
2497 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2499 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2500 yylookaheadNeeds. All uses updated.
2501 (yysplitStack): Rename local yynewLookaheadStatuses to
2502 yynewLookaheadNeeds.
2503 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2504 GLR): In comments, change `lookahead status' to `lookahead need'.
2506 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2508 * data/glr.c (yysplitStack): A little stylistic rewrite.
2510 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2512 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2514 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2516 * doc/bison.texinfo: Fix some typos.
2517 (GLR Semantic Actions): New subsection discussing special
2518 considerations because GLR semantic actions might be deferred.
2519 (Actions): Mention look-ahead usage of yylval.
2520 (Actions and Locations): Mention look-ahead usage of yylloc.
2521 (Special Features for Use in Actions): Add YYEOF entry and mention it
2522 in the yychar entry.
2523 In the yychar entry, remove mention of the local yychar case (pure
2524 parser) since this is irrelevant information when writing semantic
2525 actions and since it's already discussed in `Bison Symbols' where
2526 yychar is otherwise described as an external variable.
2527 In the yychar entry, don't call it the `current' look-ahead since it
2528 isn't when semantic actions are deferred.
2529 In the yychar and yyclearin entries, add note about deferred semantic
2531 Add yylloc and yylval entries discussing look-ahead usage.
2532 (Look-Ahead Tokens): When discussing yychar, don't call it the
2533 `current' look-ahead, and do mention yylval and yylloc.
2534 (Error Recovery): Cross-reference `Action Features' when mentioning
2536 (Bison Symbols): In the yychar entry, don't call it the `current'
2538 In the yylloc and yylval entries, mention look-ahead usage.
2540 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2542 * tests/glr-regression.at: Update copyright year to 2006.
2544 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2546 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2547 use during nondeterministic operation to track which stacks have
2548 actually needed the current lookahead.
2549 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2550 Allocate, deallocate, resize, and otherwise shuffle space for
2551 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2552 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2553 appropriately during nondeterministic operation.
2554 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2555 members to store the current lookahead to be used by the deferred
2557 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2558 from which the RHS is taken. Set the lookahead members of the new
2559 yySemanticOption according to the lookahead status for stack yyk.
2560 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2561 yyaddDeferredAction.
2562 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2563 members of yySemanticOption before invoking yyuserAction, and then set
2564 them back to their current values afterward.
2565 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2566 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2567 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2568 titles for consistency.
2569 (Leaked merged semantic value if user action cuts parse): In order to
2570 suppress lint warnings, use arguments in merge function, and assign
2571 char value < 128 in main.
2572 (Incorrect lookahead during deterministic GLR): New test case.
2573 (Incorrect lookahead during nondeterministic GLR): New test case.
2575 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2577 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2578 !yyvaluep as signal that no semantic value is available to print.
2579 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2580 to print a semantic value.
2582 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2584 * tests/glr-regression.at: For consistency with my newer test cases,
2587 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2589 * data/glr.c (yyresolveValue): When merging semantic options, if at
2590 least one user action succeeds but a later one cuts the parse, then
2591 destroy the semantic value before returning rather than leaking it.
2592 (yyresolveStates): If a user action cuts the parse and thus
2593 yyresolveValue fails, ignore the (unset) semantic value rather than
2594 corrupting the yyGLRState, and empty the semantic options list since
2595 the user actions should have called all necessary destructors.
2596 Simplify code with YYCHK.
2597 * tests/glr-regression.at (Corrupted semantic options if user action
2598 cuts parse): New test case.
2599 (Undesirable destructors if user action cuts parse): New test case.
2600 Before applying any of this patch, this test case never actually failed
2601 for me... but only because the corrupted semantic options usually
2603 (Leaked merged semantic value if user action cuts parse): New test
2606 2006-01-05 Akim Demaille <akim@epita.fr>
2608 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2610 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2612 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2613 _MSC_VER. Problem reported by Cenzato Marco.
2614 (b4_c_function_def): Use it.
2615 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2617 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2618 than rolling our own.
2620 2006-01-04 Akim Demaille <akim@epita.fr>
2622 Also warn about non-used mid-rule values.
2623 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2625 (symbol_list_new): Adjust.
2626 * src/reader.c (symbol_typed_p): New.
2627 (grammar_rule_check): Use it.
2628 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2630 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2632 * tests/actions.at (Exotic Dollars): Adjust.
2634 2006-01-04 Akim Demaille <akim@epita.fr>
2636 * src/reader.c (grammar_midrule_action): If $$ is set in a
2637 mid-rule, move the `used' bit to its lhs.
2638 * tests/input.at (Unused values): New.
2639 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2641 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2643 * doc/bison.texinfo (Bison Options): Say more accurately what
2645 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2646 about declarations in the grammar when in Yacc mode, as POSIX does
2647 not require a diagnostic when the grammar uses extensions.
2649 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2651 Warn about dubious constructions like "%token T T".
2653 * src/symtab.h (struct symbol.declared): New member.
2654 * src/symtab.c (symbol_new): Initialize it to false.
2655 (symbol_class_set): New arg DECLARING, specifying whether
2656 this is a declaration that we want to warn about, if there
2657 is more than one of them. All uses changed.
2659 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2660 Allow multiple %union directives, whose contents concatenate.
2661 * src/parse-gram.y (grammar_declaration): Likewise.
2662 Use muscle_code_grow, so that we don't need stype_line any more.
2665 * src/muscle_tab.c (muscle_grow): Fix comment.
2667 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2668 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2669 Update copyright year to 2006.
2671 2006-01-03 Akim Demaille <akim@epita.fr>
2673 Have glr.cc pass (some of) the calc.at tests.
2674 * data/glr.cc (b4_parse_param_orig): New.
2675 (b4_parse_param): Improve its definition, and bound it more
2676 clearly in the skeleton.
2677 (b4_epilogue): Append, instead of prepending, in order to keep
2679 Simplify the generation of auxiliary functions: locations and
2680 purity are mandated.
2681 (b4_global_tokens_and_yystype): Honor it.
2682 * data/location.cc (c++.m4): Don't include it.
2683 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2685 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2687 Be sure to initialize the first position's filename.
2688 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2690 (AT_CHECK_CALC_GLR_CC): New.
2691 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2693 2006-01-02 Akim Demaille <akim@epita.fr>
2695 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2697 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2698 * data/glr.cc: Do not include stack.hh.
2700 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2702 * data/glr.c: Reformat whitespace with tabs.
2703 (b4_lpure_formals): Remove this unused m4 macro.
2704 * tests/cxx-type.at: Reformat whitespace with tabs.
2705 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2706 since it's a member. Rename type to isNterm for clarity.
2708 2005-12-29 Akim <akim@sulaco.local>
2710 Let glr.cc catch up with symbol_value_print.
2711 * data/glr.cc (b4_yysymprint_generate): Replace by...
2712 (b4_yy_symbol_print_generate): this.
2713 (yy_symbol_print, yy_symbol_value_print): Declare them.
2715 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2717 * src/location.h (boundary): Note that a line or column equal
2718 to INT_MAX indicates an overflow.
2719 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2720 (rule_length_overflow, increment_rule_length, add_column_width):
2722 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2723 (<SC_BRACED_CODE>"}"):
2724 Use increment_rule_length rather than incrementing it by hand.
2725 (adjust_location, handle_syncline): Diagnose overflow.
2726 (handle_action_dollar, handle_action_at):
2727 Fix bug with monstrosities like $-2147483648.
2728 Remove now-unnecessary checks.
2729 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2730 (convert_ucn_to_byte): Verify assumptions.
2731 (handle_syncline): New arg LOC. All callers changed.
2732 Don't store through a value derived from char const * pointer.
2734 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2737 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2739 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2740 Remove unnecessary forward static decls.
2742 2005-12-27 Akim Demaille <akim@epita.fr>
2744 * src/reader.c (grammar_current_rule_check): Also check that $$
2746 Take the rule to check as argument, hence rename as...
2747 (grammar_rule_check): this.
2748 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2750 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2751 (grammar_midrule_action, grammar_symbol_append): Now static.
2752 * tests/torture.at (input): Don't rely on the default action
2753 being always performed.
2754 * tests/calc.at: "Set" $$ even when the action is "cut" with
2756 * tests/actions.at (Exotic Dollars): Instead of using unused
2757 values, check that the warning is issued.
2759 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2761 * NEWS: Improve wording for unused-value warnings.
2763 2005-12-22 Akim Demaille <akim@epita.fr>
2765 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2766 (b4_yysymprint_generate): Rename as...
2767 (b4_yy_symbol_print_generate): this.
2768 Generate yy_symbol_print instead of yysymprint.
2769 Generate also yy_symbol_value_print, and use it.
2771 2005-12-22 Akim Demaille <akim@epita.fr>
2773 * NEWS: Warn about unused values.
2774 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2776 (symbol_list_n_get, symbol_list_n_used_set): New.
2777 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2778 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2779 * src/reader.c (grammar_current_rule_check): Check that values are
2781 * src/symtab.c (symbol_print): Accept 0.
2782 * tests/existing.at: Remove the type information.
2784 Remove useless actions (beware of mid-rule actions: perl -000
2785 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2786 * tests/actions.at (Exotic Dollars): Use unused values.
2787 * tests/calc.at: Likewise.
2788 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2791 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2794 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2796 Undo 2005-12-01 tentative license wording change. The wording is
2797 still being reviewed by the lawyers, and we don't want to wait for
2798 them before publishing a test release. For now, revert to the
2800 * NEWS: Undo 2005-12-01 change.
2801 * data/glr.c: Revert to previous license wording.
2802 * data/glr.cc: Likewise.
2803 * data/lalr1.cc: Likewise.
2804 * data/location.cc: Likewise.
2805 * data/yacc.c: Likewise.
2807 * NEWS: Reword %destructor vs YYABORT etc.
2808 * data/glr.c: Use American spacing, for consistency.
2809 * data/glr.cc: Likewise.
2810 * data/lalr1.cc: Likewise.
2811 * data/yacc.c: Likewise.
2812 * data/yacc.c: Reformat comments slightly.
2813 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2814 for consistency. Fix some spelling errors and reword recently-included
2816 * tests/cxx-type.at: Cast results of malloc, for C++.
2818 2005-12-21 Joel E. Denny <address@hidden>
2820 * tests/cxx-type.at: Construct a tree, count the parents of shared
2821 nodes, and free each node once and only once. Previously, the memory
2822 for semantic values was leaked instead.
2824 2005-12-21 Joel E. Denny <address@hidden>
2826 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2827 (yylval, yylloc): If pure, #define to yystackp->yyval and
2828 yystackp->yyloc similar to yychar and yynerrs.
2829 (yyparse): If pure, remove local yylval and yylloc. Add local
2830 yystackp to accommodate pure definitions of yylval and yylloc.
2831 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2832 yylvalp and yyllocp to &yylval and &yylloc.
2833 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2834 namespace. Previously, nerrs and char were missing, but lval and lloc
2836 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2837 yylvalp and yyllocp parameters since, if pure, these are now always
2838 accessible through yystackp. If not pure, they are still accessible
2840 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2841 `if (YYID (N))' to pacify lint.
2843 2005-12-21 Akim Demaille <akim@epita.fr>
2845 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2846 destroy the RHS symbols of a rule.
2847 * data/yacc.c (yylen): Initialize to 0.
2848 Keep its value to the number of items to possibly shift.
2849 In particular, a regular successful parse that ends on YYFINAL by
2850 a (internal) YYACCEPT must not have yylen != 0.
2851 (yyerrorlab, yyreturn): Pop the RHS.
2852 Reorder a bit to emphasize the `shifting' bits of code.
2853 (YYPOPSTACK): Now accept a number of items to pop.
2854 * data/lalr1.cc: Likewise.
2855 * data/glr.c: Formatting changes.
2856 Use goto instead of fall through.
2857 * doc/bison.texinfo (Destructor Decl): Complete.
2859 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2861 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2862 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2863 * djgpp/config.bat: Replace every occurence of the file name
2864 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2865 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2866 * djgpp/config.sed: Replace every occurence of the file name
2867 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2868 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2869 * djgpp/djunpack.bat: DJGPP specific file.
2870 * djgpp/fnchange.lst: DJGPP specific file.
2871 * djgpp/README.in: Add new information about how to unpack the bison
2872 source on MSDOS and other systems which have 8.3 file name restrictions
2873 using djunpack.bat and fnchange.lst.
2875 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2877 * bootstrap (build_cvs_prefix): Remove; unused.
2878 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2879 when getting gnulib.
2881 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2883 * data/glr.c: Reorder typedef declarations for structs to match order
2884 of struct declarations.
2885 Rename yystack everywhere to yystackp except in yyparse where it's not
2887 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2889 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2890 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2891 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2894 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2896 * tests/sets.at (Accept): Fix typos in regular expression used to
2897 sed out the final state number.
2899 Work around portability problem on Solaris 10: flex-generated
2900 files include <stdio.h> before <config.h>, which messes up
2901 because the latter defines __EXTENSIONS__. Address the problem
2902 by creating two new little files that include <config.h> first,
2903 then include the flex-generated files. Rewrite everyone else
2904 to include <config.h> first, as well.
2905 * lib/timevar.c: Always include "config.h".
2906 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2907 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2908 (EXTRA_bison_SOURCES): New macro.
2909 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2910 * src/system.h: Don't include config.h.
2911 * src/LR0.c: Include <config.h> first.
2912 * src/assoc.c: Likewise.
2913 * src/closure.c: Likewise.
2914 * src/complain.c: Likewise.
2915 * src/conflicts.c: Likewise.
2916 * src/derives.c: Likewise.
2917 * src/files.c: Likewise.
2918 * src/getargs.c: Likewise.
2919 * src/gram.c: Likewise.
2920 * src/lalr.c: Likewise.
2921 * src/location.c: Likewise.
2922 * src/main.c: Likewise.
2923 * src/muscle_tab.c: Likewise.
2924 * src/nullable.c: Likewise.
2925 * src/output.c: Likewise.
2926 * src/parse-gram.y: Likewise.
2927 * src/print.c: Likewise.
2928 * src/print_graph.c: Likewise.
2929 * src/reader.c: Likewise.
2930 * src/reduce.c: Likewise.
2931 * src/relation.c: Likewise.
2932 * src/state.c: Likewise.
2933 * src/symlist.c: Likewise.
2934 * src/symtab.c: Likewise.
2935 * src/tables.c: Likewise.
2936 * src/uniqstr.c: Likewise.
2937 * src/vcg.c: Likewise.
2939 * src/parse-gram.y: Fix minor problems uncovered by lint.
2940 (current_lhs, current_lhs_location): Now static.
2941 (current_assoc): Remove unused variable.
2943 Cleanups so that Bison-generated parsers have less lint.
2944 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2945 Prepend /*ARGSUSED*/, for lint's sake.
2946 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2947 definition if 'lint' is defined.
2948 (YYID): New macro (or function, if lint).
2949 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2950 * data/yacc.c: Likewise.
2951 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2952 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2953 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2955 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2956 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2957 Use YYID(0) rather than 0, for lint.
2958 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2959 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2961 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2963 * tests/glr-regression.at
2964 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2965 Close memory leak reported by twlevo.
2967 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2969 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2971 (yyparse): Iterate another stack in order to call user destructors.
2972 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2974 (Duplicated user destructor for lookahead): This test now is expected
2977 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2979 * NEWS: Document the following change.
2980 * data/yacc.c: Say "parser skeleton" rather than "file", since
2981 it's no longer just a file.
2982 * data/glr.c: Grant a special exception for C GLR parsers, that
2983 reads like the already-existing exception for C LALR(1) parsers.
2984 * data/glr.cc: Likewise.
2985 * data/lalr1.cc: Likewise.
2986 * data/location.cc: Likewise.
2987 * data/yacc.c: Reword the "written by" statement to clarify that
2988 it was the parser skeleton, not the entire output file.
2989 * data/glr.c: Written by Paul Hilfinger.
2990 * data/glr.cc: Written by Akim Demaille.
2991 * data/lalr1.cc: Likewise.
2993 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2995 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2996 Fix typos in previous change that broke 'make check'.
2997 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2999 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3000 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3001 We can revert this once things settle down.
3003 * src/conflicts.c (conflicts_print): Don't print file name twice
3004 when %expect fails because there were no conflicts.
3005 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3007 * tests/conflicts.at (%expect not enough, %expect too much):
3008 (%expect with reduce conflicts): Adjust to new behavior.
3010 2005-11-18 Akim Demaille <akim@epita.fr>
3012 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3014 * NEWS: Document this.
3015 * doc/bison.texinfo (Expect Decl): Likewise.
3017 2005-11-16 Akim Demaille <akim@epita.fr>
3019 Generalize the display of semantic values and locations in traces.
3020 * data/glr.c (yy_reduce_print): Fix indices (again).
3021 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3023 * data/lalr1.cc (yyreduce_print): Rename as...
3024 (yy_reduce_print): this.
3025 Display values and locations.
3026 * data/yacc.c (yy_reduce_print): Likewise.
3027 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3028 (yysymprint): Move higher to be visible from yy_reduce_print).
3030 * tests/calc.at: Adjust the expected length of the traces.
3032 2005-11-14 Akim Demaille <akim@epita.fr>
3034 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3035 from 1 to N, while values and location start at 0.
3036 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3038 2005-11-14 Akim Demaille <akim@epita.fr>
3040 * data/glr.c (yy_reduce_print): Fix the $ number.
3042 2005-11-14 Akim Demaille <akim@epita.fr>
3044 "Use" parse parameters.
3045 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3046 * data/glr.c, data/glr.cc: Use them.
3047 * data/glr.c (YYUSE): Have a C++ definition that supports
3050 2005-11-14 Akim Demaille <akim@epita.fr>
3052 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3054 2005-11-14 Akim Demaille <akim@epita.fr>
3057 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3059 2005-11-12 Akim Demaille <akim@epita.fr>
3061 Let position and location be PODs.
3062 * data/location.cc (position::initialize, location::initialize): New.
3063 (position::position, location::location): Define only if
3064 b4_location_constructors is defined.
3065 * data/lalr1.cc (b4_location_constructors): Define it for backward
3067 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3069 2005-11-12 Akim Demaille <akim@epita.fr>
3071 * data/lalr1.cc: Move the body of the ctor and dtor into the
3072 parser file (instead of the header).
3073 Wrap the implementations in a "namespace yy".
3075 2005-11-12 Akim Demaille <akim@epita.fr>
3077 Have glr.c include its header file when created.
3078 * data/glr.c (b4_shared_declarations): New.
3079 Output them verbatim in the parser if !%defines, otherwise
3080 output then in the header file, and include it instead.
3082 2005-11-11 Akim Demaille <akim@epita.fr>
3084 * data/glr.c: Comment changes.
3086 2005-11-11 Akim Demaille <akim@epita.fr>
3088 When yydebug, report semantic and location values for reductions.
3089 * data/glr.c (yy_reduce_print): Report the semantic values and the
3091 (YY_REDUCE_PRINT): Adjust.
3092 (yyglrReduce): Use them.
3093 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3094 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3095 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3098 2005-11-10 Akim Demaille <akim@epita.fr>
3100 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3101 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3102 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3104 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3106 * m4/cxx.m4, examples/Makefile.am: Don't build
3107 examples/calc++ if no C++ compiler is available. (trivial change)
3109 2005-11-09 Akim Demaille <akim@epita.fr>
3111 * src/scan-skel.l: Use a couple of asserts.
3113 2005-11-03 Akim Demaille <akim@epita.fr>
3115 In some (weird) cases, the final state number is incorrect.
3116 Reported by Alexandre Duret-Lutz.
3117 * src/LR0.c (state_list_append): Remove the computation of
3119 (save_reductions): Do it here.
3120 (get_state): Alpha conversion.
3121 (generate_states): Use a for loop.
3122 * src/gram.h (item_number_is_rule_number)
3123 (item_number_is_symbol_number): New.
3124 * src/state.c: Use assert.
3125 * src/system.h: Include assert.h.
3126 * tests/sets.at (Accept): New.
3128 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3130 * data/glr.c (yyfill): Adjust comment.
3131 (yyresolveAction): Initialize default location properly
3132 for empty right-hand sides.
3133 (yydoAction): Ditto.
3134 Add comment explaining apparently dead code.
3135 * tests/glr-regression.at
3136 (Incorrectly initialized location for empty right-hand side in GLR):
3139 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3141 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3142 gnulib when interrupted. This fixes some race conditions and
3143 works around some portability problems (one noted by Paul
3146 2005-10-22 Akim <akim@epita.fr>
3148 * Makefile.cfg: Adjust to config -> build-aux.
3151 2005-10-21 Akim Demaille <akim@epita.fr>
3153 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3155 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3156 * data/yacc.c (b4_Pure_if): Rename as...
3157 (b4_yacc_pure_if): this.
3158 (YY_SYMBOL_PRINT, yyparse): Adjust.
3159 * doc/bison.texinfo: Formatting changes.
3161 2005-10-21 Akim Demaille <akim@epita.fr>
3163 Finish the transition config -> build-aux.
3164 * configure.ac, Makefile.am: Use build-aux.
3165 * config/prev-version, config/announce-gen, config/Makefile.am:
3167 * build-aux/prev-version, build-aux/announce-gen,
3168 * build-aux/Makefile.am: here.
3170 2005-10-14 Akim Demaille <akim@epita.fr>
3172 * examples/calc++/test: Use set -x only when VERBOSE.
3174 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3176 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3177 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3179 2005-10-13 Akim Demaille <akim@epita.fr>
3181 * src/scan-skel.l: Output the base name parts of the parser and
3183 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3185 Use this to exercise C++ outputs in subdirs.
3186 Reported by Oleg Smolsky.
3188 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3190 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3191 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3192 Problem reported by John P. Hartmann.
3193 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3196 2005-10-12 Akim Demaille <akim@epita.fr>
3198 * src/parse-gram.y (version_check): Exit 63 to please missing
3199 (stands for "version mismatch).
3200 * tests/input.at, doc/bison.texinfo: Adjust.
3202 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3204 Work around portability problems with Visual Age C compiler
3205 (xlc and xlC_r) reported by John P. Hartmann.
3206 * data/location.cc (initial_column, initial_line): Remove.
3207 All uses replaced by 0 and 1.
3208 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3209 that xlc complains about.
3210 * src/scan-skel.l (skel_wrap): Likewise.
3211 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3213 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3214 __STDC_VERSION__. Use it everywhere instead of looking at
3215 __STDC__ and __cplusplus.
3217 2005-10-10 Akim Demaille <akim@epita.fr>
3219 * examples/calc++/test: Be quiet unless VERBOSE.
3221 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3223 * data/c.m4 (yydestruct, yysymprint):
3224 Use YYUSE instead of casting to void.
3225 * data/glr.c (YYUSE): New macro.
3226 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3227 Use it instead of rolling our own.
3228 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3230 Use /*CONSTCOND*/ to suppress lint warnings.
3231 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3232 (YY_STACK_PRINT): Use 'false' not '0'.
3234 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3235 * data/yacc.c (YYUSE): New macro.
3236 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3237 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3238 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3241 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3242 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3244 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3246 Undo the parts of the unlocked-I/O change that substituted
3247 putc or puts for printf. This might hurt performance a bit,
3248 but some people prefer the printf style.
3249 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3250 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3251 All uses replaced by YYFPRINTF and YYDPRINTF.
3252 * data/yacc.c: Likewise.
3253 * lib/bitset.c (bitset_print): Likewise.
3254 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3256 * lib/lbitset.c (debug_lbitset): Likewise.
3257 * src/closure.c (print_firsts, print_fderives): Likewise.
3258 * src/gram.c (grammar_dump): Likewise.
3259 * src/lalr.c (look_ahead_tokens_print): Likewise.
3260 * src/output.c (escaped_output): Likewise.
3261 (user_actions_output): Break apart two printfs.
3262 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3263 * src/reduce.c (reduce_print): Likewise.
3264 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3265 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3267 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3268 Use assignments rather than casts-to-void to suppress
3269 unused-variable warnings. This pacifies 'lint'.
3270 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3271 unused-variable warnings.
3273 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3275 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3277 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3279 Use unlocked I/O for a minor performance improvement on hosts like
3280 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3281 is to use the gnlib unlocked-io module, and to prefer putc and
3282 puts to printf when either will work (since the latter doesn't
3283 come in an unlocked flavor).
3284 * bootstrap (gnulib_modules): Add unlocked-io.
3285 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3286 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3287 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3288 and similarly for puts and putc and printf.
3289 * data/yacc.c: Likewise.
3290 * lib/bitset.c (bitset_print): Likewise.
3291 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3292 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3294 * lib/lbitset.c (debug_lbitset): Likewise.
3295 * src/closure.c (print_firsts, print_fderives): Likewise.
3296 * src/gram.c (grammar_dump): Likewise.
3297 * src/lalr.c (look_ahead_tokens_print): Likewise.
3298 * src/output.c (escaped_output): Likewise.
3299 (user_actions_output): Coalesce two printfs.
3300 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3301 * src/reduce.c (reduce_print): Likewise.
3302 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3303 * src/system.h: Include unlocked-io.h rather than stdio.h.
3305 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3306 this confuses xgettext.
3308 2005-10-02 Akim Demaille <akim@epita.fr>
3310 * bootstrap (gnulib_modules): Add strverscmp.
3311 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3312 * m4/.cvsignore: Add strverscmp.m4.
3313 * src/parse-gram.y (%require): New token, new rule.
3314 (version_check): New.
3315 * src/scan-gram.l (%require): Adjust.
3316 * tests/input.at (AT_REQUIRE): New.
3318 * doc/bison.texinfo (Require Decl): New.
3319 (Calc++ Parser): Use %require.
3321 2005-10-02 Akim Demaille <akim@epita.fr>
3323 * data/location.cc: New.
3325 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3326 Akim Demaille <akim@epita.fr>
3328 Make sure -odir/foo.cc creates dir/location.hh etc.
3329 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3330 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3331 (spec_defines_file): Now const.
3333 (short_base_name): Remove.
3334 * src/files.c: Adjust.
3335 (dirname.h): Include.
3336 (base_name): Don't prototype it.
3337 (finput): Remove, duplicates gram_in.
3338 (full_base_name, short_base_name): Replace by...
3339 (all_but_ext, all_but_tab_ext): these.
3340 (compute_base_names): Rename as...
3341 (compute_file_name_parts): this.
3342 Update to compute the new variables, including dir_prefix.
3343 Adjust dependencies.
3344 * src/output.c (prepare): Output them.
3345 * src/reader.c: Adjust to use gram_in, not finput.
3346 * src/scan-skel.l (@dir_prefix@): New.
3348 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3350 * lib/subpipe.c: New function end_of_output_subpipe() added
3351 to allow support for non-posix systems. This is a no-op function
3354 * lib/subpipe.h: New function end_of_output_subpipe() added
3355 to allow support for non-posix systems. This is a no-op function
3358 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3359 handle the lack of pipe/fork functionality on non-posix systems.
3361 * djgpp/Makefile.maint: DJGPP specific file.
3363 * djgpp/README.in: DJGPP specific file.
3365 * djgpp/config.bat: DJGPP specific configuration file.
3367 * djgpp/config.sed: DJGPP specific configuration file.
3369 * djgpp/config.site: DJGPP specific configuration file.
3371 * djgpp/config_h.sed: DJGPP specific configuration file.
3373 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3375 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3377 2005-10-02 Akim Demaille <akim@epita.fr>
3379 * data/location.cc: New, extract from...
3380 * data/lalr1.cc: here.
3381 (location.hh): Include it after the user prologue, in case the
3382 filename type is defined by the user.
3383 Forward declation location and position before the pre-prologue.
3384 (yyresult_): Rename as...
3385 (yyresult): this, it's a local variable, not an attribute.
3386 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3388 2005-10-01 Akim Demaille <akim@epita.fr>
3390 * examples/extexi: Restore the #line generation.
3392 2005-09-30 Akim Demaille <akim@epita.fr>,
3393 Alexandre Duret-Lutz <adl@gnu.org>
3395 Move the token type and YYSTYPE in the parser class.
3396 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3397 (parser::token): New, from the moved free definition of tokens.
3398 (parser::semantic_value): Now a full definition instead of an
3399 indirection to YYSTYPE.
3400 (b4_post_prologue): No longer included in the header file, but
3401 in the implementation file.
3402 * doc/bison.texi (C+ Language Interface): Update.
3403 * src/parse-gram.y: Support unary %define.
3404 * tests/actions.at: Define global_tokens_and_yystype for backward
3405 compatibility until we update the tests.
3406 * tests/calc.at: Idem.
3407 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3408 to simplify the code.
3410 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3412 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3413 Ah, the good old days! Problem reported by Peter Klein.
3414 * bootstrap (gnulib_modules): Add strerror, strtoul.
3415 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3416 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3418 2005-09-29 Akim Demaille <akim@epita.fr>
3420 * data/c.m4 (b4_error_verbose_if): New.
3421 * data/lalr1.cc: Use it.
3422 (YYERROR_VERBOSE_IF): Remove.
3423 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3424 parser members, replaced by...
3425 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3427 (yysyntax_error_): Takes the state number as argument.
3428 (yyreduce_print_): Use the argument yyrule, not the former
3431 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3433 * bootstrap (gnulib_modules): Add verify.
3434 * lib/.cvsignore: Add verify.h.
3435 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3436 * src/system.h (verify): Remove.
3437 Include verify.h instead.
3438 * src/tables.c (tables_generate): Use new API for 'verify'.
3440 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3442 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3443 local variables whose names begin with 'yy'.
3444 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3445 Trivial changes from Joel E. Denny.
3447 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3449 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3450 don't use alloca any more.
3452 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3453 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3454 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3455 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3456 to match yacc.c, to test more hosts.
3458 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3460 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3461 doesn't affect behavior.
3462 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3464 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3465 This works a bit better with glibc, if user code has already included
3467 * doc/bison.texinfo (Bison Parser): Document that users can't
3468 arbitrarily use malloc and free for other purposes. Document
3469 that <alloca.h> and <malloc.h> might be included.
3470 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3471 user must declare alloca.
3473 * HACKING (release): Forwarn the Translation Project about
3476 2005-09-20 Akim Demaille <akim@epita.fr>
3478 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3480 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3482 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3483 (YYSTACK_ALLOC_MAXIMUM): Use it.
3484 (yysyntax_error): New function.
3485 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3486 multiple syntax errors are reported, and alloca is being used.
3487 Instead, reallocate buffers twice as big each time, so that
3488 we waste at most half the allocated memory. Start with a small
3489 (128-byte) buffer that will suffice in most cases anyway.
3490 Use yysyntax_error to do most of the work.
3492 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3493 yynerrs is the number of errors reported, not the number of
3496 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3497 Mark it as expected to fail.
3498 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3499 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3500 Don't start user-code symbols with "yy", to avoid name space problems.
3502 2005-09-19 Akim Demaille <akim@epita.fr>
3504 Remove the traits, failed experiment.
3505 It never proved useful, and anyway because of the current
3506 definition, it was not possible to have several specialization of
3507 this traits, making it useless.
3508 * data/lalr1.cc (yy:traits): Remove.
3509 Inline its definitions in the parser class.
3511 2005-09-19 Akim Demaille <akim@epita.fr>
3513 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3514 least Mac OSX with a /usr/local install of gettext.
3516 2005-09-19 Akim Demaille <akim@epita.fr>
3518 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3519 and yytoken for similarity with the other skeletons.
3521 2005-09-19 Akim Demaille <akim@epita.fr>
3523 * NEWS, configure.ac: update version number to 2.1a.
3525 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3527 * NEWS: Version 2.1.
3529 * NEWS: Remove notice of yytname change, since it was never in an
3531 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3533 * src/output.c (prepare): Likewise.
3534 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3535 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3536 is not defined. This is an awful hack, but it's enough for now.
3537 All callers changed.
3538 * tests/glr-regression-at (make_value): Args are const pointers now,
3539 to avoid GCC warning.
3540 (Duplicated user destructor for lookahead): New test. Currently
3541 skipped. It fails on my host but I'm not sure it'll always fail.
3543 2005-09-16 Akim Demaille <akim@epita.fr>
3545 * src/symtab.h (struct symbol): Declare the printer and destructor
3546 as const, to avoid accidental calls to free.
3547 (symbol_destructor_set, symbol_printer_set): Adjust.
3548 * src/symtab.c: Adjust.
3550 2005-09-16 Akim Demaille <akim@epita.fr>
3552 * data/c.m4 (b4_token_enums): New.
3553 (b4_token_defines): Rename as...
3554 (b4_token_enums_defines): this.
3555 (b4_token_defines): New, output only the #defines.
3556 * data/yacc.c, data/glr.c: Adjust.
3557 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3558 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3561 2005-09-16 Akim Demaille <akim@epita.fr>
3563 * data/lalr1.cc (yylex_): Remove, inline its code.
3564 (yyreport_syntax_error_): Remove, replaced by...
3565 (yysyntax_error_): this which returns a string and leaves to the
3566 caller the call to the users' error function.
3567 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3568 Move from members of the parser object...
3569 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3570 to local variables of the parse function.
3572 2005-09-16 Akim Demaille <akim@epita.fr>
3574 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3575 since it's in Bison's name space.
3577 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3579 * data/glr.c (yyresolveValue): Add default case to pacify
3580 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3582 * NEWS: Document when yyparse started to return 2.
3583 * doc/bison.texinfo (Parser Function): Document when yyparse
3586 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3587 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3589 (class position): file_name -> filename (reverting). All uses changed.
3591 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3593 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3594 do anything if $@ exists. This reverts part of the 2005-07-07
3597 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3599 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3600 contains obsolete information and isn't worth distributing as a
3601 separate file anyway.
3602 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3603 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3604 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3605 (yyparse): Abort if user code uses longjmp to throw an unexpected
3608 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3610 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3611 Suggested by twlevo@xs4all.nl.
3613 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3614 This avoids a diagnostic from gcc -Wswitch-enum.
3615 Problem reported by twlevo@xs4all.nl.
3617 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3618 standards. Use "file name" or "file" or "name", depending on
3620 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3621 not to hack/foo.tab.c.
3622 (Calc++ Top Level): 2nd arg of main is not const.
3623 * data/glr.c: b4_filename -> b4_file_name.
3624 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3626 (class position): filename -> file_name. All uses changed.
3627 * data/yacc.c: b4_filename -> b4_file_name.
3628 * lib/bitset.h: filename -> file_name in local vars.
3629 * lib/bitset_stats.c: Likewise.
3630 * src/files.c: Likewise.
3631 * src/scan-skel.l ("@output ".*\n): Likewise.
3632 * src/files.c (file_name_split): Renamed from filename_split.
3633 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3635 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3637 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3638 to accommodate latest gnulib.
3640 * tests/glr-regression.at (Duplicate representation of merged trees):
3641 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3643 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3646 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3648 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3649 All uses changed. Invoke user destructor after an error during a
3650 split parse (trivial change from Joel E. Denny).
3652 * tests/glr-regression.at
3653 (User destructor after an error during a split parse): New test case.
3654 Problem reported by Joel E. Denny in:
3655 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3657 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3659 * README-cvs: Give URLs for recommended tools.
3660 Mention Gzip version problem, and bootstrapping issues.
3661 Remove troubleshooting section, as it's somewhat obsolete.
3663 * bootstrap (no_cache): New var, to accommodate different wget
3664 variants. Use it instead of '-C off'. Problem reported by
3667 * data/glr.c (yydestroyStackItem): New function.
3668 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3669 debugging information. Problem reported by Joel E. Denny.
3671 2005-08-25 Akim Demaille <akim@epita.fr>
3673 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3675 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3677 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3678 Don't invoke destructor on unresolved entries.
3679 * tests/glr-regression.at
3680 (User destructor for unresolved GLR semantic value): New test case.
3681 Problem reported by Joel E. Denny in:
3682 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3684 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3686 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3688 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3689 lib-prefix.m4, po.m4.
3691 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3692 in yydestruct diagnostic, since it might not be an error.
3693 Problem reported by Joel Denny near end of
3694 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3695 * data/lalr1.cc (yyerturn): Likewise.
3696 * data/yacc.c (yyreturn): Likewise.
3697 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3699 * src/files.c: Remove obsolete FIXME comment.
3701 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3702 with the other templates, and to fix bogus run-on messages such
3703 as the one reported at the end of
3704 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3705 All callers changed to avoid the newline.
3706 (yyprocessOneStack): Output two lines rather than one, to accommodate
3707 the above change. This changes the debug output format slightly.
3709 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3710 reported by Joel E. Denny in
3711 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3713 * tests/glr-regression.at (Duplicate representation of merged trees):
3714 New test, from Joel E. Denny in:
3715 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3716 * THANKS: Add Joel E. Denny.
3718 * configure.ac (AC_INIT): Bump to 2.0c.
3720 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3722 * NEWS: Version 2.0b.
3724 * Makefile.am (SUBDIRS): Put examples before tests, so that
3725 "make check" doesn't finish with "All 1 tests passed".
3727 * tests/regression.at (Token definitions): Don't rely on
3728 AT_PARSER_CHECK for data that contains backslashes. It currently
3729 uses 'echo', and 'echo' isn't portable if its argument contains
3730 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3731 that the byte '\0xff' is not printable in the C locale; it is,
3732 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3733 not printable, so use '\0x81' to test.
3735 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3736 version of GCC, since the macro is used with non-GCC compilers.
3738 Fix core dump reported by Pablo De Napoli in
3739 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3740 * tests/regression.at (Invalid inputs with {}): New test.
3741 * src/parse-gram.y (token_name): Translate type before using
3744 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3745 the user's name space. All uses changed to __attribute__
3747 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3748 Add __attribute__ ((__noreturn__)).
3750 * etc/clcommit: Remove. We weren't using it, and it failed
3751 "make maintainer-distcheck".
3752 * Makefile.maint: Merge from coreutils.
3753 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3754 (syntax-check-rules): Change list of rules as described below.
3755 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3756 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3757 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3758 (sc_trailing_space): New rules.
3759 (sc_xalloc_h_in_src): Remove.
3760 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3761 (sc_space_tab, sc_error_exit_success, sc_changelog):
3762 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3763 (makefile-check, po-check, author_mark_check):
3764 (makefile_path_separator_check, copyright-check):
3765 Use grep -n, to make it easier to find violations.
3766 Use CVS_LIST and CVS_LIST_EXCEPT.
3767 (header_regexp, h_re): Remove.
3769 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3770 (my-distcheck): Use more-modern GCC flags.
3771 (signatures, %.asc): Remove.
3772 (rel-files, announcement): Remove signatures.
3773 Restore old updating code, even though we don't use it, so
3774 that we're the same as coreutils.
3775 (alpha, beta, major): Depend on news-date-check.
3776 Make the upload commands.
3778 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3779 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3780 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3781 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3782 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3783 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3784 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3785 * tests/sets.at: Likewise.
3787 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3788 we comment out the Autoconf version number.
3789 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3790 it's error-prone and "make maintainer-distcheck" rejects it.
3792 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3793 Indent calls to "error" to pacify "make maintainer-distcheck",
3794 when the calls are not intended to be translated.
3795 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3797 * src/Makefile.am (DEFS): Use +=, to pacify
3798 "make maintainer-distcheck".
3799 (bison_SOURCES): Add scan-skel.h.
3800 (sc_tight_scope): New rule, from coreutils.
3802 * src/files.c (src_extension, header_extension):
3803 Now static, not extern.
3804 * src/getargs.c (short_options): Likewise.
3805 * src/muscle_tab.c (muscle_table): Likewise.
3806 * src/parse-gram.y (current_class, current_type, current_prec):
3808 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3809 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3810 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3811 void, to avoid warning when NLS is disabled.
3812 * src/output.c: Include scan-skel.h.
3813 (scan_skel): Remove decl, since scan-skel.h does this.
3815 Indent calls to "error" to pacify "make maintainer-distcheck".
3816 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3817 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3818 "make maintainer-distcheck".
3819 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3820 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3821 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3822 (skel_lex_destroy, scan_skel): Move these decls to...
3823 * src/scan-skel.h: New file.
3824 * src/uniqstr.c (uniqstr_assert):
3825 Indent calls to "error" to pacify "make maintainer-distcheck".
3827 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3830 * tests/torture.at: Revamp to avoid misuse of atoi that
3831 "make maintainer-distcheck" complained about.
3833 * examples/extexi (message): Don't print a message more than once,
3834 and omit line-number decoration that makes Emacs compile think
3835 that informative messages are worth worrying about.
3837 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3839 * configure.ac: Update version number.
3841 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3843 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3844 autogenerated by the maintainer.
3845 * examples/calc++/.cvsignore: Add *.yy.
3847 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3848 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3849 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3851 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3853 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3854 from maintainer-distcheck about casting the argument of 'free'.
3856 * NEWS: Mention recent yytname changes.
3857 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3859 * bootstrap: For translations that have not yet been upgraded to
3860 the new runtime-po domain, prime the pump by extracting the
3861 relevant strings from the obsolete translations. This code can be
3862 removed once the bison-runtime domain has been translated by each
3865 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3866 now that token names are already quoted.
3868 Fix problem reported by Anthony Heading.
3869 * data/glr.c (YYTOKEN_TABLE): New macro.
3870 (yytname): Define if YYTOKEN_TABLE.
3871 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3872 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3873 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3874 * src/output.c (prepare_symbols): Output token_table_flag.
3876 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3878 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3879 again if the first call fails.
3881 * data/glr.c (yytnamerr): New function.
3882 (yyreportSyntaxError): Use it to dequote most string literals.
3883 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3884 with other skeletons. All uses changed.
3885 (yytnameerr_): New function.
3886 (yyreport_syntax_error): Use it to dequote most string literals.
3887 * data/yacc.c (yytnamerr): New function.
3888 (yyerrlab): Use it to decode most string literals.
3889 * doc/bison.texinfo (Decl Summary, Calling Convention):
3890 Clarify quoting convention of yytname.
3891 * src/output.c (prepare_symbols): Quote all names. This undoes
3892 the 2005-04-17 change, which is now accomplished (mostly) via
3893 changes in the parsers as described above.
3894 * tests/regression.at (Token definitions, Web2c Actions):
3895 Undo most 2005-04-17 change here, too.
3897 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3899 Fix more problems reported by twlevo@xs4all.nl.
3900 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3901 remove trailing spaces. This loses the exit status of ./types,
3902 and isn't needed since ./types shouldn't be emitting trailing
3904 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3905 as the stack isn't valid in that case.
3907 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3908 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3909 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3910 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3912 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3913 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3914 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3917 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3918 overly-picky compilers that reject 'char *foo = "bar";'.
3920 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3921 to FILE * parameter, not to stderr. This fixes a typo introduced
3922 in the 2005-07-12 change.
3924 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3925 warnings from GCC 4.
3927 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3928 (yyglrShiftDefer, yysplitStack):
3929 Remove unused parameters b4_pure_formals. All uses changed.
3930 (yyglrShift): Remove unused parameters b4_user_formals.
3932 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3934 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3936 Destructor cleanups and regularization among the three skeletons.
3937 * NEWS: Document the behavior changes.
3938 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3939 stack before failing, as the cleanup code will do it for us now.
3940 * data/lalr1.cc (yyerrlab): Likewise.
3941 * data/glr.c (yyparse): Pop everything off the stack before
3942 freeing it, so that destructors get called properly.
3943 * data/lalr1.cc (yyreturn): Likewise.
3944 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3945 This is more consistent.
3946 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3947 why destructors might be called. 1.875 -> 2.1.
3948 (Destructor Decl, Decl Summary, Table of Symbols):
3949 Some English-language cleanups for %destructor.
3950 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3951 Add output line for destructor of start symbol.
3952 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3953 because of that same extra output line.
3955 * NEWS: Document minor wording changes in diagnostics of
3956 Bison-generated parsers.
3957 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3958 Remove unused formals. All uses changed.
3959 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3960 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3961 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3962 Rename yyoverflowab to yyexhaustedlab.
3963 When memory exhaustion occurs during syntax-error reporting,
3964 report it separately rather than in a single diagnostic; this
3966 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3967 (Memory Exhausted): Renamed from Parser Stack Overflow.
3968 Revamp wording slightly to prefer "memory exhaustion".
3969 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3971 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3973 Add i18n support to the GLR skeleton. Partially fix the C++
3974 skeleton; a C++ expert needs to finish this. Remove debugging
3975 msgids; there's little point to having them translated, since they
3976 can be understood only by someone who can read the
3977 (English-language) source code.
3979 Generate runtime-po/bison-runtime.pot automatically, so that we
3980 don't have to worry about garbage getting in that file. We'll
3981 make sure after the next official release that old msgids don't
3983 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3985 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3987 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3988 Fix typos in explanations of the runtime file.
3989 * bootstrap: Change gettext keyword from YYI18N to YY_.
3990 Use standard Makefile.in.in in runtime-po, since we'll arrange
3991 for backward-compatible bison-runtime.po files in a different way.
3992 * data/glr.c (YY_): New macro, from yacc.c.
3993 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3994 Translate messages intended for users.
3995 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3996 the wording in the other skeletons. We don't know that the memory
3998 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3999 Use same method that yacc.c uses.
4000 Don't translate debugging messages.
4001 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4002 it doesn't work (yet), and requires C++ expertise to fix.
4003 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4004 Move defn to a more logical place, to be consistent with other
4006 Don't translate debugging messages.
4007 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4008 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4009 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4010 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4012 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4013 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4015 * tests/glr-regression.at (Badly Collapsed GLR States):
4017 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4018 yylex should return 0 at EOF rather than aborting.
4020 Improve tests for stack overflow in GLR parser.
4021 Problem reported by twlevo@xs4all.nl.
4022 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4024 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4025 can handle the problem.
4026 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4027 (yyparse): New local variable yyresult to record the result.
4028 Use result of setjmp to set it, rather than storing itinto
4030 (yyDone): Remove label.
4031 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4032 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4033 if YYABORT is used).
4034 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4035 yyparse status; put status > 1 into diagnostic.
4036 Check that status==2 works.
4037 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4038 Use exit status 3 for failure to open (which shouldn't happen).
4040 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4042 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4043 1 on syntax error; just let yyparse do its thing.
4044 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4045 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4046 (Exploding the Stack Size with Alloca):
4047 (Exploding the Stack Size with Malloc):
4048 Expect exit status 2, not 1, since the parser is supposed to blow
4049 its stack. Problem reported by twlevo@xs4all.nl.
4051 * data/glr.c (yyparse): Don't assume that the initial calls
4052 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4053 Print a stack-overflow message and fail instead.
4054 Initialize the line-number information before creating the stack,
4055 so that the stack-overflow message can report line zero safely.
4057 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4059 Fix problems reported by twlevo@xs4all.nl.
4060 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4061 (yyuserMerge): Provide a default case if b4_mergers is empty.
4062 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4063 * tests/glr-regression.at
4064 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4065 Add casts to pacify C++ compilers.
4066 * tests/glr-regression.at (Improper merging of GLR delayed action
4067 sets): Declare yylex before using it.
4068 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4069 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4070 test for valgrind; valgrind is independent of g++.
4071 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4072 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4073 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4074 Use a destructor, so that we can expand the stack. Change
4075 YYSTYPE to char * so that we can free it. Cast result of malloc.
4077 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4079 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4080 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4082 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4084 * PACKAGING: New file, suggested by Bruno Haible and taken from
4085 similar wording in gettext's PACKAGING file.
4086 * NEWS: Mention PACKAGING.
4087 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4089 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4091 * NEWS: Document recent i18n improvements.
4092 * bootstrap: Get runtime translations into runtime-po.
4093 Create runtime-po files automatically, if possible.
4094 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4095 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4096 does not infringe on the user's name space.
4097 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4098 * doc/bison.texinfo (Internationalization): Revamp the English
4099 and Texinfo syntax a bit, to try to make it clearer.
4100 (Bison Options, Option Cross Key): Mention --print-localedir.
4101 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4102 YYENABLE_NLS. Quote a bit more.
4103 * runtime-po/.cvsignore: New file.
4104 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4105 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4106 * runtime-po/quot.sed: Likewise.
4107 * runtime-po/boldquot.sed: Likewise.
4108 * runtime-po/en@quot.header: Likewise.
4109 * runtime-po/en@boldquot.header: Likewise.
4110 * runtime-po/insert-header.sin: Likewise.
4111 * runtime-po/remove-potcdate.sin: Likewise.
4112 * runtime-po/Makevars: Likewise.
4113 * runtime-po/LINGUAS: Likewise.
4114 * runtime-po/de.po: Likewise; we will rely on the translation project
4115 to maintain this, so "bootstrap" should get it.
4116 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4118 * src/main.c (main): Bind the bison-runtime domain, too.
4120 2005-07-12 Bruno Haible <bruno@clisp.org>
4122 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4123 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4124 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4125 * runtime-po: New directory.
4126 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4127 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4128 * runtime-po/Rules-quot: New file, copied from po/.
4129 * runtime-po/quot.sed: Likewise.
4130 * runtime-po/boldquot.sed: Likewise.
4131 * runtime-po/en@quot.header: Likewise.
4132 * runtime-po/en@boldquot.header: Likewise.
4133 * runtime-po/insert-header.sin: Likewise.
4134 * runtime-po/remove-potcdate.sin: Likewise.
4135 * runtime-po/Makevars: New file.
4136 * runtime-po/POTFILES.in: New file.
4137 * runtime-po/LINGUAS: New file.
4138 * runtime-po/bison-runtime.pot: New file.
4139 * runtime-po/de.po: New file.
4140 * m4/bison.m4: New file.
4141 * Makefile.am (SUBDIRS): Add runtime-po.
4142 (aclocaldir, aclocal_DATA): New variables.
4143 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4145 * src/getargs.c (usage): Document --print-localedir option.
4146 (PRINT_LOCALEDIR_OPTION): New enum item.
4147 (long_options): Add --print-localedir option.
4148 (getargs): Handle --print-localedir option.
4149 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4150 (Internationalization): New section.
4152 2005-07-12 Akim Demaille <akim@epita.fr>
4154 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4155 for consistency with the rest of the code.
4156 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4159 2005-07-12 Akim Demaille <akim@epita.fr>
4161 * src/parse-gram.y: Use %printer instead of YYPRINT.
4163 2005-07-12 Akim Demaille <akim@epita.fr>
4165 * src/symtab.h, src/symtab.c (symbol_print): New.
4166 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4167 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4169 2005-07-12 Akim Demaille <akim@epita.fr>
4171 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4172 b4_at_dollar and b4_dollar_dollar.
4174 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4176 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4177 and Pennello's paper.
4179 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4181 * data/yacc.c (yyparse): Undo previous patch. Instead,
4182 set yylsp[0] and yyvsp[0] only if the initial action
4183 sets yylloc and yylval, respectively.
4185 * data/yacc.c (yyparse): In the initial action, set
4186 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4187 This avoids the use of undefined variables if the initial
4188 action does not set yylloc and/or yylval.
4190 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4192 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4193 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4194 Remove from CVS. These files are automatically generated.
4195 * examples/extexi: Clarify that this file is now part of Bison,
4196 not GNU M4, and that it works with any POSIX-compatible Awk.
4197 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4198 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4199 so that we also get calc++-parser.yy. Geneate it.
4200 Use $(AWK), not gawk, since any conforming Awk will do.
4201 Put comment before action, since older 'make' can't handle comment
4203 $(BUILT_SOURCES): List all built sources, not just some of them.
4204 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4205 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4206 $($(calc_sources_generated)): Remove unnecessary test for existence
4207 of target. (This had a shell syntax error anyway; a stray "x".)
4208 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4210 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4212 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4213 implied by the other modules.
4215 2005-07-06 Akim Demaille <akim@epita.fr>
4217 Bind examples/calc++ to the package.
4218 * examples/calc++/Makefile: Remove, replaced by...
4219 * examples/calc++/Makefile.am: ... this new file.
4220 * examples/calc++/test: Remove input.
4221 * examples/calc++/compile: Remove.
4222 * examples/Makefile.am: New.
4223 * configure.ac, Makefile.am: Adjust.
4224 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4226 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4228 * data/glr.c (yyFail): Drastically simplify; since the format argument
4229 never had any % directives, we can simply pass it to yyerror.
4230 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4231 be modified later, as that is the usual style in glr.c.
4232 Problems reported by Paul Hilfinger.
4234 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4235 and size overflow errors.
4236 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4237 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4238 (YYSIZEMAX): New macro.
4239 (yystpcpy): New function, taken from yacc.c.
4240 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4241 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4242 so that we don't have to maintain their signatures.
4243 (yyFail): Check for buffer overflow, by using vsnprintf rather
4244 than vsprintf. Allocate a bigger buffer if possible.
4245 Report an error if buffer allocation fails.
4246 (yyStackOverflow): New function.
4247 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4248 the initialization was successful. It might fail if storage was
4250 (yyexpandGLRStack): Add more checks for storage allocation failure.
4251 Use yyStackOverflow to report failures.
4252 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4253 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4254 Don't assume stack number fits in int.
4255 (yysplitStack): Check for storage allocation failure.
4256 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4257 can print diagnostics on storage allocation failure. All callers
4259 (yyresolveValue): Use yybool for boolean.
4260 (yyreportSyntaxError): Check for size-calculation overflow.
4261 This code is taken from yacc.c.
4262 (yyparse): Check for storage allocation errors when allocating
4265 2005-07-05 Akim Demaille <akim@epita.fr>
4267 Extract calc++ from the documentation.
4268 * doc/bison.texinfo (Calc++): Add the extraction marks.
4269 * examples/extexi: New, from the aborted GNU Programming 2E.
4270 Separate the different paragraph of a file with empty lines.
4271 * examples/Makefile: Use it to extract the whole calc++ example.
4273 2005-06-24 Akim Demaille <akim@epita.fr>
4275 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4278 2005-06-22 Akim Demaille <akim@epita.fr>
4280 * doc/bison.texinfo (C++ Language Interface): First stab.
4281 (C++ Parsers): Remove.
4283 2005-06-22 Akim Demaille <akim@epita.fr>
4285 * data/lalr1.cc (yylex_): Honor %lex-param.
4287 2005-06-22 Akim Demaille <akim@epita.fr>
4289 Start a set of simple examples.
4290 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4291 * examples/calc++/calc++-driver.hh,
4292 * examples/calc++/calc++-parser.yy,
4293 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4294 * examples/calc++/compile, examples/calc++/test: New.
4296 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4298 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4299 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4300 which stems from the 2005-05-27 patch.
4302 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4304 * data/glr.c: Modify treatment of unused parameters to permit use
4305 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4307 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4309 Fix infringement on user name space reported by Janos Zoltan Szabo.
4310 * data/yacc.c (yyparse): strlen -> yystrlen.
4312 2005-05-30 Akim Demaille <akim@epita.fr>
4314 * data/lalr1.cc (_): New.
4315 Translate the various messages.
4317 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4319 Fix infringement on user name space reported by Bruno Haible.
4320 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4321 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4322 the user's name space.
4323 (alloca): Include <stdlib.h> to get it, if it's not built in.
4324 (YYMALLOC, YYFREE): Define only if needed.
4325 (malloc, free): Declare, but only if needed, as this infringes on
4326 the user name space.
4328 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4330 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4331 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4333 * lib/ebitset.c (min, max): Undef before defining.
4334 * lib/vbitset.c (min, max): Likewise.
4335 * lib/subpipe.c (create_subpipe): Save local variables in case
4336 vfork clobbers them.
4338 2005-05-24 Bruno Haible <bruno@clisp.org>
4340 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4341 error message syntax used by gcc-4.0.
4343 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4345 * README: Mention m4 1.4.3. Remove obsolete advice about
4346 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4348 * bootstrap: Remove workaround for problem I encountered with
4349 gettext 0.14.1; it seems to be fixed now.
4351 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4353 * NEWS: Version 2.0a.
4355 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4356 the previous change.
4358 Various maintainer cleanups.
4359 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4360 conftest*, for benefit of CVS commands run at the same time as
4361 "configure". Add build-aux, since "bootstrap" now creates it and
4363 * Makefile.cfg (move_if_change): Remove.
4364 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4365 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4366 (po_repo, do-po-update, po-update, wget_files, get-targets):
4367 (config.guess-url_prefix, config.sub-url_prefix):
4368 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4369 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4370 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4372 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4373 this is now the recommended name.
4374 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4375 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4376 ylwrap. These files now go into build-aux.
4377 * config/move-if-change: Remove.
4378 * config/prev-version.txt: Bump from 1.75 to 2.0.
4380 * bootstrap: Add stdio-safer, unistd-safer modules.
4381 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4383 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4384 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4385 * lib/subpipe.c: Include "unistd-safer.h".
4386 (create_subpipe): Make sure all the newly-created
4387 file descriptors are > 2, so that diagnostics don't
4388 get sent down them (which might cause Bison to hang, in theory).
4389 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4390 * src/files.c (xfopen): Use fopen_safer, not fopen.
4392 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4393 yesterday's yacc.c fix.
4395 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4397 * data/glr.c, data/lalr1.cc: Update copyright date.
4399 Fix a destructor bug reported by Wolfgang Spraul in
4400 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4401 * data/yacc.c (yyabortlab): Don't call destructor, and
4402 don't set yychar to EMPTY.
4403 (yyoverflowlab): Don't call destructor.
4404 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4405 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4406 since we no longer output the message "discarding lookahead token
4409 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4411 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4412 fix a small glitch in debugging output.
4413 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4414 after YY_SYMBOL_PRINT where needed.
4416 (struct yyGLRState): Add some comments.
4417 (struct yySemanticOption): Add some comments.
4418 (union yyGLRStackItem): Add comment.
4420 (yymergeOptionSets): Correct this to properly perform the union,
4421 avoiding infinite reported by Michael Rosien.
4424 * tests/glr-regression.at: Add test for GLR merging error reported
4427 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4429 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4430 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4431 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4432 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4433 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4434 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4435 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4436 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4437 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4438 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4439 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4440 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4441 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4442 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4443 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4444 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4445 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4446 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4447 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4448 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4449 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4450 src/output.h, src/parse-gram.c, src/parse-gram.h,
4451 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4452 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4453 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4454 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4455 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4456 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4457 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4458 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4459 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4460 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4461 tests/reduce.at, tests/regression.at, tests/sets.at,
4462 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4463 Update FSF postal mail address.
4465 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4467 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4468 Problem reported by Ralf Menzel.
4470 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4472 * tests/actions.at: Test that stack overflow invokes destructors.
4473 From Marcus Holland-Moritz.
4474 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4476 (yyreturn): to here. That way, destructors are called properly
4477 even if the stack overflows, or the user calls YYACCEPT or
4478 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4479 (yyoverflowlab): Destroy the lookahead.
4481 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4483 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4485 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4487 * NEWS: Bison-generated C parsers no longer quote literal strings
4488 associated with tokens.
4489 * src/output.c (prepare_symbols): Don't escape strings,
4490 since users don't want to see C escapes.
4491 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4493 * tests/input.at (Torturing the Scanner): Likewise.
4494 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4496 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4498 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4499 the data size is known to be too small and we can't increase it.
4500 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4502 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4504 * src/parse-gram.y: Include quotearg.h.
4505 (string_as_id): Quote $1 before using it as a key, since the
4506 lexer no longer quotes it for us.
4507 (string_content): Don't strip quotes, since lexer no longer
4509 * src/scan-gram.l: Include quotearg.h.
4511 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4512 a key, since the rest of the lexer doesn't quote it.
4513 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4514 * tests/regression.at (Token definitions): Check for backslashes
4517 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4518 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4519 (yyparse): Revamp code to generate long syntax error message, to
4520 make it easier to translate, and to avoid problems with arithmetic
4521 overflow. Change "virtual memory" to "memory" in diagnostic, since
4522 we don't know whether the memory is virtual.
4524 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4526 * NEWS: Bison-generated C parsers now use the _ macro to
4528 * data/yacc.c (_) [!defined _]: New macro.
4529 All English strings wrapped inside this macro.
4530 * doc/bison.texinfo (Bison Parser): Document _.
4531 * po/POTFILES.in: Include src/parse-gram.c, since it now
4532 includes translateable strings that parse-gram.y doesn't.
4534 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4536 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4537 reverting the 2004-10-11 change to this function.
4538 (symbol_check_alias_consistency): Don't call symbol_type_set
4539 if the type name is already correct.
4540 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4542 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4544 * tests/regression.at (Token definitions): Don't use a token named
4545 c, as that generates a "#define c ..." that runs afoul of buggy
4546 stdlib.h that uses the identifier c as a member of struct
4547 drand48_data. Problem reported by Horst Wente.
4549 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4551 * bootstrap: Change translation URL from
4552 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4553 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4554 redirection glitches. Problem reported by twlevo@xs4all.nl.
4556 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4558 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4559 after operands; POSIX says this isn't portable for the c99 command.
4561 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4563 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4564 immediately if a data overrun has occurred; this may help us track
4565 down what may be a spurious failure on MacOS.
4567 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4569 Respond to problems reported by twlevo@xs4all.nl.
4571 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4573 * src/vcg.h: Comment fix.
4574 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4575 (G_CMAX): Change to -1 instead of INT_MAX.
4577 * data/yacc.c (yyparse): Omit spaces before #line.
4579 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4581 * src/tables.c (state_number_to_vector_number): Put it inside an
4582 "#if 0", since it's not currently used. Problem reported by
4585 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4587 * src/output.c (escaped_output): Renamed from
4588 escaped_file_name_output, since we now use it for symbol tags as
4589 well. All uses changed.
4590 (symbol_destructors_output, symbol_printers_output):
4591 Escape symbol tags too.
4592 Problem reported by Matyas Forstner in
4593 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4595 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4597 * src/output.c (user_actions_output, token_definitions_output,
4598 symbol_destructors_output, symbol_printers_output): Likewise.
4599 * src/reader.c (prologue_augment): Likewise.
4600 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4602 * src/vcg.c (output_edge): Don't quote linestyle arg.
4603 Problem reported by twlevo@xs4all.nl.
4605 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4607 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4608 example, reported by Derek M Jones. Also, make the example even
4609 more outrageous, to better illustrate how bad the problem is.
4611 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4613 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4614 putsym. Typo reported by Sebastian Piping.
4616 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4618 * doc/bison.texinfo (Language and Grammar): some -> same
4619 (Epilogue): int he -> in the
4620 Typos reported by Sebastian Piping via Justin Pence.
4622 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4624 * tests/glr-regression.at (Improper handling of embedded actions
4625 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4626 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4627 with dollar signs in test names.
4628 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4629 for a similar reason.
4631 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4633 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4634 wants to redefine G_VIEW.
4636 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4638 * src/vcg.c (get_view_str): Remove case for normal_view.
4639 Problem reported by twlevo@xs4all.nl.
4641 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4643 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4644 Problem reported by twlevo@xs4all.nl.
4646 * doc/bison.texinfo: Change @dircategory from "GNU programming
4647 tools" to "Software development". Requested by Richard Stallman
4650 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4652 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4653 Problem reported by twlevo@xs4all.nl.
4655 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4657 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4658 keyword; it's not needed with modern compilers, and it doesn't
4659 affect correctness with older compilers. Suggested by
4662 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4664 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4665 gcc -Wswitch-default.
4666 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4667 * data/yacc.c (yyparse): Likewise.
4669 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4671 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4672 already. Let config.h define any nonstandard values.
4674 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4676 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4677 for the benefit of slower hosts. Problem reported by
4680 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4682 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4683 being defined and not used.
4684 * data/lalr1.cc (yyparse): Likewise.
4685 Use "if (false)" rather than "if (0)".
4687 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4689 * TODO: Mention that we should allow NUL bytes in tokens.
4691 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4693 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4694 Problem reported by Hans Aberg.
4696 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4698 * src/getargs.c (version): Happy new year; update overall
4699 program copyright date from 2004 to 2005.
4701 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4702 Problem reported by Hans Aberg.
4703 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4704 (Output file names.): Add a test for the case when standard output
4707 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4709 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4710 to fix an oversight in the Bison 2.0 manual.
4712 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4714 * NEWS: Version 2.0. Reformat the existing news items since
4715 1.875, so that related items are grouped together.
4716 * configure.ac (AC_INIT): Bump version to 2.0.
4717 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4719 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4720 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4721 otherwise, we're not testing alloca. Unfortunately there's no
4722 simple way to consult HAVE_ALLOCA here.
4724 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4727 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4728 hand. This avoids a warning about comparing int to size_t when
4729 GCC warnings are enabled.
4731 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4733 * NEWS: Bison-generated parsers no longer default to using the
4734 alloca function (when available) to extend the parser stack, due
4735 to widespread problems in unchecked stack-overflow detection.
4736 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4737 responsibility to set it to a positive value. This lets the user
4738 specify a value that is not a preprocessor constant.
4739 * data/yacc.c (YYMAXDEPTH): Likewise.
4740 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4741 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4742 to be a compile-time constant. However, explain the constraints on it.
4743 Also, explain the constraints on YYINITDEPTH.
4744 (Table of Symbols): Explain that alloca is no longer the default.
4745 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4748 * doc/bison.texinfo (Location Default Action): Mention that n must
4749 be zero when k is zero. Suggested by Frank Heckenbach.
4751 2004-12-22 Akim Demaille <akim@epita.fr>
4753 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4754 (parser::state_type, parser::semantic_type, parser::location_type):
4755 Private, not public.
4756 (parser::parse): Return ints, not bool.
4757 Returning a bool introduces a problem: 0 corresponds to false, and
4758 it seems weird to return false on success. Returning true changes
4759 the conventions for yyparse.
4760 Alternatively we could return void and send an exception.
4761 There is no clear consensus (yet?).
4762 (state_stack, semantic_stack, location_stack): Rename as...
4763 (state_stack_type, semantic_stack_type, location_stack_type): these.
4764 Private, not public.
4765 * tests/c++.at: New.
4766 * tests/testsuite.at, tests/Makefile.am: Adjust.
4768 2004-12-21 Akim Demaille <akim@epita.fr>
4770 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4772 2004-12-21 Akim Demaille <akim@epita.fr>
4774 Don't impose std::string for filenames.
4776 * data/lalr1.cc (b4_filename_type): New.
4777 (position::filename): Use it.
4778 (parser.hh): Move the inclusion of stack.hh and location.hh below
4779 the user code, so that needed headers for the filename type can be
4781 Forward declare them before the user code.
4782 * tests/Makefile.am (check-local, installcheck-local): Pass
4783 TESTSUITEFLAGS to the TESTSUITE.
4785 2004-12-20 Akim Demaille <akim@epita.fr>
4787 Use more STL like names: my_class instead of MyClass.
4789 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4790 (SemanticStack, SemanticType, StateStack, StateType)
4791 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4792 (Parser::value): Rename as...
4793 (location_stack, location_type, rhs_number_type, semantic_stack)
4794 (semantic_type, state_stack, state_type, token_number_type, stack)
4795 (slice, traits, parser::yylloc, parser::yylval): these.
4797 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4799 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4801 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4802 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4804 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4806 Remove uses of 'short int' and 'unsigned short int'. This raises
4807 some arbitrary limits. It uses more memory but nowadays that's
4808 not much of an issue.
4810 This change does not affect the generated parsers; that's a different
4811 task, as some users will want to conserve memory there.
4813 Ideally we should use size_t to represent all object counts, and
4814 something like ptrdiff_t to represent signed differences of object
4815 counts; but that will require more code-cleanup than I have the
4816 time to do right now.
4818 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4819 Use size_t, not int or short int, to count objects.
4820 * src/closure.c (nritemset, closure): Likewise.
4821 * src/closure.h (nritemset, closure): Likewise.
4822 * src/nullable.c (nullable_compute): Likewise.
4823 * src/print.c (print_core): Likewise.
4824 * src/print_graph.c (print_core): Likewise.
4825 * src/state.c (state_compare, state_hash): Likewise.
4826 * src/state.h (struct state): Likewise.
4827 * src/tables.c (default_goto, goto_actions): Likewise.
4829 * src/gram.h (rule_number, rule): Use int, not short int.
4830 * src/output.c (prepare_rules): Likewise.
4831 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4832 errs, reductions): Likewise.
4833 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4835 * src/tables.c (vector_number, tally, action_number,
4836 ACTION_NUMBER_MINIMUM): Likewise.
4837 * src/output.c (muscle_insert_short_int_table): Remove.
4839 2004-12-17 Akim Demaille <akim@epita.fr>
4841 * data/lalr1.cc: Extensive Doxygenation.
4842 (error_): Rename as...
4843 (error): this, since it is visible to the user.
4845 (Parser::message): Now an automatic variable from...
4846 (Parser::yyreport_syntax_error_): here.
4847 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4849 * tests/input.at: Escape $.
4851 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4853 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4854 Parenthesize rhs to avoid obscure problems with mistakes like
4855 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4856 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4857 b4_rhs_location): Likewise.
4858 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4859 b4_rhs_location): Likewise.
4861 2004-12-16 Akim Demaille <akim@epita.fr>
4863 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4864 yacc.c: be sure to stay within yycheck_.
4865 * tests/actions.at: Re-enable C++ tests.
4867 2004-12-16 Akim Demaille <akim@epita.fr>
4869 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4872 2004-12-16 Akim Demaille <akim@epita.fr>
4874 Use #define to handle the %name-prefix.
4876 * data/glr.c, data/yacc.c: Comment changes.
4877 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4878 so that one can refer to yylex in the parser file, and have it
4879 renamed, as is the case with other skeletons.
4881 2004-12-16 Akim Demaille <akim@epita.fr>
4883 Move lalr1.cc internals into yy*.
4885 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4886 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4887 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4888 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4889 (empty_, final_, terror_, errcode_, ntokens_)
4890 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4891 (looka_, ilooka_, error_range_, nerrs_):
4893 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4894 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4895 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4896 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4897 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4898 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4899 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4900 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4903 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4905 Fix some problems reported by twlevo at xs4all.
4906 * src/symtab.c (symbol_new): Report an error if the input grammar
4907 contains too many symbols. This is better than calling abort() later.
4908 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4909 (struct node, struct graph):
4910 Rename member expand to stretch. All uses changed.
4911 (struct graph): Remove member layoutalgorithm. All uses removed.
4912 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4913 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4915 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4917 2004-12-15 Akim Demaille <akim@epita.fr>
4919 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4920 Add more Doxygen comments.
4921 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4922 (report_syntax_error_, translate_): Rename as...
4923 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4924 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4926 2004-12-15 Akim Demaille <akim@epita.fr>
4928 * data/lalr1.cc (lex_): Rename as...
4930 Move the trace here.
4931 Take the %name-prefix into account.
4932 Reported by Alexandre Duret-Lutz.
4934 2004-12-15 Akim Demaille <akim@epita.fr>
4936 Simplify the C++ parser constructor.
4938 * data/lalr1.cc (debug_): Rename as...
4939 (yydebug_): so that the parser's internals are always in the yy*
4942 (b4_parse_param_decl): Remove the leading comma as it is now only
4943 called as unique argument list.
4944 (Parser::Parser): Remove the constructor accepting a location and
4945 an initial debugging level.
4946 Remove from the other ctor the argument for the debugging level.
4947 (debug_level_type, debug_level, set_debug_level): New.
4949 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4952 2004-12-15 Akim Demaille <akim@epita.fr>
4954 Remove b4_root related material: failure experiment
4955 (which goal was to allow to derive from a class).
4957 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4958 definitions and uses.
4960 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4962 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4963 not 2, since it's not portable to subtract 1 from the start of an
4964 array. The new item 0 is never set or used. All uses changed.
4966 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4967 the default definition of YYLLOC_DEFAULT. Problem reported
4968 by Frank Heckenbach.
4970 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4972 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4973 the normal case and one for the error case. Just use the
4974 first one uniformly. Problem reported by Frank Heckenbach.
4975 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4976 use exactly the same macro in both places.
4977 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4978 so that the normal-case YYRHSLOC works for the error case too.
4980 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4981 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4982 * doc/bison.texinfo (Location Default Action): Don't claim that
4983 we have an array of locations. Use the same macro for both glr
4984 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4987 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4989 * HACKING: Update email addresses to send announcements to.
4991 * configure.ac (AC_INIT): Bump version to 1.875f.
4993 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4995 * NEWS: Version 1.875e.
4996 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4998 * src/scan-skel.l: Include "complain.h", for "fatal".
5000 * src/relation.h (relation_print, relation_digraph):
5001 Relation sizes are of type relation_node, not size_t (this is
5002 merely a doc fix, since the two types are equivalent).
5003 (relation_transpose): Relation sizes are of type relation_node,
5005 * src/relation.c: Likewise.
5006 (top, infinity): Now of type relation_node, not int.
5007 (traverse, relation_transpose): Use relation_node, not int.
5009 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5010 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5011 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5014 specifying whether the test should be skipped. Use it tp
5015 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5016 fail on some hosts, and should be skipped.
5018 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5020 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5021 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5022 unless otherwise specified below.
5024 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5025 to allocate kernel_base, kernel_items, kernel_size, since
5026 they needn't be initialized to 0.
5027 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5028 * src/closure.c (new_closure): Likewise, for itemset.
5029 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5030 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5031 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5032 (build_relations): Likewise for edge, states1, includes.
5033 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5034 * src/reader.c (packgram): Likewise, for ritem, rules.
5035 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5036 * src/relation.c (relation_digraph): Likewise for VERTICES.
5037 (relation_transpose): Likewise for new_R, end_R.
5038 * src/symtab.c (symbols_token_translations_init): Likewise for
5040 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5041 (token_actions): Likewise for yydefact, actrow, conflrow,
5043 (save_column): Likewise for froms[symno], tos[symno].
5044 (goto_actions): Likewise for state_count.
5045 (pack_table): Likewise for base, pos, check.
5046 (tables_generate): Likewise for width.
5048 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5049 for initial core. Just have a separate core, so we needn't worry
5050 about whether kernel_size and kernel_base are initialized.
5052 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5053 kernel_size, kernel_items): Remove unnecessary initialization.
5054 * src/conflicts.c (conflicts): Likewise.
5055 * src/derives.c (derives): Likewise.
5056 * src/muscle_tablc (muscle_insert): Likewise.
5057 * src/relation.c (relation_digraph): Likewise.
5058 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5059 conflrow, conflict_table, conflict_list, table, check):
5062 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5063 This is because all callers pass unsigned int.
5064 * src/closure.h (new_closure): Likewise.
5066 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5067 (build_relations): Initialize includes[i] in all cases.
5068 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5069 and rules[ruleno].precsym. Initialize members in order.
5070 * src/relation.c (relation_transpose): Always initialize new_R[i]
5072 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5074 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5075 conflict_list[0] was always 0, but now it isn't initialized.
5077 * src/table.c (table_grow): When conflict_table grew, the grown
5078 area wasn't cleared. Fix this.
5080 * lib/.cvsignore: Add strdup.c, strdup.h.
5081 * m4/.cvsignore: Add strdup.m4.
5083 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5085 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5086 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5087 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5088 ngotos + 1 without checking for overflow.
5089 (build_relations): Use END_NODE, not -1, to denote end of edges.
5090 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5091 build_relations): Use goto_number, not int, for goto numbers.
5092 * src/tables.c (save_column, default_goto): Likewise.
5094 2004-11-23 Akim Demaille <akim@epita.fr>
5096 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5097 of #defining from yystype.
5098 Don't typedef yystype, C++ does not need it.
5099 This lets it possible to forward declare it as union.
5101 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5103 * bootstrap (gnulib_modules): Add extensions.
5104 Problem reported by Jim Meyering.
5106 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5108 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5109 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5110 src/system.h, src/tables.c: XFREE -> free, to accommodate
5111 recent change to gnulib xalloc.h.
5112 Problem reported by Jim Meyering.
5114 2004-11-17 Akim Demaille <akim@epita.fr>
5116 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5118 2004-11-17 Akim Demaille <akim@epita.fr>,
5119 Alexandre Duret-Lutz <adl@gnu.org>
5121 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5124 Use it instead of cdebug_.
5125 (Parser::debug_stream, Parser::set_debug_stream): New.
5126 (Parser::symprint_): Define cdebug_ for temporary backward
5128 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5131 2004-11-17 Akim Demaille <akim@epita.fr>
5133 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5134 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5135 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5136 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5138 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5140 * data/glr.c (yyloc_default): Remove; not used.
5141 Problem reported by Frank Heckenbach.
5143 2004-10-25 Akim Demaille <akim@epita.fr>
5145 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5146 Introduce another definition to address simple location arrays.
5147 (yyGLRStack): New member: yyerror_range.
5148 (yyrecoverSyntaxError, yyparse): Update it.
5149 (yyrecoverSyntaxError): Use it when shifting the error token to
5150 have an accurate range, equivalent to the one computed by both
5151 yacc.c and lalr1.cc.
5152 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5153 that column numbers start at column 0, as per GNU Coding
5154 Standards, the others tests, and the doc.
5155 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5156 Adjust to the above change (first column is 0).
5157 And adjust the location of the "<error>", now covering the whole
5160 2004-10-22 Akim Demaille <akim@epita.fr>
5161 and Paul Eggert <eggert@cs.ucla.edu>
5163 Remove some arbitrary limits on goto numbers and relations.
5164 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5165 initial values, since they're never used.
5166 (set_goto_map): ngotos is now unsigned, so test for overflow
5167 by seeing whether it wraps around to zero.
5168 * src/lalr.h (goto_number): Now size_t, not short int.
5169 (GOTO_NUMBER_MAXIMUM): Remove.
5170 * src/relation.c (relation_print, traverse, relation_transpose):
5171 Check for END_NODE rather than looking at sign.
5172 * src/relation.h (END_NODE): New macro.
5173 (relation_node): Now size_t, not short int.
5175 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5177 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5178 keyword, not an identifier. Problem reported by Baron Schwartz in
5179 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5181 2004-10-11 Akim Demaille <akim@epita.fr>
5183 * src/symtab.c (symbol_check_alias_consistency): Also check
5184 type names, destructors, and printers.
5185 Reported by Alexandre Duret-Lutz.
5186 Recode the handling of associativity and precedence in terms
5187 of symbol_precedence_set.
5188 Accept no redeclaration at all, not even equal to the previous
5190 (redeclaration): New.
5191 Use it to factor redeclaration complaints.
5192 (symbol_make_alias): Don't set the type of the alias, let
5193 symbol_check_alias_consistency do it as for other features.
5194 * src/symtab.h (symbol): Add new member prec_location, and
5196 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5197 * tests/input.at (Incompatible Aliases): New.
5199 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5201 .cvsignore fixes to accommodate gnulib changes,
5202 and the practice of naming build directories "_build".
5203 * .cvsignore: Add "_*". Sort.
5204 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5205 * m4/.cvsignore: Add "*_gl.m4".
5207 2004-10-06 Akim Demaille <akim@epita.fr>
5209 * src/parse-gram.y (add_param): Fix the truncation of trailing
5212 2004-10-05 Akim Demaille <akim@epita.fr>
5214 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5215 whether the reducion was empty or not. This leaves room to
5216 improve the use of YYLLOC_DEFAULT in such a case.
5217 lalr1.cc is still experimental, so changing this is acceptable.
5218 And finally, there are probably not many users who changed the
5219 handling of locations in GLR, so changing is admissible too.
5221 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5222 empty reduction, set @$ to an empty location ending the previously
5224 Adjust uses to make sure the code is triggered on empty
5226 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5227 expected output: empty reductions have empty locations.
5229 2004-09-29 Akim Demaille <akim@epita.fr>
5231 * data/lalr1.cc: Move towards a more standard C++ coding style
5232 for templates: Class < T > -> Class<T>.
5234 2004-09-29 Akim Demaille <akim@epita.fr>
5236 * data/lalr1.cc: Reinstall the former ctor, for sake of
5237 compatibility, but warn it will be removed.
5238 Move towards a more standard C++ coding style (i.e., type *var ->
5241 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5243 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5244 since it's less likely to work if NULs are involved in the future.
5246 2004-09-27 Akim Demaille <akim@epita.fr>
5248 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5250 2004-09-27 Akim Demaille <akim@epita.fr>
5252 * data/lalr1.cc (b4_parse_param_decl_1): New.
5253 (b4_parse_param_decl): Use it to have different names between attribute
5255 (b4_cc_constructor_call): Likewise.
5257 2004-09-24 Akim Demaille <akim@epita.fr>
5259 * src/parse-gram.y (add_param): Strip the leading and trailing
5260 blanks from a formal argument declaration.
5261 (YY_LOCATION_PRINT): New.
5263 2004-09-24 Akim Demaille <akim@epita.fr>
5265 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5268 2004-09-24 Akim Demaille <akim@epita.fr>
5270 * doc/bison.texinfo (Table of Symbols): Sort.
5272 2004-09-21 Akim Demaille <akim@epita.fr>
5274 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5275 the useless parentheses.
5276 Suggested by Paul Eggert.
5278 2004-09-20 Akim Demaille <akim@epita.fr>
5280 Let the initial-action act on the look-ahead, and use it for the
5281 "initial push" (corresponding to an hypothetical beginning-of-file).
5282 And let lalr1.cc honor %initial-action.
5284 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5286 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5287 (Parser::Parser): Remove the ctor that used to initialize it.
5288 (Parser::parse): Like in the other skeletons, issue the "starting
5289 parse" message before any action.
5290 Honor %initial-action.
5291 Initialize the stacks with the lookahead.
5292 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5294 Push them in the stacks.
5295 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5297 2004-09-20 Akim Demaille <akim@epita.fr>
5299 * doc/bison.texinfo (Initial Action Decl): New.
5301 2004-09-20 Akim Demaille <akim@epita.fr>
5303 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5304 clearer criterion to define it.
5305 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5306 When reducing on an empty RHS, use the latest stacked location as
5308 yylloc is not always available.
5309 * data/glr.c: Likewise.
5310 Also, honor initial-actions.
5312 2004-09-20 Akim Demaille <akim@epita.fr>
5314 * data/yacc.c (YY_LOCATION_PRINT): New.
5315 Define when we know YYLTYPE's structure, i.e., when the default
5316 YYLLOC_DEFAULT is used.
5317 * data/c.m4 (b4_yysymprint_generate): Use it.
5318 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5319 value of the result.
5320 (error_start_): Replace with...
5321 (error_range_): this location array.
5322 This allows to replace code relying on the implementation of
5323 locations by portable code.
5324 * data/yacc.c (yylerrsp): Replace with...
5325 (yyerror_range): this.
5326 Every time a token is popped, update yyerror_range[0], to have an
5327 accurate location for the error token.
5328 * data/glr.c (YY_LOCATION_PRINT): New.
5329 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5330 deference a pointer.
5331 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5332 report the location in %printers.
5334 * src/scan-skel.l: Instead of abort, report error messages to ease
5335 understanding skeleton scanning failures.
5337 2004-09-16 Akim Demaille <akim@epita.fr>
5339 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5340 (iterator, const_iterator): these, to be more in the C++ spirit.
5341 Also, return reverse iterators so that when displaying the stack
5342 we display its bottom first.
5343 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5345 We should probably use vector here though.
5347 2004-09-16 Akim Demaille <akim@epita.fr>
5349 Have more complete shift traces.
5351 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5352 to report Shifts instead of ad hoc YYDPRINTF invocations,
5353 including for the error token.
5354 * data/lalr1.cc (symprint_): Output the location.
5355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5356 output the location within the %printer.
5357 Activate GLR tests, at least to make sure they compile properly.
5358 They still don't pass though.
5359 * tests/calc.at: Adjust expect verbose output, since now "Entering
5360 state..." is on a different line than the "Shifting" message.
5362 2004-09-08 Akim Demaille <akim@epita.fr>
5364 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5365 Bison directive from the Bison file to the invocation of this
5366 macro, so that these directives are passed to
5367 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5368 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5369 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5370 the extra Bison directives instead of the whole series.
5371 Change the grammar so that there are recoverable errors, and
5372 unrecoverable errors. Now we can have the parser give up before
5373 consuming the whole input. As a result we now can observe that
5374 the lookahead is freed when needed.
5375 Change the parser source to parse argv[1] instead of a hard coded
5377 Simplify yylex, and give a value and location to EOF.
5378 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5379 passed directives already coded in the file.
5380 Add some tests to check the location of "error".
5381 For some tests, the C++ parser is correct, and not yacc.c.
5382 For other tests, they provide different, but unsatisfying, values,
5383 so keep the C++ value so that at least one parser is "correct"
5384 according to the test suite.
5385 (Actions after errors): Remove, this is subsumed by the
5386 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5388 2004-09-06 Akim Demaille <akim@epita.fr>
5390 * data/lalr1.cc: Adjust the indentation of the labels.
5394 2004-09-06 Akim Demaille <akim@epita.fr>
5396 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5397 argument, an informative message.
5398 Call YY_SYMBOL_PRINT.
5399 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5400 * data/lalr1.cc (destruct_): Likewise.
5401 In addition, no longer depend on b4_yysymprint_generate and
5402 b4_yydestruct_generate to generate these functions, do it "by
5405 2004-09-03 Akim Demaille <akim@epita.fr>
5407 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5408 invoked, yydestruct the lookahead.
5409 * tests/calc.at (Calculator $1): Update the expected lengths of
5410 traces: there is an added line for the discarded lookahead.
5411 * doc/bison.texinfo (Destructor Decl): Some rewording.
5412 Define "discarded" symbols.
5414 2004-09-02 Akim Demaille <akim@epita.fr>
5416 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5418 2004-09-02 Akim Demaille <akim@epita.fr>
5420 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5421 (YYDSYMPRINTF): Rename as...
5422 (YY_SYMBOL_PRINT): this.
5423 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5425 Use it instead of direct symprint_ calls.
5426 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5429 2004-09-02 Akim Demaille <akim@epita.fr>
5431 * data/lalr1.cc (b4_yysymprint_generate): New.
5432 (symprint_): New member function, defined when YYDEBUG.
5433 Use it consistently instead of token/nterm debugging output by
5435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5436 %printer calls to use cdebug_ when using lalr1.cc.
5438 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5440 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5441 with #ifdef YYDEBUG.
5443 2004-08-26 Akim Demaille <akim@epita.fr>
5445 * doc/bison.texinfo (Implementing Loops): Rename as...
5446 (Implementing Gotos/Loops): this.
5448 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5450 Adjust to latest gnulib.
5451 * bootstrap (gnulib_modules): Add xalloc-die.
5452 Set LC_ALL=C so that file names sort consistently.
5453 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5454 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5455 uintmax_t.m4, ulonglong.m4.
5456 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5457 po.m4 since we are now using _gl.m4 instead.
5459 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5461 * src/scan-action.l: Remove. Scanning of semantic actions is
5462 handled in scan-gram.l.
5464 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5466 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5468 * src/location.h (struct): The file member is a uniqstr.
5469 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5471 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5473 Fix bug with non-%union parsers that have printers or destructors,
5474 which led to a Bison core dump. Reported by Peter Fales in
5475 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5477 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5478 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5479 not to our own type.
5480 * src/output.c (symbol_destructors_output, symbol_printers_output):
5481 Don't assume %union.
5482 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5483 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5484 UNION-FLAG. All callers changed.
5485 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5486 Use type char, not unsigned int, when declaring an array of char;
5487 this lets us remove a cast.
5488 (Printers and Destructors): Add non-%union test cases.
5490 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5492 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5493 GLR writeups. E.g., avoid frenchspacing and the future tense,
5494 change "lookahead" to "look-ahead", and change "wrt" to "with
5497 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5499 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5500 New sections, split off from the GLR Parsers section. Put the new
5501 Simple GLR Parser near the start of the GLR section, for clarity.
5502 Rewrite connective text.
5504 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5506 * doc/bison.texinfo (Simple GLR Parsers): New section.
5508 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5510 * NEWS, TODO, doc/bison.texinfo:
5511 Use "look-ahead" instead of "lookahead", to be consistent.
5512 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5513 while we're fixing "look-ahead".
5514 * src/conflicts.c (shift_set): Renamed from shiftset.
5515 (look_ahead_set): Renamed from lookaheadset.
5516 * src/print.c: Likewise.
5517 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5518 name for "lookahead".
5519 (report_types, usage): Likewise.
5520 * src/getargs.h (report_look_ahead_tokens): Renamed from
5522 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5524 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5525 (look_ahead_tokens_print): Renamed from lookaheads_print.
5526 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5527 state_rule_lookaheads_print.
5528 * src/state.h: Likewise.
5529 (reductions.look_ahead_tokens): Renamed from lookaheads.
5530 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5531 AT_DATA_LOOKAHEADS_GRAMMAR.
5533 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5535 * README: Update location of patched M4 distribution.
5537 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5539 Don't assume the C++ compiler takes the same arguments as the C compiler
5541 * configure.ac (O0CXXFLAGS): New var.
5542 * tests/atlocal.in (CXXFLAGS): Use it.
5544 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5546 Fix some "make check" problems with C++ reported by
5547 Albert Chin-A-Young for Tru64 C++ in this thread:
5548 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5550 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5551 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5552 Output to a .cc file for C++, not to a .c file.
5553 * tests/calc.at (AT_CHECK_CALC): Likewise.
5554 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5555 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5557 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5559 * tests/calc.at, tests/actions.at: Workaround for SGI
5560 C++ compiler. (trivial change)
5562 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5564 Spent a few hours checking out which prerequisite versions the
5565 current sources actually require. I went all the way back to
5566 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5567 a seemingly endless set of combinations of versions more recent
5568 than that. The bottom line is that the current sources require
5569 fairly recent versions of the build tools, and it'll be some work
5571 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5572 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5573 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5574 Add comments explaining why those particular versions are
5577 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5578 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5579 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5581 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5582 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5584 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5586 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5587 0.11.5. Suggested by Bruno Haible.
5588 * bootstrap: Remove gettext version checking.
5590 * doc/bison.texinfo (Decl Summary): Also mention that %union
5591 can depend on prerequisite types. Problem reported by Tim
5594 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5596 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5597 * README-alpha: Don't tell people not to package this.
5599 * bootstrap: Don't assume $(...) works; use `...` instead.
5600 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5603 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5604 put into the -d output file, and mention what to do if YYSTYPE is
5607 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5609 Undo change made earlier today: it caused autopoint to not bring
5610 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5613 * bootstrap: Check that gettext version matches what's in
5614 configure.ac. Warn users to ignore robots.txt ERROR 404.
5615 * bootstrap: Undo today's earlier change (logged below).
5616 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5618 The gettext version checking is causing more trouble than it's
5619 curing; remove it. Problem reported by Paul Hilfinger.
5621 * bootstrap: Issue a warning that one can expect a message
5622 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5623 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5625 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5627 Ensure that the C++ compiler used for testing actually works on a
5628 simple test program; if not, skip the C++-related tests. Problem
5629 reported by Vin Shelton in:
5630 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5632 * m4/cxx.m4: New file.
5633 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5634 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5635 * tests/local.at (AT_COMPILE_CXX): Use it.
5637 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5639 * data/glr.c (yylloc): Output this macro even if locations are not
5640 being generated, as the GLR parser needs it even in that case.
5641 Problem reported by Troy A. Johnson
5642 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5644 * configure.ac (AC_INIT): Update to 1.875e.
5646 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5648 * NEWS: Version 1.875d.
5649 * configure.ac (AC_INIT): Likewise.
5650 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5652 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5653 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5654 lalr1.cc runs afoul of the first, and the last two are no longer
5655 supported by GCC 3.4.0.
5656 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5657 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5659 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5661 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5662 unsigned int, for compatibility with latest gnulib hash module.
5663 * src/state.c (state_hash, state_hasher): Likewise.
5664 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5665 * src/uniqstr.c (hash_uniqstr): Likewise.
5667 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5669 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5671 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5672 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5673 character and string literals.
5674 (unexpected_end): New function.
5675 (unexpected_eof): Use it.
5676 (unexpected_newline): New function.
5677 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5680 * NEWS: Document %expect-rr.
5682 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5683 Fix typo by replacing $1 with $option.
5684 Remove more 'intl'-related files.
5685 Don't DEFUN AM_INTL_SUBDIR twice.
5687 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5688 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5690 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5691 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5692 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5693 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5694 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5695 * src/.cvsignore: Add *.output.
5697 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5698 gets copied to the output file.
5700 2004-04-28 Paul Eggert <eggert@twinsun.com>
5702 Get files from the gnulib and po repositories, instead of relying
5703 on them being in our CVS. Upgrade to latest versions of gnulib
5706 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5707 * bootstrap: Bootstrap from gnulib and po repositories.
5708 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5709 * README-cvs: Document these changes. Remove version numbers from
5710 mentions of build tools, since they change so often. Mention Flex.
5712 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5713 (gl_USE_SYSTEM_EXTENSIONS): Add.
5714 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5715 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5717 (AC_ISC_POSIX): Remove; we no longer support this
5718 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5719 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5720 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5721 Do not check for C89 headers, except for locale.h which is used
5722 by the Yacc library and must port to K&R hosts.
5723 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5724 Do not check for C89 functions, except for setlocale which is
5725 used by the Yacc library.
5726 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5727 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5728 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5729 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5730 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5731 AM_GNU_GETTEXT): Remove; now done by:
5732 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5733 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5736 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5737 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5738 Define to empty, as gnulib.mk will do the rest for us.
5739 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5741 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5742 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5744 * src/files.c: Include gnulib's xstrndup.h.
5746 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5747 (REALLOC): Use xnrealloc, for likewise.
5748 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5749 (strnlen, memrchr): Remove decls; functions no longer used.
5752 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5753 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5754 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5755 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5756 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5757 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5758 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5759 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5760 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5761 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5762 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5763 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5764 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5765 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5766 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5767 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5768 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5769 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5770 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5771 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5772 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5773 Remove, as these files are now generated automatically
5774 by bootstrap or automake.
5776 * po/ChangeLog: Remove: all but one entry was a duplicate
5777 of this file, and I moved that 2000-11-02 entry here.
5779 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5780 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5781 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5782 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5783 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5784 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5785 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5786 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5787 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5788 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5789 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5791 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5792 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5793 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5794 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5795 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5796 * src/.cvsignore: Remove *_.c.
5799 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5800 support it. (The latest stable gzip doesn't.)
5802 2004-04-27 Paul Eggert <eggert@twinsun.com>
5804 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5805 case, as stos_ is now used by destructors due to the 2004-02-09
5808 Remove more K&R C support.
5809 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5810 * lib/subpipe.c (errno): Remove decl.
5811 Include <stdlib.h> unconditionally.
5812 (EXIT_FAILURE): Remove macro.
5813 * src/complain.c (vfprintf, strerror): Remove.
5814 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5816 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5817 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5818 (strchr, strspn, memchr): Remove decls.
5819 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5820 unconditionally. Do not declare perror.
5821 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5824 * src/complain.c (_): Remove useless defn, as system.h defines this.
5826 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5827 with latest obstack.h.
5828 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5829 to procedure types, as obstack.h now does that for us.
5830 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5832 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5833 so that this include file can stand alone.
5834 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5835 does this now. Include subpipe.h first after config.h, to
5836 test whether it can stand alone.
5838 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5839 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5842 * tests/synclines.at (%union synch line): Put a dummy member in
5843 the union, because empty unions aren't allowed in C. Caught
5846 2004-04-13 Jim Meyering <jim@meyering.net>
5848 * src/conflicts.c (conflicts_print): Correct format string typo:
5849 use `%%' to produce literal `%'. (trivial change)
5851 2004-03-30 Paul Eggert <eggert@twinsun.com>
5853 * src/getargs.c (version): Update copyright year to 2004.
5855 * data/c.m4 (b4_int_type): Use 'short int' rather than
5856 'short', and similarly for 'long', 'unsigned', etc.
5857 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5858 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5859 yy_yypstack, yydumpstack): Likewise.
5860 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5861 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5863 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5864 yy_stack_print, yyparse): Likewise.
5865 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5866 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5867 * lib/bitset.c (bitset_print): Likewise.
5868 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5869 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5870 * lib/bitsetv.c (bitsetv_dump): Likewise.
5871 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5872 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5874 * src/LR0.c (allocate_itemsets): Likewise.
5875 * src/gram.h (rule_number, rule): Likewise.
5876 * src/lalr.h (goto_number): Likewise.
5877 * src/nullable.c (nullable_compute): Likewise.
5878 * src/output.c (prepare_rules): Likewise.
5879 * src/relation.c (relation_print, relation_digraph): Likewise.
5880 * src/relation.h (relation_node): Likewise.
5881 * src/state.h (state_number, transitions, errs, reductions,
5882 struct state): Likewise.
5883 * src/symtab.h (symbol_number, struct symbol): Likewise.
5884 * src/tables.c (vector_number, tally, action_number,
5885 default_goto, goto_actions): Likewise.
5886 * tests/existing.at (GNU Cim Grammar): Likewise.
5887 * tests/regression.at (Web2c Actions): Likewise.
5889 * src/output.c (muscle_insert_short_int_table): Renamed from
5890 muscle_insert_short_table. All uses changed.
5892 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5894 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5895 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5896 Add %expect-rr rule.
5898 * src/scan-gram.l: Recognize %expect-rr.
5900 * src/conflicts.h (expected_sr_conflicts): Rename from
5902 (expected_rr_conflicts): Declare.
5904 * src/conflicts.c (expected_sr_conflicts): Rename from
5906 (expected_rr_conflicts): Define.
5907 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5909 Use expected_sr_conflicts in place of expected_conflicts.
5910 Warn if expected_rr_conflicts used in non-GLR parser.
5912 * doc/bison.texinfo: Add documentation for %expect-rr.
5914 2004-03-08 Paul Eggert <eggert@gnu.org>
5916 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5917 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5919 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5921 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5922 * src/scan-gram.l (scan_integer): New function.
5924 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5925 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5926 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5927 Say "long int", not "long", for uniformity with GNU style.
5929 2004-02-25 Paul Eggert <eggert@twinsun.com>
5931 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5932 compilers. This fixes a problem with Intel's C++ compiler being
5933 chatty, reported by Guido Trentalancia in
5934 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5936 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5938 Support %destructor and merge error locations in lalr1.cc.
5940 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5941 (Parser::stos_): Define unconditionally.
5942 (Parser::destruct_): New method. Generate its body with
5943 b4_yydestruct_generate.
5944 (Parser::error_start_): New attribute.
5945 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5946 token which are discarded.
5947 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5948 error_start_ when erroneous token are discarded.
5949 (Parser::parse) <yyerrlab1>: Compute the location of the error
5950 token so that it covers all the discarded tokens.
5951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5952 it can be called with `%skeleton "lalr1.cc"', and do that.
5954 2004-02-02 Paul Eggert <eggert@twinsun.com>
5956 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5957 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5958 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5959 There's no need to mention top_builddir since Automake does that
5961 (INCLUDES): Remove, as Automake says it's obsolescent.
5962 Contents migrated into AM_CPPFLAGS as described above.
5963 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5965 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5967 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5968 (yyreportSyntaxError): Handle case where lookahead token is
5971 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5973 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5974 resulting parsers are compilable with C++.
5976 2003-12-23 Paul Eggert <eggert@twinsun.com>
5978 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5979 * src/output.c (output_skeleton): Rename local var.
5980 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5981 Bison tokens, as this runs afoul of the 2003-10-07 change that
5982 disallowed NUL bytes in character constants or string literals.
5984 * tests/local.at: Require Autoconf 2.59's Autotest.
5985 * tests/testsuite.at: Don't include local.at, since we now assume
5986 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5988 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5989 multiple inclusion warnings.
5991 2003-12-02 Akim Demaille <akim@epita.fr>
5993 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5997 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5999 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6001 2003-10-07 Paul Eggert <eggert@twinsun.com>
6003 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6004 if testsuite doesn't exist.
6006 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6007 literals, unfortunately.
6008 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6009 Complain about NUL bytes in character constants or string literals.
6011 2003-10-05 Paul Eggert <eggert@twinsun.com>
6013 * NEWS: Don't document %no-default-prec, as it's still
6015 * doc/bison.texinfo: Document %no-default-prec only if
6016 the defaultprec flag is set. Normally it's not.
6018 2003-10-04 Paul Eggert <eggert@twinsun.com>
6020 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6021 non-modifiable lvalue, instead of a modifiable one.
6022 * doc/bison.texinfo (Actions): Document that $$ can
6023 be assigned to. Do not claim that $$ and $N are
6024 array element references: user code should not rely on this.
6026 2003-10-01 Paul Eggert <eggert@twinsun.com>
6028 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6029 (grammar_declaration): Use it.
6030 * src/scan-gram.l: New token %no-default-prec.
6031 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6032 * NEWS, doc/bison.texinfo: Document the above.
6034 2003-10-01 Akim Demaille <akim@epita.fr>
6036 VCG no longer supports long_straight_phase.
6038 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6039 * src/print_graph.c (print_graph): Adjust.
6041 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
6042 and Paul Eggert <eggert@twinsun.com>
6044 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6045 Table of Symbols): Document %default-prec.
6046 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6047 (grammar_declaration): Set default_prec on %default-prec.
6048 * src/scan-gram.l (%default-prec): New token.
6049 * src/reader.h (default_prec): New flag.
6050 * src/reader.c: Likewise.
6051 (packgram): Handle it.
6052 * tests/conflicts.at (%default-prec without %prec,
6053 %default-prec with %prec, %default-prec 1): New tests.
6055 2003-09-30 Paul Eggert <eggert@twinsun.com>
6057 * tests/testsuite.at: Include local.at, not input.at, fixing
6058 a typo in the 2003-08-25 patch.
6060 2003-08-27 Akim Demaille <akim@epita.fr>
6062 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6065 2003-08-26 Akim Demaille <akim@epita.fr>
6067 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6068 "<\#" to avoid magic from Gnus when posting parts of this script.
6070 2003-08-26 Akim Demaille <akim@epita.fr>
6072 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6073 (Parser::parse): here.
6074 Adjust: nerrs and errstatus is now replaced by...
6075 (Parser::nerrs_, Parser::errstatus_): New.
6077 2003-08-25 Akim Demaille <akim@epita.fr>
6079 * config/announce-gen, Makefile.cfg: New.
6080 * Makefile.am: Adjust.
6081 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6082 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6084 2003-08-25 Akim Demaille <akim@epita.fr>
6086 When reducing initial empty rules, Bison parser read an initial
6087 location that is not defined. This results in garbage, and that
6088 affects Bison's own parser. Therefore we need (i) to extend Bison
6089 to support a means to initialize this location, and (ii) to use
6090 this CVS Bison to fix CVS Bison's parser.
6092 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6094 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6095 * src/parse-gram.y: Adjust.
6096 (%initial-action): New.
6097 (%error-verbose): Since we require CVS Bison, there is no reason
6099 * src/scan-gram.l: Adjust.
6100 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6101 * data/yacc.c (yyparse): Use b4_initial_action.
6103 2003-08-25 Akim Demaille <akim@epita.fr>
6105 * doc/bison.texinfo: Don't promote stdout for error messages.
6107 2003-08-25 Akim Demaille <akim@epita.fr>
6109 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6110 From Alexandre Duret-Lutz.
6112 2003-08-25 Akim Demaille <akim@epita.fr>
6116 2003-08-25 Akim Demaille <akim@epita.fr>
6118 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6121 2003-08-25 Akim Demaille <akim@epita.fr>
6123 * data/lalr1.cc (Parser::reduce_print_): New.
6126 2003-08-25 Akim Demaille <akim@epita.fr>
6128 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6129 error recovery loops. This patch is based on
6130 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6131 Also, augment the similarity between lalr1.cc and yacc.c.
6132 Note: the locations of error recovery rules are not correct yet.
6134 * data/lalr1.cc: Comment changes to augment the similarity between
6135 lalr1.cc and yacc.c.
6136 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6137 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6138 yyerrlab), when hitting EOF, pop the whole stack here instead of
6139 merely falling thru the default error handling mechanism.
6140 (yyerrorlab): New label, with the old contents of YYERROR,
6141 plus the following change: pop the stack of rhs corresponding
6142 to the production that invoked YYERROR. That is how Yacc
6143 behaves (required by POSIX).
6144 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6147 2003-08-25 Akim Demaille <akim@epita.fr>
6149 Tune local.at so that people can "autom4te -l autotest calc.at -o
6150 calc" for instance, to extract a sub test suite.
6152 * tests/testsuite.at: Move the initialization, Autotest version
6153 requirement, and AT_TESTED invocation into...
6154 * tests/local.at: here.
6155 * tests/testsuite.at: Include it for compatibility with Autoconf
6157 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6160 2003-08-04 Paul Eggert <eggert@twinsun.com>
6162 Rework code slightly to avoid gcc -Wtraditional warnings.
6163 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6164 The returned value is now stored in *YY0. All callers changed.
6165 * src/output.c (merge_output): Adjust to the above change.
6167 2003-07-26 Paul Eggert <eggert@twinsun.com>
6169 * data/glr.c (YYASSERT): New macro.
6170 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6171 yyresolveStates, yyprocessOneStack):
6172 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6173 Derived from a suggestion by Frank Heckenbach.
6175 2003-07-25 Paul Eggert <eggert@twinsun.com>
6177 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6178 for portability to K&R C (after ansi2knr, presumably). See
6179 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6180 by Frank Heckenbach, though I have omitted the structure-initialization
6181 part of his glr-knr.diff patch since I recall that the Portable
6182 C Compiler didn't require that change.
6184 Let the user specify how to allocate and free memory.
6185 Derived from a suggestion by Frank Heckenbach in
6186 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6187 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6188 All uses of free, malloc, realloc changed to use these macros,
6189 and unnecessary casts removed.
6190 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6192 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6194 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6195 use s.empty() rather than s == "" to test for empty string; see
6196 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6199 2003-06-25 Akim Demaille <akim@epita.fr>
6201 * config/depcomp, config/install-sh: Update from masters.
6203 2003-06-20 Paul Eggert <eggert@twinsun.com>
6205 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6206 and return properly parenthesized result.
6207 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6208 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6209 Remove unnecessary parentheses from uses.
6210 * doc/bison.texinfo (Location Default Action): Describe the
6211 conventions for parentheses.
6213 2003-06-19 Paul Eggert <eggert@twinsun.com>
6215 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6216 yyreportTree): Do not assume that size_t is the same width as int,
6217 when printing sizes. Print sizes using an unsigned format.
6218 Problem reported by Frank Heckenbach in
6219 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6221 Port to Forte Developer 7 C compiler.
6222 * data/glr.c (struct YYLTYPE): If locations are not being used,
6223 declare a single dummy member, as empty structs do not conform
6225 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6226 the Forte Developer 7 C compiler complains that end-of-loop
6227 code is not reached.
6229 2003-06-17 Paul Eggert <eggert@twinsun.com>
6231 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6232 avoid warnings from picky compilers about redefinition of PARAMS.
6234 2003-06-17 Paul Eggert <eggert@twinsun.com>
6238 * NEWS: Document 1.875b.
6240 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6241 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6242 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6243 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6244 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6245 per recent gettext manual's suggestion.
6246 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6247 Use prototypes, not old-style definitions.
6248 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6249 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6250 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6251 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6252 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6253 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6254 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6255 vbitset_or_and_cmp, vbitset_copy): Likewise.
6257 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6258 Do not include <stdlib.h>.
6259 (PARAMS): Define unconditionally for C89.
6260 (ATTRIBUTE_NORETURN): Remove.
6261 (ATTRIBUTE_UNUSED): Define unconditionally.
6263 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6264 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6265 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6266 * lib/vbitset.c, lib/vbitset.h: New files.
6267 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6268 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6271 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6272 `How Can I Reset @code{yyparse}', since texinfo does not allow
6273 arbitrary @ in node names.
6275 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6276 shouldn't be needed according to the gettext 0.12.1 documentation
6277 but which seem to be needed anyway: codeset.m4 glibc21.m4
6278 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6279 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6280 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6282 * lib/.cvsignore: Add stdbool.h.
6283 * m4/.cvsignore: Add nls.m4, po.m4.
6285 Upgrade to CVS gnulib.
6286 * stdbool_.h: File renamed from stdbool.h.in.
6287 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6289 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6290 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6291 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6292 (MOSTLYCLEANFILES): New var.
6293 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6294 (stdbool.h): New rule.
6295 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6296 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6297 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6298 m4/quote.m4: Upgrade to today's gnulib.
6300 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6301 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6302 the tests right now.
6303 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6304 yyerror are declared before use; C99 requires this.
6306 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6308 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6310 (yyrecoverSyntaxError): Correct the logic for setting and testing
6312 Correct comment on handling EOF.
6313 Allow states with only a default reduction, rather than failing
6314 (I can't quite reconstruct why these were not allowed before).
6316 Fixes to avoid problem that $-N rules in GLR parsers can cause
6317 buffer overruns, corrupting state.
6319 * src/output.c (prepare_rules): Output max_left_semantic_context
6321 * src/reader.h (max_left_semantic_context): New variable declaration.
6322 * src/scan-gram.l (max_left_semantic_context): Define.
6323 (handle_action_dollar): Update max_left_semantic_context.
6324 * data/glr.c (YYMAXLEFT): New definition.
6325 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6326 (yyresolveAction): Ditto.
6328 Fixes to problems with location handling in GLR parsers reported by
6329 Frank Heckenbach (2003/06/05).
6331 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6332 (YYRHSLOC): Add parentheses, and define only if locations used.
6333 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6335 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6336 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6338 * tests/cxx-type.at: Exercise location information; update tests
6339 to differentiate output with and without locations.
6340 Remove forward declarations of yylex and yyerror---caused errors
6341 because default YYLTYPE not yet defined.
6342 Change semantic actions to compute strings, rather than printing
6343 them directly (to test proper passing of semantics values). Change
6344 output to prefix notation and update test data and expected results.
6345 (yylex): Track locations.
6346 (stmtMerge): Return value rather than printing, and include arguments
6349 2003-06-03 Paul Eggert <eggert@twinsun.com>
6351 Avoid warnings generated by GCC 2.95.4 when Bison is
6352 configured with --enable-gcc-warnings.
6353 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6354 yy::]b4_parser_class_name[::translate_,
6355 yy::Stack::operator[] (unsigned),
6356 yy::Stack::operator[] (unsigned) const,
6357 yy::Slice::operator[] (unsigned),
6358 yy::Slice::operator[] (unsigned) const):
6359 Rename local vars to avoid warnings.
6360 * tests/glr-regression.at (Improper handling of embedded actions
6361 and $-N in GLR parsers): Remove unused local variable from yylex.
6362 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6363 (void) as arg when not pure, since we now assume C89 when building
6364 Bison. Pacify GCC by using parameter.
6366 2003-06-02 Paul Eggert <eggert@twinsun.com>
6368 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6369 yy::Location::lines, yy::Location::columns): Rename arguments
6370 to avoid shadowing; this removes a warning generated by GCC 3.3.
6372 2003-06-01 Paul Eggert <eggert@twinsun.com>
6374 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6375 to g++, as GCC 3.3 complains if you do it.
6376 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6377 everything that WARNING_CFLAGS has, except omit warnings
6378 not suitable for C++.
6379 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6380 * tests/atlocal.in (CXXFLAGS): New var.
6381 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6383 Fix a GLR parser bug I reported in February; see
6384 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6385 The problem was that GLR parsers did not conform to the C standard,
6386 because actions like { $1 = $2 + $3; } expanded to expressions
6387 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6388 to a local variable. The C standard says that expressions
6389 like (var = f ()) + (var = f ()) have undefined behavior.
6390 Another problem was that GCC sometimes issues warnings that
6391 yyfill and its parameters are unused.
6393 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6395 (yyfill): New function.
6397 (yyuserAction): Change type of yynormal to bool, so that it matches
6398 the new yyfill signature. Mark it as possibly unused.
6401 Follow up on a bug I reported in February, where a Bison-generated
6402 parser can loop. Provide a test case and a fix for yacc.c. I
6403 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6404 The original bug report is in:
6405 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6407 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6408 macro's size was becoming unwieldy.
6409 (yyerrlab): Do not discard an empty lookahead symbol, as this
6410 might destroy garbage.
6411 (yyerrorlab): New label, with the old contents of YYERROR,
6412 plus the following change: pop the stack of rhs corresponding
6413 to the production that invoked YYERROR. That is how Yacc
6414 behaves, and POSIX requires this behavior.
6415 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6416 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6417 Define 'alarm' to do nothing if unistd.h is not available.
6418 Add a new rule "exp: '-' error;" to test the above change to
6419 data/yacc.c. Use 'alarm' to abort any test taking longer than
6420 10 seconds, as it's probably looping.
6421 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6422 Also, the new yacc.c generates two fewer diagnostics for an
6425 2003-05-24 Paul Eggert <eggert@twinsun.com>
6427 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6428 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6429 This fixes a problem reported by John Bowman when the Compaq/HP
6430 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6432 * data/yacc.c (union yyalloc): Likewise.
6433 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6435 Switch from 'int' to 'bool' where that makes sense.
6437 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6438 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6439 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6440 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6441 Return or accept bool, not int. All callers changed.
6442 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6443 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6444 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6445 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6446 bitset_or_and_cmp_): Likewise.
6447 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6448 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6449 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6450 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6451 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6452 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6453 bitset_stats_or_and_cmp): Likewise.
6454 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6455 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6456 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6457 ebitset_xor_cmp): Likewise.
6458 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6459 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6460 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6461 lbitset_xor_cmp): Likewise.
6462 * lib/bbitset.h: Include <stdbool.h>.
6463 (struct bitset_vtable): The following members now return bool, not
6464 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6465 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6467 * src/conflicts.c (count_rr_conflicts): Likewise.
6468 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6470 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6471 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6472 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6473 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6474 graph_flag): Likewise.
6475 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6476 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6477 graph_flag): Likewise.
6478 * src/output.c (error_verbose): Likewise.
6479 * src/output.h (error_verbose): Likewise.
6480 * src/reader.c (start_flag, typed): Likewise.
6481 * src/reader.h (typed): Likewise.
6482 * src/getargs.c (LOCATIONS_OPTION): New constant.
6483 (long_options, getargs): Use it.
6484 * src/lalr.c (build_relations): Use bool, not int.
6485 * src/nullable.c (nullable_compute): Likewise.
6486 * src/print.c (print_reductions): Likewise.
6487 * src/tables.c (action_row, pack_vector): Likewise.
6488 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6489 * src/output.c (prepare): Use it.
6490 * src/output.c (token_definitions_output,
6491 symbol_destructors_output, symbol_destructors_output): Use string,
6492 not boolean integer, to keep track of whether to output separator.
6493 * src/print_graph.c (print_core): Likewise.
6494 * src/state.c (state_rule_lookaheads_print): Likewise.
6496 * config/install-sh: Sync from automake 1.7.5.
6498 2003-05-14 Paul Eggert <eggert@twinsun.com>
6500 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6501 semicolon after a grammar declaration, in the interest of possible
6502 future changes to the Bison input language.
6503 Do not allow a stray semicolon at the start of the grammar.
6504 (rhses.1): Allow one or more semicolons after any rule, including
6505 just before "|" as required by POSIX.
6506 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6509 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6511 %parse-param support for lalr1.cc.
6513 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6514 b4_cc_constructor_calls, b4_cc_constructor_call,
6515 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6517 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6518 parse-param arguments.
6519 (yy::b4_parser_class_name): Declare instance variables to
6520 hold parse-param arguments.
6521 * tests/calc.at: s/value/semantic_value/ because value clashes
6522 with a member of yy::b4_parser_class_name. Adjust C++ code
6523 to handle %parse-param. Enable %parse-param test in C++.
6525 2003-05-12 Paul Eggert <eggert@twinsun.com>
6527 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6528 English a bit. Fix fclose typo. Change "const char" to "char
6529 const", and use ANSI C rather than K&R for "main". Suggest
6530 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6531 and suggest yy_switch_to_buffer.
6533 2003-05-05 Paul Eggert <eggert@twinsun.com>
6535 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6536 C89. This avoids a diagnostic on compilers that define __STDC__
6537 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6538 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6540 2003-05-03 Paul Eggert <eggert@twinsun.com>
6542 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6543 Do not overrun array bounds.
6544 This should fix a bug reported today by Olatunji Oluwabukunmi in
6545 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6547 2003-04-29 Akim Demaille <akim@epita.fr>
6549 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6550 * src/getargs.c, src/getargs.h: here, as bool, not int.
6551 (nondeterministic_parser): New.
6552 * src/parse-gram.y, src/scan-gram.l: Support
6553 %nondeterministic-parser.
6554 * src/output.c (prepare): Use nondeterministic_parser instead
6555 of glr_parser where appropriate.
6556 * src/tables.c (conflict_row, action_row, save_row)
6557 (token_actions, token_actions, pack_vector): Ditto.
6559 2003-04-29 Akim Demaille <akim@epita.fr>
6561 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6563 2003-04-29 Akim Demaille <akim@epita.fr>
6565 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6566 with %pure-parser and %locations to exercise the patch from Yakov
6569 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6571 * data/yacc.c: (b4_lex_param): Corrected for the case where
6572 %lex-param is provided and %pure-parser isn't.
6574 2003-04-27 Paul Eggert <eggert@twinsun.com>
6576 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6577 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6578 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6579 if it is not defined.
6580 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6582 2003-04-26 Paul Eggert <eggert@twinsun.com>
6584 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6585 Declare to be of type suitable for the ninf value itself, not of
6586 type suitable for the corresponding table, since the latter might
6587 be unsigned but the ninf value might be negative. This fixes a
6588 bug reported by Alexandre Duret-Lutz in
6589 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6591 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6592 invokes it. We shouldn't invoke it twice because it will attempt
6593 to put error.o in the archive twice. This fixes a glitch reported
6594 by Martin Mokrejs in
6595 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6597 2003-04-21 Paul Eggert <eggert@twinsun.com>
6599 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6602 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6604 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6605 Fix obvious typo that results in uncompilable GLR parsers
6606 when both %pure-parser and %locations are used. (trivial change)
6608 2003-04-17 Paul Eggert <eggert@twinsun.com>
6610 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6611 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6612 Do not insert the expected token via unput, as this runs afoul
6613 of a POSIX-compatibility bug in flex 2.5.31.
6614 All uses changed to BEGIN the parent state,
6615 since we no longer insert the expected token via unput.
6616 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6617 that is no longer emitted after the above change.
6619 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6620 the first one. This change is from Paul Hilfinger, and it fixes
6621 regression reported by Werner Lemberg in
6622 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6624 (resolve_sr_conflict): Don't invoke state_errs_set
6625 unless one or more tokens have been explicitly made errors.
6626 Otherwise, the above change causes Bison to abort.
6628 * tests/existing.at (GNU pic Grammar): New test case, taken from
6631 2003-03-31 Akim Demaille <akim@epita.fr>
6633 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6635 2003-03-31 Akim Demaille <akim@epita.fr>
6637 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6640 2003-03-31 Akim Demaille <akim@epita.fr>
6642 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6643 From Paul Hilfinger.
6645 2003-03-29 Akim Demaille <akim@epita.fr>
6647 * m4/error.m4: Do not put under dynamic conditions some code which
6648 expansion is under static control.
6650 2003-03-29 Akim Demaille <akim@epita.fr>
6652 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6654 2003-03-29 Akim Demaille <akim@epita.fr>
6656 * doc/bison.texinfo (Strings are Destroyed): New.
6658 2003-03-13 Paul Eggert <eggert@twinsun.com>
6660 * .cvsignore: Add configure.lineno.
6661 * src/.cvsignore: Add yacc.
6662 * tests/.cvsignore: Add testsuite.log.
6663 * doc/fdl.texi: Sync with latest FSF version.
6665 2003-03-12 Paul Eggert <eggert@twinsun.com>
6667 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6668 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6669 cursor, instead of leaving it undefined. This fixes a bug
6670 reported by Tim Van Holder in
6671 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6672 * tests/input.at (Torturing the Scanner): Test the scanner on
6673 an empty input file, which was Tim Van Holder's test case.
6675 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6676 <sys/resource.h> can be included, include sys/time.h and
6677 sys/times.h first, if available. This works around the SunOS
6678 4.1.4 porting bug reported by Bruce Becker in
6679 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6681 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6682 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6685 Merge changes from gnulib. This was prompted because the CVS
6686 snapshot didn't build on Solaris 7 due to strnlen problems.
6688 These changes need to be merged back into gnulib:
6689 * lib/hash.c: Include <stdbool.h> unconditionally.
6690 * m4/onceonly.m4 (m4_quote): New macro.
6691 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6692 Quote AC_FOREACH variable-expansions properly.
6693 The 2003-01-03 obstack.h change also needs merging.
6694 {end of changes requiring merging}
6696 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6697 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6698 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6699 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6700 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6701 New files, imported from gnulib.
6702 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6705 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6706 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6709 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6711 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6712 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6713 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6714 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6715 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6716 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6717 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6718 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6719 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6720 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6721 (jm_PREREQ_ARGMATCH): Remove.
6722 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6723 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6725 * src/system.h: Include <stdbool.h> unconditionally.
6727 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6728 assuming at least C89 in the bitset code for some time now.
6730 2003-03-03 Akim Demaille <akim@epita.fr>
6734 2003-03-02 Akim Demaille <akim@epita.fr>
6736 * doc/bison.texinfo (Table of Symbols): Reactivate the
6737 documentation for %lex-param, and %parse-param.
6739 2003-03-02 Akim Demaille <akim@epita.fr>
6741 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6742 generate verbose error messages.
6743 Use the number of tokens as an upper bound in yytname, as it
6744 cannot be a non terminal.
6746 2003-03-02 Akim Demaille <akim@epita.fr>
6748 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6751 2003-03-02 Akim Demaille <akim@epita.fr>
6753 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6754 Use them to exercise yycheck overrun.
6755 Based on Andrew Suffield's grammar.
6757 2003-03-02 Akim Demaille <akim@epita.fr>
6759 Create tests/local.at for Bison generic testing macros.
6761 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6762 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6764 * tests/calc.at (AT_CHECK_CALC): Adjust.
6765 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6766 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6767 * tests/local.at: here.
6768 (AT_COMPILE_CXX): Tags the tests using it as c++.
6769 Ignore the test if CXX is not functional.
6771 2003-03-01 Paul Eggert <eggert@twinsun.com>
6773 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6774 not loc->end, since loc->end might contain garbage and this leads
6775 to undefined behavior on some platforms.
6776 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6777 depend on *loc, so that the reader doesn't give the the false
6778 impression that *loc is initialized.
6779 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6780 does not survive the return.
6782 2003-03-01 Akim Demaille <akim@epita.fr>
6784 * src/scan-gram.l (code_start): Always initialize it when entering
6785 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6786 yylex invocation. An alternative would be making it static, but
6787 then it starts with the second %%'s beginning, instead of its end.
6789 2003-02-28 Paul Eggert <eggert@twinsun.com>
6791 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6792 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6793 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6795 2003-02-26 Paul Eggert <eggert@twinsun.com>
6797 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6798 Remove Sequent/Pyramid discussion (nobody uses them any more).
6799 Merge VMS and MS-DOS discussion; these ports may well be dead
6800 but let's keep mentioning them for now. Put <> around email
6801 addresses. Add copyright notice.
6803 2003-02-24 Paul Eggert <eggert@twinsun.com>
6805 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6806 to avoid collision with flex use of yylineno.
6807 Problem reported by Bruce Lilly in
6808 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6809 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6810 * data/yacc.c (yy_reduce_print): Likewise.
6812 * config/depcomp: Sync with Automake 1.7.3.
6814 2003-02-21 Akim Demaille <akim@epita.fr>
6816 * data/lalr1.cc: Use temporary variables instead of casts to
6817 change integer types.
6818 Suggested by Paul Eggert.
6820 2003-02-21 Akim Demaille <akim@epita.fr>
6822 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6823 to avoid confusions with lalr1.cc's notion of Position.
6824 Suggested by Paul Eggert.
6826 2003-02-20 Akim Demaille <akim@epita.fr>
6828 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6829 before initial_columns.
6830 (location.hh): Use consistent variable names when defining the
6832 Use "last" so that we subtract from Positions, not from unsigned.
6834 2003-02-20 Akim Demaille <akim@epita.fr>
6836 * data/lalr1.cc (position.hh): New subfile, including the extended
6837 and Doxygen'ed documentation of class Position.
6838 (location.hh): Use it.
6839 Document a` la Doxygen.
6840 With the help of Benoit Perrot.
6842 2003-02-20 Akim Demaille <akim@epita.fr>
6844 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6846 Redefine AT_YYERROR_SEES_LOC_IF using it.
6847 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6849 Don't use the location in yy::Parser::error_ and
6850 yy::Parser::print_ when not %locations.
6851 Activate more lalr1.cc tests.
6853 2003-02-19 Akim Demaille <akim@epita.fr>
6855 * data/lalr1.cc: When displaying a line number, be sure to make it
6858 2003-02-19 Akim Demaille <akim@epita.fr>
6860 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6862 (YYABORT, YYACCEPT, YYERROR): New.
6863 * tests/calc.at: Renable the lalr1.cc test.
6865 2003-02-19 Akim Demaille <akim@epita.fr>
6867 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6868 error recovery, mixing with/without pops and discarding of the
6871 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6873 2003-02-17 Paul Eggert <eggert@twinsun.com>
6875 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6876 * tests/testsuite.at (AT_COMPILE): Use them.
6877 This fixes the testsuite problem reported by Robert Lentz in
6878 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6880 2003-02-12 Paul Eggert <eggert@twinsun.com>
6882 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6883 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6884 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6885 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6886 Check for malloc failure, for consistency with yacc.c.
6887 (yytname_size): Remove, for consistency with yacc.c.
6889 The bug still remains in data/lalr1.cc, as I didn't have time
6892 2003-02-06 Akim Demaille <akim@epita.fr>
6894 * configure.ac (GXX): Rename as...
6895 (CXX): this, to keep the original Autoconf semantics.
6897 * data/lalr1.cc: Fix b4_copyright invocations.
6898 If YYDEBUG is not defined, don't depend upon name_ being defined.
6899 (location.hh): Include string and iostream.
6900 (Position::filename): New member.
6901 (Position::Position ()): New.
6902 (operator<< (Position)): New.
6903 (operator- (Position, int)): New.
6904 (Location::first, Location::last): Rename as...
6905 (Location::begin, Location::end): these, to mock the conventional
6907 (operator<< (Location)): New.
6908 * tests/atlocal.in (CXX): New.
6909 * tests/testsuite.at (AT_COMPILE_CXX): New.
6910 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6911 locations in a more synthetic way.
6912 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6914 Adjust the C locations to match those from Emacs: first column is
6916 Change all the expected results.
6917 Conform to the GCS: simplify the locations when applicable.
6918 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6919 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6920 these CPP macros with the m4 macros new defined by...
6921 (AT_CHECK_PUSHDEFS): this, i.e.:
6922 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6923 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6925 (AT_CHECK_POPDEFS): Undefine them.
6926 (AT_CHECK_CALC_LALR1_CC): New.
6927 Use it for the first lalr1.cc test.
6929 2003-02-04 Akim Demaille <akim@epita.fr>
6931 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6932 Location as is defined.
6934 2003-02-04 Akim Demaille <akim@epita.fr>
6936 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6937 name_ being defined.
6939 2003-02-03 Paul Eggert <eggert@twinsun.com>
6941 * src/gram.h (start_symbol): Remove unused decl.
6943 Use more-consistent naming conventions for local vars.
6945 * src/derives.c (derives_compute): Change type of local var from
6947 * src/gram.c (grammar_rules_partial_print): Likewise.
6948 * src/print.c (print_core): Likewise.
6949 * src/reduce.c (reduce_grammar_tables): Likewise.
6951 * src/gram.c (grammar_dump): Change name of item_number *
6952 local var from r to rp.
6953 * src/nullable.c (nullable_compute): Likewise.
6955 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6957 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6958 for symbol or symbol_number var.
6959 * src/reader.c (grammar_start_symbol_set): Likewise.
6960 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6962 * src/state.c (transitions_to): Likewise.
6963 * src/state.h: Likewise.
6964 * src/tables.c (symbol_number_to_vector_number): Likewise.
6966 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6969 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6972 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6975 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6976 Use str, not s, for char * var. Use ch, not c, for character var.
6977 Use size for size var.
6979 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6981 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6983 * src/uniqstr.h: Likewise.
6985 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6986 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6987 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6988 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6989 param to have same name as that of enum, so that we don't use
6990 "s" to stand for a non-state.
6992 2003-02-02 Akim Demaille <akim@epita.fr>
6994 * src/scan-skel.l: Scan more than one inert character per yylex
6997 2003-02-01 Paul Eggert <eggert@twinsun.com>
7001 * po/LINGUAS: Add ms.
7003 2003-01-30 Akim Demaille <akim@epita.fr>
7005 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7007 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7009 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7012 Changes in response to error report by S. Eken: GLR mode does not
7013 handle negative $ indices or $ indices in embedded rules correctly.
7014 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7016 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7017 (b4_rhs_location): Ditto.
7018 (yyfill): New function to copy from stack tree into array
7020 (yyuserAction): Modify to allow incremental move of semantic values
7021 to rhs array when in GLR mode.
7022 Define YYFILL to use in user-defined actions to fill semantic array
7024 Remove dummy use of yystack, as there is now a guaranteed use.
7025 (yydoAction): Modify to allow incremental move of semantic values
7026 to rhs array when in GLR mode.
7027 (yyresolveAction): Ditto.
7028 (yyglrShiftDefer): Update comment.
7029 (yyresolveStates): Use X == NULL for pointers, not !X.
7030 (yyglrReduce): Ditto.
7033 * tests/glr-regr1.at: Rename to ...
7034 * tests/glr-regression.at: Add new regression test for the problems
7035 described above (adapted from S. Eken).
7036 Update copyright notice.
7037 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7038 * tests/Makefile.am: Ditto.
7040 2003-01-28 Paul Eggert <eggert@twinsun.com>
7042 * data/lalr1.cc: Do not use @output_header_name@ unless
7043 b4_defines_flag is set. This fixes two bugs reported by
7045 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7046 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7048 2003-01-21 Paul Eggert <eggert@twinsun.com>
7050 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7051 we don't need to worry about yyerrlab1 being reported as an
7052 "unused label" by non-GCC C compilers. The downside is that if
7053 locations are used then a couple of statements are duplicated each
7054 time YYERROR is invoked, but the upside is that the warnings
7056 (yyerrlab1): Move code to YERROR.
7057 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7058 This reverts some of the 2002-12-27 change.
7060 2003-01-17 Paul Eggert <eggert@twinsun.com>
7062 * src/output.c (symbol_printers_output): Fix typo that led
7063 to core dump. Problem reported by Antonio Rus in
7064 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7066 2003-01-13 Akim Demaille <akim@epita.fr>,
7067 Quoc Peyrot <chojin@lrde.epita.fr>,
7068 Robert Anisko <anisko_r@lrde.epita.fr>
7070 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7071 when the stacks contain one element, as the loop would otherwise
7072 free the last state, and then use the top state (the one we just
7073 popped). This means that the initial elements will not be freed
7074 explicitly, as is the case in yacc.c; it is not a problem, as
7075 these elements have fake values.
7077 2003-01-11 Paul Eggert <eggert@twinsun.com>
7079 * NEWS: %expect-violations are now just warnings, reverting
7080 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7081 bootstrapping problem reported by Matthias Klose; see
7082 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7083 * src/conflicts.c (conflicts_print): Likewise.
7084 * tests/conflicts.at (%expect not enough, %expect too much,
7085 %expect with reduce conflicts): Likewise.
7086 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7087 that the warning is enabled if the number of conflicts changes
7088 (not necessarily increases).
7090 * src/getargs.c (version): Update copyright year.
7092 2003-01-09 Akim Demaille <akim@epita.fr>
7094 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7096 2003-01-08 Paul Eggert <eggert@twinsun.com>
7098 * Makefile.maint (WGETFLAGS):
7099 New macro, containing "-C off" to disable proxy caches.
7100 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7101 (rel-check): Use $(WGET) instead of wget.
7103 2003-01-06 Paul Eggert <eggert@twinsun.com>
7105 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7106 the GLR paper of Scott, Johnstone and Hussain.
7108 2003-01-04 Paul Eggert <eggert@twinsun.com>
7110 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7111 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7112 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7113 (EXTRA_LIBRARIES): New var, for liby.a.
7114 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7115 (EXTRA_SCRIPTS): New var, for yacc.
7117 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7118 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7119 Problem reported by Nelson H. F. Beebe.
7121 2003-01-03 Paul Eggert <eggert@twinsun.com>
7123 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7124 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7125 when compiling Bison 1.875's `bitset bset = obstack_alloc
7126 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7128 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7129 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7130 grow to a huge size with typical invocation.
7132 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7133 Use the pattern recommended by Autoconf 2.57, except also protect
7134 against double-definition.
7135 * src/system.h: Likewise.
7136 Portability issues reported by Nelson H. F. Beebe.
7138 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7139 All uses changed. Provide a definition in both C and C++.
7140 (yytrue, yyfalse): Define even if defined (__cplusplus).
7142 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7143 Reported by Nelson H. F. Beebe.
7145 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7147 2003-01-02 Paul Eggert <eggert@twinsun.com>
7149 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7150 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7151 Bug reported by Nelson H. F. Beebe.
7153 2003-01-01 Paul Eggert <eggert@twinsun.com>
7157 2002-12-30 Paul Eggert <eggert@twinsun.com>
7159 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7161 (<INITIAL>","): Here. This causes stray "," to be treated
7164 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7165 last brace in braced code when not in Yacc mode, for compatibility
7166 with Bison 1.35. This resurrects the 2001-12-15 patch to
7169 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7170 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7172 2002-12-28 Paul Eggert <eggert@twinsun.com>
7174 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7175 that of SYM's type. This fixes Debian bug 168069, reported by
7178 2002-12-28 Paul Eggert <eggert@twinsun.com>
7182 Switch back to the Yacc style of conflict reports, undoing some
7183 of the 2002-07-30 change.
7184 * doc/bison.texinfo (Understanding): Use Yacc style for
7185 conflict reports. Also, use new way of locating rules.
7186 * src/conflicts.c (conflict_report):
7187 Renamed from conflict_report_yacc, removing the old
7188 'conflict_report'. Translate the entire conflict report at once,
7189 so that we don't assume that "," has the same interpretation in
7191 (conflicts_output): Use Yacc-style conflict report for each state,
7192 instead of our more-complicated style.
7193 (conflicts_print): Use Yacc-style conflict report, except print
7194 the input file name when not emulating Yacc.
7195 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7196 Conflicted Reduction, %expect not enough, %expect too much,
7197 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7198 * tests/existing.at (GNU Cim Grammar): Likewise.
7199 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7201 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7202 fatal): Don't invoke fflush; it's not needed and it might even be
7203 harmful for stdout, as stdout might not be open.
7204 * src/reduce.c (reduce_print): Likewise.
7206 2002-12-27 Paul Eggert <eggert@twinsun.com>
7208 Fix a bug where error locations were not being recorded correctly.
7209 This problem was originally reported by Paul Hilfinger in
7210 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7212 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7213 top of the location stack's error locations.
7214 (yyerrlab): Set it. When discarding a token, push its location
7215 onto yylerrsp so that we don't lose track of the error's end.
7216 (yyerrlab1): Now is only the target of YYERROR, so that we can
7217 properly record the location of the action that failed. For GCC
7218 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7219 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7220 (yyerrlab2): New label, which yyerrlab now falls through to.
7221 Compute the error's location by applying YYLLOC_DEFAULT to
7222 the locations of all the symbols that went into the error.
7223 * doc/bison.texinfo (Location Default Action): Mention that
7224 YYLLOC_DEFAULT is also invoked for syntax errors.
7225 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7226 Error locations include the locations of all the tokens that were
7227 discarded, not just the last token.
7229 2002-12-26 Paul Eggert <eggert@twinsun.com>
7231 * src/files.c: Include quote.h.
7232 (compute_output_file_names): Warn if we detect conflicting
7233 outputs to the same file. This should catch the misunderstanding
7234 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7236 * src/conflicts.c (conflicts_print): If the user specifies
7237 "%expect N", report an error if there are any reduce/reduce
7238 conflicts. This is what the manual says should happen.
7239 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7240 * tests/conflicts.at (%expect with reduce conflicts): New test.
7242 Don't use m4_include on relative file names, as it doesn't work as
7243 desired if there happens to be a file with that name under ".".
7245 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7246 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7247 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7248 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7249 * src/output.c (output_skeleton): Use full path names when
7250 specifying a file to include; don't rely on include path, as
7251 it's unreliable when the working file contains a file with
7254 2002-12-25 Paul Eggert <eggert@twinsun.com>
7256 Remove obsolete references to bison.simple and bison.hairy.
7257 Problem mentioned by Aubin Mahe in
7258 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7259 * data/glr.c: Comment fix.
7260 * doc/bison.1: Remove references. Also, mention "yacc".
7262 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7265 * src/parse-gram.y (declaration): Use enum "report_states" rather
7266 than its numeric value 1.
7268 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7269 opening a new one. This fixes Debian bug 165349, reported by
7272 2002-12-24 Paul Eggert <eggert@twinsun.com>
7276 * Makefile.maint (cvs-update): Don't assume that the shell
7277 supports $(...), as Solaris sh doesn't.
7279 * src/parse-gram.y (lloc_default): Remove test for empty
7280 nonterminals at the end, since it didn't change the result.
7282 2002-12-24 Paul Eggert <eggert@twinsun.com>
7284 If the user does not define YYSTYPE as a macro, Bison now declares it
7285 using typedef instead of defining it as a macro. POSIX requires this.
7286 For consistency, YYLTYPE is also declared instead of defined.
7288 %union directives can now have a tag before the `{', e.g., the
7289 directive `%union foo {...}' now generates the C code
7290 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7291 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7292 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7293 instead of `yyltype'.
7295 `yystype' and `yyltype' are now obsolescent macros instead of being
7296 typedefs or tags; they are no longer documented and will be
7297 withdrawn in a future release.
7299 * data/glr.c (b4_location_type): Remove.
7300 (YYSTYPE): Renamed from yystype.
7301 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7302 (struct YYLTYPE): Renamed from struct yyltype.
7303 (YYLTYPE): Renamed from yyltype.
7304 (yyltype, yystype): New (and obsolescent) macros,
7305 for backward compatibility.
7306 * data/yacc.c: Likewise.
7308 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7309 does not specify a union tag. This is for compatibility with
7312 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7313 const *, since it is now modified by stripping surrounding { }.
7314 (current_braced_code): Remove.
7315 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7316 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7317 trailing " {...}". Now of type <chars>.
7318 (grammar_declaration): Adjust to bundled tokens.
7319 (code_content): Remove; stripping is now done by add_param.
7320 (print_token_value): Print contents of bundled tokens.
7321 (token_name): New function.
7323 * src/reader.h (braced_code, current_braced_code): Remove.
7324 (token_name): New decl.
7326 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7327 token_type, not braced_code code_kind. All uses changed.
7328 (SC_PRE_CODE): New state, for scanning after a keyword that
7329 has (or usually has) an immediately-following braced code.
7330 (token_type): New local var, to keep track of which token type
7331 to return when scanning braced code.
7332 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7333 <INITIAL>"%parse-param", <INITIAL>"%printer",
7334 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7335 instead of returning a token type immediately.
7336 (<INITIAL>"{"): Set token type.
7337 (<SC_BRACED_CODE>"}"): Use it.
7338 (handle_action_dollar, handle_action_at): Now returns bool
7339 indicating success. Fail if ! current_rule; this prevents a core dump.
7340 (handle_symbol_code_dollar, handle_symbol_code_at):
7341 Remove; merge body into caller.
7342 (handle_dollar, handle_at): Complain in invalid contexts.
7344 * NEWS, doc/bison.texinfo: Document the above.
7345 * NEWS: Fix years and program names in copyright notice.
7347 2002-12-17 Paul Eggert <eggert@twinsun.com>
7349 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7350 Reporting, Table of Symbols): Omit mentions of %lex-param and
7351 %parse-param from the documentation for now.
7353 2002-12-15 Paul Eggert <eggert@twinsun.com>
7355 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7356 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7357 lookahead symbol, and which sets yychar in parser actions) and it
7358 disagreed with the Bison documentation. Bug
7359 reported by Andrew Walrond.
7361 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7362 as the caller now does that.
7363 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7364 (YYEMPTY): Parenthesize right hand side, since others use it.
7365 (yyparse): Don't assume that our generated code is the only code
7368 2002-12-13 Paul Eggert <eggert@twinsun.com>
7372 POSIX requires a "yacc" command.
7373 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7374 (MOSTLYCLEANFILES): Add yacc.
7376 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7377 as an alias for bison y.
7379 * po/LINGUAS: Add da.
7381 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7382 problem with latest <getopt.h>.
7383 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7385 * doc/fdl.texi: Upgrade to 1.2.
7386 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7387 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7388 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7390 * config/install-sh: Sync with autotools.
7392 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7393 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7394 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7395 locations are requested.
7396 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7397 locations are requested.
7399 2002-12-12 Paul Eggert <eggert@twinsun.com>
7401 Remove unportable casts and storage allocation tricks.
7402 While we're at it, remove almost all casts, since they
7403 usually aren't needed and are a sign of trouble.
7405 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7407 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7408 the pointer DSET returned by malloc; this isn't portable.
7409 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7410 Similarly for DERIVES.
7411 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7412 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7413 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7415 * src/derives.c (derives_compute): Do not bother invoking
7416 int_of_rule_number, since rule numbers are integers.
7418 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7419 rather than XMALLOC (char, N).
7421 * src/files.c (filename_split): Rewrite to avoid cast.
7423 * src/gram.h (symbol_number_as_item_number,
7424 item_number_as_symbol_number, rule_number_as_item_number,
7425 item_number_as_rule_number):
7426 Now inline functions rather than macros, to avoid casts.
7427 * src/state.h (state_number_as_int): Likewise.
7428 * src/tables.c (state_number_to_vector_number,
7429 symbol_number_to_vector_number): Likewise.
7431 * src/gram.h (int_of_rule_number): Remove; no longer used.
7433 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7434 since the resulting storage is always stored into.
7436 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7439 * src/muscle_tab.c (muscle_m4_output):
7440 Now inline. Return bool, not int.
7441 * src/state.c (state_compare): Likewise.
7442 * src/symtab.c (symbol_check_defined,
7443 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7444 hash_compare_symbol, hash_symbol):
7446 * src/uniqstr.c (uniqstr_print): Likewise.
7447 * src/muscle_tab.c (muscle_m4_output_processor):
7448 New function, to avoid casts.
7449 * src/state.c (state_comparator, stage_hasher): Likewise.
7450 * src/symtab.c (symbol_check_defined_processor,
7451 symbol_check_alias_consistency_processor, symbol_pack_processor,
7452 symbol_translation_processor, hash_symbol_comparator,
7453 hash_symbol_hasher): Likewise.
7454 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7455 * src/muscle_tab.c (muscles_m4_output):
7456 Use new functions instead of casting old functions unportably.
7457 * src/state.c (state_hash_new): Likewise.
7458 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7459 symbols_token_translations_init):
7461 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7463 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7464 var instead of casting to long, to avoid casts.
7465 (prepare_states): Use MALLOC rather than alloca, so that we don't
7466 have to worry about alloca.
7467 * src/state.c (state_hash_lookup): Likewise.
7469 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7470 local var instead of casting to unsigned char, to avoid casts.
7472 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7473 STATE_ALLOC): Remove.
7474 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7475 rather than calloc, and use offsetof to avoid allocating slightly
7477 (state_new): Initialize all members.
7479 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7481 * src/symtab.c (symbol_free): Remove; unused.
7482 (symbol_get): Remove cast in lhs of assignment.
7483 (symbols_do): Now static. Accept generic arguments, not
7484 hashing-related ones.
7486 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7487 (symbol_processor): Remove.
7488 (symbols_do): Remove decl; now static.
7490 * src/system.h (alloca): Remove; decl no longer needed.
7491 (<stddef.h>): Include, for offsetof.
7492 (<inttypes.>, <stdint.h>): Include if available.
7493 (uintptr_t): New type, if system lacks it.
7494 (CALLOC, MALLOC, REALLOC): New macros.
7495 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7498 * src/tables.c (table_size): Now int, to pacify GCC.
7499 (table_grow, table_ninf_remap): Use signed table size.
7500 (save_row): Don't bother initializing locals when not needed.
7501 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7502 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7504 * src/vcg.h: Correct misspellings.
7506 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7509 * src/getargs.c (getargs): Don't assume EOF == -1.
7511 2002-12-09 Paul Eggert <eggert@twinsun.com>
7513 Change identifier spellings to avoid collisions with names
7514 that are reserved by POSIX.
7516 Don't use names ending in _t, since POSIX reserves them.
7517 For consistency, remove _e and _s endings -- they're weren't
7518 needed to remove ambiguity. All uses changed.
7519 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7520 turn was just renamed from struniq_t.
7521 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7522 which in turn was just renamed from struniq_processor_t.
7523 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7524 in turn was renamed from hash_compare_struniq_t.
7525 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7526 (state_list): Renamed from state_list_t.
7527 * src/assoc.h (assoc): Renamed from assoc_t.
7528 * src/conflicts.c (enum conflict_resolution): Renamed from
7529 enum conflict_resolution_e.
7530 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7531 (rule_list): Renamed from rule_list_t.
7532 * src/getargs.h (enum trace): Renamed from enum trace_e.
7533 (enum report): Renamed from enum report_e.
7534 * src/gram.h (item_number): Renamed from item_number_t.
7535 (rule_number): Renamed from rule_number_t.
7536 (struct rule_s): Remove the "rule_s" part; not used.
7537 (rule): Renamed from rule_t.
7538 (rule_filter): Renamed from rule_filter_t.
7539 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7540 (goto_list): Renamed from goto_list_t.
7541 * src/lalr.h (goto_number): Renamed from goto_number_t.
7542 * src/location.h (location): Renamed from location_t.
7543 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7544 and moved here from:
7545 * src/muscle_tab.h (muscle_entry_t): here.
7546 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7547 (rule_list): Renamed from rule_list_t.
7548 * src/print_graph.c (static_graph): Renamed from graph.
7549 * src/reader.h (braced_code): Renamed from braced_code_t.
7550 Remove brace_code_e tag.
7551 * src/relation.h (relation_node): Renamed from relation_node_t.
7552 (relation_nodes): Renamed from relation_nodes_t.
7553 (relation): Renamed from relation_t.
7554 * src/state.h (state_number): Renamed from state_number_t.
7555 (struct state): Renamed from struct state_s.
7556 (state): Renamed from state_t.
7557 (transitions): Renamed from transitions_t. Unused (and
7558 misspelled) transtion_s tag removed.
7559 (errs): Renamed from errs_t. Unused errs_s tag removed.
7560 (reductions): Renamed from reductions_t. Unused tag
7561 reductions_s removed.
7562 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7563 (struct symbol_list): Renamed from struct symbol_list_s.
7564 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7565 (struct symbol): Renamed from struct symbol_s.
7566 (symbol): Renamed from symbol_t.
7567 * src/tables.c (vector_number): Renamed from vector_number_t.
7568 (action_number): Renamed from action_t.
7569 * src/tables.h (base_number): Renamed from base_t.
7570 * src/vcg.h (enum color): Renamed from enum color_e.
7571 (enum textmode): Renamed from enum textmode_e.
7572 (enum shape): Renamed from enum shape_e.
7573 (struct colorentry): Renamed from struct colorentry_s.
7574 (struct classname): Renamed from struct classname_s.
7575 (struct infoname): Renamed from struct infoname_s.
7576 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7577 (enum decision): Renamed from enum decision_e.
7578 (enum orientation): Renamed from enum orientation_e.
7579 (enum alignment): Renamed from enum alignment_e.
7580 (enum arrow_mode): Renamed from enum arrow_mode_e.
7581 (enum crossing_type): Renamed from enum crossing_type_e.
7582 (enum view): Renamed from enum view_e.
7583 (struct node): Renamed from struct node_s.
7584 (node): Renamed from node_t.
7585 (enum linestyle): Renamed from enum linestyle_e.
7586 (enum arrowstyle): Renamed from enum arrowstyle_e.
7587 (struct edge): Renamed from struct edge.
7588 (edge): Renamed from edge_t.
7589 (struct graph): Renamed from struct graph_s.
7590 (graph): Renamed from graph_t.
7591 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7592 Rename value_t -> value.
7593 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7594 value_t_as_yystype -> value_as_yystype.
7596 Don't include <errno.h> in the mainstream code, since it
7597 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7598 * lib/get-errno.c, lib/get-errno.h: New files.
7599 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7601 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7602 * src/output.c (output_skeleton): Likewise.
7603 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7605 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7607 (handle_action_dollar, handle_action_at): Likewise.
7608 * src/system.h: Do not include <errno.h>.
7609 (TAB_EXT): Renamed from EXT_TAB.
7610 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7612 Avoid str[a-z]*, since <string.h> reserves that name space.
7613 Change all instances of "struniq" in names to "uniqstr", and
7614 likewise for "STRUNIQ" and "UNIQSTR".
7615 * src/uniqstr.c: Renamed from src/struniq.c.
7616 * src/uniqstr.h: Renamed from src/struniq.h.
7617 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7618 * src/files.c (strsuffix): Remove; unused.
7619 (concat2): Renamed from stringappend. Now static.
7620 * src/files.h (strsuffix, stringappend): Remove; unused.
7621 * src/parse-gram.y (<chars>): Renamed from <string>.
7622 (<uniqstr>): Renamed from <struniq>.
7623 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7624 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7625 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7626 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7627 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7628 (N_EXPAND): Renamed from N_STRETCH.
7630 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7631 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7632 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7634 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7635 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7636 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7637 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7638 (BASE_MAXIMUM): Renamed from BASE_MAX.
7639 (BASE_MINIMUM): Renamed from BASE_MIN.
7640 (ACTION_MAX): Remove; unused.
7641 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7642 Unnecessary casts removed from above defines.
7645 Fix misspelling in names.
7646 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7647 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7651 * lib/timevar.c (timevar_report): Renamed from time_report,
7652 for consistency with other names.
7653 * lib/timevar.h (timevar_report): New decl.
7654 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7657 Sort include-file uses.
7659 Reorder all include files under src to be in the order "system.h".
7660 then the ../lib include files in angle brackets (alphabetized),
7661 then the . include files in double-quotes (alphabetized). Fix
7662 dependency breakages encountered in this process, as follows:
7663 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7664 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7665 * src/state.h: Include "symtab.h".
7667 2002-12-08 Paul Eggert <eggert@twinsun.com>
7669 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7670 since this causes problems when __file__ contains character
7671 sequences like "@" that are treated specially by src/scan-skel.l.
7672 Instead, just use the file's basename. This fixes the bug
7673 reported by Martin Mokrejs in
7674 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7676 2002-12-06 Paul Eggert <eggert@twinsun.com>
7678 Add support for rules that do not have trailing semicolons, as
7679 POSIX requires. Improve the quality of locations in Bison
7682 * src/location.c: Include <quotearg.h>.
7683 (empty_location): Now const.
7684 (location_print): New function. Follow the recommendation of the
7685 GNU Coding Standards for locations that span file boundaries.
7686 * src/location.h: Do not include <quotearg.h>; no longer needed.
7687 (boundary): New type.
7688 (location_t): Use it. This allows locations to span file boundaries.
7689 All member uses changed: file -> start.file or end.file (as needed),
7690 first_line -> start.line, first_column -> start.column,
7691 last_line -> end.line, last_column -> end.column.
7692 (equal_boundaries): New function.
7693 (LOCATION_RESET, LOCATION_STEP): Remove.
7694 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7695 (empty_location): Now const.
7696 (location_print): New decl.
7697 * src/parse-gram.y (lloc_default): New function, which handles
7698 empty locations more accurately.
7699 (YYLLOC_DEFAULT): Use it.
7700 (%token COLON): Remove.
7701 (%token ID_COLON): New token.
7703 (declarations, rules): Remove trailing semicolon.
7704 (declaration, rules_or_grammar_declaration):
7705 Allow empty (";") declaration.
7706 (symbol_def): Remove empty actions; no longer needed.
7707 (rules_or_grammar_declaration): Remove trailing semicolon.
7708 (semi_colon.opt): Remove.
7709 * src/reader.h: Include location.h.
7710 (scanner_cursor): New decl.
7711 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7713 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7715 (STEP): Remove. No longer needed, now that adjust_location does
7716 the work. All uses removed.
7717 (scanner_cursor): New var.
7718 (adjust_location): Renamed from extend_location. It now sets
7719 *loc and adjusts the scanner cursor. All uses changed.
7720 Don't bother testing for CR.
7721 (handle_syncline): Remove location arg; now updates scanner cursor.
7722 All callers changed.
7723 (unexpected_end_of_file): Now accepts start boundary of token or
7724 comment, not location. All callers changed. Update scanner cursor,
7726 (SC_AFTER_IDENTIFIER): New state.
7727 (context_state): Renamed from c_context. All uses changed.
7728 (id_loc, code_start, token_start): New local vars.
7729 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7730 processing of Yacc white space and equivalents here.
7731 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7732 instead of returning ID immediately, since we need to search for
7734 (<INITIAL>"'", "\""): Save token_start.
7735 (<INITIAL>"%{", "{", "%%"): Save code_start.
7736 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7737 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7738 BEGIN context_state at end, not INITIAL.
7739 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7740 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7741 Return correct token start.
7742 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7743 the start of a character, string or multiline comment is found.
7744 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7745 Reduction): Adjust reported locations to match the more-precise
7746 results now expected.
7747 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7748 * tests/reduce.at (Useless Rules, Reduced Automaton,
7749 Underivable Rules): Likewise.
7750 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7751 or "|"' now that so many other tokens are allowed by the new grammar.
7753 * src/complain.h (current_file): Remove duplicate decl;
7754 current_file is now owned by files.h.
7755 * src/complain.c, src/scan-gram.l: Include files.h.
7757 2002-12-06 Paul Eggert <eggert@twinsun.com>
7759 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7760 promotes to int; it might be unsigned int.
7761 * data/yacc.c (yy_reduce_print): Likewise.
7763 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7764 be #defined in the prologue, not in the Bison declarations.
7765 This fixes Debian Bug 102878, reported by Shaul Karl.
7767 2002-12-02 Paul Eggert <eggert@twinsun.com>
7769 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7770 * lib/strtoul.c: New file, from gnulib.
7771 This fixes a porting bug reported by Peter Klein in
7772 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7774 2002-11-30 Paul Eggert <eggert@twinsun.com>
7776 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7777 and put only a forward declaration in the prologue. This is for
7778 consistency with the other scanner helper functions.
7780 Type clashes now generate warnings, not errors, since it
7781 appears that POSIX may allow some grammars with type clashes.
7782 * src/reader.c (grammar_current_rule_check): Warn about
7783 type clashes instead of complaining.
7784 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7786 Add Yacc library, since POSIX requires it.
7787 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7788 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7789 * lib/main.c, lib/yyerror.c: New files.
7791 gram_error can be static; it need not be extern.
7792 * src/reader.h (gram_error): Remove decl.
7793 * src/parse-gram.y (gram_error): Now static. Add static decl.
7794 (print_token_value): Omit parameter names from forward decl,
7797 2002-11-29 Paul Eggert <eggert@twinsun.com>
7799 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7800 be declared before being used. E.g., one should typically
7801 declare them in the prologue. Use GNU coding style in examples.
7802 Put "const" consistently after the type it modifies. Mention
7803 that C99 supports "inline". Mention that yyerror traditionally
7806 %parse-param and %lex-param now take just one argument, the
7807 declaration; the argument name is deduced from the declaration.
7809 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7810 Reporting, Table of Symbols): Document this.
7811 * src/parse-gram.y (add_param): New function.
7813 (declaration): Implement new rule for %parse-param and %lex-param.
7814 * src/scan-gram.l: "," now elicits a warning, rather than being
7815 a token; this is more compatible with byacc.
7816 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7818 2002-11-27 Paul Eggert <eggert@twinsun.com>
7820 Rename identifiers to avoid real and potential collisions.
7822 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7823 to avoid collision with lex macro described by Bruce Lilly in
7824 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7826 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7827 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7829 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7830 The name "yycontrol" violates the name space rules, and this stuff
7831 wasn't being used anyway.
7832 (input): Remove action; this stuff wasn't being used.
7833 (gram_error): Rename local variable yylloc -> loc.
7834 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7835 (YY_DECL): Don't use "yy" at start of local variables.
7836 All uses changed, e.g., yylloc -> loc.
7837 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7838 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7839 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7840 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7842 * src/parse-gram.y (gram_error): loc is now const *.
7843 * src/reader.h (gram_error): Likewise.
7845 2002-11-24 Paul Eggert <eggert@twinsun.com>
7849 * tests/actions.at (Actions after errors): Use an output format
7850 more similar to that of the Printers and Destructors test.
7851 Test the position of the ';' token too.
7852 (Printers and Destructors): Likewise.
7853 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7854 unnecessarily alarming people when the test fails.
7856 * data/yacc.c (yyerrlab1): Move this label down, so that the
7857 parser does not discard the lookahead token if the user code
7858 invokes YYERROR. This change is required for POSIX conformance.
7860 * lib/error.c: Sync with gnulib.
7862 2002-11-22 Paul Eggert <eggert@twinsun.com>
7864 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7865 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7866 * lib/xmalloc.c: Likewise.
7868 2002-11-20 Paul Eggert <eggert@twinsun.com>
7870 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7872 2002-11-20 Paul Eggert <eggert@twinsun.com>
7874 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7875 should use `if (! x) abort ();' rather than `assert (x);', and
7876 anyway it's one less thing to worry about configuring.
7878 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7879 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7880 and replace all instances of assert with abort.
7881 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7882 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7884 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7885 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7886 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7887 hash_find_entry, hash_rehash, hash_insert): Likewise.
7888 * src/conflicts.c (resolve_sr_conflict): Likewise.
7889 * src/lalr.c (set_goto_map, map_goto): Likewise.
7890 * src/nullable.c (nullable_compute): Likewise.
7891 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7892 * src/reader.c (packgram, reader): Likewise.
7893 * src/state.c (state_new, state_free, state_transitions_set,
7894 state_reduction_find): Likewise.
7895 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7896 symbol_pack): Likewise.
7897 * src/tables.c (conflict_row, pack_vector): Likewise.
7898 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7899 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7900 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7901 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7903 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7904 (ARGMATCH_CONSTRAINT): New macro.
7905 (ARGMATCH_ASSERT): Use it.
7907 * src/system.h (verify): New macro.
7908 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7910 * src/tables.c (tables_generate): Likewise.
7912 * src/struniq.c (struniq_assert): Now returns void, and aborts
7913 if the assertion is false.
7914 (struniq_assert_p): Remove.
7915 * src/struniq.h: Likewise.
7917 2002-11-18 Paul Eggert <eggert@twinsun.com>
7919 * data/glr.c (yygetLRActions): Replace `yyindex' with
7920 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7921 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7922 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7924 2002-11-18 Akim Demaille <akim@epita.fr>
7926 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7928 From Tim Van Holder.
7930 2002-11-17 Paul Eggert <eggert@twinsun.com>
7932 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7933 to "SyntaxError" for consistency with my 2002-11-15 change.
7935 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7936 not define to {}, since this breaks the common use of `YYDPRINTF
7937 ((...));' if a single statement is desired (e.g. before `else').
7938 Work around GCC warnings by surrounding corresponding calls with
7940 (yyhasResolvedValue): Remove unused function.
7941 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7943 (yyreportSyntaxError): Renamed from yyreportParseError.
7944 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7946 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7947 extern when possible. Remove unused initializations.
7949 2002-11-16 Akim Demaille <akim@epita.fr>
7951 Augment the similarity between GLR and LALR traces.
7953 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7954 (YY_REDUCE_PRINT): New.
7955 (yyparse): Use them.
7956 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7958 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7959 state reached after the reduction/recovery, since...
7960 (yyparse, yyprocessOneStack): Report the state we are entering in.
7962 2002-11-16 Akim Demaille <akim@epita.fr>
7964 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7965 Add support for --trace=skeleton.
7966 * src/scan-skel.l: %option debug.
7967 Scan strings of non-@ or \n instead of character by character.
7968 (scan_skel): Handle trace_skeleton.
7970 (@output_parser_name@, @output_header_name@): ``Restore'' their
7971 support (used to be M4 macros).
7972 * data/yacc.c: Quote larger chunks, a la glr.c.
7973 * data/lalr1.cc: Likewise.
7974 The header guards are no longer available, so use some other
7975 string than `YYLSP_NEEDED'.
7977 2002-11-16 Akim Demaille <akim@epita.fr>
7979 Make the ``Printers and Destructors'' test more verbose, taking
7980 `yacc.c''s behavior as (possibly wrong) reference.
7982 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7983 instead of fprint on stdout.
7984 Set and report the last_line of the symbols.
7985 Consistently display values and locations.
7987 2002-11-16 Paul Eggert <eggert@twinsun.com>
7989 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7991 2002-11-15 Paul Eggert <eggert@twinsun.com>
7993 * tests/actions.at (Actions after errors): New test case.
7995 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7996 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7997 tests/action.at, tests/calc.at, tests/conflicts.at,
7998 tests/cxx-type.at, tests/regression.at:
7999 "parse error" -> "syntax error" for POSIX compatibility.
8000 "parsing stack overflow..." -> "parser stack overflow" so
8001 that code matches Bison documentation.
8003 2002-11-15 Akim Demaille <akim@epita.fr>
8005 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8006 take two BRACED_CODE, not two string_content.
8007 Free the scanner's obstack when we are done.
8008 (code_content): New.
8009 * tests/calc.at: Adjust.
8010 * doc/bison.texinfo: Adjust.
8011 Also, make sure to include the `,' for these declarations.
8013 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8015 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8016 definition; avoids potential autoreconf problems.
8018 2002-11-15 Akim Demaille <akim@epita.fr>
8020 Always check the value returned by yyparse.
8022 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8023 returned by yyparse.
8024 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8026 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8027 returned by yyparse.
8029 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8031 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8034 2002-11-14 Paul Eggert <eggert@twinsun.com>
8036 * src/output.c (output_skeleton): Call xfopen instead of
8037 duplicating xfopen's body.
8039 Fix bugs reported by Nelson H. F. Beebe in
8040 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8042 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8043 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8044 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8045 file twice in the grammar, as an extra check.
8047 * tests/input.at (Torturing the Scanner): Surround the
8048 backslash-newline tests with "#if 0", to make it less likely that
8049 we'll run into compiler bugs. Bring back solitary \ inside
8050 comment, but add a closing comment to work around HP C bug. Don't
8051 test backslash-newline in C character constant.
8053 2002-11-14 Akim Demaille <akim@epita.fr>
8055 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8056 status of the compiler.
8057 Calling `exit 1' is no longer needed.
8058 Reported by Nelson H. F. Beebe.
8060 2002-11-14 Akim Demaille <akim@epita.fr>
8062 * tests/atlocal.in (CPPFLAGS): We have config.h.
8063 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8065 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8066 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8067 * tests/regression.at, tests/torture.at: Use them for all the
8068 grammars that are to be compiled.
8069 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8070 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8071 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8073 2002-11-14 Akim Demaille <akim@epita.fr>
8075 * doc/bison.texinfo: Various formatting changes (alignments in
8076 samples, additional @group/@end group, GCS in samples.
8077 Use @deffn instead of simple @table to define the directives,
8078 macros, variables etc.
8080 2002-11-13 Paul Eggert <eggert@twinsun.com>
8082 Fix some bugs reported by Albert Chin-A-Young in
8083 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8085 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8086 -o c"; the HP C compiler chatters during compilation.
8087 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8088 * tests/headers.at (export YYLTYPE): Likewise.
8090 * tests/input.at (Torturing the Scanner): Remove lines containing
8091 solitary backslashes, as they tickle a bug in the HP C compiler.
8093 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8094 comments, since they're not portable. Use GNU coding style.
8096 2002-11-13 Akim Demaille <akim@epita.fr>
8098 * data/yacc.c: Leave bigger chunks of quoted text.
8099 (YYDSYMPRINTF): New.
8100 Use it to report symbol activities.
8101 * data/glr.c (YYDSYMPRINTF): New.
8104 2002-11-12 Paul Eggert <eggert@twinsun.com>
8108 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8109 (yyglrReduce): Return yyok, not 0.
8110 This should avoid the enumerated-type warnings reported
8111 by Nelson H. F. Beebe in
8112 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8114 * lib/bbitset.h (BITSET_INLINE): Remove.
8115 * lib/bitset.h [! BITSET_INLINE]: Remove.
8116 (bitset_set, bitset_reset, bitset_test): Rename local vars
8117 to avoid shadowing warnings by GCC.
8119 * data/glr.c (inline): Remove #define. It's the user's
8120 responsibility to #define it away, just like 'const'.
8121 This fixes one of the bugs reported by Nelson H. F. Beebe in
8122 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8124 * Makefile.maint (po-check): Scan .l and .y files instead of the
8125 .c and the .h files that they generate. This fixes the bug
8126 reported by Tim Van Holder in:
8127 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8128 Look for N_ as well as for _. Try to avoid matching #define for
8130 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8131 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8132 * src/scan-gram.l: Revamp regular expressions so that " and '
8133 do not confuse xgettext.
8135 * src/struniq.h (struniq_new): Do not declare the return type
8136 to be 'const'; this violates the C standard.
8137 * src/struniq.c (struniq_new): Likewise.
8139 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8141 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8142 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8145 2002-11-12 Akim Demaille <akim@epita.fr>
8147 * Makefile.maint: Sync with Autoconf:
8148 (local_updates): New.
8150 2002-11-12 Akim Demaille <akim@epita.fr>
8152 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8154 2002-11-12 Akim Demaille <akim@epita.fr>
8156 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8159 2002-11-12 Akim Demaille <akim@epita.fr>
8161 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8164 2002-11-12 Akim Demaille <akim@epita.fr>
8166 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8167 Use it to test the GLR parser.
8169 2002-11-12 Akim Demaille <akim@epita.fr>
8171 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8173 * data/glr.c (yystos): New.
8174 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8176 (yyval): Don't define it, it is handled via M4.
8177 (yyrecoverParseError): Free verbosely the discarded symbols.
8178 * data/yacc.c (yysymprint): Remove, rather...
8179 (b4_yysymprint_generate): invoke.
8180 * data/c.m4 (b4_yysymprint_generate): New.
8181 Accept pointers as arguments, as opposed to the version from
8183 (b4_yydestruct_generate): Likewise.
8184 * tests/cations.at (Printers and Destructors): Use Bison directives
8185 instead of CPP macros.
8186 Don't rely on internal details.
8188 2002-11-12 Akim Demaille <akim@epita.fr>
8190 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8191 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8192 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8193 it against YYEMPTY and so forth), work on yytoken (i.e., set
8194 it to YYEMPTY etc.).
8195 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8196 (b4_symbol_actions): Remove.
8197 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8198 for 0, end-of-input.
8200 2002-11-12 Akim Demaille <akim@epita.fr>
8202 * doc/bison.texinfo (Destructor Decl): New.
8204 2002-11-12 Akim Demaille <akim@epita.fr>
8206 * src/tables.c (tables_generate): Use free for pointers that
8207 cannot be NULL, not XFREE.
8208 (pack_vector): Use assert, not fatal, for bound violations.
8209 * src/state.c (state_new): Likewise.
8210 * src/reader.c (reader): Likewise.
8211 * src/lalr.c (set_goto_map): Likewise.
8212 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8215 2002-11-12 Akim Demaille <akim@epita.fr>
8217 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8219 * src/scan-gram.l (last_string): Is global to the file, not to
8221 * src/parse-gram.y (input): Don't append the epilogue here,
8222 (epilogue.opt): do it here, and free the scanner's obstack.
8223 * src/reader.c (epilogue_set): Rename as...
8224 (epilogue_augment): this.
8225 * data/c.m4 (b4_epilogue): Defaults to empty.
8227 2002-11-12 Akim Demaille <akim@epita.fr>
8229 * src/getargs.c (long_options): Remove duplicates.
8230 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8232 * doc/bison.rnh: Remove.
8233 * doc/bison.texinfo (VMS Invocation): Remove.
8235 2002-11-12 Akim Demaille <akim@epita.fr>
8237 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8238 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8240 Use struniq for symbols.
8242 * src/symtab.h (symbol_t): The tag member is a struniq.
8243 (symbol_type_set): Adjust.
8244 * src/symtab.c (symbol_new): Takes a struniq.
8245 (symbol_free): Don't free the tag member.
8246 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8247 (hash_compare_symbol, hash_symbol): these.
8248 Use the fact that tags as struniqs.
8249 (symbol_get): Use struniq_new.
8250 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8252 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8253 and type members are struniqs.
8254 * src/reader.c (get_merge_function)
8255 (grammar_current_rule_merge_set): Adjust.
8256 (TYPE, current_type): Are struniq.
8258 Use struniq for file names.
8260 * src/files.h, src/files.c (infile): Split into...
8261 (grammar_file, current_file): these.
8262 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8263 * src/reduce.c (reduce_print): Likewise.
8264 * src/getargs.c (getargs): Likewise.
8265 * src/complain.h, src/complain.c: Likewise.
8266 * src/main.c (main): Call struniqs_new early enough to use it for
8268 Don't free the input file name.
8270 2002-11-12 Akim Demaille <akim@epita.fr>
8272 * src/symtab.c (symbol_free): Remove dead deactivated code:
8273 type_name are properly removed.
8274 Don't use XFREE to free items that cannot be NULL.
8275 * src/struniq.h, src/struniq.c: New.
8276 * src/main.c (main): Initialize/free struniqs.
8277 * src/parse-gram.y (%union): Add astruniq member.
8279 * src/scan-gram.l (<{tag}>): Return a struniq.
8280 Free the obstack bit that used to store it.
8281 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8283 2002-11-11 Paul Eggert <eggert@twinsun.com>
8285 Revamp to fix many (but not all) of the C- and M4-related quoting
8286 problems. Among other things, this fixes the Bison bug reported
8287 by Jan Hubicka when processing the Bash grammar; see:
8288 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8290 Use new @ escapes consistently. Represent brackets with @{ and @}
8291 rather than @<:@ and @:>@, since this works a bit better with dumb
8292 editors like vi. Represent @ with @@, since @ is now consistently
8293 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8294 __ofile__, to avoid unexpected expansions. Similarly, use @output
8295 rather than #output.
8297 * data/c.m4 (b4_copyright): Omit file name from comment, since
8298 the file name could contain "*/".
8299 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8300 be quoted. All uses changed.
8302 * data/glr.c: Use new @ escapes consistently.
8303 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8304 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8305 Remove, since they couldn't handle arbitrary characters in file
8307 * data/lalr1.cc: Likewise.
8308 * data/yacc.c: Likewise.
8310 * src/files.c (output_infix): Remove; all uses removed.
8311 * src/files.h: Likewise.
8313 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8314 mishandled funny characters in file names, and anyway it isn't
8316 * data/yacc.c: Likewise.
8317 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8319 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8320 * data/yacc.c: Likewise.
8322 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8324 (muscle_init): Quote filename as a C string.
8325 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8326 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8327 * src/output.c (escaped_file_name_output): New function.
8328 (prepare_symbols): Quote tokens for M4.
8329 (prepare): Don't insert output_infix, output_prefix,
8330 output_parser_name, output_header_name; this is now down by scan-skel.
8331 Insert skeleton as a C string.
8333 * src/output.c (user_actions_output, symbol_destructors_output,
8334 symbol_printers_output): Quote filenames for C and M4.
8335 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8337 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8338 escapes other than \\ and \'; this simplifies the code.
8339 (<SC_STRING>): Likewise, for \\ and \".
8340 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8341 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8342 Use new escapes @{ and @} for [ and ].
8344 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8345 them with auto vars.
8346 Switch to new escape scheme, where @ is the escape character uniformly.
8347 Abort if a stray escape character is found. Avoid unbounded input
8348 buffer when parsing non-escaped text.
8350 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8351 __oline__, #output, $@, and @{ do not have unintended meanings.
8353 2002-11-09 Paul Eggert <eggert@twinsun.com>
8355 Fix the test failure due to GCC warnings described in
8356 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8357 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8358 evaluate to 0 if it's impossible for NINF to be in the respective
8360 (yygetLRActions, yyrecoverParseError): Use them.
8362 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8363 counted in the token inserted at end of file. Now takes
8364 location_t *, not location_t, so that the location can be
8365 adjusted. All uses changed.
8367 * tests/regression.at (Invalid inputs): Adjust wording in
8368 diagnostic to match the new behavior.
8370 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8371 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8372 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8373 abort ();'. This reduces the runtime of the "Many lookaheads"
8374 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8377 2002-11-07 Paul Eggert <eggert@twinsun.com>
8379 * src/parse-gram.y (CHARACTER): Remove unused token.
8382 * src/scan-gram.l: Remove stack option. We no longer use the
8383 stack, since the stack was never deeper than 1; instead, use the
8384 new auto var c_context to record the stacked value.
8386 Remove nounput option. At an unexpected end of file, we now unput
8387 the minimal input necessary to end cleanly; this simplifies the
8390 Avoid unbounded token sizes where this is easy.
8392 (unexpected_end_of_file): New function.
8393 Use it to systematize the error message on unexpected EOF.
8394 (last-string): Now auto, not static.
8395 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8396 (scanner_last_string_free): Remove; not used.
8397 (percent_percent_count): Move decl to just before use.
8398 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8399 not the (never otherwised-used) CHARACTER.
8401 2002-11-07 Akim Demaille <akim@epita.fr>
8403 Let yyerror always receive the msg as last argument, so that
8404 yyerror can be variadic.
8406 * data/yacc.c (b4_yyerror_args): New.
8407 Use it when calling yyerror.
8408 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8409 Use it when calling yyerror.
8410 * doc/bison.texinfo (Error Reporting): Adjust.
8411 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8412 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8414 2002-11-06 Akim Demaille <akim@epita.fr>
8416 #line should have quoted strings.
8417 Ideally, this should be done by m4_quotearg.
8419 * src/scan-skel.l: Include quotearg.h.
8421 * src/output.c (symbol_printers_output)
8422 (symbol_destructors_output): Quote the file name.
8424 2002-11-06 Akim Demaille <akim@epita.fr>
8426 * tests/regression.at (Invalid inputs): Adjust to the recent
8429 2002-11-06 Akim Demaille <akim@epita.fr>
8432 Reported by Jim Kent.
8434 * data/c.m4 (b4_syncline): New.
8435 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8436 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8437 * src/output.c (user_actions_output): Likewise.
8438 (prepare): Define 'b4_synclines_flag'.
8439 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8441 2002-11-06 Akim Demaille <akim@epita.fr>
8443 * src/main.c (main): Free `infile'.
8444 * src/scan-gram.l (handle_syncline): New.
8446 * src/output.c (user_actions_output, symbol_destructors_output)
8447 (symbol_printers_output): Use the location's file name, not
8449 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8451 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8453 * src/tables.c (matching_state): Don't allow states to match if
8454 either has GLR conflict entries.
8456 2002-11-05 Paul Eggert <eggert@twinsun.com>
8458 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8459 "integer out of range" rather than "invalid value".
8460 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8463 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8464 Also, remove one static variable in the scanner.
8466 * src/scan-gram.l (braces_level): Now auto, not static.
8467 Initialize to zero if the compiler is being picky.
8468 (INITIAL): Clear braces_level instead of incrementing it.
8469 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8470 as POSIX 1003.1-2001 requires.
8471 * src/system.h (IF_LINT): New macro, taken from coreutils.
8472 * configure.ac: Define "lint" if --enable-gcc-warnings.
8474 2002-11-05 Akim Demaille <akim@epita.fr>
8476 * src/scan-gram.l: When it starts with `%', complain about the
8477 whole directive, not just that `invalid character: %'.
8479 2002-11-04 Akim Demaille <akim@epita.fr>
8481 * Makefile.maint: Update from Autoconf.
8482 (update, cvs-update, po-update, do-po-update): New.
8484 2002-11-04 Akim Demaille <akim@epita.fr>
8486 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8488 Have yyerror `use' its arguments.
8489 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8490 returns true when location & yacc & pure & parse-param.
8491 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8493 2002-11-04 Akim Demaille <akim@epita.fr>
8495 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8497 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8500 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8503 2002-11-03 Paul Eggert <eggert@twinsun.com>
8505 * src/reader.c (get_merge_function, grammar_current_rule_check):
8506 Use consistent diagnostics for reporting type name clashes.
8507 Quote the types with <>, for consistency with Yacc.
8508 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8510 2002-11-03 Akim Demaille <akim@epita.fr>
8512 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8514 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8515 (b4_parse_param): Remove.
8516 Use b4_identification.
8517 Propagate b4_pure_args where needed to pass them to yyerror.
8518 * data/glr.m4 (b4_parse_param): Remove.
8519 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8520 (b4_lpure_formals): New.
8521 Use b4_identification.
8522 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8523 b4_user_formals and b4_user_args.
8524 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8525 (yyreportAmbiguity): When using a pure parser, also need
8526 the location, and the parse-params.
8528 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8529 When using a pure parser, also need the parse-params.
8531 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8532 (%pure-parser + %parse-param) LALR and GLR parsers.
8533 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8534 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8535 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8536 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8537 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8538 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8539 * doc/bison.texinfo: Untabify the whole file.
8540 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8541 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8542 (Error Reporting): Adjust to these new directives.
8543 Document %error-verbose, deprecate YYERROR_VERBOSE.
8545 2002-11-03 Akim Demaille <akim@epita.fr>
8547 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8548 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8549 command line options.
8550 * tests/cxx-type.at: Formatting changes.
8552 2002-11-03 Paul Eggert <eggert@twinsun.com>
8554 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8555 to count columns correctly, and to check for invalid inputs.
8557 Use mbsnwidth to count columns correctly. Account for tabs, too.
8559 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8560 (extend_location): New function.
8563 Handle CRLF in C code rather than in Lex code.
8564 (YY_INPUT): New macro.
8565 (no_cr_read): New function.
8567 Scan UCNs, even though we don't fully handle them yet.
8568 (convert_ucn_to_byte): New function.
8570 Handle backslash-newline correctly in C code.
8571 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8572 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8574 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8575 Use {splice} wherever C allows backslash-newline.
8576 YY_STEP after space, newline, vertical-tab.
8577 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8579 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8581 ({int}, handle_action_dollar, handle_action_at): Check for integer
8584 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8586 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8587 as well as \000. Check for UCHAR_MAX, not 255.
8588 Allow \x with an arbitrary positive number of digits, as in C.
8589 Check for overflow here.
8590 Allow \? and UCNs, for compatibility with C.
8592 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8593 with quote slot used by complain_at.
8595 * tests/input.at: Add tests for backslash-newline, m4 quotes
8596 in symbols, long literals, and funny escapes in strings.
8598 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8599 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8600 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8601 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8602 * m4/mbswidth.m4: New file, from GNU coreutils.
8604 * doc/bison.texinfo (Grammar Outline): Document // comments.
8605 (Symbols): Document that trigraphs have no special meaning in Bison,
8606 nor is backslash-newline allowed.
8607 (Actions): Document that trigraphs have no special meaning.
8609 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8612 2002-11-02 Paul Eggert <eggert@twinsun.com>
8614 * src/reader.c: Don't include quote.h; not needed.
8615 (get_merge_function): Reword warning to be consistent with
8616 type clash diagnostic in grammar_current_rule_check.
8618 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8619 bug in trigraph handling.
8621 * src/output.c (prepare_symbols): When printing token names,
8622 escape "[" as "@<:@" and likewise for "]".
8624 * src/system.h (errno): Remove declaration, as we are now
8625 assuming C89 or better, and C89 guarantees errno.
8627 2002-10-30 Paul Eggert <eggert@twinsun.com>
8629 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8630 Check for close failures.
8631 * src/files.h (xfclose): Return void, not int, since it always
8633 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8635 * src/output.c (output_skeleton): Use xfclose rather than fclose
8636 and ferror. xfclose now checks ferror.
8638 * data/glr.c (YYLEFTMOST_STATE): Remove.
8639 (yyreportTree): Use a stack-based leftmost state. This avoids
8640 our continuing battles with bogus warnings about initializers.
8642 2002-10-30 Akim Demaille <akim@epita.fr>
8644 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8647 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8649 * tests/glr-regr1.at: New test for reported regressions.
8650 * tests/testsuite.at: Add glr-regr1.at test.
8651 * tests/Makefile.am: Add glr-regr1.at test.
8653 2002-10-24 Paul Eggert <eggert@twinsun.com>
8657 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8658 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8659 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8660 Don't assume strdup exists; POSIX says its an XSI extension.
8661 Check for buffer overflow on input.
8663 2002-10-24 Akim Demaille <akim@epita.fr>
8665 * src/output.c (output_skeleton): Don't disable M4sugar comments
8666 too soon: it results in comments being expanded.
8667 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8670 2002-10-24 Akim Demaille <akim@epita.fr>
8672 * data/yacc.c (m4_int_type): New.
8673 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8674 char' as only yacc.c wants K&R portability.
8675 * data/glr.c (yysigned_char): Remove.
8676 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8677 Reported by Quoc Peyrot.
8679 2002-10-23 Paul Eggert <eggert@twinsun.com>
8681 * src/main.c (main): With --trace=time, report times even if a
8682 non-fatal error occurs. Formerly, the times were reported in some
8683 such cases but not in others.
8684 * src/reader.c (reader): Just return if a complaint has been issued,
8685 instead of exiting, so that 'main' can report times.
8687 2002-10-22 Akim Demaille <akim@epita.fr>
8689 * src/system.h: Include sys/types.
8690 Reported by Bert Deknuydt.
8692 2002-10-23 Paul Eggert <eggert@twinsun.com>
8694 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8695 Suggested by Art Haas.
8697 2002-10-22 Paul Eggert <eggert@twinsun.com>
8699 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8700 decl; not needed any more.
8701 * src/main.c (main): Use return to exit, undoing yesterday's change.
8702 The last OS that we could find where this wouldn't work is
8703 SunOS 3.5, and that's too old to worry about now.
8705 * data/glr.c (struct yyltype): Define members even when not
8706 doing locations. This is more consistent with yacc.c, and it
8707 works around the following bug reports:
8708 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8709 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8711 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8712 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8713 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8715 2002-10-22 Akim Demaille <akim@epita.fr>
8719 2002-10-21 Paul Eggert <eggert@twinsun.com>
8721 Be consistent about 'bool'; the old code used an enum in one
8722 module and an int in another, and this violates the C standard.
8723 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8724 * configure.ac (AC_HEADER_STDBOOL): Add.
8725 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8726 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8727 * src/symtab.c (hash_compare_symbol_t): Likewise.
8728 * src/system.h (bool, false, true): Use a definition consistent
8729 with ../lib/hash.c. All uses changed.
8731 * src/complain.c (warning_issued): Renamed from warn_message_count,
8732 so that we needn't worry about integer overflow (!).
8733 Now of type bool. All uses changed.
8734 (complaint_issued): Renamed from complain_message_count; likewise.
8736 * src/main.c (main): Use exit to exit with failure.
8738 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8739 rather than 1 and 0.
8740 * src/main.c (main): Likewise.
8741 * src/getargs.c (getargs): Likewise.
8742 * src/reader.c (reader): Likewise.
8744 * src/getarg.c (getargs): Remove duplicate code for
8745 "Try `bison --help'".
8747 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8748 What was that "2" for?
8750 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8751 * src/getargs.c (usage): Likewise.
8753 * src/getargs.c (getargs): When there are too few operands, report
8754 the last one. When there are too many, report the first extra
8755 one. This is how diffutils does it.
8757 2002-10-20 Paul Eggert <eggert@twinsun.com>
8759 Remove K&R vestiges.
8760 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8761 * src/complain.c (VA_START): Remove. Assume prototypes.
8762 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8763 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8764 fatal): Assume prototypes.
8765 * src/complain.h: Assume prototypes.
8766 * src/system.h (PARAMS): Remove.
8767 Include <limits.h> unconditionally, since it's guaranteeed even
8768 for a freestanding C89 compiler.
8769 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8770 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8772 2002-10-20 Akim Demaille <akim@epita.fr>
8774 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8775 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8776 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8777 (yyresolveStates, yyresolveAction, yyresolveStack)
8778 (yyprocessOneStack): Use them.
8779 (yy_reduce_print): New.
8780 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8782 2002-10-20 Akim Demaille <akim@epita.fr>
8784 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8785 arguments and output `void'.
8786 (b4_c_function): Rename as...
8787 (b4_c_function_def): this.
8788 (b4_c_function_decl, b4_c_ansi_function_def)
8789 (b4_c_ansi_function_decl): New.
8790 Change the interpretation of the arguments: before `int, foo', now
8792 * data/yacc.c (yyparse): Prototype and define thanks to these.
8793 Adjust b4_c_function_def uses.
8794 * data/glr.c (yyparse): Likewise, but ANSI only.
8796 2002-10-20 Akim Demaille <akim@epita.fr>
8798 * src/output.c (prepare): Move the definition of `tokens_number',
8799 `nterms_number', `undef_token_number', `user_token_number_max'
8801 (prepare_tokens): Here.
8802 (prepare_tokens): Rename as...
8803 (prepare_symbols): this.
8804 (prepare): Move the definition of `rules_number' to...
8805 (prepare_rules): here.
8806 (prepare): Move the definition of `last', `final_state_number',
8807 `states_number' to...
8808 (prepare_states): here.
8809 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8811 2002-10-20 Akim Demaille <akim@epita.fr>
8813 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8815 2002-10-20 Akim Demaille <akim@epita.fr>
8817 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8820 2002-10-20 Akim Demaille <akim@epita.fr>
8822 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8823 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8825 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8827 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8828 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8831 2002-10-19 Paul Eggert <eggert@twinsun.com>
8833 Do not create a temporary file, as that involves security and
8834 cleanup headaches. Instead, use a pair of pipes.
8835 Derived from a suggestion by Florian Krohm.
8836 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8837 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8838 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8839 (BISON_PREREQ_SUBPIPE): Add.
8840 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8841 Add subpipe.h, subpipe.c.
8842 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8843 * po/POTFILES.in: Add lib/subpipe.c.
8844 * src/output.c: Include "subpipe.h".
8845 (m4_invoke): Remove decl.
8846 (scan_skel): New decl.
8847 (output_skeleton): Use pipe rather than temporary file for m4 input.
8848 Check that m4sugar.m4 is readable, to avoid deadlock.
8849 Check for pipe I/O error.
8850 * src/scan-skel.l (readpipe): Remove decl.
8851 (scan_skel): New function, to be used in place of m4_invoke.
8852 Read from stream rather than file.
8854 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8855 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8856 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8857 this generates a more-accurate value anyway.
8859 * lib/timevar.c (timervar_accumulate): Rename locals to
8860 avoid confusion with similarly-named more-global.
8861 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8863 * src/output.c (prepare): Use xstrdup to convert char const *
8864 to char *, to avoid GCC warning.
8866 2002-10-19 Akim Demaille <akim@epita.fr>
8868 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8869 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8870 Use them to have `calc.y' ready for %pure-parser.
8871 * data/yacc.c (YYLEX): Pass a yylex return type to
8874 2002-10-19 Akim Demaille <akim@epita.fr>
8876 Prototype support of %lex-param and %parse-param.
8878 * src/parse-gram.y: Add the definition of the %lex-param and
8879 %parse-param tokens, plus their rules.
8880 Drop the `_' version of %glr-parser.
8882 * src/scan-gram.l (INITIAL): Scan them.
8883 * src/muscle_tab.c: Comment changes.
8884 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8885 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8886 (muscle_entry_s): The `value' member is no longer const.
8887 Adjust all dependencies.
8888 * src/muscle_tab.c (muscle_init): Adjust: use
8889 MUSCLE_INSERT_STRING.
8890 Initialize the obstack earlier.
8891 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8892 (muscle_pair_list_grow): New.
8893 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8894 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8895 * tests/calc.at: Use %locations, not --locations.
8896 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8898 2002-10-19 Akim Demaille <akim@epita.fr>
8900 * src/getargs.c (usage): Take status as argument and exit
8902 Report the traditional `Try ... --help' message when status != 0.
8903 (usage, version): Don't take a FILE * as arg, it is pointless.
8904 (getargs): When there is an incorrect number of arguments, make it
8905 an error, and report it GNUlically thanks to `usage ()'.
8907 2002-10-18 Paul Eggert <eggert@twinsun.com>
8909 * data/glr.c (yyreportParseError): Don't assume that sprintf
8910 yields the length of the printed string, as this is not true
8911 on SunOS 4.1.4. Reported by Peter Klein.
8913 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8914 * tests/conflicts.at (%nonassoc and eof): Likewise.
8915 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8917 2002-10-17 Akim Demaille <akim@epita.fr>
8919 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8920 * src/getargs.c (trace_types, trace_args): Adjust.
8921 * src/reader.c (grammar_current_rule_prec_set)
8922 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8923 Standardize error messages.
8925 (reader): Use trace_flag to enable scanner/parser debugging,
8926 instead of an adhoc scheme.
8927 * src/scan-gram.l: Remove trailing debugging code.
8929 2002-10-16 Paul Eggert <eggert@twinsun.com>
8931 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8934 * NEWS: Officially drop support for building Bison with K&R C,
8935 since it didn't work anyway and it's not worth worrying about.
8936 * Makefile.maint (wget_files): Remove ansi2knr.c.
8937 (ansi2knr.c-url_prefix): Remove.
8938 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8939 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8940 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8942 2002-10-15 Paul Eggert <eggert@twinsun.com>
8944 Stop using the "enum_" trick for K&R-style function definitions;
8945 it confused me, and I was the author! Instead, assume that people
8946 who want to use K&R C compilers (when using these modules in GCC,
8947 perhaps?) will run ansi2knr.
8949 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8950 All uses of "enum_" changed to "enum ".
8951 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8952 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8954 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8955 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8956 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8957 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8958 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8959 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8960 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8961 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8962 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8963 Use function prototypes; this removes the need for declaring
8964 static functions simply to provide their prototypes.
8965 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8966 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8967 bitset_count_, bitset_create, bitset_dump, bitset_first,
8968 bitset_free, bitset_init, bitset_last, bitset_next,
8969 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8970 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8971 bitset_print, bitset_release_memory, bitset_toggle_,
8972 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8973 debug_bitset): Likewise.
8974 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8975 * lib/bitset_stats.c (bitset_log_histogram_print,
8976 bitset_percent_histogram_print, bitset_stats_and,
8977 bitset_stats_and_cmp, bitset_stats_and_or,
8978 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8979 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8980 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8981 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8982 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8983 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8984 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8985 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8986 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8987 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8988 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8989 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8990 bitset_stats_zero): Likewise.
8991 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8992 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8993 bitsetv_dump, debug_bitsetv): Likewise.
8994 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8995 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8996 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8997 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8998 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8999 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9000 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9001 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9002 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9003 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9004 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9006 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9007 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9008 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9009 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9010 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9011 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9012 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9013 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9014 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9015 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9016 lbitset_xor_cmp, lbitset_zero): Likewise.
9018 2002-10-14 Akim Demaille <akim@epita.fr>
9022 2002-10-14 Akim Demaille <akim@epita.fr>
9024 * tests/Makefile.am (maintainer-check-posix): New.
9026 2002-10-14 Akim Demaille <akim@epita.fr>
9028 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9031 2002-10-14 Akim Demaille <akim@epita.fr>
9033 * src/tables.c (table_ninf_remap): base -> tab.
9034 Reported by Matt Rosing.
9036 2002-10-14 Paul Eggert <eggert@twinsun.com>
9038 * tests/action.at, tests/calc.at, tests/conflicts.at,
9039 tests/cxx-type.at, tests/headers.at, tests/input.at,
9040 tests/regression.at, tests/synclines.at, tests/torture.at:
9041 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9042 so that the tests still work even if POSIXLY_CORRECT is set.
9043 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9045 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9046 for portability to K&R hosts. Fix typo: signed char is guaranteed
9047 only to 127, not to 128.
9048 * data/glr.c (yysigned_char): New type.
9049 * data/yacc.c (yysigned_char): Likewise.
9050 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9052 2002-10-13 Paul Eggert <eggert@twinsun.com>
9054 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9055 true due to limited range of data type" warning from GCC.
9057 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9058 by wrapping enum yytokentype's definition inside #ifndef
9059 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9061 2002-10-13 Akim Demaille <akim@epita.fr>
9063 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9064 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9066 2002-10-13 Akim Demaille <akim@epita.fr>
9068 * Makefile.maint: Update from Autoconf 2.54.
9069 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9071 2002-10-13 Akim Demaille <akim@epita.fr>
9073 * src/print.c (print_state): Separate the list of solved conflicts
9074 from the other items.
9075 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9077 2002-10-13 Akim Demaille <akim@epita.fr>
9079 Let nondeterministic skeletons be usable with deterministic
9082 With the patch, GAWK compiled by GCC without -O2 passes its test
9083 suite using a GLR parser driven by LALR tables. It fails with -O2
9084 because `struct stat' gives two different answers on my machine:
9085 88 (definition of an auto var) and later 96 (memset on this var).
9086 Hence the stack is badly corrumpted. The headers inclusion is to
9087 blame: if I move the awk.h inclusion before GLR's system header
9088 inclusion, the two struct stat have the same size.
9090 * src/tables.c (pack_table): Always create conflict_table.
9091 (token_actions): Always create conflict_list.
9092 * data/glr.c (YYFLAG): Remove, unused.
9094 2002-10-13 Akim Demaille <akim@epita.fr>
9096 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9098 (VALGRIND, GXX): New.
9099 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9100 * tests/bison.in: Run $PREBISON a pre-command.
9101 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9102 (maintainer-check-g++): New.
9103 * Makefile.am (maintainer-check): New.
9105 2002-10-13 Akim Demaille <akim@epita.fr>
9107 * data/glr.c: Formatting changes.
9108 Tweak some trace messages to match yacc.c's.
9110 2002-10-13 Akim Demaille <akim@epita.fr>
9112 GLR parsers sometimes raise parse errors instead of performing the
9114 Reported by Charles-Henry de Boysson.
9116 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9117 check the length of the traces when %glr.
9118 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9120 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9122 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9123 (yyltype): Remove the yy prefix from the member names.
9124 (yytable): Complete its comment.
9125 (yygetLRActions): Map error action number from YYTABLE from
9127 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9128 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9129 not satisfying as we could compare an YYACTION computed from
9130 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9131 only value for error actions.
9132 (yyreportParseError): In verbose parse error messages, don't issue
9133 `error' in the list of expected tokens.
9134 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9135 next action to perform to match glr.c's decoding.
9136 (yytable): Complete its comment.
9138 2002-10-13 Paul Eggert <eggert@twinsun.com>
9140 Fix problem reported by Henrik Grubbstroem in
9141 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9142 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9143 because the Bison parser reads the second action before reducing
9145 * src/scan-gram.l (rule_length): New static var.
9146 Use it to keep track of the rule length in the scanner, since
9147 we can't expect the parser to be in lock-step sync with the scanner.
9148 (handle_action_dollar, handle_action_at): Use this var.
9149 * tests/actions.at (Exotic Dollars): Test for the problem.
9151 2002-10-12 Paul Eggert <eggert@twinsun.com>
9153 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9154 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9155 Include <sys/time.h> when checking for clock_t and struct tms.
9156 Use same include order as source.
9157 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9158 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9160 * lib/timevar.c: Update copyright date and clarify comments.
9161 (get_time) [IN_GCC]: Keep the GCC version for reference.
9163 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9164 GCC version as of today, then merge Bison's changes.
9165 Change "GCC" to "Bison" in copyright notice. timevar.def's
9166 author is Akim, so change that too.
9168 * src/reader.c (grammar_current_rule_check):
9169 Don't worry about the default action if $$ is untyped.
9170 Prevents bogus warnings reported by Jim Gifford in
9171 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9173 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9174 * data/glr.c, data/lalr1.cc, data/yacc.c:
9175 Output token definitions before the first part of user declarations.
9176 Fixes compatibility problem reported by Jim Gifford for kbd in
9177 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9179 2002-10-11 Paul Eggert <eggert@twinsun.com>
9181 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9182 (yyparse): here. This undoes some of the 2002-07-25 change.
9183 Compatibility problem reported by Ralf S. Engelschall with
9184 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9186 2002-10-11 Akim Demaille <akim@epita.fr>
9188 * tests/regression.at Characters Escapes): New.
9189 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9191 Reported by Jan Nieuwenhuizen.
9193 2002-10-11 Akim Demaille <akim@epita.fr>
9197 2002-10-10 Paul Eggert <eggert@twinsun.com>
9199 Portability fixes for bitsets; this also avoids several GCC
9202 * lib/abitset.c: Include <stddef.h>, for offsetof.
9203 * lib/lbitset.c: Likewise.
9205 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9206 properly for vectors of objects. Do not assume that adding a
9207 header size to a multiple of a word size yields a value that is
9208 properly aligned for the whole union.
9209 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9211 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9212 unique names for structures.
9213 * lib/ebitset.c (ebitset_bytes): Likewise.
9214 * lib/lbitset.c (lbitset_bytes): Likewise.
9216 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9217 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9218 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9219 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9220 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9221 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9222 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9223 to improve the type-checking that GCC can do.
9224 * lib/bitset.c (bitset_op4_cmp): Likewise.
9225 * lib/bitset_stats.c (bitset_stats_count,
9226 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9227 bitset_stats_copy, bitset_stats_disjoint_p,
9228 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9229 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9230 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9231 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9232 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9233 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9234 bitset_stats_or_and_cmp): Likewise.
9235 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9236 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9237 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9238 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9240 * lib/abitset.h: Include bitset.h, not bbitset.h.
9241 * lib/ebitset.h: Likewise.
9242 * lib/lbitset.h: Likewise.
9244 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9245 All instances of parameters of type enum bitset_opts are now of
9246 type enum_bitset_opts, to conform to the C Standard, and similarly
9247 for enum_bitset_type.
9248 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9249 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9251 Do not use "struct bitset_struct" to mean different things in
9252 different modules. Not only is this confusing, it violates
9253 the C Standard, which requires that structure types in different
9254 modules must be compatible if one is to be passed to the other.
9255 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9256 All instances of "struct bitset_struct *" replaced with "bitset".
9257 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9258 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9259 struct lbitset_struct, struct bitset_stats_struct): New types.
9260 All uses of struct bitset_struct changed to union bitset_union,
9262 * lib/abitset.c (struct abitset_struct, abitset,
9263 struct bitset_struct): Remove.
9264 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9265 struct bitset_struct): Remove.
9266 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9267 bitset_struct): Remove.
9268 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9271 Do not call a function of type T using a call that assumes the
9272 function is of a different type U. Standard C requires that a
9273 function must be called with a type that is compatible with its
9275 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9277 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9279 * lib/ebitset.c (PFV): Remove.
9280 * lib/lbitset.c (PFV): Likewise.
9281 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9282 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9284 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9285 (ebitset_vtable): Use them.
9286 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9287 lbitset_xor): New functions.
9288 (lbitset_vtable): Use them.
9290 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9293 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9295 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9296 Use offsetof, for simplicity.
9298 2002-10-06 Paul Eggert <eggert@twinsun.com>
9300 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9301 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9302 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9303 which was inadvertently undone by the 2002-09-30 patch.
9304 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9305 the same width as int.
9307 2002-10-04 Paul Eggert <eggert@twinsun.com>
9311 * configure.ac (AC_INIT), NEWS: Increment version number.
9313 * doc/bison.texinfo: Minor spelling, grammar, and white space
9315 (Symbols): Mention that any negative value returned from yylex
9316 signifies end-of-input. Warn about negative chars. Mention
9317 the portable Standard C character set.
9319 The GNU coding standard says CFLAGS and YFLAGS are reserved
9320 for the installer to set.
9321 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9322 * src/Makefile.am (AM_CFLAGS): Likewise.
9323 (AM_YFLAGS): Renamed from YFLAGS.
9325 Fix some MAX and MIN problems.
9326 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9327 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9328 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9329 * src/reader.c (reader): Use it.
9331 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9332 POSIX 1003.1-2001 has removed fgrep.
9334 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9336 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9337 interpreted as signed.
9338 * lib/ebitset.c (ebitset_list): Fix bug.
9340 2002-10-01 Paul Eggert <eggert@twinsun.com>
9342 More fixes for 64-bit hosts and large bitsets.
9344 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9345 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9346 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9347 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9348 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9349 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9350 bitset_count_): Likewise.
9351 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9352 bitset_first, bitset_last): Likewise.
9353 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9354 bitset_stats_list_reverse, bitset_stats_size,
9355 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9357 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9358 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9359 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9360 bitsetv_reflexive_transitive_closure): Likewise.
9361 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9362 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9364 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9367 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9368 Use size_t, not unsigned int, to count bytes.
9369 * lib/abitset.h (abitset_bytes): Likewise.
9370 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9372 * lib/bitset.h (bitset_bytes): Likewise.
9373 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9374 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9375 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9376 * lib/ebitset.c (ebitset_bytes): Likewise.
9377 * lib/ebitset.h (ebitset_bytes): Likewise.
9378 * lib/lbitset.c (lbitset_bytes): Likewise.
9379 * lib/lbitset.h (lbitset_bytes): Likewise.
9381 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9382 abitset_subset_p, abitset_disjoint_p, abitset_and,
9383 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9384 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9385 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9386 abitset_or_and, abitset_or_and_cmp):
9387 Use bitset_windex instead of unsigned int.
9388 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9389 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9390 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9391 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9393 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9395 * lib/bitset.c (bitset_print):
9396 Use proper printf formats for widths of integer types.
9397 * lib/bitset_stats.c (bitset_percent_histogram_print,
9398 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9399 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9400 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9401 * lib/lbitset.c (lbitset_bytes): Likewise.
9403 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9404 BITSET_SIZE_MAX): New macros.
9405 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9406 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9407 to BITSET_WINDEX_MAX.
9409 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9410 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9411 since we now return the bitset_bindex type (not int).
9413 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9414 when computing sizes.
9415 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9417 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9418 and avoid cast to unsigned.
9420 2002-09-30 Akim Demaille <akim@epita.fr>
9422 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9423 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9424 Updates from Michael Hayes.
9426 2002-09-30 Art Haas <ahaas@neosoft.com>
9428 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9430 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9433 2002-09-27 Akim Demaille <akim@epita.fr>
9437 2002-09-27 Akim Demaille <akim@epita.fr>
9439 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9440 (Because of AC_LIBSOURCE).
9442 2002-09-27 Akim Demaille <akim@epita.fr>
9444 Playing with Autoscan.
9446 * configure.ac: Remove the old LIBOBJ tweaks.
9447 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9448 * lib/strrchr.c: New.
9449 * lib/strtol.c: New, from the Coreutils 4.5.1.
9451 2002-09-27 Akim Demaille <akim@epita.fr>
9453 Playing with Autoscan.
9455 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9456 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9457 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9458 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9461 2002-09-24 Akim Demaille <akim@epita.fr>
9463 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9464 (Frequently Asked Questions, Parser Stack Overflow): New.
9466 2002-09-13 Akim Demaille <akim@epita.fr>
9468 Playing with autoscan.
9470 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9471 * src/files.c (skeleton_find): Remove, unused.
9472 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9473 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9475 2002-09-13 Akim Demaille <akim@epita.fr>
9477 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9478 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9480 2002-09-13 Akim Demaille <akim@epita.fr>
9482 * configure.ac: Require 2.54.
9483 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9484 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9485 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9486 Remove, provided by Autoconf macros.
9488 2002-09-12 Akim Demaille <akim@epita.fr>
9490 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9492 2002-09-12 Akim Demaille <akim@epita.fr>
9494 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9495 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9496 Reported by Martin Mokrejs.
9498 2002-09-10 Akim Demaille <akim@epita.fr>
9500 * src/parse-gram.y: Associate a human readable string to each
9502 * tests/regression.at (Invalid inputs): Adjust.
9504 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9506 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9507 with an Autoconf-2.5x style configure.ac.
9509 2002-09-06 Paul Eggert <eggert@twinsun.com>
9511 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9512 exception applies only to yacc.c. This is a modification of a
9513 patch originally suggested by Akim Demaille.
9515 2002-09-06 Akim Demaille <akim@epita.fr>
9517 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9519 * data/yacc.c: here.
9521 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9523 (b4_ltype): Default to yy::Location from location.hh.
9525 2002-09-04 Jim Meyering <jim@meyering.net>
9527 * data/yacc.c: Guard the declaration of yytoknum also with
9528 `#ifdef YYPRINT', so it is declared only when used.
9530 2002-09-04 Akim Demaille <akim@epita.fr>
9532 * configure.in: Rename as...
9533 * configure.ac: this.
9536 2002-09-04 Akim Demaille <akim@epita.fr>
9538 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9539 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9540 translate maintainer only messages.
9542 2002-08-12 Paul Eggert <eggert@twinsun.com>
9546 * Makefile.am (SUBDIRS): Remove intl.
9547 (DISTCLEANFILES): Remove.
9548 * NEWS: Mention that GNU M4 is now required. Clarify what is
9549 meant by "larger grammars". Mention the pt_BR translation.
9550 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9551 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9552 Bump version from 0.11.2 to 0.11.5.
9553 (BISON_PREREQ_STAGE): Remove.
9554 (AM_GNU_GETTEXT): Use external gettext.
9555 (AC_OUTPUT): Remove intl/Makefile.
9557 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9559 * data/glr.c: Include string.h, for strlen.
9560 (yyreportParseError): Use size_t for yysize.
9561 (yy_yypstack): No longer nested inside yypstates, as nested
9562 functions are not portable. Do not assume size_t is the
9564 (yypstates): Do not assume that ptrdiff_t is the same width
9565 as int, and similarly for yyposn and YYINDEX.
9567 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9569 * lib/Makefile.am (INCLUDES): Do not include from the intl
9570 directory, which has been removed.
9571 * src/Makefile.am (INCLUDES): Likewise.
9573 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9574 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9577 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9578 * tests/Makefile.am (EXTRA_DIST): Likewise.
9580 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9581 Do not assume that bitset_windex is the same width as unsigned.
9583 * lib/abitset.c (abitset_unused_clear): Do not assume that
9584 bitset_word is the same width as int.
9585 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9586 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9587 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9588 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9589 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9591 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9592 portability to one's complement hosts!).
9593 * lib/ebitset.c (ebitset_op1): Likewise.
9594 * lib/lbitset.c (lbitset_op1): Likewise.
9596 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9597 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9598 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9599 Sync with fileutils.
9600 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9601 lib/gettext.h: Sync with diffutils.
9603 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9604 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9606 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9607 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9610 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9611 size_t; the old version tried to do this but casted improperly.
9612 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9613 (bitset_test): Now returns int, not unsigned long.
9615 * lib/bitset_stats.c: Include "gettext.h".
9617 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9618 name locals "index", as it generates unnecessary warnings on some
9619 hosts that have an "index" function.
9621 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9622 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9623 they need translation.
9624 * src/LR0.c (state_list_append, new_itemsets, get_state,
9625 append_states, generate_states): Likewise.
9626 * src/assoc.c (assoc_to_string): Likewise.
9627 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9628 * src/gram.c (grammar_dump): Likewise.
9629 * src/injections.c (injections_compute): Likewise.
9630 * src/lalr.c (lookaheads_print): Likewise.
9631 * src/relation.c (relation_transpose): Likewise.
9632 * src/scan-gram.l: Likewise.
9633 * src/tables.c (table_grow, pack_vector): Likewise.
9635 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9636 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9637 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9638 * m4/mbstate_t.m4: Sync with fileutils.
9639 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9641 * po/LINGUAS: Add pt_BR.
9642 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9643 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9645 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9647 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9649 * src/complain.c (strerror_r): Remove decl; not needed.
9650 (strerror): Use same pattern as ../lib/error.c.
9652 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9654 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9656 * src/main.c (main): Cast result of bindtextdomain and textdomain
9657 to void, to avoid a GCC warning when --disable-nls is in effect.
9659 * src/scan-gram.l: Use strings rather than escapes when possible,
9660 to minimize the number of warnings from xgettext.
9661 (handle_action_dollar, handle_action_at): Don't use isdigit,
9662 as it mishandles negative chars and it may not work as expected
9663 outside the C locale.
9665 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9666 this is a GCC extension and is not portable to other compilers.
9668 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9669 Do not include <ctype.h>; no longer needed.
9670 Do not include <malloc.h>; no longer needed (and generates
9671 warnings on OpenBSD 3.0).
9673 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9676 * tests/regression.at: Do not use 'cc -c input.c -o input';
9677 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9679 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9680 exit status as failure, not just exit status 1. Sun C exits
9681 with status 2 sometimes.
9683 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9684 Use it for the two large tests.
9686 2002-08-02 Akim Demaille <akim@epita.fr>
9688 * src/conflicts.c (conflicts_output): Don't output rules never
9689 reduced here, since anyway that computation doesn't work.
9690 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9691 (rule_useless_p, rule_never_reduced_p): New.
9692 (grammar_rules_partial_print): Use a filter instead of a range.
9693 Display the title only if needed.
9694 (grammar_rules_print): Adjust.
9695 (grammar_rules_never_reduced_report): New.
9696 * src/tables.c (action_row): Move the computation of rules never
9698 (token_actions): here.
9699 * src/main.c (main): Make the parser before making the report, so
9700 that rules never reduced are computed.
9701 Call grammar_rules_never_reduced_report.
9702 * src/print.c (print_results): Report rules never reduced.
9703 * tests/conflicts.at, tests/reduce.at: Adjust.
9705 2002-08-01 Akim Demaille <akim@epita.fr>
9707 Instead of attaching lookaheads and duplicating the rules being
9708 reduced by a state, attach the lookaheads to the reductions.
9710 * src/state.h (state_t): Remove the `lookaheads',
9711 `lookaheads_rule' member.
9712 (reductions_t): Add a `lookaheads' member.
9713 Use a regular array for the `rules'.
9714 * src/state.c (reductions_new): Initialize the lookaheads member
9716 (state_rule_lookaheads_print): Adjust.
9717 * src/state.h, src/state.c (state_reductions_find): New.
9718 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9719 (count_rr_conflicts): Adjust.
9720 * src/lalr.c (LArule): Remove.
9721 (add_lookback_edge): Adjust.
9722 (state_lookaheads_count): New.
9723 (states_lookaheads_initialize): Merge into...
9724 (initialize_LA): this.
9725 (lalr_free): Adjust.
9726 * src/main.c (main): Don't free nullable and derives too early: it
9727 is used by --verbose.
9728 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9730 2002-08-01 Akim Demaille <akim@epita.fr>
9732 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9734 (set_derives, free_derives): Rename as...
9735 (derives_compute, derives_free): this.
9736 Adjust all dependencies.
9737 * src/nullable.c (set_nullable, free_nullable): Rename as...
9738 (nullable_compute, nullable_free): these.
9739 (rule_list_t): Store rule_t *, not rule_number_t.
9740 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9741 pointers, instead of their numbers.
9742 * src/main.c (main): Call nullable_free, and derives_free earlier,
9743 as they were lo longer used.
9745 2002-08-01 Akim Demaille <akim@epita.fr>
9747 * lib/timevar.c (get_time): Include children time.
9748 * src/lalr.h (LA, LArule): Don't export them: used with the
9750 * src/lalr.c (LA, LArule): Static.
9751 * src/lalr.h, src/lalr.c (lalr_free): New.
9752 * src/main.c (main): Call it.
9753 * src/tables.c (pack_vector): Check whether loc is >= to the
9755 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9756 (tables_generate): do it, since that's also it which allocates
9758 Don't free LA and LArule, main does.
9760 2002-07-31 Akim Demaille <akim@epita.fr>
9762 Separate parser tables computation and output.
9764 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9765 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9766 (yydefgoto, yydefact, high): Move to...
9767 * src/tables.h, src/tables.c: here.
9768 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9769 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9770 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9771 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9772 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9773 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9774 (action_row, save_row, token_actions, save_column, default_goto)
9775 (goto_actions, sort_actions, matching_state, pack_vector)
9776 (table_ninf_remap, pack_table, prepare_actions): Move to...
9777 * src/tables.c: here.
9778 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9779 * src/output.c (token_actions, output_base, output_conflicts)
9780 (output_check): Merge into...
9781 (prepare_actions): this.
9782 (actions_output): Rename as...
9783 (user_actions_output): this.
9784 * src/main.c (main): Call tables_generate and tables_free.
9786 2002-07-31 Akim Demaille <akim@epita.fr>
9788 Steal GCC's --time-report support.
9790 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9791 stolen/adjusted from GCC.
9792 * m4/stage.m4: Remove time related checks.
9793 * m4/timevar.m4: New.
9794 * configure.in: Adjust.
9795 * src/system.h: Adjust to using timevar.h.
9796 * src/getargs.h, src/getargs.c: Support trace_time for
9798 * src/main.c (stage): Remove.
9799 (main): Replace `stage' invocations with timevar calls.
9800 * src/output.c: Insert pertinent timevar calls.
9802 2002-07-31 Akim Demaille <akim@epita.fr>
9804 Let --trace have arguments.
9806 * src/getargs.h (enum trace_e): New.
9807 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9808 (long_options, short_options): --trace/-T takes an optional
9810 Change all the uses of trace_flag to reflect the new flags.
9811 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9813 Strengthen `stage' portability.
9815 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9816 * configure.in: Use it.
9817 Don't check for malloc.h and sys/times.h.
9818 * src/system.h: Include them when appropriate.
9819 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9820 times and struct tms are available.
9822 2002-07-30 Akim Demaille <akim@epita.fr>
9824 In verbose parse error message, don't report `error' as an
9826 * tests/actions.at (Printers and Destructors): Adjust.
9827 * tests/calc.at (Calculator $1): Adjust.
9828 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9829 error message, do not report the parser accepts the error token in
9832 2002-07-30 Akim Demaille <akim@epita.fr>
9834 Normalize conflict related messages.
9836 * src/complain.h, src/complain.c (warn, complain): New.
9837 * src/conflicts.c (conflicts_print): Use them.
9838 (conflict_report_yacc): New, extracted from...
9839 (conflicts_print): here.
9840 * tests/conflicts.at, tests/existing.at: Adjust.
9842 2002-07-30 Akim Demaille <akim@epita.fr>
9844 Report rules which are never reduced by the parser: those hidden
9847 * src/LR0.c (save_reductions): Don't make the final state too
9848 different: save its reduction (accept) instead of having a state
9849 without any action (no shift or goto, no reduce).
9850 Note: the final state is now a ``regular'' state, i.e., the
9851 parsers now contain `reduce 0' as default reduction.
9852 Nevertheless, since they decide to `accept' when yystate =
9853 final_state, they still will not reduce rule 0.
9854 * src/print.c (print_actions, print_reduction): Adjust.
9855 * src/output.c (action_row): Track reduced rules.
9856 (token_actions): Report rules never reduced.
9857 * tests/conflicts.at, tests/regression.at: Adjust.
9859 2002-07-30 Akim Demaille <akim@epita.fr>
9861 `stage' was accidently included in a previous patch.
9862 Initiate its autoconfiscation.
9864 * configure.in: Look for malloc.h and sys/times.h.
9865 * src/main.c (stage): Adjust.
9866 Report only when trace_flag.
9868 2002-07-29 Akim Demaille <akim@epita.fr>
9870 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9872 (errs_t): symbol_t*, not symbol_number_t.
9873 (reductions_t): rule_t*, not rule_number_t.
9874 (FOR_EACH_SHIFT): New.
9875 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9876 * src/print.c, src/print_graph.c: Adjust.
9878 2002-07-29 Akim Demaille <akim@epita.fr>
9880 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9882 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9883 (endtoken, accept): these.
9884 * src/reader.c (reader): Set endtoken's default tag to "$end".
9885 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9886 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9889 2002-07-29 Akim Demaille <akim@epita.fr>
9891 * src/reduce.c (reduce_grammar): When the language is empty,
9892 complain about the start symbol, not the axiom.
9894 * tests/reduce.at (Empty Language): New.
9896 2002-07-26 Akim Demaille <akim@epita.fr>
9898 * src/reader.h, src/reader.c (gram_error): ... can't get
9899 yycontrol without making too strong assumptions on the parser
9901 * src/output.c (prepare_tokens): Use the real 0th value of
9902 token_translations instead of `0'.
9903 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9905 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9906 for the time being: %locations ought to provide it to yyerror.
9908 2002-07-25 Akim Demaille <akim@epita.fr>
9910 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9911 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9912 * tests/regression.at (Web2c Actions): Adjust.
9914 2002-07-25 Akim Demaille <akim@epita.fr>
9916 Stop storing rules from 1 to nrules + 1.
9918 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9919 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9920 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9921 Iterate from 0 to nrules.
9922 Use rule_number_as_item_number and item_number_as_rule_number.
9923 Adjust to `derive' now containing possibly 0.
9924 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9925 Handle the `- 1' part in rule numbers from/to item numbers.
9926 * src/conflicts.c (log_resolution): Fix the message which reversed
9928 * src/output.c (action_row): Initialize default_rule to -1.
9929 (token_actions): Adjust.
9930 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9932 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9934 2002-07-25 Akim Demaille <akim@epita.fr>
9936 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9937 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9938 (b4_c_knr_arg_decl): New.
9939 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9940 yyreport_parse_error.
9942 2002-07-25 Akim Demaille <akim@epita.fr>
9944 * data/yacc.c (yyreport_parse_error): New, extracted from...
9946 (yydestruct, yysymprint): Move above yyparse.
9949 2002-07-25 Akim Demaille <akim@epita.fr>
9951 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9953 (b4_sint_type, b4_uint_type): these.
9954 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9955 * tests/regression.at (Web2c Actions): Adjust.
9957 2002-07-25 Akim Demaille <akim@epita.fr>
9959 * src/gram.h (TIEM_NUMBER_MAX): New.
9960 (item_number_of_rule_number, rule_number_of_item_number): Rename
9962 (rule_number_as_item_number, item_number_as_rule_number): these.
9963 Adjust dependencies.
9964 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9965 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9966 (symbol_number_to_vector_number): New.
9967 (order): Of vector_number_t* type.
9968 (base_t, BASE_MAX, BASE_MIN): New.
9969 (froms, tos, width, pos, check): Of base_t type.
9970 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9971 (actrow): Of action_number_t type.
9972 (conflrow): Of unsigned int type.
9973 (table_ninf, base_ninf): New.
9974 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9975 (muscle_insert_int_table, muscle_insert_base_table)
9976 (muscle_insert_rule_number_table): New.
9977 (prepare_tokens): Output `toknum' as int_table.
9978 (action_row): Returns a rule_number_t.
9979 Use ACTION_MIN, not SHRT_MIN.
9980 (token_actions): yydefact is rule_number_t*.
9981 (table_ninf_remap): New.
9982 (pack_table): Use it for `base' and `table'.
9983 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9985 (YYPACT_NINF, YYTABLE_NINF): these.
9986 (yypact, yytable): Compute their types instead of hard-coded
9988 * tests/regression.at (Web2c Actions): Adjust.
9990 2002-07-19 Akim Demaille <akim@epita.fr>
9992 * src/scan-gram.l (id): Can start with an underscore.
9994 2002-07-16 Akim Demaille <akim@epita.fr>
9996 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9997 Adjust all former `associativity' dependencies.
9998 * src/symtab.c (symbol_new): Default associativity is `undef', not
10000 (symbol_check_alias_consistence): Adjust.
10002 2002-07-09 Akim Demaille <akim@epita.fr>
10004 * doc/bison.texinfo: Properly set the ``header'' part.
10005 Use @dircategory ``GNU programming tools'' as per Texinfo's
10009 2002-07-09 Akim Demaille <akim@epita.fr>
10011 * lib/quotearg.h: Protect against multiple inclusions.
10012 * src/location.h (location_t): Add a `file' member.
10013 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10014 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10015 `error_one_per_line' support.
10017 2002-07-09 Akim Demaille <akim@epita.fr>
10019 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10020 * src/reader.c (lineno): Remove.
10021 Adjust all dependencies.
10022 (get_merge_function): Take a location and use complain_at.
10023 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10024 * tests/regression.at (Invalid inputs, Mixing %token styles):
10027 2002-07-09 Akim Demaille <akim@epita.fr>
10029 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10030 recovery rule, and forbid extensions when --yacc.
10031 (gram_error): Use complain_at.
10032 * src/reader.c (reader): Exit if there were parse errors.
10034 2002-07-09 Akim Demaille <akim@epita.fr>
10036 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10037 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10038 Reported by R Blake <blakers@mac.com>.
10040 2002-07-09 Akim Demaille <akim@epita.fr>
10042 * data/yacc.c: Output the copyright notive in the header.
10044 2002-07-03 Akim Demaille <akim@epita.fr>
10046 * src/output.c (froms, tos): Are state_number_t.
10047 (save_column): sp, sp1, and sp2 are state_number_t.
10048 (prepare): Rename `final' as `final_state_number', `nnts' as
10049 `nterms_number', `nrules' as `rules_number', `nstates' as
10050 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10052 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10053 * data/lalr1.cc (nsym_): Remove, unused.
10055 2002-07-03 Akim Demaille <akim@epita.fr>
10057 * src/lalr.h, src/lalr.c (goto_number_t): New.
10058 * src/lalr.c (goto_list_t): New.
10060 * src/nullable.c (rule_list_t): New.
10062 * src/types.h: Remove.
10064 2002-07-03 Akim Demaille <akim@epita.fr>
10066 * src/closure.c (print_fderives): Use rule_rhs_print.
10067 * src/derives.c (print_derives): Use rule_rhs_print.
10068 (rule_list_t): New, replaces `shorts'.
10069 (set_derives): Add comments.
10070 * tests/sets.at (Nullable, Firsts): Adjust.
10072 2002-07-03 Akim Demaille <akim@epita.fr>
10074 * src/output.c (prepare_actions): Free `tally' and `width'.
10075 (prepare_actions): Allocate and free `order'.
10076 * src/symtab.c (symbols_free): Free `symbols'.
10077 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10078 * src/output.c (m4_invoke): Move to...
10079 * src/scan-skel.l: here.
10080 (<<EOF>>): Close yyout, and free its name.
10082 2002-07-03 Akim Demaille <akim@epita.fr>
10084 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10086 * src/LR0.c (new_state): Merge into...
10087 (state_list_append): this.
10088 (new_states): Merge into...
10089 (generate_states): here.
10090 (set_states): Don't ensure a proper `errs' state member here, do it...
10091 * src/conflicts.c (conflicts_solve): here.
10092 * src/state.h, src/state.c: Comment changes.
10093 (state_t): Rename member `shifts' as `transitions'.
10094 Adjust all dependencies.
10095 (errs_new): For consistency, also take the values as argument.
10096 (errs_dup): Remove.
10097 (state_errs_set): New.
10098 (state_reductions_set, state_transitions_set): Assert that no
10099 previous value was assigned.
10101 (states_free): Use it.
10102 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10103 temporary storage: use `errs' and `nerrs' as elsewhere.
10104 (set_conflicts): Allocate and free this `errs'.
10106 2002-07-02 Akim Demaille <akim@epita.fr>
10108 * lib/libiberty.h: New.
10109 * lib: Update the bitset implementation from upstream.
10110 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10111 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10112 * src/main.c: Adjust bitset stats calls.
10114 2002-07-01 Paul Eggert <eggert@twinsun.com>
10116 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10117 char, so that negative chars don't collide with $.
10119 2002-06-30 Akim Demaille <akim@epita.fr>
10121 Have the GLR tests be `warning' checked, and fix the warnings.
10123 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10124 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10125 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10126 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10127 (yyaddDeferredAction): static.
10128 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10129 (yyreportParseError): yyprefix is const.
10130 yytokenp is used only when verbose.
10131 (yy__GNUC__): Replace with __GNUC__.
10132 (yypdumpstack): yyi is size_t.
10133 (yypreference): Un-yy local variables and arguments, to avoid
10134 clashes with `yyr1'. Anyway, we are not in the user name space.
10135 (yytname_size): be an int, as is compared with ints.
10136 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10138 * tests/cxx-gram.at: Use quotation to protect $1.
10139 Use AT_COMPILE to enable warnings hunts.
10140 Prototype yylex and yyerror.
10142 Include `string.h', not `strings.h'.
10143 Produce and prototype stmtMerge only when used.
10144 yylex takes a location.
10146 2002-06-30 Akim Demaille <akim@epita.fr>
10148 We spend a lot of time in quotearg, in particular when --verbose.
10150 * src/symtab.c (symbol_get): Store a quoted version of the key.
10151 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10152 Adjust all callers.
10154 2002-06-30 Akim Demaille <akim@epita.fr>
10156 * src/state.h (reductions_t): Rename member `nreds' as num.
10157 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10158 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10160 2002-06-30 Akim Demaille <akim@epita.fr>
10162 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10163 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10164 (shifts_to): Rename as...
10165 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10166 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10167 (TRANSITION_IS_DISABLED, transitions_to): these.
10169 2002-06-30 Akim Demaille <akim@epita.fr>
10171 * src/print.c (print_shifts, print_gotos): Merge into...
10172 (print_transitions): this.
10173 (print_transitions, print_errs, print_reductions): Align the
10174 lookaheads columns.
10175 (print_core, print_transitions, print_errs, print_state,
10176 print_grammar): Output empty lines separator before, not after.
10177 (state_default_rule_compute): Rename as...
10178 (state_default_rule): this.
10179 * tests/conflicts.at (Defaulted Conflicted Reduction),
10180 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10181 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10183 2002-06-30 Akim Demaille <akim@epita.fr>
10185 Display items as we display rules.
10187 * src/gram.h, src/gram.c (rule_lhs_print): New.
10188 * src/gram.c (grammar_rules_partial_print): Use it.
10189 * src/print.c (print_core): Likewise.
10190 * tests/conflicts.at (Defaulted Conflicted Reduction),
10191 (Unresolved SR Conflicts): Adjust.
10192 (Unresolved SR Conflicts): Adjust and rename as...
10193 (Resolved SR Conflicts): this, as was meant.
10194 * tests/regression.at (Web2c Report): Adjust.
10196 2002-06-30 Akim Demaille <akim@epita.fr>
10198 * src/print.c (state_default_rule_compute): New, extracted from...
10199 (print_reductions): here.
10200 Pessimize, but clarify the code.
10201 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10203 2002-06-30 Akim Demaille <akim@epita.fr>
10205 * src/output.c (action_row): Let default_rule be always a rule
10208 2002-06-30 Akim Demaille <akim@epita.fr>
10210 * src/closure.c (print_firsts, print_fderives, closure):
10211 Use BITSET_EXECUTE.
10212 * src/lalr.c (lookaheads_print): Likewise.
10213 * src/state.c (state_rule_lookaheads_print): Likewise.
10214 * src/print_graph.c (print_core): Likewise.
10215 * src/print.c (print_reductions): Likewise.
10216 * src/output.c (action_row): Likewise.
10217 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10219 2002-06-30 Akim Demaille <akim@epita.fr>
10221 * src/print_graph.c: Use report_flag.
10223 2002-06-30 Akim Demaille <akim@epita.fr>
10225 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10227 * src/relation.h, src/relation.c (traverse, relation_digraph)
10228 (relation_print, relation_transpose): New.
10230 2002-06-30 Akim Demaille <akim@epita.fr>
10232 * src/state.h, src/state.c (shifts_to): New.
10233 * src/lalr.c (build_relations): Use it.
10235 2002-06-30 Akim Demaille <akim@epita.fr>
10237 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10238 (item_number_of_rule_number, rule_number_of_item_number): New.
10239 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10240 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10241 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10242 Propagate their use.
10243 Much remains to be done, in particular wrt `shorts' from types.h.
10245 2002-06-30 Akim Demaille <akim@epita.fr>
10247 * src/symtab.c (symbol_new): Initialize the `printer' member.
10249 2002-06-30 Akim Demaille <akim@epita.fr>
10251 * src/LR0.c (save_reductions): Remove, replaced by...
10252 * src/state.h, src/state.c (state_reductions_set): New.
10253 (reductions, errs): Rename as...
10254 (reductions_t, errs_t): these.
10255 Adjust all dependencies.
10257 2002-06-30 Akim Demaille <akim@epita.fr>
10259 * src/LR0.c (state_list_t, state_list_append): New.
10260 (first_state, last_state): Now symbol_list_t.
10261 (this_state): Remove.
10262 (new_itemsets, append_states, save_reductions): Take a state_t as
10264 (set_states, generate_states): Adjust.
10265 (save_shifts): Remove, replaced by...
10266 * src/state.h, src/state.c (state_shifts_set): New.
10267 (shifts): Rename as...
10269 Adjust all dependencies.
10270 * src/state.h (state_t): Remove the `next' member.
10272 2002-06-30 Akim Demaille <akim@epita.fr>
10274 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10277 2002-06-30 Akim Demaille <akim@epita.fr>
10279 Use hash.h for the state hash table.
10281 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10282 (allocate_storage): Use state_hash_new.
10283 (free_storage): Use state_hash_free.
10284 (new_state, get_state): Adjust.
10285 * src/lalr.h, src/lalr.c (states): Move to...
10286 * src/states.h (state_t): Remove the `link' member, no longer
10288 * src/states.h, src/states.c: here.
10289 (state_hash_new, state_hash_free, state_hash_lookup)
10290 (state_hash_insert, states_free): New.
10291 * src/states.c (state_table, state_compare, state_hash): New.
10292 * src/output.c (output_actions): Do not free states now, since we
10293 still need to know the final_state number in `prepare', called
10294 afterwards. Do it...
10295 * src/main.c (main): here: call states_free after `output'.
10297 2002-06-30 Akim Demaille <akim@epita.fr>
10299 * src/state.h, src/state.c (state_new): New, extracted from...
10300 * src/LR0.c (new_state): here.
10301 * src/state.h (STATE_ALLOC): Move to...
10302 * src/state.c: here.
10303 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10304 * src/state.h, src/state.c: here.
10306 2002-06-30 Akim Demaille <akim@epita.fr>
10308 * src/reader.c (gensym): Rename as...
10309 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10310 (getsym): Rename as...
10311 (symbol_get): this.
10313 2002-06-30 Akim Demaille <akim@epita.fr>
10315 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10316 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10317 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10318 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10320 2002-06-30 Akim Demaille <akim@epita.fr>
10322 Make the test suite pass with warnings checked.
10324 * tests/actions.at (Printers and Destructors): Improve.
10325 Avoid unsigned vs. signed issues.
10326 * tests/calc.at: Don't exercise the scanner here, do it...
10327 * tests/input.at (Torturing the Scanner): here.
10329 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10331 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10332 reorganize first lines parallel to yacc.c.
10334 2002-06-28 Akim Demaille <akim@epita.fr>
10336 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10337 (b4_token_enum, b4_token_defines): New, factored from...
10338 * data/lalr1.cc, data/yacc.c, glr.c: here.
10340 2002-06-28 Akim Demaille <akim@epita.fr>
10342 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10344 * src/output.c (merger_output): static.
10346 2002-06-28 Akim Demaille <akim@epita.fr>
10348 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10349 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10351 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10353 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10355 Accumulated changelog for new GLR parsing features.
10357 * src/conflicts.c (count_total_conflicts): Change name to
10358 conflicts_total_count.
10359 * src/conflicts.h: Ditto.
10360 * src/output.c (token_actions): Use the new name.
10361 (output_conflicts): Change conflp => conflict_list_heads, and
10362 confl => conflict_list for better readability.
10363 * data/glr.c: Use the new names.
10364 * NEWS: Add self to GLR announcement.
10366 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10368 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10371 * data/bison.glr: Change name to glr.c
10372 * data/glr.c: Renamed from bison.glr.
10373 * data/Makefile.am: Add glr.c
10377 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10378 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10380 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10382 * data/bison.glr: Be sure to restore the
10383 current #line when returning to the skeleton contents after having
10384 exposed the input file's #line.
10386 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10388 * data/bison.glr: Bring up to date with changes to bison.simple.
10390 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10392 * data/bison.glr: Correct definitions that use b4_prefix.
10393 Various reformatting.
10394 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10395 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10396 yytokenp argument; now part of stack.
10397 (yychar): Define to behave as documented.
10398 (yyclearin): Ditto.
10400 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10402 * src/reader.h: Add declaration for free_merger_functions.
10404 * src/reader.c (merge_functions): New variable.
10405 (get_merge_function): New function.
10406 (free_merger_functions): New function.
10407 (readgram): Check for %prec that is not followed by a symbol.
10408 Handle %dprec and %merge declarations.
10409 (packgram): Initialize dprec and merger fields in rules array.
10411 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10412 conflict_list_cnt, conflict_list_free): New variables.
10413 (table_grow): Also grow conflict_table.
10414 (prepare_rules): Output dprec and merger tables.
10415 (conflict_row): New function.
10416 (action_row): Output conflict lists for GLR parser. Don't use
10417 default reduction in conflicted states for GLR parser so that there
10418 are spaces for the conflict lists.
10419 (save_row): Also save conflict information.
10420 (token_actions): Allocate conflict list.
10421 (merger_output): New function.
10422 (pack_vector): Pack conflict table, too.
10423 (output_conflicts): New function to output yyconflp and yyconfl.
10424 (output_check): Allocate conflict_tos.
10425 (output_actions): Output conflict tables, also.
10426 (output_skeleton): Output b4_mergers definition.
10427 (prepare): Output b4_max_rhs_length definition.
10428 Use 'bison.glr' as default skeleton for GLR parsers.
10430 * src/gram.c (glr_parser): New flag.
10431 (grammar_free): Call free_merger_functions.
10433 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10434 all pairs of conflicting reductions, rather than just all tokens
10435 causing conflicts. Needed to size conflict tables.
10436 (conflicts_output): Modify call to count_rr_conflicts for new
10438 (conflicts_print): Ditto.
10439 (count_total_conflicts): New function.
10441 * src/reader.h (merger_list): New type.
10442 (merge_functions): New variable.
10444 * src/lex.h (tok_dprec, tok_merge): New token types.
10446 * src/gram.h (rule_s): Add dprec and merger fields.
10447 (glr_parser): New flag.
10449 * src/conflicts.h (count_total_conflicts): New function.
10451 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10453 * doc/bison.texinfo (Generalized LR Parsing): New section.
10454 (GLR Parsers): New section.
10455 (Language and Grammar): Mention GLR parsing.
10456 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10457 Correct typo ("tge" -> "the").
10459 * data/bison.glr: New skeleton for GLR parsing.
10461 * tests/cxx-gram.at: New tests for GLR parsing.
10463 * tests/testsuite.at: Include cxx-gram.at.
10465 * tests/Makefile.am: Add cxx-gram.at.
10467 * src/parse-gram.y:
10469 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10471 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10473 2002-06-27 Akim Demaille <akim@epita.fr>
10475 * src/options.h, src/options.c: Remove.
10476 * src/getargs.c (short_options, long_options): New.
10478 2002-06-27 Akim Demaille <akim@epita.fr>
10480 * data/bison.simple, data/bison.c++: Rename as...
10481 * data/yacc.c, data/lalr1.cc: these.
10482 * doc/bison.texinfo (Environment Variables): Remove.
10484 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10486 * src/getargs.c (report_argmatch): Initialize strtok().
10488 2002-06-20 Akim Demaille <akim@epita.fr>
10490 * data/bison.simple (b4_symbol_actions): New, replaces...
10491 (b4_symbol_destructor, b4_symbol_printer): these.
10492 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10493 user token numbers.
10495 2002-06-20 Akim Demaille <akim@epita.fr>
10497 * data/bison.simple (yydestructor): Rename as...
10498 (yydestruct): this.
10500 2002-06-20 Akim Demaille <akim@epita.fr>
10502 * src/symtab.h, src/symtab.c (symbol_type_set)
10503 (symbol_destructor_set, symbol_precedence_set): The location is
10505 Adjust all callers.
10507 2002-06-20 Akim Demaille <akim@epita.fr>
10509 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10511 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10513 * src/symtab.h, src/symtab.c (symbol_class_set)
10514 (symbol_user_token_number_set): Likewise.
10515 Adjust all callers.
10516 Promote complain_at.
10517 * tests/input.at (Type Clashes): Adjust.
10519 2002-06-20 Akim Demaille <akim@epita.fr>
10521 * data/bison.simple (YYLEX): Fix the declaration when
10524 2002-06-20 Akim Demaille <akim@epita.fr>
10526 * data/bison.simple (yysymprint): Don't print the token number,
10528 * tests/actions.at (Destructors): Rename as...
10529 (Printers and Destructors): this.
10530 Also exercise %printer.
10532 2002-06-20 Akim Demaille <akim@epita.fr>
10534 * data/bison.simple (YYDSYMPRINT): New.
10535 Use it to remove many of the #if YYDEBUG/if (yydebug).
10537 2002-06-20 Akim Demaille <akim@epita.fr>
10539 * src/symtab.h, src/symtab.c (symbol_t): printer and
10540 printer_location are new members.
10541 (symbol_printer_set): New.
10542 * src/parse-gram.y (PERCENT_PRINTER): New token.
10543 Handle its associated rule.
10544 * src/scan-gram.l: Adjust.
10545 (handle_destructor_at, handle_destructor_dollar): Rename as...
10546 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10547 * src/output.c (symbol_printers_output): New.
10548 (output_skeleton): Call it.
10549 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10550 since there are already many grammar files with a user `yyprint'.
10551 Replace the calls to YYPRINT to calls to yysymprint.
10552 * tests/calc.at: Adjust.
10553 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10554 taking advantage of parser very internal details (stack size!).
10556 2002-06-20 Akim Demaille <akim@epita.fr>
10558 * src/scan-gram.l: Complete the scanner with the missing patterns
10560 Use `quote' and `symbol_tag_get' where appropriate.
10562 2002-06-19 Akim Demaille <akim@epita.fr>
10564 * tests/actions.at (Destructors): Augment to test locations.
10565 * data/bison.simple (yydestructor): Pass it the current location
10566 if locations are enabled.
10567 Prototype only when __STDC__ or C++.
10568 Change the argument names to move into the yy name space: there is
10571 2002-06-19 Akim Demaille <akim@epita.fr>
10573 * data/bison.simple (b4_pure_if): New.
10574 Use it instead of #ifdef YYPURE.
10576 2002-06-19 Akim Demaille <akim@epita.fr>
10578 * data/bison.simple (b4_location_if): New.
10579 Use it instead of #ifdef YYLSP_NEEDED.
10581 2002-06-19 Akim Demaille <akim@epita.fr>
10583 Prepare @$ in %destructor, but currently don't bind it in the
10584 skeleton, as %location use is not cleaned up yet.
10586 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10587 (handle_action_at): New.
10588 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10589 a braced_code_t and a location as additional arguments.
10590 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10591 unquote one when outputting `b4_dollar_dollar'.
10593 * data/bison.simple (b4_eval): Remove.
10594 (b4_symbol_destructor): Adjust.
10595 * tests/input.at (Invalid @n): Adjust.
10597 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10599 * doc/bison.texinfo: Document ability to have multiple
10602 2002-06-18 Akim Demaille <akim@epita.fr>
10604 * src/files.c (compute_base_names): When computing the output file
10605 names from the input file name, strip the directory part.
10607 2002-06-18 Akim Demaille <akim@epita.fr>
10609 * data/bison.simple.new: Comment changes.
10610 Reported by Andreas Schwab.
10612 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10614 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10615 there are no `label `yyoverflowlab' defined but not used' warnings
10616 when yyoverflow is defined.
10618 2002-06-18 Akim Demaille <akim@epita.fr>
10620 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10622 (symbol_destructor_set): Adjust.
10623 * src/output.c (symbol_destructors_output): Output the destructor
10625 Output the symbol name.
10626 * data/bison.simple (b4_symbol_destructor): Adjust.
10628 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10629 and Akim Demaille <akim@epita.fr>
10631 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10632 what's left on the stack when the error recovery hits EOF.
10633 * tests/actions.at (Destructors): Complete to exercise this case.
10635 2002-06-17 Akim Demaille <akim@epita.fr>
10637 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10638 arguments is really empty, not only equal to `[]'.
10639 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10641 (symbol_destructor_set): New.
10642 * src/output.c (symbol_destructors_output): New.
10643 * src/reader.h (brace_code_t, current_braced_code): New.
10644 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10645 (handle_dollar): Rename as...
10646 (handle_action_dollar): this.
10647 (handle_destructor_dollar): New.
10648 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10649 (grammar_declaration): Use it.
10650 * data/bison.simple (yystos): Is always defined.
10651 (yydestructor): New.
10652 * tests/actions.at (Destructors): New.
10653 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10655 2002-06-17 Akim Demaille <akim@epita.fr>
10657 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10658 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10659 rule_length only when needed.
10660 * src/output.c (actions_output, token_definitions_output): Output
10662 * src/symtab.c: Don't access directly to the symbol tag, use
10664 * src/parse-gram.y: Use symbol_list_free.
10666 2002-06-17 Akim Demaille <akim@epita.fr>
10668 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10669 (symbol_list_prepend, get_type_name): Move to...
10670 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10671 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10672 Adjust all callers.
10673 (symbol_list_free): New.
10674 * src/scan-gram.l (handle_dollar): Takes a location.
10675 * tests/input.at (Invalid $n): Adjust.
10677 2002-06-17 Akim Demaille <akim@epita.fr>
10679 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10680 (symbol_list_prepend): New.
10681 * src/parse-gram.y (%union): `list' is a new member.
10682 (symbols.1): New, replaces...
10683 (terms_to_prec.1, nterms_to_type.1): these.
10684 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10685 Take a location as additional argument.
10686 Adjust all callers.
10688 2002-06-15 Akim Demaille <akim@epita.fr>
10690 * src/parse-gram.y: Move %token in the declaration section so that
10691 we don't depend upon CVS Bison.
10693 2002-06-15 Akim Demaille <akim@epita.fr>
10695 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10696 * src/print.c (print_core): Use it.
10698 2002-06-15 Akim Demaille <akim@epita.fr>
10700 * src/conflicts.c (log_resolution): Accept the rule involved in
10701 the sr conflicts instead of the lookahead number that points to
10703 (flush_reduce): Accept the current lookahead vector as argument,
10704 instead of the index in LA.
10705 (resolve_sr_conflict): Accept the current number of lookahead
10706 bitset to consider for the STATE, instead of the index in LA.
10707 (set_conflicts): Adjust.
10708 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10710 2002-06-15 Akim Demaille <akim@epita.fr>
10712 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10713 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10714 Adjust all dependencies.
10715 * src/lalr.c (initialize_lookaheads): Split into...
10716 (states_lookaheads_count, states_lookaheads_initialize): these.
10719 2002-06-15 Akim Demaille <akim@epita.fr>
10721 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10723 (grammar_rules_print): here.
10724 * src/reduce.c (reduce_output): Use it.
10725 * tests/reduce.at (Useless Rules, Reduced Automaton)
10726 (Underivable Rules): Adjust.
10728 2002-06-15 Akim Demaille <akim@epita.fr>
10730 Copy BYacc's nice way to report the grammar.
10732 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10734 Don't print the rules' location, it is confusing and useless.
10735 (rule_print): Use grammar_rhs_print.
10736 * src/print.c (print_grammar): Use grammar_rules_print.
10738 2002-06-15 Akim Demaille <akim@epita.fr>
10740 Complete and rationalize `useless thing' warnings.
10742 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10743 (symbol_tag_print): New.
10744 Use them everywhere in place of accessing directly the tag member.
10745 * src/gram.h, src/gram.c (rule_print): New.
10746 Use it where a rule used to be printed `by hand'.
10747 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10748 (reduce_grammar_tables): Report the useless rules.
10749 (reduce_print): Useless things are a warning, not an error.
10751 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10752 (Reduced Automaton, Underivable Rules): Adjust.
10753 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10754 * tests/conflicts.at (Unresolved SR Conflicts)
10755 (Solved SR Conflicts): Adjust.
10757 2002-06-15 Akim Demaille <akim@epita.fr>
10759 Let symbols have a location.
10761 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10763 Adjust all callers.
10764 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10765 Use location_t, not int.
10766 * src/symtab.c (symbol_check_defined): Take advantage of the
10768 * tests/regression.at (Invalid inputs): Adjust.
10770 2002-06-15 Akim Demaille <akim@epita.fr>
10772 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10773 (input): Don't try to initialize yylloc here, do it in the
10775 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10776 * src/gram.h (rule_t): Change line and action_line into location
10777 and action_location, of location_t type.
10778 Adjust all dependencies.
10779 * src/location.h, src/location.c (empty_location): New.
10780 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10781 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10782 (grammar_current_rule_symbol_append)
10783 (grammar_current_rule_action_append): Expect a location as argument.
10784 * src/reader.c (grammar_midrule_action): Adjust to attach an
10785 action's location as dummy symbol location.
10786 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10787 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10790 2002-06-14 Akim Demaille <akim@epita.fr>
10792 Grammar declarations may be found in the grammar section.
10794 * src/parse-gram.y (rules_or_grammar_declaration): New.
10795 (declarations): Each declaration may end with a semicolon, not
10797 (grammar_declaration): `"%union"'.
10798 (grammar): Branch to rules_or_grammar_declaration.
10800 2002-06-14 Akim Demaille <akim@epita.fr>
10802 * src/main.c (main): Invoke scanner_free.
10804 2002-06-14 Akim Demaille <akim@epita.fr>
10806 * src/output.c (m4_invoke): Extracted from...
10807 (output_skeleton): here.
10810 2002-06-14 Akim Demaille <akim@epita.fr>
10812 * src/parse-gram.y (directives, directive, gram)
10813 (grammar_directives, precedence_directives, precedence_directive):
10815 (declarations, declaration, grammar, grammar_declaration)
10816 (precedence_declaration, precedence_declarator): these.
10817 (symbol_declaration): New.
10819 2002-06-14 Akim Demaille <akim@epita.fr>
10821 * src/files.c (action_obstack): Remove, unused.
10822 (output_obstack): Remove it, and all its dependencies, as it is no
10824 * src/reader.c (epilogue_set): Build the epilogue in the
10826 * src/output.h, src/output.c (muscle_obstack): Move to...
10827 * src/muscle_tab.h, src/muscle_tab.h: here.
10828 (muscle_init): Initialize muscle_obstack.
10829 (muscle_free): New.
10830 * src/main.c (main): Call it.
10832 2002-06-14 Akim Demaille <akim@epita.fr>
10834 * src/location.h: New, extracted from...
10835 * src/reader.h: here.
10836 * src/Makefile.am (noinst_HEADERS): Merge into
10837 (bison_SOURCES): this.
10839 * src/parse-gram.y: Use location_t instead of Bison's.
10840 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10841 Use location_t instead of ints.
10843 2002-06-14 Akim Demaille <akim@epita.fr>
10845 * data/bison.simple, data/bison.c++: Be sure to restore the
10846 current #line when returning to the skeleton contents after having
10847 exposed the input file's #line.
10849 2002-06-12 Akim Demaille <akim@epita.fr>
10851 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10853 * tests/actions.at (Exotic Dollars): New.
10855 2002-06-12 Akim Demaille <akim@epita.fr>
10857 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10859 * tests/input.at (Torturing the Scanner): New.
10861 2002-06-11 Akim Demaille <akim@epita.fr>
10863 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10864 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10865 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10866 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10867 * src/reader.c (reader): Use it.
10869 2002-06-11 Akim Demaille <akim@epita.fr>
10871 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10872 Adjust all callers.
10873 (scanner_last_string_free): New.
10875 2002-06-11 Akim Demaille <akim@epita.fr>
10877 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10878 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10879 (last_string, YY_OBS_FREE): New.
10880 Use them when returning an ID.
10882 2002-06-11 Akim Demaille <akim@epita.fr>
10884 Have Bison grammars parsed by a Bison grammar.
10886 * src/reader.c, src/reader.h (prologue_augment): New.
10887 * src/reader.c (copy_definition): Remove.
10889 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10890 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10891 (grammar_current_rule_prec_set, grammar_current_rule_check)
10892 (grammar_current_rule_symbol_append)
10893 (grammar_current_rule_action_append): Export.
10894 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10895 (symbol_list_action_append): Remove.
10896 Hook the routines from reader.
10897 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10898 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10900 * src/reader.c (read_declarations): Remove, unused.
10902 * src/parse-gram.y: Handle the epilogue.
10903 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10904 (grammar_start_symbol_set): this.
10905 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10906 * src/reader.c (readgram): Remove, unused.
10907 (reader): Adjust to insert eoftoken and axiom where appropriate.
10909 * src/reader.c (copy_dollar): Replace with...
10910 * src/scan-gram.h (handle_dollar): this.
10911 * src/parse-gram.y: Remove `%thong'.
10913 * src/reader.c (copy_at): Replace with...
10914 * src/scan-gram.h (handle_at): this.
10916 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10919 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10922 * src/reader.h, src/reader.c (grammar_rule_end): New.
10924 * src/parse.y (current_type, current_class): New.
10925 Implement `%nterm', `%token' support.
10926 Merge `%term' into `%token'.
10927 (string_as_id): New.
10928 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10931 * src/parse-gram.y: Be sure to handle properly the beginning of
10934 * src/parse-gram.y: Handle %type.
10935 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10937 * src/parse-gram.y: More directives support.
10938 * src/options.c: No longer handle source directives.
10940 * src/parse-gram.y: Fix %output.
10942 * src/parse-gram.y: Handle %union.
10943 Use the prologue locations.
10944 * src/reader.c (parse_union_decl): Remove.
10946 * src/reader.h, src/reader.c (epilogue_set): New.
10947 * src/parse-gram.y: Use it.
10949 * data/bison.simple, data/bison.c++: b4_stype is now either not
10950 defined, then default to int, or to the contents of %union,
10951 without `union' itself.
10953 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10955 * src/output.c (actions_output): Don't output braces, as they are
10956 already handled by the scanner.
10958 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10959 characters to themselves.
10961 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10962 that the epilogue has a proper #line.
10964 * src/parse-gram.y: Handle precedence/associativity.
10966 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10968 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10969 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10970 at all to define terminals that cannot be emitted.
10972 * src/scan-gram.l: Escape M4 characters.
10974 * src/scan-gram.l: Working properly with escapes in user
10975 strings/characters.
10977 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10978 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10980 Use more modest sizes, as for the time being the parser does not
10981 release memory, and therefore the process swallows a huge amount
10984 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10985 stricter %token grammar.
10987 * src/symtab.h (associativity): Add `undef_assoc'.
10988 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10989 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10991 * tests/regression.at (Invalid %directive): Remove, as it is now
10993 (Invalid inputs): Adjust to the new error messages.
10994 (Token definitions): The new grammar doesn't allow too many
10997 * src/lex.h, src/lex.c: Remove.
10998 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10999 (copy_character, copy_string2, copy_string, copy_identifier)
11000 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11001 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11002 (parse_action): Remove.
11003 * po/POTFILES.in: Adjust.
11005 2002-06-11 Akim Demaille <akim@epita.fr>
11007 * src/reader.c (parse_action): Don't store directly into the
11008 rule's action member: return the action as a string.
11009 Don't require `rule_length' as an argument: compute it.
11010 (grammar_current_rule_symbol_append)
11011 (grammar_current_rule_action_append): New, eved out from
11013 Remove `action_flag', `rulelength', unused now.
11015 2002-06-11 Akim Demaille <akim@epita.fr>
11017 * src/reader.c (grammar_current_rule_prec_set).
11018 (grammar_current_rule_check): New, eved out from...
11020 Remove `xaction', `first_rhs': useless.
11021 * tests/input.at (Type clashes): New.
11022 * tests/existing.at (GNU Cim Grammar): Adjust.
11024 2002-06-11 Akim Demaille <akim@epita.fr>
11026 * src/reader.c (grammar_midrule_action): New, Eved out from
11029 2002-06-11 Akim Demaille <akim@epita.fr>
11031 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11033 (readgram): Use them as replacement of inlined code, crule and
11036 2002-06-11 Akim Demaille <akim@epita.fr>
11038 * src/reader.c (grammar_end, grammar_symbol_append): New.
11039 (readgram): Use them.
11040 Make the use of `p' as local as possible.
11042 2002-06-10 Akim Demaille <akim@epita.fr>
11044 GCJ's parser requires the tokens to be defined before the prologue.
11046 * data/bison.simple: Output the token definition before the user's
11048 * tests/regression.at (Braces parsing, Duplicate string)
11049 (Mixing %token styles): Check the output from bison.
11050 (Early token definitions): New.
11052 2002-06-10 Akim Demaille <akim@epita.fr>
11054 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11055 assigning twice the same user number to a token, so that we can
11057 * src/lex.c (lex): here.
11058 Also use `symbol_class_set' instead of hand written code.
11059 * src/reader.c (parse_assoc_decl): Likewise.
11061 2002-06-10 Akim Demaille <akim@epita.fr>
11063 * src/symtab.c, src/symtab.c (symbol_class_set)
11064 (symbol_user_token_number_set): New.
11065 * src/reader.c (parse_token_decl): Use them.
11066 Use a switch instead of ifs.
11067 Use a single argument.
11069 2002-06-10 Akim Demaille <akim@epita.fr>
11071 Remove `%thong' support as it is undocumented, unused, duplicates
11072 `%token's job, and creates useless e-mail traffic with people who
11073 want to know what it is, why it is undocumented, unused, and
11074 duplicates `%token's job.
11076 * src/reader.c (parse_thong_decl): Remove.
11077 * src/options.c (option_table): Remove "thong".
11078 * src/lex.h (tok_thong): Remove.
11080 2002-06-10 Akim Demaille <akim@epita.fr>
11082 * src/symtab.c, src/symtab.c (symbol_type_set)
11083 (symbol_precedence_set): New.
11084 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11085 (value_components_used): Remove, unused.
11087 2002-06-09 Akim Demaille <akim@epita.fr>
11089 Move symbols handling code out of the reader.
11091 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11092 (axiom): Move to...
11093 * src/symtab.h, src/symtab.c: here.
11095 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11096 * src/reader.c (startval): Rename as...
11097 * src/symtab.h, src/symtab.c (startsymbol): this.
11098 * src/reader.c: Adjust.
11100 * src/reader.c (symbol_check_defined, symbol_make_alias)
11101 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11102 (token_translations_init)
11104 * src/symtab.c: here.
11105 * src/reader.c (packsymbols): Move to...
11106 * src/symtab.h, src/symtab.c (symbols_pack): here.
11107 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11110 2002-06-03 Akim Demaille <akim@epita.fr>
11112 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11115 2002-06-03 Akim Demaille <akim@epita.fr>
11117 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11118 structs with non literals.
11119 * src/scan-skel.l: never-interactive.
11120 * src/conflicts.c (enum conflict_resolution_e): No trailing
11122 * src/getargs.c (usage): Split long literal strings.
11123 Reported by Hans Aberg.
11125 2002-05-28 Akim Demaille <akim@epita.fr>
11127 * data/bison.c++: Use C++ ostreams.
11128 (cdebug_): New member.
11130 2002-05-28 Akim Demaille <akim@epita.fr>
11132 * src/output.c (output_skeleton): Be sure to allocate enough room
11133 for `/' _and_ for `\0' in full_skeleton.
11135 2002-05-28 Akim Demaille <akim@epita.fr>
11137 * data/bison.c++: Catch up with bison.simple:
11138 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11139 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11140 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11141 and popping traces.
11143 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11145 * src/output.c (output_skeleton): Put an explicit path in front of
11146 the skeleton file name, rather than relying on the -I directory,
11147 to partially alleviate effects of having a skeleton file lying around
11148 in the current directory.
11150 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11152 * src/conflicts.c (log_resolution): Correct typo:
11153 obstack_printf should be obstack_fgrow1.
11155 2002-05-26 Akim Demaille <akim@epita.fr>
11157 * src/state.h (state_t): `solved_conflicts' is a new member.
11158 * src/LR0.c (new_state): Set it to 0.
11159 * src/conflicts.h, src/conflicts.c (print_conflicts)
11160 (free_conflicts, solve_conflicts): Rename as...
11161 (conflicts_print, conflicts_free, conflicts_solve): these.
11163 * src/conflicts.c (enum conflict_resolution_e)
11164 (solved_conflicts_obstack): New, used by...
11165 (log_resolution): this.
11166 Adjust to attach the conflict resolution to each state.
11167 Complete the description with the precedence/associativity
11169 (resolve_sr_conflict): Adjust.
11170 * src/print.c (print_state): Output its solved_conflicts.
11171 * tests/conflicts.at (Unresolved SR Conflicts)
11172 (Solved SR Conflicts): Exercise --report=all.
11174 2002-05-26 Akim Demaille <akim@epita.fr>
11176 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11177 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11178 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11179 (token_number_t, item_number_as_token_number)
11180 (token_number_as_item_number, muscle_insert_token_number_table):
11182 (symbol_number_t, item_number_as_symbol_number)
11183 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11184 these, since it is more appropriate.
11186 2002-05-26 Akim Demaille <akim@epita.fr>
11188 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11190 * data/bison.simple (yystos) [YYDEBUG]: New.
11191 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11193 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11195 2002-05-25 Akim Demaille <akim@epita.fr>
11197 * doc/bison.texinfo (Debugging): Split into...
11198 (Tracing): this new section, its former contents, and...
11199 (Understanding): this new section.
11200 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11202 (report_flag): this.
11203 Adjust all dependencies.
11204 (report_args, report_types, report_argmatch): New.
11205 (usage, getargs): Report/support -r, --report.
11207 (struct option_table_struct): Rename as..,
11208 (struct option_table_s): this.
11209 Rename the `set_flag' member to `flag' to match with getopt_long's
11211 * src/options.c (option_table): Split verbose into an entry for
11212 %verbose, and another for --verbose.
11213 Support --report/-r, so remove -r from the obsolete --raw.
11214 * src/print.c: Attach full item sets and lookaheads reports to
11215 report_flag instead of trace_flag.
11216 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11218 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11219 and Paul Eggert <eggert@twinsun.com>
11221 * data/bison.simple (yyparse): Correct error handling to conform to
11222 POSIX and yacc. Specifically, after syntax error is discovered,
11223 do not reduce further before shifting the error token.
11224 Clean up the code a bit by removing the labels yyerrdefault,
11225 yyerrhandle, yyerrpop.
11226 * NEWS: Document the above.
11228 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11230 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11231 type; it isn't always big enough, since it doesn't necessarily
11232 include non-terminals.
11233 (yytranslate): Expand definition of yy_token_number_type, so that
11234 the latter can be removed.
11235 (yy_token_number_type): Remove, only one use.
11236 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11237 don't use TokenNumberType as element type.
11239 * tests/regression.at: Modify expected output to agree with change
11240 to yyr1 and yytranslate.
11242 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11244 * src/reader.c (parse_action): Use copy_character instead of
11247 2002-05-13 Akim Demaille <akim@epita.fr>
11249 * tests/regression.at (Token definitions): Prototype yylex and
11252 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11254 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11255 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11257 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11259 2002-05-07 Akim Demaille <akim@epita.fr>
11261 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11262 avoid GCC warnings.
11264 2002-05-07 Akim Demaille <akim@epita.fr>
11268 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11269 over the RHS of each rule.
11270 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11271 * src/state.h (state_t): Member `nitems' is unsigned short.
11272 * src/LR0.c (get_state): Adjust.
11273 * src/reader.c (packgram): Likewise.
11274 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11276 (muscle_insert_int_table): Remove, unused.
11277 (prepare_rules): Remove `max'.
11279 2002-05-06 Akim Demaille <akim@epita.fr>
11281 * src/closure.c (print_firsts): Display of the symbol tags.
11282 (bitmatrix_print): Move to...
11283 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11285 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11287 2002-05-06 Akim Demaille <akim@epita.fr>
11289 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11292 2002-05-06 Akim Demaille <akim@epita.fr>
11294 * src/LR0.c (new_state, get_state): Instead of using the global
11295 `kernel_size' and `kernel_base', have two new arguments:
11296 `core_size' and `core'.
11299 2002-05-06 Akim Demaille <akim@epita.fr>
11301 * src/reader.c (packgram): No longer end `ritem' with a 0
11302 sentinel: it is not used.
11304 2002-05-05 Akim Demaille <akim@epita.fr>
11306 New experimental feature: display the lookaheads in the report and
11309 * src/print (print_core): When --trace-flag, display the rules
11311 * src/print_graph.c (print_core): Likewise.
11312 Swap the arguments.
11315 2002-05-05 Akim Demaille <akim@epita.fr>
11317 * tests/torture.at (Many lookaheads): New test.
11319 2002-05-05 Akim Demaille <akim@epita.fr>
11321 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11322 (GENERATE_MUSCLE_INSERT_TABLE): this.
11323 (output_int_table, output_unsigned_int_table, output_short_table)
11324 (output_token_number_table, output_item_number_table): Replace with...
11325 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11326 (muscle_insert_short_table, muscle_insert_token_number_table)
11327 (muscle_insert_item_number_table): these.
11328 Adjust all callers.
11329 (prepare_tokens): Don't free `translations', since...
11330 * src/reader.h, src/reader.c (grammar_free): do it.
11332 * src/gram.h, src/gram.c (grammar_free): here.
11333 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11336 2002-05-05 Akim Demaille <akim@epita.fr>
11338 * src/output.c (output_unsigned_int_table): New.
11339 (prepare_rules): `i' is unsigned.
11340 `prhs', `rline', `r2' are unsigned int.
11341 Rename muscle `rhs_number_max' as `rhs_max'.
11342 Output muscles `prhs_max', `rline_max', and `r2_max'.
11344 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11345 to compute types instead of constant types.
11346 * tests/regression.at (Web2c Actions): Adjust.
11348 2002-05-04 Akim Demaille <akim@epita.fr>
11350 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11351 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11352 Adjust dependencies.
11353 * src/output.c (token_definitions_output): Be sure not to output a
11354 `#define 'a'' when fed with `%token 'a' "a"'.
11355 * tests/regression.at (Token definitions): New.
11357 2002-05-03 Paul Eggert <eggert@twinsun.com>
11359 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11362 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11364 * Makefile.am (SUBDIRS): Remove intl.
11365 (EXTRA_DIST): Add config/config.rpath.
11367 2002-05-03 Akim Demaille <akim@epita.fr>
11369 * data/bison.simple (m4_if): Don't output empty enums.
11370 And actually, output valid enum definitions :(.
11372 2002-05-03 Akim Demaille <akim@epita.fr>
11374 * configure.bat: Remove, completely obsolete.
11375 * Makefile.am (EXTRA_DIST): Adjust.
11376 Don't distribute config.rpath...
11377 * config/Makefile.am (EXTRA_DIST): Do it.
11379 2002-05-03 Akim Demaille <akim@epita.fr>
11381 * configure.in (GETTEXT_VERSION): New.
11382 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11384 2002-05-03 Akim Demaille <akim@epita.fr>
11386 * data/bison.simple (b4_token_enum): New.
11387 (b4_token_defines): Use it to output tokens both as #define and
11389 Suggested by Paul Eggert.
11390 * src/output.c (token_definitions_output): Don't output spurious
11393 2002-05-03 Akim Demaille <akim@epita.fr>
11395 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11397 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11399 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11400 Update the stack class, give a try to deque as the default container.
11402 2002-05-02 Akim Demaille <akim@epita.fr>
11404 * data/bison.simple (yyparse): Do not implement @$ = @1.
11405 (YYLLOC_DEFAULT): Adjust to do it.
11406 * doc/bison.texinfo (Location Default Action): Fix.
11408 2002-05-02 Akim Demaille <akim@epita.fr>
11410 * src/reader.c (parse_braces): Merge into...
11411 (parse_action): this.
11413 2002-05-02 Akim Demaille <akim@epita.fr>
11415 * configure.in (ALL_LINGUAS): Remove.
11416 * po/LINGUAS, hr.po: New.
11418 2002-05-02 Akim Demaille <akim@epita.fr>
11420 Remove the so called hairy (semantic) parsers.
11422 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11423 * src/gram.h, src/gram.c (semantic_parser): Remove.
11424 (rule_t): Remove the guard and guard_line members.
11425 * src/lex.h (token_t): remove tok_guard.
11426 * src/options.c (option_table): Remove %guard and %semantic_parser
11428 * src/output.c, src/output.h (guards_output): Remove.
11430 (token_definitions_output): Don't output the `T'
11432 (output_skeleton): Don't output the guards.
11433 * src/files.c, src/files.c (attrsfile): Remove.
11434 * src/reader.c (symbol_list): Remove the guard and guard_line
11436 Adjust dependencies.
11437 (parse_guard): Remove.
11438 * data/bison.hairy: Remove.
11439 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11442 2002-05-02 Akim Demaille <akim@epita.fr>
11444 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11445 (parse_guard): Rename the formal argument `stack_offset' as
11446 `rule_length', which is more readable.
11448 (copy_at, copy_dollar): Instead of outputting the hard coded
11449 values of $$, $n and so forth, output invocation to b4_lhs_value,
11450 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11451 Note: this patch partially drops `semantic-parser' support: it
11452 always does `rule_length - n', where semantic parsers ought to
11454 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11455 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11457 2002-05-02 Akim Demaille <akim@epita.fr>
11459 * configure.in (AC_INIT): Bump to 1.49b.
11460 (AM_INIT_AUTOMAKE): Short invocation.
11462 2002-05-02 Akim Demaille <akim@epita.fr>
11466 2002-05-01 Akim Demaille <akim@epita.fr>
11468 * src/skeleton.h: Remove.
11470 2002-05-01 Akim Demaille <akim@epita.fr>
11472 * src/skeleton.h: Fix the #endif.
11473 Reported by Magnus Fromreide.
11475 2002-04-26 Paul Eggert <eggert@twinsun.com>
11477 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11478 Define if we define YYSTYPE and YYLTYPE, respectively.
11479 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11481 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11483 * src/scan-skel.l: Postprocess quadrigraphs.
11485 * src/reader.c (copy_character): New function, used to output
11486 single characters while replacing `[' and `]' with quadrigraphs, to
11487 avoid troubles with M4 quotes.
11488 (copy_comment): Output characters with copy_character.
11489 (read_additionnal_code): Likewise.
11490 (copy_string2): Likewise.
11491 (copy_definition): Likewise.
11493 * tests/calc.at: Exercise M4 quoting.
11495 2002-04-25 Akim Demaille <akim@epita.fr>
11497 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11498 between `!' and the command.
11499 Reported by Paul Eggert.
11501 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11503 * tests/calc.at: Exercise prologue splitting.
11505 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11506 `b4_post_prologue' instead of `b4_prologue'.
11508 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11510 (output): Free pre_prologue_obstack and post_prologue_obstack.
11511 * src/files.h, src/files.c (attrs_obstack): Remove.
11512 (pre_prologue_obstack, post_prologue_obstack): New.
11513 * src/reader.c (copy_definition): Add a parameter to specify the
11514 obstack to fill, instead of using attrs_obstack unconditionally.
11515 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11516 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11518 2002-04-23 Paul Eggert <eggert@twinsun.com>
11520 * data/bison.simple: Remove unnecessary commentary and white
11521 space differences from 1_29-branch.
11522 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11524 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11525 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11526 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11527 constructors or destructors.
11529 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11531 2002-04-23 Akim Demaille <akim@epita.fr>
11533 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11534 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11535 location with columns.
11536 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11537 All reported by Paul Eggert.
11539 2002-04-22 Akim Demaille <akim@epita.fr>
11541 * src/reduce.c (dump_grammar): Move to...
11542 * src/gram.h, src/gram.c (grammar_dump): here.
11543 Be sure to separate long item numbers.
11544 Don't read the members of a rule's prec if its nil.
11546 2002-04-22 Akim Demaille <akim@epita.fr>
11548 * src/output.c (table_size, table_grow): New.
11549 (MAXTABLE): Remove, replace uses with table_size.
11550 (pack_vector): Instead of dying when the table is too big, grow it.
11552 2002-04-22 Akim Demaille <akim@epita.fr>
11554 * data/bison.simple (yyr1): Its type is that of a token number.
11555 * data/bison.c++ (r1_): Likewise.
11556 * tests/regression.at (Web2c Actions): Adjust.
11558 2002-04-22 Akim Demaille <akim@epita.fr>
11560 * src/reader.c (token_translations_init): 256 is now the default
11561 value for the error token, i.e., it will be assigned another
11562 number if the user assigned 256 to one of her tokens.
11563 (reader): Don't force 256 to error.
11564 * doc/bison.texinfo (Symbols): Adjust.
11565 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11566 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11567 etc. instead of 10, 20, 30 (which was used to `jump' over error
11568 (256) and undefined (2)).
11570 2002-04-22 Akim Demaille <akim@epita.fr>
11572 Propagate more token_number_t.
11574 * src/gram.h (token_number_as_item_number)
11575 (item_number_as_token_number): New.
11576 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11577 Use it to create output_item_number_table and
11578 output_token_number_table.
11579 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11580 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11581 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11582 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11584 2002-04-22 Akim Demaille <akim@epita.fr>
11586 * src/output.h, src/output.c (get_lines_number): Remove.
11588 2002-04-19 Akim Demaille <akim@epita.fr>
11590 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11592 (Debugging): More details about enabling the debugging features.
11593 (Table of Symbols): Describe $$, $n, @$, and @n.
11594 Suggested by Tim Josling.
11596 2002-04-19 Akim Demaille <akim@epita.fr>
11598 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11600 2002-04-10 Akim Demaille <akim@epita.fr>
11602 * src/system.h: Rely on HAVE_LIMITS_H.
11603 Suggested by Paul Eggert.
11605 2002-04-09 Akim Demaille <akim@epita.fr>
11607 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11608 full stderr, and strip it according to the bison options, instead
11609 of composing the error message from different bits.
11610 This makes it easier to check for several error messages.
11611 Adjust all the invocations.
11612 Add an invocation exercising the error token.
11613 Add an invocation demonstrating a stupid error message.
11614 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11616 Error message are for stderr, not stdout.
11618 2002-04-09 Akim Demaille <akim@epita.fr>
11620 * src/gram.h, src/gram.c (error_token_number): Remove, use
11622 * src/reader.c (reader): Don't specify the user token number (2)
11623 for $undefined, as it uselessly prevents using it.
11624 * src/gram.h (token_number_t): Move to...
11625 * src/symtab.h: here.
11626 (state_t.number): Is a token_number_t.
11627 * src/print.c, src/reader.c: Use undeftoken->number instead of
11629 (Even though this 2 is not the same as above: the number of the
11630 undeftoken remains being 2, it is its user token number which
11632 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11633 `user_token_number_max'.
11634 Output `undef_token_number'.
11635 * data/bison.simple, data/bison.c++: Use them.
11636 Be sure to map invalid yylex return values to
11637 `undef_token_number'. This saves us from gratuitous SEGV.
11639 * tests/conflicts.at (Solved SR Conflicts)
11640 (Unresolved SR Conflicts): Adjust.
11641 * tests/regression.at (Web2c Actions): Adjust.
11643 2002-04-08 Akim Demaille <akim@epita.fr>
11645 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11647 Remove the duplicate `typedefs'.
11648 (RhsNumberType): Fix the declaration and various other typos.
11650 * data/bison.simple: Use __ofile__.
11651 * src/scan-skel.l: Handle __ofile__.
11653 2002-04-08 Akim Demaille <akim@epita.fr>
11655 * src/gram.h (item_number_t): New, the type of item numbers in
11656 RITEM. Note that it must be able to code symbol numbers as
11657 positive number, and the negation of rule numbers as negative
11659 Adjust all dependencies (pretty many).
11660 * src/reduce.c (rule): Remove this `short *' pointer: use
11662 * src/system.h (MINSHORT, MAXSHORT): Remove.
11663 Include `limits.h'.
11664 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11665 (shortcpy): Remove.
11666 (MAXTABLE): Move to...
11667 * src/output.c (MAXTABLE): here.
11668 (prepare_rules): Use output_int_table to output rhs.
11669 * data/bison.simple, data/bison.c++: Adjust.
11670 * tests/torture.at (Big triangle): Move the limit from 254 to
11672 * tests/regression.at (Web2c Actions): Ajust.
11674 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11675 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11676 passes, but produces negative #line number, once fixed, GCC is
11677 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11679 * src/state.h (state_h): Code input lines on ints, not shorts.
11681 2002-04-08 Akim Demaille <akim@epita.fr>
11683 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11684 and then the grammar.
11686 2002-04-08 Akim Demaille <akim@epita.fr>
11688 * src/system.h: No longer using strndup.
11690 2002-04-07 Akim Demaille <akim@epita.fr>
11692 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11693 * src/output.c (output_table_data): Return the longest number.
11694 (prepare_tokens): Output `token_number_max').
11695 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11697 Use them to define yy_token_number_type/TokenNumberType.
11698 Use this type for yytranslate.
11699 * tests/torture.at (Big triangle): Push the limit from 124 to
11701 * tests/regression.at (Web2c Actions): Adjust.
11703 2002-04-07 Akim Demaille <akim@epita.fr>
11705 * tests/torture.at (Big triangle): New.
11706 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11707 * tests/existing.at: here.
11709 2002-04-07 Akim Demaille <akim@epita.fr>
11711 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11713 Adjust dependencies.
11715 2002-04-07 Akim Demaille <akim@epita.fr>
11717 * src/reader.c: Normalize increments to prefix form.
11719 2002-04-07 Akim Demaille <akim@epita.fr>
11721 * src/reader.c, symtab.c: Remove debugging code.
11723 2002-04-07 Akim Demaille <akim@epita.fr>
11725 Rename all the `bucket's as `symbol_t'.
11727 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11728 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11729 * src/symtab.c, src/symtab.h (bucket): Rename as...
11731 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11732 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11733 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11734 (buckets_new, buckets_free, buckets_do): Rename as...
11735 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11736 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11737 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11738 (symbols_new, symbols_free, symbols_do): these.
11740 2002-04-07 Akim Demaille <akim@epita.fr>
11742 Use lib/hash for the symbol table.
11744 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11746 * src/lex.c (lex): Set the `number' member of new terminals.
11747 * src/reader.c (bucket_check_defined, bucket_make_alias)
11748 (bucket_check_alias_consistence, bucket_translation): New.
11749 (reader, grammar_free, readgram, token_translations_init)
11750 (packsymbols): Adjust.
11751 (reader): Number the predefined tokens.
11752 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11753 for predefined tokens.
11754 * src/symtab.h (bucket): Remove all the hash table related
11756 * src/symtab.c (symtab): Replace by...
11757 (bucket_table): this.
11758 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11759 (buckets_new, buckets_do): New.
11761 2002-04-07 Akim Demaille <akim@epita.fr>
11763 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11764 (start_symbol, max_user_token_number, semantic_parser)
11765 (error_token_number): Initialize.
11766 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11769 (errtoken, eoftoken, undeftoken, axiom): Extern.
11771 2002-04-07 Akim Demaille <akim@epita.fr>
11773 * src/gram.h (rule_s): prec and precsym are now pointers
11774 to the bucket giving the priority/associativity.
11775 Member `associativity' removed: useless.
11776 * src/reduce.c, src/conflicts.c: Adjust.
11778 2002-04-07 Akim Demaille <akim@epita.fr>
11780 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11781 Properly escape the symbols' TAG when outputting them.
11783 2002-04-07 Akim Demaille <akim@epita.fr>
11785 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11787 2002-04-07 Akim Demaille <akim@epita.fr>
11789 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11790 (LArule): this, which is an array to rule_t*.
11791 * src/print.c, src/conflicts.c: Adjust.
11793 2002-04-07 Akim Demaille <akim@epita.fr>
11795 * src/gram.h (rule_t): Rename `number' as `user_number'.
11796 `number' is a new member.
11797 Adjust dependencies.
11798 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11800 2002-04-07 Akim Demaille <akim@epita.fr>
11802 As a result of the previous patch, it is no longer needed
11803 to reorder ritem itself.
11805 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11807 2002-04-07 Akim Demaille <akim@epita.fr>
11809 Be sure never to walk through RITEMS, but use only data related to
11810 the rules themselves. RITEMS should be banished.
11812 * src/output.c (output_token_translations): Rename as...
11813 (prepare_tokens): this.
11814 In addition to `translate', prepare the muscles `tname' and
11815 `toknum', which were handled by...
11816 (output_rule_data): this.
11817 Remove, and move the remainder of its outputs into...
11818 (prepare_rules): this new routines, which also merges content from
11819 (output_gram): this.
11820 (prepare_rules): Be sure never to walk through RITEMS.
11821 (output_stos): Rename as...
11822 (prepare_stos): this.
11823 (output): Always invoke prepare_states, after all, just don't use it
11824 in the output if you don't need it.
11826 2002-04-07 Akim Demaille <akim@epita.fr>
11828 * src/LR0.c (new_state): Display `nstates' as the name of the
11829 newly created state.
11830 Adjust to initialize first_state and last_state if needed.
11831 Be sure to distinguish the initial from the final state.
11832 (new_states): Create the itemset of the initial state, and use
11834 * src/closure.c (closure): Now that the initial state has its
11835 items properly set, there is no need for a special case when
11836 creating `ruleset'.
11838 As a result, now the rule 0, reducing to $axiom, is visible in the
11839 outputs. Adjust the test suite.
11841 * tests/conflicts.at (Solved SR Conflicts)
11842 (Unresolved SR Conflicts): Adjust.
11843 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11844 * tests/conflicts.at (S/R in initial): New.
11846 2002-04-07 Akim Demaille <akim@epita.fr>
11848 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11849 the RHS of the rules.
11850 * src/output.c (output_gram): Likewise.
11852 2002-04-07 Akim Demaille <akim@epita.fr>
11854 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11856 Adjust all dependencies.
11857 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11858 `number' of the buckets too.
11859 * src/gram.h: Include `symtab.h'.
11860 (associativity): Move to...
11861 * src/symtab.h: here.
11862 No longer include `gram.h'.
11864 2002-04-07 Akim Demaille <akim@epita.fr>
11866 * src/gram.h, src/gram.c (rules_rhs_length): New.
11867 (ritem_longest_rhs): Use it.
11868 * src/gram.h (rule_t): `number' is a new member.
11869 * src/reader.c (packgram): Set it.
11870 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11871 the end of `rules', and count them out of `nrules'.
11872 (reduce_output, dump_grammar): Adjust.
11873 * src/print.c (print_grammar): It is no longer needed to check for
11874 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11875 * tests/reduce.at (Reduced Automaton): New test.
11877 2002-04-07 Akim Demaille <akim@epita.fr>
11879 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11880 lacking `+ 1' to nrules, Bison reported as useless a token if it
11881 was used solely to set the precedence of the last rule...
11883 2002-04-07 Akim Demaille <akim@epita.fr>
11885 * data/bison.c++, data/bison.simple: Don't output the current file
11886 name in #line, to avoid useless diffs between two identical
11887 outputs under different names.
11889 2002-04-07 Akim Demaille <akim@epita.fr>
11891 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11892 Normalize loops to using `< nrules + 1', not `<= nrules'.
11894 2002-04-07 Akim Demaille <akim@epita.fr>
11898 2002-04-07 Akim Demaille <akim@epita.fr>
11900 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11901 bucket.value as bucket.number.
11903 2002-04-07 Akim Demaille <akim@epita.fr>
11905 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11906 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11907 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11908 RHS, instead of being an index in RITEMS.
11910 2002-04-04 Paul Eggert <eggert@twinsun.com>
11912 * doc/bison.texinfo: Update copyright date.
11913 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11914 (Symbols): Warn about running Bison in one character set,
11915 but compiling and/or running in an incompatible one.
11916 Warn about character code 256, too.
11918 2002-04-03 Paul Eggert <eggert@twinsun.com>
11920 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11921 YYERROR_VERBOSE is nonzero, not whether it is defined.
11923 Merge changes from bison-1_29-branch.
11925 2002-03-20 Paul Eggert <eggert@twinsun.com>
11927 Merge fixes from Debian bison_1.34-1.diff.
11929 * configure.in (AC_PREREQ): 2.53.
11931 2002-03-20 Akim Demaille <akim@epita.fr>
11933 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11935 2002-03-19 Paul Eggert <eggert@twinsun.com>
11937 * src/bison.simple (YYCOPY): New macro.
11938 (YYSTACK_RELOCATE): Use it.
11939 Remove Type arg; no longer needed. All callers changed.
11940 (yymemcpy): Remove; no longer needed.
11942 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11943 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11945 2002-03-19 Akim Demaille <akim@epita.fr>
11947 Test and fix the #line outputs.
11949 * tests/atlocal.at (GCC): New.
11950 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11951 (Prologue synch line, %union synch line, Postprologue synch line)
11952 (Action synch line, Epilogue synch line): New tests.
11953 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11954 * data/bison.simple, data/bison.c++: Use it.
11956 2002-03-19 Akim Demaille <akim@epita.fr>
11958 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11959 (Solved SR Conflicts, %expect not enough, %expect right)
11960 (%expect too much): Move to...
11961 * tests/conflicts.at: this new file.
11963 2002-03-19 Akim Demaille <akim@epita.fr>
11965 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11966 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11967 that we can move to enums for instance.
11968 * src/output.c (token_definitions_output): Output a list of
11969 `token-name, token-number' instead of the #define.
11970 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11972 2002-03-14 Akim Demaille <akim@epita.fr>
11974 Use Gettext 0.11.1.
11976 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11978 * data/bison.c++: Make the user able to add members to the generated
11979 parser by subclassing.
11981 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11983 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11985 Reported by Nicolas Tisserand and Nicolas Burrus.
11987 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11989 * src/reader.c: Warn about lacking semi-colons, do not complain.
11991 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11993 * data/bison.c++: Remove a debug line.
11995 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11997 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11998 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11999 provide a default implementation.
12001 2002-03-04 Akim Demaille <akim@epita.fr>
12003 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12004 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12005 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12006 * tests/semantic.at (Parsing Guards): Similarly.
12007 * src/reader.at (readgram): Complain if the last rule is not ended
12010 2002-03-04 Akim Demaille <akim@epita.fr>
12012 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12013 * src/closure.c: here.
12014 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12016 * src/warshall.h, src/warshall.c: Remove.
12017 * tests/sets.at (Broken Closure): Adjust.
12019 2002-03-04 Akim Demaille <akim@epita.fr>
12021 * src/output.c (output_skeleton): tempdir is const.
12022 bytes_read is unused.
12024 2002-03-04 Akim Demaille <akim@epita.fr>
12026 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12027 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12029 From Michael Hayes.
12031 2002-03-04 Akim Demaille <akim@epita.fr>
12033 * src/closure.c (closure): `r' is unused.
12035 2002-03-04 Akim Demaille <akim@epita.fr>
12037 * tests/sets.at (Broken Closure): Add the ending `;'.
12038 * src/reader.at (readgram): Complain if a rule is not ended with a
12041 2002-03-04 Akim Demaille <akim@epita.fr>
12043 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12044 (count_sr_conflicts): Use bitset_count.
12045 * src/reduce.c (inaccessable_symbols): Ditto.
12046 (bits_size): Remove.
12047 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12049 2002-03-04 Akim Demaille <akim@epita.fr>
12051 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12052 * src/reduce.c: Remove the `bitset_zero's following the
12053 `bitset_create's, as now it is performed by the latter.
12055 2002-03-04 Akim Demaille <akim@epita.fr>
12057 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12058 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12059 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12060 latest sources from Michael.
12062 2002-03-04 Akim Demaille <akim@epita.fr>
12064 * src/output.c (output): Don't free the grammar.
12065 * src/reader.c (grammar_free): New.
12066 * src/main.c (main): Call it and don't free symtab here.
12068 2002-03-04 Akim Demaille <akim@epita.fr>
12070 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12072 Reported by Benoit Perrot.
12074 2002-03-04 Akim Demaille <akim@epita.fr>
12076 Use bitset operations when possible, not loops over bits.
12078 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12080 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12081 * src/reduce.c (useless_nonterminals): Formatting changes.
12082 * src/warshall.c (TC): Use bitset_or.
12084 2002-03-04 Akim Demaille <akim@epita.fr>
12086 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12087 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12090 2002-03-04 Akim Demaille <akim@epita.fr>
12092 * src/lalr.c (F): Now a bitset*.
12093 Adjust all dependencies.
12095 2002-03-04 Akim Demaille <akim@epita.fr>
12097 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12098 Adjust all dependencies.
12100 2002-03-04 Akim Demaille <akim@epita.fr>
12102 * src/L0.c, src/LR0.h (nstates): Be size_t.
12103 Adjust comparisons (signed vs unsigned).
12104 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12106 Adjust all dependencies.
12108 2002-03-04 Akim Demaille <akim@epita.fr>
12110 * src/closure.c (firsts): Now, also a bitset.
12111 Adjust all dependencies.
12112 (varsetsize): Remove, now unused.
12113 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12115 2002-03-04 Akim Demaille <akim@epita.fr>
12117 * src/print.c: Convert to use bitset.h, not hand coded iterations
12120 2002-03-04 Akim Demaille <akim@epita.fr>
12122 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12124 2002-03-04 Akim Demaille <akim@epita.fr>
12126 * src/closure.c (ruleset): Be a bitset.
12127 (rulesetsize): Remove.
12129 2002-03-04 Akim Demaille <akim@epita.fr>
12131 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12132 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12133 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12134 * src/closure.c (fderives): Be an array of bitsets.
12136 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
12138 * data/bison.c++: Merge the two generated headers. Insert a copyright
12139 notice in each output file.
12141 2002-02-28 Akim Demaille <akim@epita.fr>
12143 * data/bison.c++: Copy the prologue of bison.simple to fetch
12144 useful M4 definitions, such as b4_header_guard.
12146 2002-02-25 Akim Demaille <akim@epita.fr>
12148 * src/getargs.c (version): Give the name of the authors, and use a
12149 translator friendly scheme for the bgr
12152 2002-02-25 Akim Demaille <akim@epita.fr>
12154 * src/output.c (header_output): Remove, now handled completely via
12157 2002-02-25 Akim Demaille <akim@epita.fr>
12159 * m4/m4.m4: New, from CVS Autoconf.
12160 * configure.in: Invoke it.
12161 * src/output.c (output_skeleton): Use its result instead of the
12164 2002-02-25 Akim Demaille <akim@epita.fr>
12166 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12168 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12169 * src/output.c (output_skeleton): Use mkstemp to create a real
12171 Move the filling of `skeleton' and its muscle to...
12173 (output): Move the definition of the prologue muscle to...
12175 * src/system.h (DEFAULT_TMPDIR): New.
12177 2002-02-14 Paul Eggert <eggert@twinsun.com>
12179 Remove the support for C++ namespace cleanliness; it was
12180 causing more problems than it was curing, since it didn't work
12181 properly on some nonstandard C++ compilers. This can wait
12182 for a proper C++ parser.
12184 * NEWS: Document this.
12185 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12186 of C++, as it's treated like C now.
12187 * src/bison.simple (YYSTD): Remove.
12188 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12189 Treat C++ just like Standard C instead of trying to support
12190 namespace cleanliness.
12192 2002-02-14 Akim Demaille <akim@epita.fr>
12194 * tests/regression.at (else): Adjust to Andreas' change.
12196 2002-02-14 Akim Demaille <akim@epita.fr>
12198 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12200 2002-02-13 Andreas Schwab <schwab@suse.de>
12202 * src/output.c (output_rule_data): Don't output NULL, it might
12203 not be defined yet.
12205 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12207 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12208 (Copyright notice): Update.
12210 2002-02-11 Akim Demaille <akim@epita.fr>
12212 * tests/regression.at (%nonassoc and eof): Don't include
12213 nonportable headers.
12215 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12217 * data/bison.c++: Correct error recovery. Make the user able to
12218 initialize the starting location.
12220 2002-02-07 Akim Demaille <akim@epita.fr>
12222 * tests/input.at: New.
12224 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12226 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12227 more consistent when naming methods and variables. Put preprocessor
12228 directives around tables only needed for debugging.
12230 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12232 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12234 (yy::b4_name::parse): Use print_.
12236 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12238 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12240 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12242 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12244 (yy::b4_name::parse): Build verbose error messages, and use error_.
12246 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12248 * data/bison.c++: Fix m4 quoting in comments.
12250 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12252 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12253 not expanded by m4.
12255 2002-02-05 Akim Demaille <akim@epita.fr>
12257 * data/bison.c++: Adjust to the M4 back end.
12258 More is certainly needed.
12260 2002-02-05 Akim Demaille <akim@epita.fr>
12262 Give a try to M4 as a back end.
12264 * lib/readpipe.c: New, from wdiff.
12265 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12267 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12268 specific values. Now it is m4 that performs the lookup.
12269 * src/parse-skel.y: Remove.
12270 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12271 * src/output.c (actions_output, guards_output)
12272 (token_definitions_output): No longer keeps track of the output
12273 line number, hence remove the second argument.
12274 (guards_output): Check against the guard member of a rule, not the
12277 (output_skeleton): Don't look for the skeleton location, let m4 do
12279 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12281 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12282 (prepare): Given that for the time being changesyntax is not
12283 usable in M4, rename the muscles using `-' to `_'.
12284 Define `defines_flag', `output_parser_name' and `output_header_name'.
12285 * src/output.h (actions_output, guards_output)
12286 (token_definitions_output): Adjust prototypes.
12287 * src/scan-skel.l: Instead of scanning the skeletons, it now
12288 processes the output of m4: `__oline__' and `#output'.
12289 * data/bison.simple: Adjust to be used by M4(sugar).
12290 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12292 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12293 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12294 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12295 shamelessly stolen from CVS Autoconf.
12297 2002-02-05 Akim Demaille <akim@epita.fr>
12299 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12300 * configure.in: Check for the declarations of free and malloc.
12301 * src/muscle_tab.c: Adjust.
12303 2002-02-05 Akim Demaille <akim@epita.fr>
12305 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12306 which have no values.
12308 2002-02-05 Akim Demaille <akim@epita.fr>
12310 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12313 2002-01-29 Paul Eggert <eggert@twinsun.com>
12315 * src/bison.simple (YYSIZE_T): Do not define merely because
12316 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12317 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12319 2002-01-27 Akim Demaille <akim@epita.fr>
12321 Fix `%nonassoc and eof'.
12323 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12324 which were not properly copied! Replace
12325 memcpy (res->errs, src->errs, src->nerrs);
12327 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12329 * tests/regression.at (%nonassoc and eof): Adjust to newest
12330 Autotest: `.' is not in the PATH.
12332 2002-01-27 Akim Demaille <akim@epita.fr>
12334 * tests/sets.at (AT_EXTRACT_SETS): New.
12335 (Nullable): Use it.
12338 2002-01-26 Akim Demaille <akim@epita.fr>
12340 * tests/actions.at, tests/calc.at, tests/headers.at,
12341 * tests/torture.at: Adjust to the newest Autotest which no longer
12342 forces `.' in the PATH.
12344 2002-01-25 Akim Demaille <akim@epita.fr>
12346 * tests/regression.at (%nonassoc and eof): New.
12347 Suggested by Robert Anisko.
12349 2002-01-24 Akim Demaille <akim@epita.fr>
12351 Bison dumps core when trying to complain about broken input files.
12352 Reported by Cris van Pelt.
12354 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12355 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12357 (Invalid inputs): Strengthen: exercise parse_percent_token.
12359 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12361 * src/Makefile.am: Add bison.c++.
12362 * src/bison.c++: New skeleton.
12364 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12368 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12370 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12372 2002-01-20 Marc Autret <marc@gnu.org>
12374 * src/files.c (compute_output_file_names): Fix
12376 2002-01-20 Marc Autret <marc@gnu.org>
12378 * tests/output.at: New test.
12379 * src/files.c (compute_base_names): Don't map extensions when
12380 the YACC flag is set, use defaults.
12381 Reported by Evgeny Stambulchik.
12383 2002-01-20 Marc Autret <marc@gnu.org>
12385 * src/system.h: Need to define __attribute__ away for non-GCC
12386 compilers as well (i.e., the vendor C compiler).
12387 Suggested by Albert Chin-A-Young.
12389 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12391 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12392 canonical definition.
12393 * src/system.h: Use the canonical definition for PARAMS (avoids
12394 a conflict with the macro from lib/hash.h).
12396 2002-01-11 Akim Demaille <akim@epita.fr>
12398 * configure.in: Use AC_FUNC_STRNLEN.
12399 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12401 2002-01-09 Akim Demaille <akim@epita.fr>
12403 * src/files.c, src/files.h (output_infix): New.
12404 (tab_extension): Remove.
12405 (compute_base_names): Compute the former, drop the latter.
12406 * src/output.c (prepare): Insert the muscles `output-infix', and
12408 * src/parse-skel.y (string, string.1): New.
12409 (section.header): Use it.
12410 (section.yacc): Remove.
12411 (prefix): Remove too.
12412 * src/scan-skel.l: Adjust.
12413 * src/bison.simple, src/bison.hairy: Adjust.
12415 2002-01-09 Akim Demaille <akim@epita.fr>
12417 * configure.in (WERROR_CFLAGS): Compute it.
12418 * src/Makefile.am (CFLAGS): Pass it.
12419 * tests/atlocal.in (CFLAGS): Idem.
12420 * src/files.c: Fix a few warnings.
12421 (get_extension_index): Remove, unused.
12423 2002-01-08 Akim Demaille <akim@epita.fr>
12425 * src/getargs.c (AS_FILE_NAME): New.
12426 (getargs): Use it to convert DOSish file names.
12427 * src/files.c (base_name): Rename as full_base_name to avoid
12428 clashes with `base_name ()'.
12429 (filename_split): New.
12430 (compute_base_names): N-th rewrite, using filename_split.
12432 2002-01-08 Akim Demaille <akim@epita.fr>
12434 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12435 New, stolen from the Fileutils 4.1.
12436 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12437 * configure.in: Check for the presence of memrchr, and of its
12440 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12442 * lib/hash.h (__P): Added definition for this macro.
12443 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12444 BUILT_SOURCES, to ensure they are generated first.
12445 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12446 %error-verbose to allow bootstrapping with bison 1.30x.
12448 2002-01-06 Akim Demaille <akim@epita.fr>
12450 * src/reader.c (parse_braces): Don't fetch the next char, the
12451 convention is to fetch on entry.
12452 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12453 'switch' without a following semicolon.
12454 * tests/regression.at (braces parsing): New.
12456 2002-01-06 Akim Demaille <akim@epita.fr>
12458 Bison is dead wrong in its RR conflict reports.
12460 * tests/torture.at (GNU Cim Grammar): New.
12461 * src/conflicts.c (count_rr_conflicts): Fix.
12463 2002-01-06 Akim Demaille <akim@epita.fr>
12465 Creating package.m4 from configure.ac causes too many problems.
12467 * tests/Makefile.am (package.m4): Create it by hand,
12468 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12470 2002-01-06 Akim Demaille <akim@epita.fr>
12472 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12475 2002-01-04 Paul Eggert <eggert@twinsun.com>
12477 * doc/bison.texinfo (Debugging):
12478 Remove YYSTDERR; it's no longer defined or used.
12479 Also, s/cstdio.h/cstdio/.
12481 2002-01-03 Akim Demaille <akim@epita.fr>
12483 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12485 2002-01-03 Akim Demaille <akim@epita.fr>
12487 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12488 tracing code to --trace, wait for a better --trace option, with
12491 2002-01-03 Akim Demaille <akim@epita.fr>
12493 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12494 The ISO C++ standard is extremely clear about it: stderr is
12495 considered a macro, not a regular symbol (see table 94 `Header
12496 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12497 Therefore std:: does not apply to it. It still does with fprintf.
12498 Also, s/cstdio.h/cstdio/.
12500 2002-01-03 Akim Demaille <akim@epita.fr>
12502 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12503 for non system headers.
12505 2002-01-02 Akim Demaille <akim@epita.fr>
12507 Equip the skeleton chain with location tracking, runtime trace,
12508 pure parser and scanner.
12510 * src/parse-skel.y: Request a pure parser, locations, and prefix
12512 (%union): Having several members with the same type does not help
12513 type mismatches, simplify.
12514 (YYPRINT, yyprint): New.
12515 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12516 (skel_error): this.
12518 * src/scan-skel.l: Adjust to these changes.
12519 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12520 (LOCATION_PRINT, skel_control_t): New.
12522 2001-12-30 Akim Demaille <akim@epita.fr>
12524 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12525 replace `gb' with BLANKS.
12526 * src/scan-skel.l: Adjust.
12528 2001-12-30 Akim Demaille <akim@epita.fr>
12530 * src/system.h: We don't need nor want bcopy.
12531 Throw away MS-DOS crap: we don't need getpid.
12532 * configure.in: We don't need strndup. It was even causing
12533 problems: because Flex includes the headers *before* us,
12534 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12536 * lib/xstrndup.c: New.
12537 * src/scan-skel.l: Use it.
12538 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12539 * src/parse-skel.y: Use %directives instead of #defines.
12541 2001-12-30 Akim Demaille <akim@epita.fr>
12543 * src/skeleton.h: New.
12544 * src/output.c (output_parser, output_master_parser): Remove, dead
12546 * src/output.h (get_lines_number, actions_output, guards_output)
12547 (token_definitions_output): Prototype them.
12548 * src/parse-skel.y: Add the license notice.
12549 Include output.h and skeleton.h.
12550 (process_skeleton): Returns void, and takes a single parameter.
12551 * src/scan-skel.l: Add the license notice.
12552 Include skeleton.h.
12553 Don't use %option yylineno: it seems that then Flex imagines
12554 REJECT has been used, and therefore it won't reallocate its
12555 buffers (which makes no other sense to me than a bug). It results
12556 in warnings for `unused: yy_flex_realloc'.
12558 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12560 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12561 (MUSCLE_INSERT_PREFIX): ...to there.
12562 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12563 (MUSCLE_INSERT_PREFIX): Move from here...
12565 * src/bison.hairy: Add a section directive. Put braces around muscle
12566 names. This parser skeleton is still broken, but Bison should not
12567 choke on a bad muscle 'syntax'.
12568 * src/bison.simple: Add a section directive. Put braces around muscle
12571 * src/files.h (strsuffix, stringappend): Add declarations.
12572 (tab_extension): Add declaration.
12573 (short_base_name): Add declaration.
12575 * src/files.c (strsuffix, stringappend): No longer static. These
12576 functions are used in the skeleton parser.
12577 (tab_extension): New.
12578 (compute_base_names): Use the computations done in this function
12579 to guess if the generated parsers should have '.tab' in their
12581 (short_base_name): No longer static.
12583 * src/output.c (output_skeleton): New.
12584 (output): Disable call to output_master_parser, and give a try to
12585 a new skeleton handling system.
12586 (guards_output, actions_output): No longer static.
12587 (token_definitions_output, get_lines_number): No longer static.
12589 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12591 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12594 * src/parse-skel.y: New file.
12595 * src/scan-skel.l: New file.
12597 2001-12-29 Akim Demaille <akim@epita.fr>
12599 %name-prefix is broken.
12601 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12602 Adjust all dependencies.
12603 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12606 Renaming yylval but not yylloc is not consistent. Now we do.
12608 * src/bison.simple: Prefix yylloc if used.
12609 * doc/bison.texinfo (Decl Summary): Document that.
12611 2001-12-29 Akim Demaille <akim@epita.fr>
12613 * doc/bison.texinfo: Promote `%long-directive' over
12615 Remove all references to fixed-output-files, yacc is enough.
12617 2001-12-29 Akim Demaille <akim@epita.fr>
12619 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12620 user prologue. These are defaults.
12621 * tests/actions.at (Mid-rule actions): Make sure the user can
12622 define YYDEBUG and YYERROR_VERBOSE.
12624 2001-12-29 Akim Demaille <akim@epita.fr>
12626 * src/output.c (header_output): Don't forget to export YYLTYPE and
12628 * tests/headers.at (export YYLTYPE): New, make sure it does.
12629 * tests/regression.at (%union and --defines, Invalid CPP headers):
12631 * tests/headers.at: here.
12633 2001-12-29 Akim Demaille <akim@epita.fr>
12635 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12637 2001-12-29 Akim Demaille <akim@epita.fr>
12639 * tests/actions.at (Mid-rule actions): Output on a single line
12640 instead of several.
12642 2001-12-29 Akim Demaille <akim@epita.fr>
12644 * doc/bison.texinfo: Formatting changes.
12646 2001-12-29 Akim Demaille <akim@epita.fr>
12648 Don't store the token defs in a muscle, just be ready to output it
12649 on command. Now possible via `symbols'. Fixes a memory leak.
12651 * src/output.c (token_definitions_output): New.
12652 (output_parser, header_output): Use it.
12653 * src/reader.c (symbols_save): Remove.
12655 2001-12-29 Akim Demaille <akim@epita.fr>
12657 * src/bison.simple: Do not provide a default for YYSTYPE and
12658 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12661 2001-12-29 Akim Demaille <akim@epita.fr>
12663 Mid-rule actions are simply... ignored!
12665 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12666 the empty-rule associated to the dummy symbol, not to the host
12668 * tests/actions.at (Mid-rule actions): New.
12670 2001-12-29 Akim Demaille <akim@epita.fr>
12674 * src/reader.c (reader): Free grammar.
12676 2001-12-29 Akim Demaille <akim@epita.fr>
12680 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12681 since it allocates it for each state, although only one is needed.
12682 (allocate_storage): Do it here.
12684 2001-12-29 Akim Demaille <akim@epita.fr>
12686 * src/options.h, src/options.c (create_long_option_table): Rename
12688 (long_option_table_new): this, with a clearer prototype.
12689 (percent_table): Remove, unused,
12690 * src/getargs.c (getargs): Adjust.
12692 2001-12-29 Akim Demaille <akim@epita.fr>
12694 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12695 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12698 2001-12-29 Akim Demaille <akim@epita.fr>
12700 * src/lalr.c (build_relations): Rename `states' as `states1'.
12701 Sorry, I don't understand exactly what it is, no better name...
12703 2001-12-29 Akim Demaille <akim@epita.fr>
12705 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12706 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12707 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12710 2001-12-29 Akim Demaille <akim@epita.fr>
12712 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12715 2001-12-29 Akim Demaille <akim@epita.fr>
12717 * src/reader.c, src/reader.h (user_toknums): Remove.
12718 Adjust all users to use symbols[i]->user_token_number.
12720 2001-12-29 Akim Demaille <akim@epita.fr>
12722 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12723 Adjust all users to use symbols[i]->prec or ->assoc.
12725 2001-12-29 Akim Demaille <akim@epita.fr>
12727 * src/reader.c, src/reader.h (tags): Remove.
12728 Adjust all users to use symbols[i]->tag.
12730 2001-12-29 Akim Demaille <akim@epita.fr>
12732 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12734 * src/reader.c (packsymbols): Fill this table.
12736 * src/conflicts.c (resolve_sr_conflict): Adjust.
12737 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12739 Use symbols[i]->tag instead of tags[i].
12741 2001-12-29 Akim Demaille <akim@epita.fr>
12743 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12744 In addition, put a comment in there, to replace...
12745 * tests/regression.at (%union and C comments): Remove.
12747 2001-12-29 Akim Demaille <akim@epita.fr>
12749 * tests/regression.at (Web2c Actions): Blindly move the actual
12750 output as expected output. The contents *seem* right to me, but I
12751 can't pretend reading perfectly parser tables... Nonetheless, all
12752 the other tests pass correctly, the table look OK, even though the
12753 presence of `$axiom' is to be noted: AFAICS it is useless (but
12756 2001-12-29 Akim Demaille <akim@epita.fr>
12758 * src/reader.c (readgram): Don't add the rule 0 if there were no
12759 rules read. In other words, add it _after_ having performed
12760 grammar sanity checks.
12761 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12763 2001-12-29 Akim Demaille <akim@epita.fr>
12765 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12766 visible, and some states have now a different number.
12768 2001-12-29 Akim Demaille <akim@epita.fr>
12770 * src/reader.c (readgram): Bind the initial rule's lineno to that
12772 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12773 (Solved SR Conflicts): Adjust rule 0's line number.
12775 2001-12-29 Akim Demaille <akim@epita.fr>
12777 Fix the `GAWK Grammar' failure.
12779 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12780 the reductions of the first state which was mistakenly confused
12781 with the final state because precisely final_state was initialized
12783 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12784 now noticed by Bison.
12785 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12786 have a reduction on $default.
12788 2001-12-29 Akim Demaille <akim@epita.fr>
12790 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12792 * src/closure.c (print_closure): Likewise.
12793 * src/derives.c (print_derives): Likewise.
12794 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12797 2001-12-29 Akim Demaille <akim@epita.fr>
12799 * src/lalr.c (lookaheads_print): New.
12800 (lalr): Call it when --trace-flag.
12801 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12804 2001-12-29 Akim Demaille <akim@epita.fr>
12806 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12807 when walking through ritem, even via rule->rhs.
12808 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12809 (useful_production, useless_nonterminals): Likewise.
12810 (reduce_grammar_tables): Likewise, plus update nritems.
12811 * src/nullable.c (set_nullable): Likewise.
12812 * src/lalr.c (build_relations): Likewise.
12813 * tests/sets.at (Nullable): Adjust.
12814 Fortunately, now, the $axiom is no longer nullable.
12816 2001-12-29 Akim Demaille <akim@epita.fr>
12818 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12820 * src/gram.c (ritem_longest_rhs): Likewise.
12821 * src/reduce.c (nonterminals_reduce): Likewise.
12822 * src/print_graph.c (print_graph): Likewise.
12823 * src/output.c (output_rule_data): Likewise.
12824 * src/nullable.c (set_nullable): Likewise.
12826 2001-12-29 Akim Demaille <akim@epita.fr>
12828 * src/output.c: Comment changes.
12830 2001-12-27 Paul Eggert <eggert@twinsun.com>
12832 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12833 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12834 Sparc, as they were causing more porting problems than the
12835 (minor) performance improvement was worth.
12837 Also, catch up with 1.31's YYSTD.
12839 2001-12-27 Akim Demaille <akim@epita.fr>
12841 * src/output.c (output_gram): Rely on nritems, not the
12842 0-sentinel. See below.
12843 Use -1 as separator, not 0.
12844 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12845 Rely on -1 as separator in yyrhs, instead of 0.
12846 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12847 twice `Now at end of input', therefore there are two lines less to
12850 2001-12-27 Akim Demaille <akim@epita.fr>
12852 * tests/regression.at (Unresolved SR Conflicts):
12853 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12856 2001-12-27 Akim Demaille <akim@epita.fr>
12858 * src/LR0.c (new_state): Recognize the final state by the fact it
12859 is reached by eoftoken.
12860 (insert_start_shifting_state, insert_eof_shifting_state)
12861 (insert_accepting_state, augment_automaton): Remove, since now
12862 these states are automatically computed from the initial state.
12863 (generate_states): Adjust.
12864 * src/print.c: When reporting a rule number to the user, substract
12865 1, so that the axiom rule is rule 0, and the first user rule is 1.
12866 * src/reduce.c: Likewise.
12867 * src/print_graph.c (print_core): For the time being, just as for
12868 the report, depend upon --trace-flags to dump the full set of
12870 * src/reader.c (readgram): Once the grammar read, insert the rule
12871 0: `$axiom: START-SYMBOL $'.
12872 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12873 number of the states has changed (the final state is no longer
12874 necessarily the last), catch up.
12876 2001-12-27 Akim Demaille <akim@epita.fr>
12878 Try to make the use of the eoftoken valid. Given that its value
12879 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12880 is used instead of > 0 where appropriate, (ii), depend upon nritems
12881 instead of the 0-sentinel.
12883 * src/gram.h, src/gram.c (nritems): New.
12884 Expected to be duplication of nitems, but for the time being...
12885 * src/reader.c (packgram): Assert nritems and nitems are equal.
12886 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12887 * src/closure.c (print_closure, print_fderives): Likewise.
12888 * src/gram.c (ritem_print): Likewise.
12889 * src/print.c (print_core, print_grammar): Likewise.
12890 * src/print_graph.c: Likewise.
12892 2001-12-27 Akim Demaille <akim@epita.fr>
12894 * src/main.c (main): If there are complains after grammar
12895 reductions, then output the report anyway if requested, then die.
12896 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12897 * src/reader.c (eoftoken): New.
12898 (parse_token_decl): If the token being defined has value `0', it
12900 (packsymbols): No longer hack `tags' to insert `$' by hand.
12901 Be sure to preserve the value of the eoftoken.
12902 (reader): Make sure eoftoken is defined.
12903 Initialize nsyms to 0: now eoftoken is created just like the others.
12904 * src/print.c (print_grammar): Don't special case the eof token.
12905 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12906 lie anyway, albeit pleasant.
12907 * tests/calc.at: Exercise error messages with eoftoken.
12908 Change the grammar so that empty input is invalid.
12909 Adjust expectations.
12910 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12912 2001-12-27 Akim Demaille <akim@epita.fr>
12914 * configure.in: Check the protos of strchr ans strspn.
12915 Replace strchr if needed.
12916 * src/system.h: Provide the protos of strchr, strspn and memchr if
12918 * lib/strchr.c: New.
12919 * src/reader.c (symbols_save): Use strchr.
12921 2001-12-27 Akim Demaille <akim@epita.fr>
12923 * src/print.c, src/print_graph.c (escape): New.
12924 Use it to quote the TAGS outputs.
12925 * src/print_graph.c (print_state): Now errors are in red, and
12926 reductions in green.
12927 Prefer high to wide: output the state number on a line of its own.
12929 2001-12-27 Akim Demaille <akim@epita.fr>
12931 * src/state.h, src/state.c (reductions_new): New.
12932 * src/LR0.c (set_state_table): Let all the states have a
12933 `reductions', even if reduced to 0.
12934 (save_reductions): Adjust.
12935 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12936 * src/print.c (print_reductions, print_actions): Adjust.
12937 * src/output.c (action_row): Adjust.
12939 2001-12-27 Akim Demaille <akim@epita.fr>
12941 * src/state.h, src/state.c (errs_new, errs_dup): New.
12942 * src/LR0.c (set_state_table): Let all the states have an errs,
12943 even if reduced to 0.
12944 * src/print.c (print_errs, print_reductions): Adjust.
12945 * src/output.c (output_actions, action_row): Adjust.
12946 * src/conflicts.c (resolve_sr_conflict): Adjust.
12948 2001-12-27 Akim Demaille <akim@epita.fr>
12950 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12952 2001-12-27 Akim Demaille <akim@epita.fr>
12954 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12955 * src/print.c: here.
12956 (lookaheadset, shiftset): New, used as additional storage by
12958 (print_results): Adjust.
12959 (print_shifts, print_gotos, print_errs): New, extracted from...
12960 (print_actions): here.
12961 * src/print_graph.c (print_actions): Remove dead code.
12963 2001-12-27 Akim Demaille <akim@epita.fr>
12965 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12968 2001-12-27 Akim Demaille <akim@epita.fr>
12970 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12971 (build_relations): Adjust.
12973 2001-12-27 Akim Demaille <akim@epita.fr>
12975 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12978 2001-12-27 Akim Demaille <akim@epita.fr>
12980 * src/reader.c (packgram): Catch nitems overflows.
12982 2001-12-27 Akim Demaille <akim@epita.fr>
12984 * src/files.c, src/files.h (guard_obstack): Remove.
12985 * src/output.c (output): Adjust.
12986 * src/reader.c (parse_braces): New, factoring...
12987 (copy_action, copy_guard): these two which are renamed as...
12988 (parse_action, parse_guard): these.
12989 As a voluntary consequence, using braces around guards is now
12992 2001-12-27 Akim Demaille <akim@epita.fr>
12994 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12995 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12997 (symbol_list_new): Adjust.
12998 (copy_action): action_line is the first line, not the last.
12999 (copy_guard): Just as for actions, store the `action' only, not
13000 the switch/case/break flesh.
13001 Don't parse the user action that might follow the guard, let...
13002 (readgram): do it, i.e., now, there can be an action after a
13004 In other words the guard is just explicitly optional.
13005 (packgram): Adjust.
13006 * src/output.c (guards_output): New.
13007 (output_parser): Call it when needed.
13008 (output): Also free the guard and attrs obstacks.
13009 * src/files.c, src/files.h (obstack_save): Remove.
13010 (output_files): Remove.
13011 As a result, if one needs the former `.act' file, using an
13012 appropriate skeleton which requires actions and guards is now
13014 * src/main.c (main): Adjust.
13015 * tests/semantic.at: New.
13016 * tests/regression.at: Use `input.y' as input file name.
13017 Avoid 8+3 problems by requiring input.c when the test needs the
13020 2001-12-27 Akim Demaille <akim@epita.fr>
13022 * src/reader.c (symbol_list_new): Be sure to initialize all the
13025 2001-12-27 Akim Demaille <akim@epita.fr>
13027 All the hacks using a final pseudo state are now useless.
13029 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13030 * src/lalr.c (nLA): New.
13031 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13032 instead of lookaheadsp from the pseudo state (nstate + 1).
13034 2001-12-27 Akim Demaille <akim@epita.fr>
13036 * src/output.c (action_row, token_actions): Use a state_t instead
13037 of a integer, and nlookaheads instead of the following state's
13040 2001-12-27 Akim Demaille <akim@epita.fr>
13042 * src/conflicts.c (log_resolution, flush_shift)
13043 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13044 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13045 (conflicts_print, print_reductions): Use a state_t instead of an
13046 integer when referring to a state.
13047 As much as possible, depend upon nlookaheads, instead of the
13048 `lookaheadsp' member of the following state (since lookaheads of
13049 successive states are successive, the difference between state n + 1
13050 and n served as the number of lookaheads for state n).
13051 * src/lalr.c (add_lookback_edge): Likewise.
13052 * src/print.c (print_core, print_actions, print_state)
13053 (print_results): Likewise.
13054 * src/print_graph.c (print_core, print_actions, print_state)
13055 (print_graph): Likewise.
13056 * src/conflicts.h: Adjust.
13058 2001-12-27 Akim Demaille <akim@epita.fr>
13060 * src/bison.hairy: Formatting/comment changes.
13062 Remove `register' indications.
13063 Add plenty of `static'.
13065 2001-12-27 Akim Demaille <akim@epita.fr>
13067 * src/output.c (prepare): Drop the muscle `ntbase' which
13068 duplicates ntokens.
13069 * src/bison.simple: Formatting/comment changes.
13070 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13071 is an undocumented synonym.
13073 2001-12-22 Akim Demaille <akim@epita.fr>
13075 * src/output.c (output_table_data): Change the prototype to use
13076 `int' for array ranges: some invocations do pass an int, not a
13078 Reported by Wayne Green.
13080 2001-12-22 Akim Demaille <akim@epita.fr>
13082 Some actions of web2c.y are improperly triggered.
13083 Reported by Mike Castle.
13085 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13086 * tests/regression.at (Web2c): Rename as...
13087 (Web2c Report): this.
13088 (Web2c Actions): New.
13090 2001-12-22 Akim Demaille <akim@epita.fr>
13092 Reductions in web2c.y are improperly reported.
13093 Reported by Mike Castle.
13095 * src/conflicts.c (print_reductions): Fix.
13096 * tests/regression.at (Web2c): New.
13098 2001-12-18 Akim Demaille <akim@epita.fr>
13100 Some host fail on `assert (!"foo")', which expands to
13101 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13102 Reported by Nelson Beebee.
13104 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13105 `#define it_succeeded 0' and `assert (it_succeeded)'.
13107 2001-12-17 Marc Autret <autret_m@epita.fr>
13109 * src/bison.simple: Don't hard code the skeleton line and filename.
13110 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13111 New line counter 'skeleton_line' (skeleton-line muscle).
13113 2001-12-17 Paul Eggert <eggert@twinsun.com>
13115 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13116 YYDEBUG must be defined to a nonzero value.
13118 * src/bison.simple (yytname): Do not assume that the user defines
13119 YYDEBUG to a properly parenthesized expression.
13121 2001-12-17 Akim Demaille <akim@epita.fr>
13123 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13124 nlookaheads is a new member.
13126 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13127 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13130 2001-12-17 Akim Demaille <akim@epita.fr>
13132 * src/files.h, src/files.c (open_files, close_files): Remove.
13133 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13135 * src/reader.c (reader): Do it.
13137 2001-12-17 Akim Demaille <akim@epita.fr>
13139 * src/conflicts.c (print_reductions): Formatting changes.
13141 2001-12-17 Akim Demaille <akim@epita.fr>
13143 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13144 (flush_reduce): New.
13145 (resolve_sr_conflict): Adjust.
13147 2001-12-17 Akim Demaille <akim@epita.fr>
13149 * src/output.c (output_obstack): Be static and rename as...
13150 (format_obstack): this, to avoid any confusion with files.c's
13152 * src/reader.h (muscle_obstack): Move to...
13153 * src/output.h: here, since it's defined in output.c.
13155 2001-12-17 Akim Demaille <akim@epita.fr>
13157 * src/output.c (action_row, save_column, default_goto)
13158 (sort_actions, matching_state, pack_vector): Better variable
13161 2001-12-17 Akim Demaille <akim@epita.fr>
13163 * src/output.c: Various formatting changes.
13165 2001-12-17 Akim Demaille <akim@epita.fr>
13167 * src/files.c (output_files): Free the output_obstack.
13168 * src/main.c (main): Call print and print_graph conditionally.
13169 * src/print.c (print): Work unconditionally.
13170 * src/print_graph.c (print_graph): Work unconditionally.
13171 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13173 2001-12-16 Marc Autret <autret_m@epita.fr>
13175 * src/output.c (actions_output): Fix. When we use %no-lines,
13176 there is one less line per action.
13178 2001-12-16 Marc Autret <autret_m@epita.fr>
13180 * src/bison.simple: Remove a useless #line directive.
13181 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13182 * src/output.c (get_lines_number): New.
13183 (output_parser): Adjust, now takes care about the lines of a
13185 Fix line numbering.
13186 (actions_output): Computes the number of lines taken by actions.
13187 (output_master_parser): Insert new skeleton which is the name of
13188 the output parser file name.
13190 2001-12-15 Marc Autret <autret_m@epita.fr>
13192 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13194 2001-12-15 Marc Autret <autret_m@epita.fr>
13196 * src/output.c (output_gram): Keep track of the hairy one.
13198 2001-12-15 Akim Demaille <akim@epita.fr>
13200 Make `make distcheck' work.
13202 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13203 system.h which uses libgettext.h.
13205 2001-12-15 Akim Demaille <akim@epita.fr>
13207 * src/nullable.c (set_nullable): Useless rules must be skipped,
13208 otherwise, since we range over their symbols, we might look at a
13209 nonterminal which no longer ``exists'', i.e., it is not counted in
13210 `nvars', hence we overflow our arrays.
13212 2001-12-15 Akim Demaille <akim@epita.fr>
13214 The header can also be produced directly, without any obstack!
13217 * src/files.c, src/files.h (defines_obstack): Remove.
13218 (compute_header_macro): Global.
13219 (defines_obstack_save): Remove.
13220 * src/reader.c (parse_union_decl): No longer output to
13221 defines_obstack: its content can be found in the `stype' muscle
13223 (output_token_translations): Merge into...
13224 (symbols_output): this.
13226 (symbols_save): this.
13228 * src/output.c (header_output): New.
13231 2001-12-15 Akim Demaille <akim@epita.fr>
13233 * src/reader.c (parse_union_decl): Instead of handling two obstack
13234 simultaneously, use one to define the `stype' muscle, and use the
13235 value of the latter to fill defines_obstack.
13236 (copy_comment): Remove.
13237 (copy_comment2): Work for a single obstack.
13239 (copy_comment): this.
13241 2001-12-15 Akim Demaille <akim@epita.fr>
13243 * src/lex.c, src/lex.h (xgetc): No longer static.
13244 * src/reader.c (parse_union_decl): Revamp.
13246 2001-12-15 Akim Demaille <akim@epita.fr>
13248 Still making progress in separating Bison into (i) input, (ii)
13249 process, (iii) output: now we can directly output the parser file
13250 without using table_obstack at all.
13252 * src/files.c, src/files.h (table_obstack): Bye bye.
13253 (parser_file_name): New.
13254 * src/files.c (compute_output_file_names): Compute it.
13255 * src/output.c (actions_output, output_parser)
13256 (output_master_parser): To a file instead of an obstack.
13258 2001-12-15 Akim Demaille <akim@epita.fr>
13260 Attach actions to rules, instead of pre-outputting them to
13263 * src/gram.h (rule_t): action and action_line are new members.
13264 * src/reader.c (symbol_list): Likewise.
13265 (copy_action): Save the actions within the rule.
13266 (packgram): Save them in rule_table.
13267 * src/output.c (actions_output): New.
13268 (output_parser): Use it on `%%actions'.
13269 (output_rule_data): Don't free rule_table.
13271 (prepare): Don't save the `action' muscle.
13272 * src/bison.simple: s/%%action/%%actions/.
13274 2001-12-15 Akim Demaille <akim@epita.fr>
13276 * src/reader.c (copy_action): When --yacc, don't append a `;'
13277 to the user action: let it fail if lacking.
13278 Suggested by Arnold Robbins and Tom Tromey.
13280 2001-12-14 Akim Demaille <akim@epita.fr>
13282 * src/lex.c (literalchar): Simply return the char you decoded, non
13283 longer mess around with obstacks and int pointers.
13284 Adjust all callers.
13286 2001-12-14 Akim Demaille <akim@epita.fr>
13288 * src/lex.c (literalchar): Don't escape the special characters,
13289 just decode them, and keep them as char (before, eol was output as
13290 the 2 char string `\n' etc.).
13291 * src/output.c (output_rule_data): Use quotearg to output the
13294 2001-12-13 Paul Eggert <eggert@twinsun.com>
13296 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13297 Do not infringe on the global user namespace when using C++.
13298 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13299 All uses of `fprintf' and `stderr' changed.
13301 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13303 2001-12-13 Akim Demaille <akim@epita.fr>
13305 The computation of nullable is broken: it doesn't handle empty
13308 * tests/torture.at (GNU AWK Grammar): New.
13309 * tests/sets.at (Nullable): New.
13310 * src/nullable.c (set_nullable): Instead of blindly looping over
13311 `ritems', loop over the rules, and then over their rhs's.
13313 Work around Autotest bugs.
13315 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13316 frame, because Autotest understand lines starting with a `+' as
13317 traces from the shell. Then, they are not processed properly.
13318 Admittedly an Autotest bug, but we don't have time to wait for
13319 Autotest to catch up.
13320 * tests/regression.at (Broken Closure): Adjust to the new table
13323 * tests/sets.at: here.
13325 2001-12-13 Akim Demaille <akim@epita.fr>
13327 * src/closure.c (closure): Use nrules instead of playing tricks
13328 with BITS_PER_WORD.
13330 2001-12-13 Akim Demaille <akim@epita.fr>
13332 * src/print.c (print_actions): Output the handling of `$' as the
13333 traces do: shifting the token EOF. Before EOF was treated as a
13335 * tests/regression.at: Adjust some tests.
13336 * src/print_graph.c (print_core): Complete the set of items via
13337 closure. The next-to-final and final states are still unsatisfying,
13338 but that's to be addressed elsewhere.
13339 No longer output the rule numbers, but do output the state number.
13340 A single loop for the shifts + gotos is enough, but picked a
13341 distinct color for each.
13342 (print_graph): Initialize and finalize closure.
13344 2001-12-13 Akim Demaille <akim@epita.fr>
13346 * src/reader.c (readgram): Remove dead code, an strip useless
13348 (get_type): Remove, unused.
13350 2001-12-12 Akim Demaille <akim@epita.fr>
13352 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13353 on that of lib/error.c.
13355 2001-12-12 Akim Demaille <akim@epita.fr>
13357 Some hosts don't like `/' in includes.
13359 * src/system.h: Include libgettext.h without qualifying the path.
13360 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13363 2001-12-11 Marc Autret <autret_m@epita.fr>
13365 * src/output.c (output_parser): Remove useless muscle.
13367 2001-12-11 Marc Autret <autret_m@epita.fr>
13369 * src/bison.simple: Remove #line just before %%epilogue. It
13370 is now handled in ...
13371 * src/reader.c (read_additionnal_code): Add the output of a
13372 #line for the epilogue.
13374 2001-12-10 Marc Autret <autret_m@epita.fr>
13376 * src/reader.c (copy_definition): Re-use CPP-outed code which
13377 replace precedent remove.
13378 * src/bison.simple: Remove #line before %%prologue because
13379 %%input-line is wrong at this time.
13381 2001-12-10 Marc Autret <autret_m@epita.fr>
13383 * src/reader.c (symbols_output): Clean up.
13384 * src/output.c (output_gram, output): Clean up.
13386 2001-12-10 Akim Demaille <akim@epita.fr>
13388 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13389 * src/LR0.c (set_state_table): here.
13390 * src/lalr.c (lalr): Call it.
13392 2001-12-10 Akim Demaille <akim@epita.fr>
13394 * src/state.h (shifts): Remove the `number' member: shifts are
13395 attached to state, hence no longer need to be labelled with a
13398 2001-12-10 Akim Demaille <akim@epita.fr>
13400 Now that states have a complete set of members, the linked list of
13401 shifts is useless: just fill directly the state's shifts member.
13403 * src/state.h (shifts): Remove the `next' member.
13404 * src/LR0.c (first_state, last_state): Remove.
13405 Adjust the callers.
13406 (augment_automaton): Don't look for the shifts that must be added
13407 a shift on EOF: it is those of the state we looked for! But now,
13408 since shifts are attached, it is no longer needed to looking
13409 merely by its id: its number.
13411 2001-12-10 Akim Demaille <akim@epita.fr>
13413 * src/LR0.c (augment_automaton): Better variable locality.
13414 Remove an impossible branch: if there is a state corresponding to
13415 the start symbol being shifted, then there is shift for the start
13416 symbol from the initial state.
13418 2001-12-10 Akim Demaille <akim@epita.fr>
13420 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13421 only when appropriate: when insert_start_shifting_state' is not
13423 * tests/regression.at (Rule Line Numbers): Adjust.
13425 2001-12-10 Akim Demaille <akim@epita.fr>
13427 * src/LR0.c (augment_automaton): Now that all states have shifts,
13428 merge the two cases addition shifts to the initial state.
13430 2001-12-10 Akim Demaille <akim@epita.fr>
13432 * src/lalr.c (set_state_table): Move to...
13434 * src/lalr.c (lalr): Don't call it...
13435 * src/LR0.c (generate_states): do it.
13436 * src/LR0.h (first_state): Remove, only the table is used.
13438 2001-12-10 Akim Demaille <akim@epita.fr>
13440 * src/LR0.h (first_shift, first_reduction): Remove.
13441 * src/lalr.c: Don't use first_shift: find shifts through the
13444 2001-12-10 Akim Demaille <akim@epita.fr>
13446 * src/LR0.c: Attach shifts to states as soon as they are
13448 * src/lalr.c (set_state_table): Instead of assigning shifts to
13449 state, just assert that the mapping was properly done.
13451 2001-12-10 Akim Demaille <akim@epita.fr>
13453 * src/LR0.c (insert_start_shift): Rename as...
13454 (insert_start_shifting_state): this.
13455 (insert_eof_shifting_state, insert_accepting_state): New.
13456 (augment_automaton): Adjust.
13457 Better locality of the variables.
13458 When looking if the start_symbol is shifted from the initial
13459 state, using `while (... symbol != start_symbol ...)' sounds
13460 better than `while (... symbol < start_symbol ...)': If fail
13461 to see how the order between symbols could be relevant!
13463 2001-12-10 Akim Demaille <akim@epita.fr>
13465 * src/getargs.h: Don't declare `spec_name_prefix' and
13466 `spec_file_prefix', declared by src/files.h.
13467 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13468 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13469 * src/output.c (prepare): Adjust.
13470 * src/reader.c (symbols_output): Likewise.
13471 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13473 2001-12-10 Akim Demaille <akim@epita.fr>
13475 * src/muscle_tab.c (muscle_init): NULL is a better default than
13478 2001-12-10 Akim Demaille <akim@epita.fr>
13480 * src/reader.c (reader): Calling symbols_output once is enough.
13482 2001-12-10 Akim Demaille <akim@epita.fr>
13484 Now that states have a complete set of members, the linked list of
13485 reductions is useless: just fill directly the state's reductions
13488 * src/state.h (struct reductions): Remove member `number' and
13490 * src/LR0.c (first_reduction, last_reduction): Remove.
13491 (save_reductions): Don't link the new reductions, store them in
13493 * src/lalr.c (set_state_table): No need to attach reductions to
13494 states, it's already done.
13495 * src/output.c (output_actions): No longer free the shifts, then
13496 the reductions, then the states: free all the states and their
13499 2001-12-10 Akim Demaille <akim@epita.fr>
13501 * src/options.c (OPTN, DRTV, BOTH): New.
13502 (option_table): Use them.
13504 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13505 the job of system.h.
13506 * src/options.c: Don't include stdio.h and xalloc.h for the same
13509 2001-12-10 Akim Demaille <akim@epita.fr>
13511 * src/output.c (output, prepare): Make sure the values of the
13512 muscles `action' and `prologue' are 0-terminated.
13514 2001-12-10 Akim Demaille <akim@epita.fr>
13516 Clean up GCC warnings.
13518 * src/reader.c (copy_action): `buf' is not used.
13519 (parse_skel_decl): Be static.
13520 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13521 * src/options.h (create_long_option_table): Have a real prototype.
13522 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13523 (hash_delete_at): Return const void *.
13524 Adjust casts to preserve the const.
13526 2001-12-10 Akim Demaille <akim@epita.fr>
13528 * configure.in: Require 2.52g.
13529 M4 is not needed, but AUTOM4TE is.
13530 * m4/m4.m4: Remove.
13531 * tests/Makefile.am: Adjust.
13533 2001-12-10 Akim Demaille <akim@epita.fr>
13535 One structure for states is enough, even though theoretically
13536 there are LR(0) states and LALR(1) states.
13538 * src/lalr.h (state_t): Remove.
13539 (state_table): Be state_t **, not state_t *.
13540 * src/state.h (core, CORE_ALLOC): Rename as...
13541 (state_t, STATE_ALLOC): this.
13542 Add the LALR(1) members: shifts, reductions, errs.
13543 * src/LR0.c (state_table): Rename as...
13544 (state_hash): this, to avoid name clashes with the global
13546 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13547 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13549 2001-12-10 Akim Demaille <akim@epita.fr>
13551 Bison dumps core on bash.y.
13552 Reported by Pascal Bart.
13554 * src/warshall.c (bitmatrix_print): New.
13556 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13557 j must be the outer loop.
13558 * tests/regression.at (Broken Closure): New.
13560 2001-12-05 Akim Demaille <akim@epita.fr>
13562 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13564 Reported by Peter Hamorsky.
13566 2001-12-05 Akim Demaille <akim@epita.fr>
13568 * src/conflicts.c (err_table): Remove.
13569 (resolve_sr_conflict): Adjust.
13570 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13572 (state_t.reductions, state_t.shifts): this.
13574 2001-12-05 Akim Demaille <akim@epita.fr>
13576 * src/reduce.c (reduce_grammar_tables): No longer disable the
13577 removal of useless rules via CPP but via `if (0)', so that the
13578 compiler still check the code is valid.
13579 For instance, it should have noticed `rline' no longer exists: use
13580 the `line' member of rule_t.
13581 * src/gram.c (dummy, rline): Remove, unused.
13583 2001-12-05 Akim Demaille <akim@epita.fr>
13585 * src/output.c (pack_vector): Use assert, not berror.
13586 * src/main.c (berror): Remove, unused.
13588 2001-12-05 Akim Demaille <akim@epita.fr>
13590 New experimental feature: if --verbose --trace output all the
13591 items of a state, not only its kernel.
13593 * src/print.c (print_core): If `trace_flag', then invoke closure
13594 before outputting the items of the state (print_core is no longer
13595 a correct name them).
13596 (print_results): Invoke new_closure/free_closure if needed.
13598 2001-12-05 Akim Demaille <akim@epita.fr>
13600 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13601 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13602 (nitemset): for consistency with the rest of the project.
13604 2001-12-05 Akim Demaille <akim@epita.fr>
13606 * src/closure.c (print_closure): Improve.
13607 (closure): Use it for printing input and output.
13609 2001-12-05 Akim Demaille <akim@epita.fr>
13611 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13612 indexed by nonterminals.
13614 2001-12-05 Akim Demaille <akim@epita.fr>
13616 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13618 * src/warshall.h: Remove accidental duplication of the content.
13620 2001-12-05 Akim Demaille <akim@epita.fr>
13622 * src/closure.c (set_fderives): De-obfuscate.
13624 2001-12-05 Akim Demaille <akim@epita.fr>
13626 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13628 2001-12-05 Akim Demaille <akim@epita.fr>
13630 * src/closure.c (set_firsts): De-obfuscate.
13632 2001-12-05 Akim Demaille <akim@epita.fr>
13634 * src/output.c (action_row): De-obfuscate
13635 using the good o' techniques: arrays not pointers, variable
13636 locality, BITISSET, RESETBIT etc.
13638 2001-12-05 Akim Demaille <akim@epita.fr>
13640 Pessimize the code to simplify it: from now on, all the states
13641 have a valid SHIFTS, which NSHIFTS is possibly 0.
13643 * src/LR0.c (shifts_new): Be global and move to..
13644 * src/state.c, src/state.h: here.
13645 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13646 * src/print_graph: Adjust.
13648 2001-12-05 Akim Demaille <akim@epita.fr>
13650 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13651 * src/conflicts.c: Use it.
13652 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13653 incorrectly ``simplified''.
13655 2001-12-05 Akim Demaille <akim@epita.fr>
13657 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13658 using the good o' techniques: arrays not pointers, variable
13659 locality, BITISSET, RESETBIT etc.
13661 2001-12-05 Akim Demaille <akim@epita.fr>
13663 * src/state.h (SHIFT_SYMBOL): New.
13664 * src/conflicts.c: Use it to deobfuscate.
13666 2001-12-05 Akim Demaille <akim@epita.fr>
13668 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13669 (print_reductions): De-obfuscate using the good o' techniques:
13670 arrays not pointers, variable locality, BITISSET.
13672 2001-12-05 Akim Demaille <akim@epita.fr>
13674 * src/conflicts.c (print_reductions): Arrays, not pointers.
13677 2001-12-05 Akim Demaille <akim@epita.fr>
13679 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13681 2001-12-05 Akim Demaille <akim@epita.fr>
13683 * src/conflicts.c (print_reductions): Improve variable locality.
13685 2001-12-05 Akim Demaille <akim@epita.fr>
13687 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13689 2001-12-05 Akim Demaille <akim@epita.fr>
13691 * src/conflicts.c (print_reductions): Improve variable locality.
13693 2001-12-05 Akim Demaille <akim@epita.fr>
13695 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13696 * src/lalr.c: Use them.
13698 2001-12-05 Akim Demaille <akim@epita.fr>
13700 * src/LR0.c (augment_automaton): Formatting changes.
13701 Better variable locality.
13703 2001-12-05 Akim Demaille <akim@epita.fr>
13705 * src/lalr.c (matrix_print): New.
13706 (transpose): Use it.
13707 Use arrays instead of pointers.
13709 2001-12-05 Akim Demaille <akim@epita.fr>
13711 * src/lalr.c (maxrhs): Move to...
13712 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13713 * src/lalr.c (build_relations): Adjust.
13715 2001-12-05 Akim Demaille <akim@epita.fr>
13717 * src/lalr.c (transpose): Free the memory allocated to the
13718 argument, as it is replaced by the results by the unique caller.
13719 (build_relations): Merely invoke transpose: it handles the memory
13721 Improve variable locality.
13722 Avoid variables used as mere abbreviations.
13723 (compute_lookaheads): Use arrays instead of pointers.
13725 2001-12-05 Akim Demaille <akim@epita.fr>
13727 * src/lalr.c (initialize_F): Improve variable locality.
13728 Avoid variables used as mere abbreviations.
13730 2001-12-05 Akim Demaille <akim@epita.fr>
13732 * src/derives.c (print_derives): Display the ruleno.
13733 * src/lalr.c (initialize_F, transpose): Better variable locality
13734 to improve readability.
13735 Avoid variables used as mere abbreviations.
13737 2001-12-05 Akim Demaille <akim@epita.fr>
13739 * src/lalr.c (traverse): Use arrays instead of pointers.
13741 2001-12-05 Akim Demaille <akim@epita.fr>
13743 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13744 the handling of squeue.
13745 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13747 2001-12-05 Akim Demaille <akim@epita.fr>
13749 Because useless nonterminals are now kept alive (instead of being
13750 `destroyed'), we now sometimes examine them, and store information
13751 related to them. Hence we need to know their number, and adjust
13752 memory allocations.
13754 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13756 * src/LR0.c (allocate_itemsets): The memory allocated to
13757 `symbol_count' was used for two different purpose: once to count
13758 the number of occurrences of each symbol, and later reassigned to
13759 `shift_symbol', containing the symbol that can be shifted from a
13761 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13763 (new_itemsets): Allocate `shift_symbol' here.
13764 (allocate_itemsets): symbol_count includes useless nonterminals.
13765 Make room for them.
13766 (free_storage): Use `free', not `XFREE', for pointers that cannot
13769 2001-12-05 Akim Demaille <akim@epita.fr>
13771 * src/nullable.c (set_nullable): Deobfuscate the handling of
13773 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13775 2001-12-05 Akim Demaille <akim@epita.fr>
13777 * src/gram.c, src/gram.h (ritem_print): New.
13778 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13779 (This useless function was defined only to work around VMS linkers
13780 that can't handle compilation units with variables only).
13781 * src/reduce.c (dump_grammar): Use it to trace the construction of
13784 2001-12-04 Paul Eggert <eggert@twinsun.com>
13786 * src/bison.simple (union yyalloc): Change member names
13787 to be the same as the stack names.
13788 (yyparse): yyptr is now union yyalloc *, not char *.
13789 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13790 and may generate better code on some machines.
13791 (yystpcpy): Use prototype if __STDC__ is defined, not just
13792 if __cplusplus is defined.
13794 2001-11-30 Akim Demaille <akim@epita.fr>
13796 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13797 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13798 Gettext doesn't compile cleanly, and dies with -Werror.
13799 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13800 Include WARNING_CFLAGS here.
13801 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13802 before being defined.
13804 2001-11-27 Paul Eggert <eggert@twinsun.com>
13806 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13807 First arg is int, not unsigned.
13808 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13809 (SIZE_MAX, UINT_MAX): New macros.
13810 (quotearg_n_options): Abort if N is negative.
13811 Avoid overflow check on hosts where size_t is 64 bits and int
13812 is 32 bits, as overflow is impossible there.
13813 Fix off-by-one typo that caused unnecessary reallocation.
13815 2001-11-29 Paul Eggert <eggert@twinsun.com>
13817 Name space cleanup in generated parser.
13819 * doc/bison.texinfo (Bison Parser): Discuss system headers
13820 and their effect on the user name space.
13822 * src/bison.simple:
13823 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13824 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13825 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13827 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13828 on user names when possible.
13830 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13831 Simplify test for whather <alloca.h> exists.
13833 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13835 (<stdio.h>): Include if YYDEBUG.
13837 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13838 ! defined (yyoverflow) && ! defined (yymemcpy).
13840 (yymemcpy, yyparse): Rename local variables as needed so that
13841 they all begin with 'yy'.
13843 (yystrlen, yystpcpy): New functions.
13845 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13848 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13849 instead of relying on string.h functions. Use YYSTACK_ALLOC
13850 and YYSTACK_FREE instead of malloc and free.
13852 2001-11-30 Akim Demaille <akim@epita.fr>
13854 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13855 before their first uses.
13856 (YYBISON, YYPURE): Move to the top of the output.
13858 2001-11-30 Akim Demaille <akim@epita.fr>
13860 * tests/reduce.at (Useless Nonterminals): Fix.
13862 2001-11-30 Akim Demaille <akim@epita.fr>
13864 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13865 if body instead of `;' to pacify GCC's warnings.
13867 2001-11-30 Akim Demaille <akim@epita.fr>
13869 Instead of mapping the LHS of unused rules to -1, keep the LHS
13870 valid, but flag the rules as invalid.
13872 * src/gram.h (rule_t): `useful' is a new member.
13873 * src/print.c (print_grammar): Adjust.
13874 * src/derives.c (set_derives): Likewise.
13875 * src/reader.c (packgram, reduce_output): Likewise.
13876 * src/reduce.c (reduce_grammar_tables): Likewise.
13877 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13879 2001-11-30 Akim Demaille <akim@epita.fr>
13881 * src/reduce.c (reduce_output): Formatting changes.
13882 * src/print.c (print_results, print_grammar): Likewise.
13883 * tests/regression.at (Rule Line Numbers)
13884 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13886 2001-11-30 Akim Demaille <akim@epita.fr>
13888 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13889 useless nonterminals, move them at the end of the symbol arrays.
13890 (reduce_output): Adjust.
13891 * tests/reduce.at (Useless Nonterminals): Adjust.
13893 2001-11-30 Akim Demaille <akim@epita.fr>
13895 * src/reduce.c: Various comment/formatting changes.
13896 (nonterminals_reduce): New, extracted from...
13897 (reduce_grammar_tables): here.
13898 (reduce_grammar): Call nonterminals_reduce.
13900 2001-11-29 Paul Eggert <eggert@twinsun.com>
13902 * src/bison.simple (YYSTACK_REALLOC): Remove.
13903 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13904 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13906 (union yyalloc): New type.
13907 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13908 an arbitrary restriction on hosts where size_t is wider than int.
13910 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13911 a parser stack overflow. Allocate just one block of memory for all
13912 three stacks, instead of allocating three blocks; this typically is
13913 faster and reduces fragmentation.
13915 Do not limit the number of items in the stack to a value that fits
13916 in 'int', as this is an arbitrary limit on hosts with 64-bit
13917 size_t and 32-bit int.
13919 2001-11-29 Marc Autret <autret_m@epita.fr>
13921 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13922 of defining YYERROR_VERBOSE.
13923 [AT_DATA]: $4 is now out of C declarations in the prologue.
13925 2001-11-28 Marc Autret <autret_m@epita.fr>
13927 * src/reader.c (parse_dquoted_param): New.
13928 (parse_skel_decl): Use it.
13929 * src/lex.h: Add its prototype.
13930 * src/lex.c (literalchar): Become not static.
13932 2001-11-28 Marc Autret <autret_m@epita.fr>
13934 * src/output.h: And put its extern declaration here.
13935 * src/output.c (error_verbose): Define here.
13936 (prepare): Echo name modification.
13937 * src/getargs.h: Clean its extern declaration.
13938 * src/getargs.c (error_verbose_flag): Remove.
13939 (getargs): Remove case 'e'.
13940 * src/options.c (option_table): 'error-verbose' is now seen as simple
13944 * src/reader.c (read_declarations): Remove case tok_include.
13945 (parse_include_decl): Remove.
13946 * src/lex.h (token_t): Remove tok_include.
13947 * src/options.c (option_table): 'include' is now a simple command line
13950 2001-11-28 Marc Autret <autret_m@epita.fr>
13952 * src/bison.simple: Adjust muscle names.
13953 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13954 * src/output.c (prepare): s/_/-/ for the muscles names.
13955 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13957 2001-11-28 Marc Autret <autret_m@epita.fr>
13959 * src/bison.simple: Fix debug.
13960 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13962 2001-11-28 Akim Demaille <akim@epita.fr>
13964 * src/LR0.c (shifts_new): New.
13965 (save_shifts, insert_start_shift, augment_automaton): Use it.
13967 2001-11-28 Akim Demaille <akim@epita.fr>
13969 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13972 2001-11-28 Akim Demaille <akim@epita.fr>
13974 * src/closure.c (closure): Instead of looping over word in array
13975 then bits in words, loop over bits in array.
13977 2001-11-28 Akim Demaille <akim@epita.fr>
13979 * src/closure.c (closure): No longer optimize the special case
13980 where all the bits of `ruleset[r]' are set to 0, to make the code
13983 2001-11-28 Akim Demaille <akim@epita.fr>
13985 * src/closure.c (closure): `r' and `c' are new variables, used to
13986 de-obfuscate accesses to RULESET and CORE.
13988 2001-11-28 Akim Demaille <akim@epita.fr>
13990 * src/reduce.c (reduce_print): Use ngettext.
13991 (dump_grammar): Improve the trace accuracy.
13993 2001-11-28 Akim Demaille <akim@epita.fr>
13995 * src/reduce.c (dump_grammar): Don't translate trace messages.
13997 2001-11-28 Akim Demaille <akim@epita.fr>
13999 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14000 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14001 as all tags are free'ed afterwards.
14002 From Enrico Scholz.
14004 2001-11-27 Paul Eggert <eggert@twinsun.com>
14006 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14007 use alloca when we didn't want to, and vice versa.
14009 2001-11-27 Marc Autret <autret_m@epita.fr>
14011 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14013 * src/output.c (prepare): Remove its update.
14015 2001-11-27 Marc Autret <autret_m@epita.fr>
14017 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14018 Use %error-verbose.
14020 2001-11-27 Marc Autret <autret_m@epita.fr>
14022 * src/bison.simple: Remove YYERROR_VERBOSE using.
14023 Use %%error_verbose.
14024 (yyparse): Likewise.
14025 * src/output.c (prepare): Give its final value.
14026 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14027 * src/getargs.h: Add its extern declaration.
14028 * src/getargs.c (error_verbose_flag): New int.
14029 (getargs): Update to catch new case.
14030 * src/options.c (option_table): 'error-verbose' is a new option.
14031 (shortopts): Update.
14033 2001-11-27 Akim Demaille <akim@epita.fr>
14035 * src/system.h: Use intl/libgettext.h.
14036 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14038 2001-11-27 Akim Demaille <akim@epita.fr>
14040 * tests/torture.at (Exploding the Stack Size with Malloc):
14041 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14043 2001-11-27 Akim Demaille <akim@epita.fr>
14045 * src/files.c: Include error.h.
14046 Reported by Hans Aberg.
14048 2001-11-26 Marc Autret <autret_m@epita.fr>
14050 * src/reader.c (parse_include_decl): New, not yet implemented.
14051 (read_declarations): Add case tok_include.
14052 * src/getargs.h (include): Add its extern definition.
14053 * src/getargs.c (include): New const char *.
14054 (getargs): Add case '-I'.
14055 * src/options.c (option_table): Add include as command line and
14057 * src/lex.h (token_t): Add tok_include.
14059 2001-11-26 Akim Demaille <akim@epita.fr>
14061 * src/reader.c (readgram): Make sure rules for mid-rule actions
14062 have a lineno equal to that of their host rule.
14063 Reported by Hans Aberg.
14064 * tests/regression.at (Rule Line Numbers): New.
14066 2001-11-26 Akim Demaille <akim@epita.fr>
14068 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14071 2001-11-26 Akim Demaille <akim@epita.fr>
14073 * src/complain.c, src/complain.h (error): Remove, provided by
14076 2001-11-26 Akim Demaille <akim@epita.fr>
14078 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14079 issue an error message.
14080 * tests/regression.at (Invalid %directive): New.
14081 Reported by Hans Aberg.
14083 2001-11-26 Akim Demaille <akim@epita.fr>
14085 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14086 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14088 2001-11-26 Akim Demaille <akim@epita.fr>
14090 * src/conflicts.c (conflicts_print): Don't complain at all when
14091 there are no reduce/reduce conflicts, and as many shift/reduce
14092 conflicts as expected.
14093 * tests/regression.at (%expect right): Adjust.
14095 2001-11-23 Akim Demaille <akim@epita.fr>
14097 * lib/alloca.c: Update, from fileutils.
14099 2001-11-23 Akim Demaille <akim@epita.fr>
14101 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14103 2001-11-23 Akim Demaille <akim@epita.fr>
14105 * src/system.h: Include alloca.h.
14106 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14108 2001-11-23 Akim Demaille <akim@epita.fr>
14110 * src/print_graph.c (print_actions): Remove `rule', unused.
14111 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14112 pacify GCC's signed < unsigned warnings.
14113 * src/closure.c (itemsetsize): Likewise.
14114 * src/reader.c (symbol_list_new): Static.
14116 2001-11-23 Akim Demaille <akim@epita.fr>
14118 Attaching lineno to buckets is stupid, since only one copy of each
14119 symbol is kept, only the line of the first occurrence is kept too.
14121 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14122 * src/reader.c (rline_allocated): Remove, unused.
14123 (symbol_list): Have a `line' member.
14124 (symbol_list_new): New.
14125 (readgram): Use it.
14126 * src/print.c (print_grammar): Output the rule line numbers.
14127 * tests/regression.at (Solved SR Conflicts)
14128 (Unresolved SR Conflicts): Adjust.
14129 Reported by Hans Aberg.
14131 2001-11-22 Marc Autret <autret_m@epita.fr>
14133 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14135 2001-11-22 Marc Autret <autret_m@epita.fr>
14137 * src/muscle_tab.c (muscle_init): Remove initialization of
14139 * src/output.c (output_master_parser): Do it here.
14141 2001-11-20 Akim Demaille <akim@epita.fr>
14144 * configure.in (ALL_LINGUAS): Adjust.
14145 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14146 longer contains strings to translate.
14148 2001-11-19 Akim Demaille <akim@epita.fr>
14150 * src/conflicts.c (conflicts_print): Add a missing \n.
14152 2001-11-19 Akim Demaille <akim@epita.fr>
14154 * src/nullable.c (nullable_print): New.
14155 (set_nullable): Call it when tracing.
14156 Better locality of variables.
14158 2001-11-19 Akim Demaille <akim@epita.fr>
14160 * src/print.c (print_actions): Better locality of variables.
14162 2001-11-19 Akim Demaille <akim@epita.fr>
14164 * src/derives.c (print_derives): Fix and enrich.
14165 * src/closure.c (print_fderives): Likewise.
14167 2001-11-19 Akim Demaille <akim@epita.fr>
14169 * src/closure.c (itemsetend): Remove, replaced with...
14170 (itemsetsize): new.
14172 2001-11-19 Akim Demaille <akim@epita.fr>
14174 * src/LR0.c (kernel_end): Remove, replaced with...
14175 (kernel_size): new.
14177 2001-11-19 Akim Demaille <akim@epita.fr>
14179 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14182 2001-11-19 Akim Demaille <akim@epita.fr>
14184 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14186 2001-11-19 Akim Demaille <akim@epita.fr>
14188 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14190 * src/LR0.c: Likewise.
14191 (allocate_itemsets): Use arrays instead of pointers to clarify.
14193 2001-11-19 Akim Demaille <akim@epita.fr>
14195 * src/getargs.c (statistics_flag): Replace with...
14197 (longopts): Accept --trace instead of --statistics.
14198 * src/getargs.h, src/options.c: Adjust.
14199 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14200 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14202 2001-11-19 Akim Demaille <akim@epita.fr>
14204 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14205 pointers to clarify the code.
14206 (save_reductions, save_shifts): Factor common parts of alternatives.
14208 2001-11-19 Akim Demaille <akim@epita.fr>
14210 * src/LR0.c (new_state, get_state): Complete TRACE code.
14211 * src/closure.c: Include `reader.h' to get `tags', needed by the
14213 Rename the conditional DEBUG as TRACE.
14214 Output consistently TRACEs to stderr, not stdout.
14215 * src/derives.c: Likewise.
14216 * src/reduce.c: (inaccessable_symbols): Using if is better style
14218 Use `#if TRACE' instead of `#if 0' for tracing code.
14220 2001-11-19 Akim Demaille <akim@epita.fr>
14222 * src/system.h (LIST_FREE, shortcpy): New.
14223 * src/LR0.c: Use them.
14224 * src/output.c (free_itemsets, free_reductions, free_shifts):
14225 Remove, replaced by LIST_FREE.
14227 2001-11-19 Akim Demaille <akim@epita.fr>
14229 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14230 (REDUCTIONS_ALLOC): New.
14231 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14234 2001-11-19 Akim Demaille <akim@epita.fr>
14236 * src/LR0.c (new_state): Complete trace code.
14237 * src/nullable.c (set_nullable): Don't translate traces.
14239 2001-11-19 Akim Demaille <akim@epita.fr>
14241 * src/print_graph.c (print_core): Better locality of variables.
14242 * src/print.c (print_core): Likewise.
14244 2001-11-19 Akim Demaille <akim@epita.fr>
14246 * src/vcg.c: You do the output, so you are responsible of the
14247 handling of VCG syntax, in particular: use quotearg.
14248 * src/print_graph.c: Don't.
14249 (print_actions): Don't output the actions as part of the nodes,
14250 since that's the job of the edges.
14251 (print_state): Don't output by hand: fill the node description,
14252 and ask for its output.
14254 2001-11-19 Akim Demaille <akim@epita.fr>
14256 * src/bison.simple (yyparse): When verbosely reporting an error,
14257 no longer put additional quotes around token names.
14258 * tests/calc.at: Adjust.
14260 2001-11-19 Akim Demaille <akim@epita.fr>
14262 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14263 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14264 * src/output.c: Adjust.
14266 2001-11-19 Akim Demaille <akim@epita.fr>
14268 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14270 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14272 2001-11-19 Akim Demaille <akim@epita.fr>
14274 * src/gram.h (rule_t): New.
14276 (rrhs, rlhs): Remove, part of state_t.
14277 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14278 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14279 * src/reader.c, src/reduce.c: Adjust.
14281 2001-11-19 Akim Demaille <akim@epita.fr>
14283 * src/reader.c (symbols_output): New, extracted from...
14284 (packsymbols): Here.
14287 2001-11-19 Akim Demaille <akim@epita.fr>
14289 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14290 (maxrhs): this new function.
14292 2001-11-19 Akim Demaille <akim@epita.fr>
14294 * src/lalr.c (F): New macro to access the variable F.
14297 2001-11-19 Akim Demaille <akim@epita.fr>
14299 * src/lalr.h (LA): New macro to access the variable LA.
14300 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14301 * src/lalr.c: Adjust.
14303 2001-11-19 Akim Demaille <akim@epita.fr>
14305 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14306 (set_state_table): handle the `lookaheads' members.
14308 2001-11-19 Akim Demaille <akim@epita.fr>
14310 * src/lalr.h (lookaheads): Removed array, whose contents is now
14312 (state_t): this structure.
14313 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14316 2001-11-19 Akim Demaille <akim@epita.fr>
14318 * src/lalr.h (consistent): Removed array, whose contents is now
14320 (state_t): this structure.
14321 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14324 2001-11-19 Akim Demaille <akim@epita.fr>
14326 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14327 contents are now members of...
14328 (state_t): this structure.
14329 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14332 2001-11-19 Akim Demaille <akim@epita.fr>
14334 * src/lalr.h (state_t): New.
14335 (state_table): Be a state_t * instead of a core **.
14336 (accessing_symbol): Remove, part of state_t.
14337 * src/lalr.c: Adjust.
14338 (set_accessing_symbol): Merge into...
14339 (set_state_table): this.
14340 * src/print_graph.c, src/conflicts.c: Adjust.
14342 2001-11-14 Akim Demaille <akim@epita.fr>
14344 * tests/calc.at, tests/output.at, tests/regression.at,
14345 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14346 now the tests are run in private dirs, therefore AC_CLEANUP and
14347 family can be simplified to 0-ary.
14348 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14349 use abs. path to find config.h.
14350 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14351 stderr, there can be way too much random noise.
14352 Instead pass -Werror to GCC and rely on the exit status.
14353 Reported by Wolfram Wagner.
14355 2001-11-14 Akim Demaille <akim@epita.fr>
14357 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14358 defined only if yyoverflow is defined, to avoid `warning: unused
14360 Reported by The Test Suite.
14362 2001-11-14 Akim Demaille <akim@epita.fr>
14364 * src/print.c: Include reduce.h.
14365 Reported by Hans Aberg.
14367 2001-11-14 Akim Demaille <akim@epita.fr>
14369 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14370 Revert a previous patch: these are really const.
14371 * src/conflicts.c (conflict_report): Additional useless pair of
14372 braces to pacify GCC's warnings for `if () if () {} else {}'.
14373 * src/lex.c (parse_percent_token): Replace equal_offset with
14376 Be sure to strdup `arg' when used, since there is no reason for
14377 token_buffer not to change.
14379 2001-11-14 Akim Demaille <akim@epita.fr>
14381 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14383 * src/main.c (main): Use them.
14384 Suggested by Hans Aberg.
14386 2001-11-12 Akim Demaille <akim@epita.fr>
14388 * src/system.h (ngettext): Now that we use ngettext, be sure to
14389 provide a default definition when NLS are not used.
14391 2001-11-12 Akim Demaille <akim@epita.fr>
14393 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14394 Use @kbd to denote user input.
14395 (Language and Grammar): ANSIfy the example.
14396 Adjust its layout for info/notinfo.
14397 (Location Tracking Calc): Output error messages to stderr.
14398 Output locations in a more GNUtically correct way.
14399 Fix a couple of Englishos.
14400 Adjust @group/@end group pairs.
14402 2001-11-12 Akim Demaille <akim@epita.fr>
14404 %expect was not functioning at all.
14406 * src/conflicts.c (expected_conflicts): Set to -1.
14407 (conflict_report): Use ngettext.
14408 (conflicts_print): Check %expect and make its violation an error.
14409 * doc/bison.texinfo (Expect Decl): Adjust.
14410 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14411 * tests/regression.at (%expect not enough, %expect right)
14412 (%expect too much): New.
14414 2001-11-12 Akim Demaille <akim@epita.fr>
14416 * tests/regression.at (Conflicts): Rename as...
14417 (Unresolved SR Conflicts): this.
14418 (Solved SR Conflicts): New.
14420 2001-11-12 Akim Demaille <akim@epita.fr>
14422 * src/reduce.c (print_results): Rename as...
14423 (reduce_output): This.
14424 Output to OUT, passed as argument, instead of output_obstack.
14425 (dump_grammar): Likewise.
14426 (reduce_free): New.
14428 (reduce_grammar): No longer call reduce_output, since...
14429 * src/print.c (print_results): do it.
14430 * src/main.c (main): Call reduce_free;
14432 2001-11-12 Akim Demaille <akim@epita.fr>
14434 * src/conflicts.c (print_reductions): Accept OUT as argument.
14435 Output to it, not to output_obstack.
14436 * src/print.c (print_actions): Adjust.
14438 2001-11-12 Akim Demaille <akim@epita.fr>
14440 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14441 the result instead of using...
14442 (src_total, rrc_total, src_count, rrc_count): Remove.
14443 (any_conflicts): Remove.
14444 (print_conflicts): Split into...
14445 (conflicts_print, conflicts_output): New.
14446 * src/conflicts.h: Adjust.
14447 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14448 * src/print.c (print_grammar): Issue `\n' between two rules.
14449 * tests/regression.at (Conflicts): New.
14450 Reported by Tom Lane.
14452 2001-11-12 Akim Demaille <akim@epita.fr>
14454 * tests/regression.at (Invalid input): Remove, duplicate with
14455 ``Invalid input: 1''.
14457 2001-11-12 Akim Demaille <akim@epita.fr>
14459 * tests/torture.at (AT_DATA_STACK_TORTURE)
14460 (Exploding the Stack Size with Alloca)
14461 (Exploding the Stack Size with Malloc): New.
14463 2001-11-12 Akim Demaille <akim@epita.fr>
14465 * src/bison.simple (YYSTACK_REALLOC): New.
14466 (yyparse) [!yyoverflow]: Use it and free the old stack.
14467 Reported by Per Allansson.
14469 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14471 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14472 define CPP macro, which substitute YYSTYPE by yystype.
14473 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14474 with yyltype/YYLTYPE. This allows inclusion of the generated
14475 header within the parser if the compiler, such as GGC, accepts
14476 multiple equivalent #defines.
14479 2001-11-05 Akim Demaille <akim@epita.fr>
14481 * src/reader.c (symbols_output): New, extracted from...
14482 (packsymbols): here.
14485 2001-11-05 Akim Demaille <akim@epita.fr>
14487 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14489 2001-11-05 Akim Demaille <akim@epita.fr>
14491 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14494 2001-11-05 Akim Demaille <akim@epita.fr>
14496 * src/options.h (struct option_table_struct): set_flags is void*.
14497 * src/options.c (longopts): Support `--output' and `%output'.
14499 * src/lex.h (tok_setopt): Remove, replaced with...
14500 (tok_intopt, tok_stropt): these new guys.
14501 * src/lex.c (getopt.h): Not needed.
14502 (token_buffer, unlexed_token_buffer): Not const.
14503 (percent_table): Promote `-' over `_' in directive names.
14504 Active `%name-prefix', `file-prefix', and `output'.
14505 (parse_percent_token): Accept possible arguments to directives.
14506 Promote `-' over `_' in directive names.
14508 2001-11-04 Akim Demaille <akim@epita.fr>
14510 * doc/bison.texinfo (Decl Summary): Split the list into
14511 `directives for grammars' and `directives for bison'.
14513 Add description of `%name-prefix', `file-prefix', and `output'.
14514 Promote `-' over `_' in directive names.
14515 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14516 Simplify the description of `--name-prefix'.
14517 Promote `-' over `_' in directive names.
14518 Promote `--output' over `--output-file'.
14519 Fix the description of `--defines'.
14520 * tests/output.at: Exercise %file-prefix and %output.
14522 2001-11-02 Akim Demaille <akim@epita.fr>
14524 * doc/refcard.tex: Update.
14526 2001-11-02 Akim Demaille <akim@epita.fr>
14528 * src/symtab.h (SUNDEF): New.
14529 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14530 stand for `uninitialized', instead of 0.
14531 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14532 * src/lex.c (lex): Adjust.
14534 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14536 Let yylex return it instead of a plain 0.
14537 Reported by Dick Streefland.
14539 2001-11-02 Akim Demaille <akim@epita.fr>
14541 * tests/regression.at (Mixing %token styles): New test.
14543 2001-11-02 Akim Demaille <akim@epita.fr>
14545 * src/reader.c (parse_thong_decl): Formatting changes.
14546 (token_translations_init): New, extracted from...
14547 (packsymbols): Here.
14550 2001-11-01 Akim Demaille <akim@epita.fr>
14552 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14553 Check that `9foo.y' produces correct cpp guards.
14554 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14558 2001-11-01 Akim Demaille <akim@epita.fr>
14560 * tests/regression.at (Invalid input: 2): New.
14561 * src/lex.c (unlexed_token_buffer): New.
14562 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14566 2001-11-01 Akim Demaille <akim@epita.fr>
14568 * tests/calc.at: Catch up with 1.30.
14569 * configure.in: Bump to 1.49a.
14570 Adjust to newer Autotest.
14572 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14574 * src/conflicts.c: Move global variables rrc_total and src_total ...
14575 (print_conflicts): here.
14576 * src/output.c (output): Free global variable user_toknums.
14577 * src/lex.c (token_obstack): Become static.
14579 2001-10-18 Akim Demaille <akim@epita.fr>
14581 * tests/atlocal.in (GCC): Add.
14582 * tests/calc.at: s/m4_match/m4_bmatch/.
14583 s/m4_patsubst/m4_bpatsubst/.
14584 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14585 * configure.in: AC_SUBST(GCC).
14587 2001-10-14 Marc Autret <autret_m@epita.fr>
14589 * src/options.c (create_long_option_table): Fix.
14591 2001-10-10 Akim Demaille <akim@epita.fr>
14593 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14595 2001-10-04 Akim Demaille <akim@epita.fr>
14597 * src/reader.c (parse_union_decl): Push the caracters in
14598 union_obstack, not attrs_obstack.
14600 2001-10-04 Akim Demaille <akim@epita.fr>
14602 Merge in the branch 1.29.
14604 * src/reader.c (packsymbols): Use a temporary obstack for
14605 `%%tokendef', since output_stack is already used elsewhere.
14607 2001-10-02 Akim Demaille <akim@epita.fr>
14611 2001-10-02 Akim Demaille <akim@epita.fr>
14615 2001-10-02 Akim Demaille <akim@epita.fr>
14617 * tests/regression.at (Invalid CPP headers): New.
14618 From Alexander Belopolsky.
14619 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14621 2001-10-02 Akim Demaille <akim@epita.fr>
14623 * tests/regression.at (Invalid input): New.
14624 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14627 2001-10-02 Akim Demaille <akim@epita.fr>
14629 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14631 2001-10-02 Akim Demaille <akim@epita.fr>
14633 * src/output.c (output_parser): Assert `skeleton'.
14634 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14638 2001-10-01 Marc Autret <autret_m@epita.fr>
14640 * src/lex.h: Echo modifications.
14641 * src/lex.c (unlex): Parameter is now token_t.
14644 2001-10-01 Marc Autret <autret_m@epita.fr>
14646 * src/main.c: Include lex.h.
14649 2001-09-29 Akim Demaille <akim@epita.fr>
14651 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14653 2001-09-28 Akim Demaille <akim@epita.fr>
14655 * tests/testsuite.at: Update to newer Autotest.
14656 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14658 2001-09-27 Akim Demaille <akim@epita.fr>
14660 Position independent wrapper.
14662 * tests/bison: Remove.
14663 * tests/bison.in: New.
14664 * configure.in: Adjust.
14666 2001-09-27 Paul Eggert <eggert@twinsun.com>
14668 Port quotearg fixes from tar 1.13.24.
14670 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14672 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14673 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14675 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14676 * m4/mbrtowc.m4: New file.
14677 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14678 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14680 2001-09-27 Akim Demaille <akim@epita.fr>
14684 2001-09-27 Akim Demaille <akim@epita.fr>
14688 2001-09-25 Akim Demaille <akim@epita.fr>
14690 * src/system.h: Include `xalloc.h'.
14691 Remove it from the C files.
14692 * src/files.c (output_files): Free the obstacks.
14693 * src/lex.c (init_lex): Rename as...
14696 * src/main.c (main): Use it.
14698 2001-09-24 Marc Autret <autret_m@epita.fr>
14700 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14701 to output informations in fout (FILE*).
14702 (open_graph, close_graph): Likewise.
14703 (output_graph, output_edge, output_node): Likewise.
14704 * src/vcg.h: Update function prototypes.
14705 * src/print_graph.c (print_graph): Open output graph file.
14706 (print_actions): Adjust.
14707 * src/files.h: Remove extern declaration.
14708 * src/files.c: Remove graph_obstack declaration.
14709 (open_files): Remove graph_obstack initialization.
14710 (output_files): Remove graph_obstack saving.
14712 2001-09-24 Marc Autret <autret_m@epita.fr>
14714 * src/files.c (compute_output_file_names): Fix.
14716 2001-09-24 Marc Autret <autret_m@epita.fr>,
14717 Akim Demaille <akim@epita.fr>
14719 * src/reader.c (reader): Remove call to free_symtab ().
14720 * src/main.c (main): Call it here.
14722 * src/conflicts.c (initialize_conflicts): Rename as...
14723 (solve_conflicts): this.
14724 * src/print.c (print_core, print_actions, print_state)
14725 (print_grammar): Dump to a file instead a `output_obstack'.
14726 (print_results): Dump `output_obstack', and then proceed with the
14728 * src/files.c (compute_output_file_names, close_files): New.
14729 (output_files): Adjust.
14730 * src/main.c (main): Adjust.
14732 2001-09-23 Marc Autret <autret_m@epita.fr>
14734 * src/files.c (compute_header_macro): Computes header macro name
14735 from spec_defines_file when given.
14737 2001-09-23 Marc Autret <autret_m@epita.fr>
14739 * src/files.c (output_files): Add default extensions.
14741 2001-09-22 Akim Demaille <akim@epita.fr>
14743 * src/conflicts.c (finalize_conflicts): Rename as...
14744 (free_conflicts): this.
14746 2001-09-22 Akim Demaille <akim@epita.fr>
14748 * src/gram.c (gram_free): Rename back as...
14750 (output_token_translations): Free `token_translations'.
14751 * src/symtab.c (free_symtab): Free the tag field.
14753 2001-09-22 Akim Demaille <akim@epita.fr>
14755 Remove `translations' as it is always set to true.
14757 * src/gram.h: Adjust.
14758 * src/reader.c (packsymbols, parse_token_decl): Adjust
14759 * src/print.c (print_grammar): Adjust.
14760 * src/output.c (output_token_translations): Adjust.
14761 * src/lex.c (lex): Adjust.
14762 * src/gram.c: Be sure the set pointers to NULL.
14763 (dummy): Rename as...
14766 2001-09-22 Akim Demaille <akim@epita.fr>
14768 * configure.in: Invoke AM_LIB_DMALLOC.
14769 * src/system.h: Use dmalloc.
14770 * src/LR0.c: Be sure to have pointers initialized to NULL.
14771 (allocate_itemsets): Allocate kernel_items only if needed.
14773 2001-09-22 Akim Demaille <akim@epita.fr>
14775 * configure.in: Bump to 1.29b.
14776 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14777 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14778 need xmalloc.c in calc.y.
14781 2001-09-21 Akim Demaille <akim@epita.fr>
14784 * Makefile.maint, config/config.guess, config/config.sub,
14785 * config/missing: Update from masters.
14786 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14788 * configure.in (ALL_LINGUAS): Add `tr'.
14790 2001-09-21 Akim Demaille <akim@epita.fr>
14792 * tests/Makefile.am (package.m4): Move to...
14793 ($(srcdir)/$(TESTSUITE)): here.
14795 2001-09-20 Akim Demaille <akim@epita.fr>
14797 * src/complain.c: No longer try to be standalone: use system.h.
14798 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14799 * src/complain.h: Likewise.
14800 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14801 Remove the unused variable `n'.
14802 From Albert Chin-A-Young.
14804 2001-09-18 Marc Autret <autret_m@epita.fr>
14806 * doc/bison.1: Update.
14807 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14809 (Option Cross Key): Update.
14812 2001-09-18 Marc Autret <autret_m@epita.fr>
14814 * tests/regression.at: New test (comment in %union).
14816 2001-09-18 Marc Autret <autret_m@epita.fr>
14818 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14820 Reported by Keith Browne.
14822 2001-09-18 Marc Autret <autret_m@epita.fr>
14824 * tests/output.at: Add tests for --defines and --graph.
14826 2001-09-18 Marc Autret <autret_m@epita.fr>
14828 * tests/output.at: Removes tests of %{header,src}_extension features.
14830 2001-09-18 Akim Demaille <akim@epita.fr>
14832 * tests/Makefile.am (package.m4): New.
14833 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14834 (_AT_CHECK_CALC_ERROR): Likewise.
14835 Factor the `, ' part of verbose error messages.
14837 2001-09-18 Marc Autret <autret_m@epita.fr>
14839 * src/getargs.c (longopts): Declare --defines and --graph as options
14840 with optional arguments.
14841 * src/files.h: Add extern declarations.
14842 * src/files.c (spec_graph_file, spec_defines_file): New.
14843 (output_files): Update.
14844 Remove CPP-outed code.
14846 2001-09-18 Marc Autret <autret_m@epita.fr>
14848 Turn off %{source,header}_extension feature.
14850 * src/files.c (compute_exts_from_gf): Update.
14851 (compute_exts_from_src): Update.
14852 (output_files): CPP-out useless code.
14853 * src/files.h: Remove {header,source}_extension extern declarations.
14854 * src/reader.c (parse_dquoted_param): CPP-out.
14855 (parse_header_extension_decl): Remove.
14856 (parse_source_extension_decl): Remove.
14857 (read_declarations): Remove cases tok_{hdrext,srcext}.
14858 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14859 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14861 2001-09-10 Akim Demaille <akim@epita.fr>
14863 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14864 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14865 (AT_CHECK_OUTPUT): this.
14866 Merely check ls' exit status, its output is useless.
14868 2001-09-10 Akim Demaille <akim@epita.fr>
14870 * tests/calc.at: Use m4_match.
14871 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14873 2001-09-10 Marc Autret <autret_m@epita.fr>,
14874 Akim Demaille <akim@epita.fr>
14876 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14878 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14880 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14881 * src/lex.h: Adjust prototype.
14882 (token_t): Add `tok_undef'.
14883 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14884 (parse_percent_token): Now returns token_t.
14885 Add default statement in switch.
14886 (lex): Separate `c' as an input variable, from the token_t result
14888 (unlexed): Is a token_t.
14890 2001-09-10 Akim Demaille <akim@epita.fr>
14892 * configure.in: Bump to 1.29a.
14894 2001-09-07 Akim Demaille <akim@epita.fr>
14898 2001-08-30 Akim Demaille <akim@epita.fr>
14900 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14901 * m4/atconfig.m4: Remove.
14902 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14903 * tests/bison: New.
14904 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14905 m4_if, m4_patsubst, and m4_regexp.
14906 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14907 `input' file instead of echo.
14909 2001-08-29 Akim Demaille <akim@epita.fr>
14913 2001-08-29 Akim Demaille <akim@epita.fr>
14917 2001-08-29 Paul Eggert <eggert@twinsun.com>
14919 * src/bison.simple (yyparse): Don't take the address of an
14920 item before the start of an array, as that doesn't conform to
14923 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14925 * doc/bison.texinfo (Location Tracking Calc): New node.
14927 2001-08-29 Paul Eggert <eggert@twinsun.com>
14929 * src/output.c (output): Do not define const, as this now
14930 causes more problems than it cures.
14932 2001-08-29 Akim Demaille <akim@epita.fr>
14934 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14936 Be sure to tag the `detailmenu'.
14938 2001-08-29 Akim Demaille <akim@epita.fr>
14940 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14941 download in a tmp dir.
14943 2001-08-28 Marc Autret <autret_m@epita.fr>
14945 * config/depcomp: New file.
14947 2001-08-28 Marc Autret <autret_m@epita.fr>
14949 * doc/bison.1 (mandoc): Adjust.
14950 From Juan Manuel Guerrero.
14952 2001-08-28 Marc Autret <autret_m@epita.fr>
14954 * src/print_graph.c (print_state): Fix.
14956 2001-08-27 Marc Autret <autret_m@epita.fr>
14958 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14960 Echo modifications to the functions prototypes.
14961 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14963 2001-08-27 Marc Autret <autret_m@epita.fr>
14965 * src/vcg.c: Include `xalloc.h'.
14966 (add_colorentry): New.
14967 (add_classname): New.
14968 (add_infoname): New.
14969 * src/vcg.h: Add new prototypes.
14971 2001-08-27 Akim Demaille <akim@epita.fr>
14973 * Makefile.maint: Sync. again with CVS Autoconf.
14975 2001-08-27 Akim Demaille <akim@epita.fr>
14977 * Makefile.maint: Formatting changes.
14978 (po-update, cvs-update, update): New targets.
14981 2001-08-27 Akim Demaille <akim@epita.fr>
14983 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14984 * Makefile.maint: Sync. with CVS Autoconf.
14986 2001-08-27 Marc Autret <autret_m@epita.fr>
14988 * src/vcg.h (struct infoname_s): New.
14989 (struct colorentry_s): New.
14990 (graph_s): New fields {vertical,horizontal}_order in structure.
14991 Add `infoname' field.
14992 Add `colorentry' field;
14993 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14994 (G_HORIZONTAL_ORDER): New.
14996 (G_COLORENTRY): New.
14997 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14998 Add output of `infoname'.
14999 Add output of `colorentry'.
15001 2001-08-27 Marc Autret <autret_m@epita.fr>
15003 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15004 This one shadowed a global parameter.
15006 2001-08-24 Marc Autret <autret_m@epita.fr>
15008 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15009 instead of `unsigned'.
15010 (print_state): Do not call obstack_object_size () in obstack_grow ()
15011 to avoid macro variables shadowing.
15013 2001-08-23 Marc Autret <autret_m@epita.fr>
15015 * src/lex.c (percent_table): Typo: s/naem/name/.
15017 Normalize new options declarations.
15019 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15021 * tests/suite.at: Exercise %header_extension and %source_extension.
15023 2001-08-16 Marc Autret <autret_m@epita.fr>
15025 * src/reader.c (parse_dquoted_param): New.
15026 (parse_header_extension_decl): Use it.
15027 (parse_source_extension_decl): Likewise.
15029 2001-08-16 Marc Autret <autret_m@epita.fr>
15031 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15032 (get_xxxx_str): Use assert () instead of complain ().
15033 Remove return invokations in default cases.
15034 (get_decision_str): Modify default behaviour. Remove second argument.
15035 Echo modifications on calls.
15036 (output_graph): Fix.
15038 2001-08-16 Marc Autret <autret_m@epita.fr>
15040 * src/getargs.c (usage): Update with ``-g, --graph''.
15042 2001-08-16 Marc Autret <autret_m@epita.fr>
15044 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15045 (Option Cross Key): Likewise.
15046 * doc/bison.1: Update.
15048 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
15050 * src/output.c (output_master_parser): Don't finish action_obstack.
15051 (output_parser): Don't care about the muscle action, here.
15052 (prepare): Copy the action_obstack in the action muscle.
15053 (output): Free action_obstack.
15055 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15057 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15058 will contain `%union' declaration.
15059 (parse_union_decl): Delete #line directive output.
15060 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15061 informations about %union.
15062 (parse_union_decl): Copy the union_obstack in the muscle stype.
15063 * src/bison.simple: Add new #line directive.
15064 Add typdef %%stype YYSTYPE.
15066 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15068 * src/bison.simple: Add new `#line' directive.
15070 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
15072 * src/bison.simple: New `#line' directive.
15073 * src/output.c (output_parser): Support new dynamic muscle input_line.
15075 2001-09-22 Marc Autret <autret_m@epita.fr>
15077 * src/output.c (output_master_parser): New.
15078 (output_parser): Be more re-entrant.
15080 2001-09-21 Marc Autret <autret_m@epita.fr>
15082 * src/reader.c (copy_definition, parse_union_decl): Update and use
15084 (copy_action): Likewise.
15085 Use obstack_1grow ().
15086 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15088 2001-09-21 Marc Autret <autret_m@epita.fr>
15090 * src/options.c (option_table): Adjust.
15091 * src/lex.c (parse_percent_token): Fix.
15093 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15095 * src/options.c (symtab.h): Include it, need by lex.h.
15097 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15099 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15100 is now an option_table_struct*.
15101 (option_strcmp): New function option_strcmp.
15102 (parse_percent_token): Call option_strcmp.
15103 * src/getargs.c (xalloc.h, options.h): Include it.
15104 (getargs): Call create_long_option_table.
15105 (getargs): Free longopts at the end of the function.
15106 (shortopts): Move in options.c.
15107 * src/options.c (create_long_option_table): New function. Convert
15108 information from option_table to option structure.
15109 * src/reader.c (options.h): Include it.
15111 * src/Makefile.am: Adjust.
15112 * src/options.c (option_table): Create from longopts and percent_table.
15113 * src/getargs.c (longopts): Delete.
15114 * src/lex.c (struct percent_table_struct): Delete.
15115 (percent_table): Delete.
15116 (options.h): Include it.
15117 * src/options.c: Create.
15118 * src/options.h: Create.
15119 Declare enum opt_access_e.
15120 Define struct option_table_struct.
15122 2001-09-20 Marc Autret <autret_m@epita.fr>
15124 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15127 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
15129 * src/bison.simple: s/%%filename/%%skeleton.
15130 * src/muscle_tab.c (getargs.h): Include it.
15131 (muscle_init): Insert new muscle skeleton.
15133 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
15135 * src/output.c (output_parser): Delete unused variable actions_dumped.
15137 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
15139 * src/output.c (output): Delete call to reader_output_yylsp.
15140 * src/reader.c (reader): Likewise.
15141 * src/reader.h: Delete declaration of reader_output_yylsp.
15143 2001-09-02 Marc Autret <autret_m@epita.fr>
15145 * src/reader.c: Include muscle_tab.h.
15146 (parse_union_decl): Update.
15147 (parse_macro_decl): Rename parse_muscle_decl.
15148 Update to use renamed functions and variable.
15149 (read_declarations, copy_action, read_additionnal_code, : Updated
15150 with correct variables and functions names.
15151 (packsymbols, reader): Likewise.
15153 * src/reader.h (muscle_obstack): Extern declaration update.
15155 * src/output.c: Include muscle_tab.h
15156 In all functions using macro_insert, change by using muscle_insert ().
15157 (macro_obstack): Rename muscle_obstack.
15158 Echo modifications in the whole file.
15159 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15160 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15161 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15163 * src/muscle_tab.h: Update double inclusion macros.
15164 (macro_entry_s): Rename muscle_entry_s.
15167 * src/muscle_tab.c: Include muscle_tab.h.
15168 Rename macro_tabble to muscle_table.
15169 (mhash1, mhash2, mcmp): Use muscle_entry.
15170 (macro_init): Rename muscle_init. Update.
15171 (macro_insert): Rename muscle_insert. Update.
15172 (macro_find): Rename muscle_find. Update.
15174 * src/main.c: Include muscle_tab.h.
15175 (main): Call muscle_init ().
15176 * src/Makefile.am (bison_SOURCES): Echo modifications.
15178 2001-09-02 Marc Autret <autret_m@epita.fr>
15180 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15182 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15184 2001-09-02 Marc Autret <autret_m@epita.fr>
15186 * src/macrotab.c, src/macrotab.h: Remove.
15188 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15190 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15193 2001-09-01 Marc Autret <autret_m@epita.fr>
15195 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15196 to an explicit value to activate the feature. We do it here.
15198 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15200 * src/output.c (prepare): Delete the `filename' muscule insertion.
15201 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15202 (parse_union_decl): Likewise.
15203 * src/macrotab.c (macro_init): Initialize filename by infile.
15205 2001-08-31 Marc Autret <autret_m@epita.fr>
15207 * src/bison.simple (YYLSP_NEEDED): New definition.
15208 * src/output.c (prepare): Add macro insertion of `locations_flag'
15210 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15212 * src/output.c (prepare): Delete insertion of previous muscles,
15213 and insert the `prefix' muscles.
15214 * src/macrotab.c (macro_init): Likewise.
15215 (macro_init): Initialization prefix directive by `yy'.
15216 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15217 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15218 yylval, yydebug, yyerror, yynerrs and yyparse.
15219 New directive `#define' to substitute yydebug, ... with option
15222 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15224 * src/main.c (main): Standardize.
15225 * src/output.c (output_table_data, output_parser): Likewise.
15226 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15228 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15230 * src/reader.c (read_additionnal_code): Rename %%user_code to
15232 * src/output.c (output): Rename %%declarations to %%prologue.
15233 * src/bison.simple: Echo modifications.
15235 2001-08-31 Marc Autret <autret_m@epita.fr>
15237 * src/reader.c (readgram): CleanUp.
15238 (output_token_defines): Likewise.
15239 (packsymbols): Likewise.
15240 (reader): Likewise.
15241 * src/output.c (output): CPP-out useless code.
15243 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15245 * src/reader.c (reader): Delete obsolete call to function
15246 output_trailers and output_headers.
15247 * src/output.h: Remove obsolete functions prototypes of output_headers
15248 and output_trailers.
15250 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15252 * src/main.c: Include macrotab.h.
15253 * src/macrotab.h (macro_entry_s): Constify fields.
15254 Adjust functions prototypes.
15255 * src/macrotab.c (macro_insert): Constify key and value.
15256 (macro_find): Constify key.
15257 (macro_insert): Include 'xalloc.h'
15258 (macro_insert): Use XMALLOC.
15259 (macro_find): Constify return value.
15260 * src/output.c (output_table_data): Rename table to table_data.
15261 (output_parser): Constify macro_key, macro_value.
15263 2001-08-30 Marc Autret <autret_m@epita.fr>
15265 * src/reader.c (parse_skel_decl): New.
15266 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15267 * src/lex.h (token_t): New token `tok_skel'.
15268 * src/lex.c (percent_table): Add skeleton option entry.
15271 2001-08-29 Marc Autret <autret_m@epita.fr>
15273 * src/bison.simple: Add %%user_code directive at the end.
15274 * src/reader.c (read_additionnal_code): New.
15276 * src/output.c (output_program): Remove.
15279 2001-08-28 Marc Autret <autret_m@epita.fr>
15281 * src/output.c (output_actions): Clean up.
15282 (output_gram): CPP-out useless code.
15283 * src/reader.c (reader): Clean up, CPP-out useless code.
15285 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15287 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15289 * src/bison.simple: Add `%%definitions'.
15291 2001-08-28 Marc Autret <autret_m@epita.fr>
15293 * config/depcomp: New file.
15295 2001-08-27 Paul Eggert <eggert@twinsun.com>
15297 * src/bison.simple (yyparse): Don't take the address of an
15298 item before the start of an array, as that doesn't conform to
15301 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15303 * src/output.c (output): Remove the initialization of the macro
15304 obstack. It was done too late here.
15306 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15308 (reader): Initialize the macro obstack here, since we need it to grow
15309 '%define' directives.
15311 * src/reader.h: Declare the macro obstack as extern.
15313 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15315 * src/output.c (output_parser): Fix. Store single '%' characters in
15316 the output obstack instead of throwing them away.
15318 2001-08-27 Akim Demaille <akim@epita.fr>
15320 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15322 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15324 * lib/Makefile.am: Adjust.
15326 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15328 * src/bison.simple: Update and add '%%' directives.
15330 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15332 * src/reader.c (reader): Remove calls to 'output_headers' and
15333 'output_trailers'. Remove some C output.
15334 (readgram): Disable a piece of code that was writing a default
15335 definition for 'YYSTYPE'.
15336 (reader_output_yylsp): Remove.
15337 (packsymbols): Output token defintions to a macro.
15338 (copy_definition): Disable C output.
15340 * src/reader.c (parse_macro_decl): New function used to parse macro
15342 (copy_string2): Put the body of copy_string into this new function.
15343 Add a parameter to let the caller choose whether he wants to copy the
15344 string delimiters or not.
15345 (copy_string): Be a simple call to copy_string2 with the last argument
15347 (read_declarations): Add case for macro definition.
15348 (copy_identifier): New.
15349 (parse_macro_decl): Read macro identifiers using copy_identifier
15352 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15354 * src/output.c (prepare): Add prefixed names.
15355 (output_parser): Output semantic actions.
15356 (output_parser): Fix bug on '%%line' directives.
15358 * src/output.c (output_headers): Remove. The C code printed by this
15359 function should now be in the skeletons.
15360 (output_trailers): Remove.
15361 (output): Disable call to 'reader_output_yylsp'.
15362 (output_rule_data): Do not output tables to the table obstack.
15364 * src/output.c: Remove some C dedicated output.
15365 Improve the use of macro and output obstacks.
15366 (output_defines): Remove.
15368 * src/output.c (output_token_translations): Associate 'translate'
15369 table with a macro. No output to the table obstack.
15370 (output_gram): Same for 'rhs' and 'prhs'.
15371 (output_stos): Same for 'stos'.
15372 (output_rule_data): Same for 'r1' and 'r2'.
15373 (token_actions): Same for 'defact'.
15374 (goto_actions): Same for 'defgoto'.
15375 (output_base): Same for 'pact' and 'pgoto'.
15376 (output_table): Same for 'table'.
15377 (output_check): Same for 'check'.
15379 * src/output.c (output_table_data): New function.
15380 (output_short_table): Remove.
15381 (output_short_or_char_table): Remove.
15383 * src/output.c (output_parser): Replace most of the skeleton copy code
15384 with something new. Skeletons are now processed character by character
15385 rather than line by line, and Bison looks for '%%' macros. This is the
15386 first step in making Bison's output process (a lot) more flexible.
15387 (output_parser): Use the macro table.
15389 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15391 * src/main.c (main): Initialize the macro table.
15393 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15395 * src/lex.c (percent_table): Add tok_define.
15396 * src/lex.h: Add tok_define.
15398 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15400 * src/macrotab.c: New file.
15401 * src/macrotab.h: New file.
15402 * src/Makefile.am: Update.
15404 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15406 * lib/hash.c: New file.
15407 * lib/hash.h: New file.
15408 * lib/Makefile.am: Update.
15410 2001-08-15 Akim Demaille <akim@epita.fr>
15414 2001-08-15 Marc Autret <autret_m@epita.fr>
15416 * src/reader.c (readgram): Indent output macro YYSTYPE.
15417 (packsymbols): Likewise.
15418 (output_token_defines): Likewise.
15419 * src/files.c: Standardize.
15420 (compute_header_macro): New.
15421 (defines_obstack_save): New. Use compute_header_macro.
15422 (output_files): Update. Use defines_obstack_save.
15424 2001-08-15 Akim Demaille <akim@epita.fr>
15426 * doc/bison.texinfo (Table of Symbols): Document
15427 YYSTACK_USE_ALLOCA.
15429 2001-08-15 Akim Demaille <akim@epita.fr>
15431 * missing: Update from CVS Automake.
15432 * config/config.guess, config/config.sub, config/texinfo.tex:
15433 Update from gnu.org.
15435 2001-08-15 Akim Demaille <akim@epita.fr>
15437 * Makefile.maint: Sync with CVS Autoconf.
15439 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15441 * doc/bison.texinfo: Include GNU Free Documentation License from
15443 * doc/fdl.texi: Add to package.
15445 2001-08-14 Marc Autret <autret_m@epita.fr>
15447 Turn on %{source,header}_extension features.
15449 * src/lex.c (percent_table): Un-CPP out header_extension and
15451 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15452 (compute_exts_from_src): Remove conditions. It restores priorities
15455 2001-08-14 Marc Autret <autret_m@epita.fr>
15457 * src/files.c (compute_base_names): Add extensions computing when
15458 `--file-prefix' used.
15459 Standardize function calls.
15461 2001-08-13 Marc Autret <autret_m@epita.fr>
15463 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15464 defining it (defined but null disables alloca).
15466 2001-08-13 Marc Autret <autret_m@epita.fr>
15468 * src/bison.simple (_yy_memcpy): CPP reformat.
15470 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15472 * tests/atconfig.in (CPPFLAGS): Fix.
15474 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15476 * doc/bison.texinfo: Include GNU General Public License from
15478 * doc/gpl.texi: Add to package.
15480 2001-08-10 Marc Autret <autret_m@epita.fr>
15482 * src/print_graph.h: Fix.
15483 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15485 2001-08-10 Akim Demaille <akim@epita.fr>
15487 * src/system.h: Provide default declarations for stpcpy, strndup,
15490 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15492 * doc/bison.texinfo (Locations): Update @$ stuff.
15494 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15496 * src/bison.simple (YYLLOC_DEFAULT): Update.
15499 2001-08-08 Marc Autret <autret_m@epita.fr>
15501 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15502 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15503 Reported by Fabrice Bauzac.
15505 2001-08-08 Marc Autret <autret_m@epita.fr>
15507 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15508 * src/vcg.c (output_node): Fix.
15509 * src/vcg.h: Cleanup.
15510 * src/print_graph.c: Add comments.
15511 (node_output_size): New global variable. Simplify the formatting of
15512 the VCG graph output.
15513 (print_actions): Unused code is now used. It notifies the final state
15514 and no action states in the VCG graph. It also give the reduce actions.
15515 The `shift and goto' edges are red and the `go to state' edges are
15517 Get the current node name and node_obstack by argument.
15518 (node_obstack): New variable.
15519 (print_state): Manage node_obstack.
15520 (print_core): Use node_obstack given by argument.
15521 A node is not only computed here but in print_actions also.
15522 (print_graph): CPP out useless code instead of commenting it.
15524 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15526 * tests/atconfig.in (CPPFLAGS): Fix.
15528 2001-08-07 Akim Demaille <akim@epita.fr>
15530 * src/print_graph.c (quote): New.
15531 (print_core): Use it.
15533 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15535 * src/vcg.c (complain.h): Include it.
15536 Unepitaize `return' invocations.
15537 [NDEBUG] (main): Remove.
15538 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15539 * src/files.c (open_files): Initialize graph_obstack.
15540 * src/print_graph.c (print_actions): CPP out useless code.
15541 (print_core): Don't output the last `\n' in labels.
15543 * src/files.c (output_files): Output the VCG file.
15544 * src/main.c (main): Invoke print_graph ();
15546 2001-08-06 Marc Autret <autret_m@epita.fr>
15548 Automaton VCG graph output.
15549 Using option ``-g'' or long option ``--graph'', you can generate
15550 a gram_filename.vcg file containing a VCG description of the LALR (1)
15551 automaton of your grammar.
15553 * src/main.c: Call to print_graph() function.
15554 * src/getargs.h: Update.
15555 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15556 (graph_flag): New flag.
15557 (longopts): Update.
15558 (getargs): Add case `g'.
15559 * src/files.c (graph_obstack): New obstack struct.
15560 (open_files): Initialize new obstack.
15561 (output_files): Saves graph_obstack if required.
15562 * src/files.h (graph_obstack): New extern declaration.
15563 * src/Makefile.am: Add new source files.
15565 2001-08-06 Marc Autret <autret_m@epita.fr>
15567 * src/print_graph.c, src/print_graph.h (graph): New.
15568 * src/vcg.h: New file.
15569 * src/vcg.c: New file, VCG graph handling.
15571 2001-08-06 Marc Autret <autret_m@epita.fr>
15573 Add of %source_extension and %header_extension which specify
15574 the source or/and the header output file extension.
15576 * src/files.c (compute_base_names): Remove initialisation of
15577 src_extension and header_extension.
15578 (compute_exts_from_gf): Update.
15579 (compute_exts_from_src): Update.
15580 (output_files): Update.
15581 * src/reader.c (parse_header_extension_decl): New.
15582 (parse_source_extension_decl): New.
15583 (read_declarations): New case statements for the new tokens.
15584 * src/lex.c (percent_table): Add entries for %source_extension
15585 and %header_extension.
15586 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15588 2001-08-06 Marc Autret <autret_m@epita.fr>
15590 * configure.in: Bump to 1.28c.
15591 * doc/bison.texinfo: Texinfo thingies.
15593 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15595 * tests/atconfig.in (CPPFLAGS): Add.
15596 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15598 2001-08-03 Akim Demaille <akim@epita.fr>
15602 2001-08-03 Akim Demaille <akim@epita.fr>
15604 * tests/Makefile.am (check-local): Ship testsuite.
15605 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15606 Include `string.h'.
15608 2001-08-03 Akim Demaille <akim@epita.fr>
15610 * configure.in: Try using -Wformat when compiling.
15612 2001-08-03 Akim Demaille <akim@epita.fr>
15614 * configure.in: Bump to 1.28b.
15616 2001-08-03 Akim Demaille <akim@epita.fr>
15618 * src/complain.c: Adjust strerror_r portability issues.
15620 2001-08-03 Akim Demaille <akim@epita.fr>
15624 2001-08-03 Akim Demaille <akim@epita.fr>
15626 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15627 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15628 * src/getargs.c: Include complain.h.
15629 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15630 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15632 2001-08-03 Akim Demaille <akim@epita.fr>
15634 * src/reader.c (readgram): Display hidden chars in error messages.
15636 2001-08-03 Akim Demaille <akim@epita.fr>
15638 Update to gettext 0.10.39.
15640 2001-08-03 Akim Demaille <akim@epita.fr>
15642 * lib/strspn.c: New.
15644 2001-08-01 Marc Autret <autret_m@epita.fr>
15646 * doc/bison.texinfo: Update.
15647 * doc/bison.1 (mandoc): Update.
15648 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15649 * src/files.c: Support output files extensions computing.
15650 (src_extension): New static variable.
15651 (header_extension): New static variable.
15652 (tr): New function.
15653 (get_extension_index): New function, gets the index of an extension
15654 filename in a string.
15655 (compute_exts_from_gf): New function, computes extensions from the
15656 grammar file extension.
15657 (compute_exts_from_src): New functions, computes extensions from the
15658 C source file extension, file given by ``-o'' option.
15659 (compute_base_names): Update.
15660 (output_files): Update.
15662 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15664 * doc/bison.texi: Document @$.
15665 (Locations): New section.
15667 2001-07-18 Akim Demaille <akim@epita.fr>
15669 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15670 * config/prev-version.txt, config/move-if-change: New.
15671 * Makefile.am: Adjust.
15673 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15675 * src/bison.simple (yyparse): Suppress warning `comparaison
15676 between signed and unsigned'.
15678 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15680 * src/getargs.h (raw_flag): Remove.
15681 * src/getargs.c: Die on `-r'/`--raw'.
15682 * src/lex.c (parse_percent_token): Die on `%raw'.
15683 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15684 * tests/calc.at: Suppress test with option `--raw'.
15686 2001-07-14 Akim Demaille <akim@epita.fr>
15689 * configure.in: Require Autoconf 2.50.
15690 Update to gettext 0.10.38.
15692 2001-03-16 Akim Demaille <akim@epita.fr>
15694 * doc/bison.texinfo: ANSIfy the examples.
15696 2001-03-16 Akim Demaille <akim@epita.fr>
15698 * getargs.c (skeleton): New variable.
15699 (longopts): --skeleton is a new option.
15700 (shortopts, getargs): -S is a new option.
15701 * getargs.h: Declare skeleton.
15702 * output.c (output_parser): Use it.
15704 2001-03-16 Akim Demaille <akim@epita.fr>
15706 * m4/strerror_r.m4: New.
15707 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15708 * lib/error.h, lib/error.c: Update.
15710 2001-03-16 Akim Demaille <akim@epita.fr>
15712 * src/getargs.c (longopts): Clean up.
15714 2001-02-21 Akim Demaille <akim@epita.fr>
15716 * src/reader.c (gensym): `gensym_count' is your own.
15717 Use a static buf to create the symbol name, as token_buffer is no
15720 2001-02-08 Akim Demaille <akim@epita.fr>
15722 * src/conflicts.c (conflict_report): Be sure not to append to res
15723 between two calls, which could happen if both first sprintf were
15724 skipped, but not the first cp += strlen.
15726 2001-02-08 Akim Demaille <akim@epita.fr>
15728 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15729 New, from fileutils 4.0.37.
15730 * configure.in: Require Autoconf 2.49c. I took some time before
15731 making this decision. This is the only way out for portability
15732 issues in Bison, it would mean way too much duplicate effort to
15733 import in Bison features implemented in 2.49c since 2.13.
15734 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15736 2001-02-02 Akim Demaille <akim@epita.fr>
15738 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15739 * lib/xalloc.h, lib/xmalloc.c: Update.
15741 2001-01-19 Akim Demaille <akim@epita.fr>
15743 Get rid of the ad hoc handling of token_buffer in the scanner: use
15746 * src/lex.c (token_obstack): New.
15747 (init_lex): Initialize it. No longer call...
15748 (grow_token_buffer): this. Remove it.
15749 Adjust all the places which used it to use the obstack.
15751 2001-01-19 Akim Demaille <akim@epita.fr>
15753 * src/lex.h: Rename all the tokens:
15754 s/\bENDFILE\b/tok_eof/g;
15755 s/\bIDENTIFIER\b/tok_identifier/g;
15757 Let them be enums, not #define, to ease debugging.
15758 Adjust all the code.
15760 2001-01-18 Akim Demaille <akim@epita.fr>
15762 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15763 * src/lex.c (maxtoken, grow_token_buffer): Static.
15765 2001-01-18 Akim Demaille <akim@epita.fr>
15767 Since we now use obstacks, more % directives can be enabled.
15769 * src/lex.c (percent_table): Also accept `%yacc',
15770 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15772 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15773 instead of returning a token.
15774 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15775 * src/reader.c (read_declarations): Adjust.
15776 * src/files.c (open_files): Don't call `compute_base_names', don't
15777 compute `attrsfile' since they depend upon data which might be
15778 *in* the input file now.
15779 (output_files): Do it here.
15780 * src/output.c (output_headers): Document the fact that this patch
15781 introduces a guaranteed SEGV for semantic parsers.
15782 * doc/bison.texinfo: Document them.
15783 * tests/suite.at: Exercise these %options.
15785 2000-12-20 Akim Demaille <akim@epita.fr>
15787 Also handle the output file (--verbose) with obstacks.
15789 * files.c (foutput): Remove.
15790 (output_obstack): New.
15791 Adjust all dependencies.
15792 * src/conflicts.c: Return a string.
15793 * src/system.h (obstack_grow_string): Rename as...
15794 (obstack_sgrow): this. Be ready to work with non literals.
15795 (obstack_fgrow4): New.
15797 2000-12-20 Akim Demaille <akim@epita.fr>
15799 * src/files.c (open_files): Fix the computation of short_base_name
15800 in the case of `-o foo.tab.c'.
15802 2000-12-20 Akim Demaille <akim@epita.fr>
15804 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15805 (copy_dollar): Now that everything uses obstacks, get rid of the
15808 2000-12-20 Akim Demaille <akim@epita.fr>
15810 * src/files.c (open_files): Actually the `.output' file is based
15811 on the short_base_name, not base_name.
15812 * tests/suite.at (Checking output file names): Adjust.
15814 2000-12-20 Akim Demaille <akim@epita.fr>
15816 * src/bison.s1: Remove, we now use directly...
15817 * src/bison.simple: this.
15818 * src/Makefile.am: Use pkgdata instead of data.
15820 2000-12-20 Akim Demaille <akim@epita.fr>
15822 * src/files.c (guard_obstack): New.
15823 (open_files): Initialize it.
15824 (output_files): Dump it...
15825 * src/files.h: Export it.
15826 * src/reader.c (copy_guard): Use it.
15828 2000-12-19 Akim Demaille <akim@epita.fr>
15830 * src/files.c (outfile, defsfile, actfile): Removed as global
15832 (open_files): Don't compute them.
15833 (output_files): Adjust.
15834 (base_name, short_base_name): Be global.
15835 Adjust dependencies.
15837 2000-12-19 Akim Demaille <akim@epita.fr>
15839 * src/files.c (strsuffix): New.
15840 (stringappend): Be just like strcat but allocate.
15841 (base_names): Eve out from open_files.
15842 Try to simplify the rather hairy computation of base_name and
15844 (open_files): Use it.
15845 * tests/suite.at (Checking output file names): New test.
15847 2000-12-19 Akim Demaille <akim@epita.fr>
15849 * src/system.h (obstack_grow_literal_string): Rename as...
15850 (obstack_grow_string): this.
15851 * src/output.c (output_parser): Recognize `%% actions' instead of
15853 * src/bison.s1: s/$/%% actions/.
15854 * src/bison.hairy: Likewise.
15856 2000-12-19 Akim Demaille <akim@epita.fr>
15858 * src/output.c (output_parser): Compute the `#line' lines when
15860 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15861 Suggested by Hans Aberg.
15863 2000-12-19 Akim Demaille <akim@epita.fr>
15865 Let the handling of the skeleton files be local to the procedures
15868 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15870 (fparser, open_extra_files): Remove.
15871 (open_files, output_files): Don't take care of fparser.
15872 * src/files.h: Adjust.
15873 * src/output.c (output_parser): Open and close the file to the
15875 * src/reader.c (read_declarations): When %semantic_parser, open
15878 2000-12-19 Akim Demaille <akim@epita.fr>
15880 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15881 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15883 2000-12-19 Akim Demaille <akim@epita.fr>
15885 * src/files.c (open_files): Yipee! We no longer need all the code
15886 looking for `/tmp' since we have no tmp file.
15888 2000-12-19 Akim Demaille <akim@epita.fr>
15890 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15892 * src/files.c (open_files): Less dependency on MSDOS etc.
15894 2000-12-14 Akim Demaille <akim@epita.fr>
15896 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15897 Provide a default definition.
15898 Use it when executing the default @ action.
15899 * src/reader.c (reader_output_yylsp): No longer include
15900 `timestamp' and `text' in the default YYLTYPE.
15902 2000-12-12 Akim Demaille <akim@epita.fr>
15904 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15905 (copy_guard): Quote the file names.
15906 Reported by Laurent Mascherpa.
15908 2000-12-12 Akim Demaille <akim@epita.fr>
15910 * src/output.c (output_headers, output_program, output): Be sure
15911 to escape special characters when outputting filenames.
15912 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15913 (output_headers): Don't depend on them, Use ACTSTR.
15915 2000-11-17 Akim Demaille <akim@epita.fr>
15917 * lib/obstack.h: Formatting changes.
15918 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15919 prevents type checking.
15920 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15921 cast the value to (void *): assigning a `foo *' to a `void *'
15923 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15924 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15927 2000-11-17 Akim Demaille <akim@epita.fr>
15929 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15931 (suite.m4, regression.m4, calc.m4): these.
15932 * tests/atgeneral.m4: Update from CVS Autoconf.
15934 2000-11-17 Akim Demaille <akim@epita.fr>
15936 * tests/regression.m4 (%union and --defines): New test,
15937 demonstrating a current bug in the obstack implementation.
15939 2000-11-17 Akim Demaille <akim@epita.fr>
15941 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15943 Use them to declare the variables which are global or local to
15946 2000-11-17 Akim Demaille <akim@epita.fr>
15948 * acconfig.h: Remove, no longer used.
15950 2000-11-07 Akim Demaille <akim@epita.fr>
15952 * src: s/Copyright (C)/Copyright/g.
15954 2000-11-07 Akim Demaille <akim@epita.fr>
15956 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15958 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15960 2000-11-07 Akim Demaille <akim@epita.fr>
15962 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15963 Merge in a single CPP if/else.
15965 2000-11-07 Akim Demaille <akim@epita.fr>
15967 * src/output.c (output): Remove useless variables.
15968 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15969 argument `data' for consistency with the prototypes.
15970 Qualify it `const'.
15971 (obstack_copy, obstack_copy0): Rename the second argument as
15972 `address' for consistency. Qualify it `const'.
15973 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15974 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15975 `const' their input argument (`data' or `address').
15976 Adjust the corresponding macros to include `const' in casts.
15978 2000-11-03 Akim Demaille <akim@epita.fr>
15980 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15981 s/PFILE1/BISON_HAIRY/.
15982 Adjust dependencies.
15984 2000-11-03 Akim Demaille <akim@epita.fr>
15986 For some reason, this was not applied.
15988 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15989 `unlink': it's no longer used.
15991 2000-11-03 Akim Demaille <akim@epita.fr>
15993 * src/files.c (skeleton_find): New function, eved out of...
15994 (open_files, open_extra_files): here.
15996 2000-11-03 Akim Demaille <akim@epita.fr>
15998 Don't use `atexit'.
16000 * src/files.c (obstack_save): New function.
16001 (done): Rename as...
16002 (output_files): this.
16003 Use `obstack_save'.
16004 * src/main.c (main): Don't use `atexit' to register `done', since
16005 it no longer has to remove tmp files, just call `output_files'
16006 when there are no errors.
16008 2000-11-02 Akim Demaille <akim@epita.fr>
16010 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16011 `unlink': it's no longer used.
16012 * src/files.h: Formatting changes.
16014 2000-11-02 Akim Demaille <akim@epita.fr>
16016 Remove the last uses of mktemp and unlink/delete.
16018 * src/files.c (fdefines, ftable): Removed.
16019 (defines_ostack, table_obstack): New.
16020 Adjust dependencies of the former into uses of the latter.
16021 * src/output.c (output_short_or_char_table, output_short_table):
16022 Convert to using obstacks.
16023 * src/reader.c (copy_comment2): Accept one FILE * and two
16025 (output_token_defines, reader_output_yylsp): Use obstacks.
16026 * src/system.h (obstack_fgrow3): New.
16027 * po/POTFILES.in: Adjust.
16029 2000-11-01 Akim Demaille <akim@epita.fr>
16031 Change each use of `fattrs' into a use of `attrs_obstack'.
16033 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16034 * src/files.c (fattrs): Remove.
16035 (attrs_obstack): New.
16036 Adjust all dependencies.
16037 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16039 2000-11-01 Akim Demaille <akim@epita.fr>
16041 Introduce obstacks.
16042 Change each use of `faction' into a use of `action_obstack'.
16044 * lib/obstack.h, lib/obstack.c: New files.
16045 * src/files.c (faction): Remove.
16046 (action_obstack): New.
16047 Adjust all dependencies.
16049 2000-10-20 Akim Demaille <akim@epita.fr>
16051 * lib/quote.h (PARAMS): New macro. Use it.
16053 2000-10-16 Akim Demaille <akim@epita.fr>
16055 * src/output.c (output_short_or_char_table): New function.
16056 (output_short_table, output_token_translations): Use it.
16057 (goto_actions): Use output_short_table.
16059 2000-10-16 Akim Demaille <akim@epita.fr>
16061 * src/symtab.c (bucket_new): New function.
16064 * src/output.c (output_short_table): New argument to display the
16065 comment associated with the table.
16066 Adjust dependencies.
16067 (output_gram): Use it.
16068 (output_rule_data): Nicer output layout for YYTNAME.
16070 2000-10-16 Akim Demaille <akim@epita.fr>
16072 * src/lex.c (read_typename): New function.
16074 * src/reader.c (copy_dollar): Likewise.
16076 2000-10-16 Akim Demaille <akim@epita.fr>
16078 * src/reader.c (copy_comment2): Expect the input stream to be on
16079 the `/' which is suspected to open a comment, instead of being
16080 called after `//' or `/*' was read.
16081 (copy_comment, copy_definition, parse_union_decl, copy_action)
16082 (copy_guard): Adjust.
16084 2000-10-16 Akim Demaille <akim@epita.fr>
16086 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16087 `read_signed_integer'.
16089 2000-10-16 Akim Demaille <akim@epita.fr>
16091 * src/reader.c (copy_dollar): New function.
16092 (copy_guard, copy_action): Use it.
16094 2000-10-16 Akim Demaille <akim@epita.fr>
16096 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16097 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16098 New files, from Fileutils 4.0.27.
16099 * src/main.c (printable_version): Remove.
16100 * src/lex.c, src/reader.c: Use `quote'.
16102 2000-10-04 Akim Demaille <akim@epita.fr>
16104 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16106 2000-10-04 Akim Demaille <akim@epita.fr>
16108 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16110 2000-10-04 Akim Demaille <akim@epita.fr>
16112 When a literal string is used to define two different tokens,
16113 `bison -v' segfaults.
16114 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16116 * tests/regression.m4: New file.
16117 Include the core of the sample provided by Piotr Gackiewicz.
16118 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16121 2000-10-04 Akim Demaille <akim@epita.fr>
16123 * src/reader.c (parse_expect_decl): Keep `count' within the size
16127 2000-10-02 Paul Eggert <eggert@twinsun.com>
16129 * bison.s1 (yyparse): Assign the default value
16130 unconditionally, to avoid a GCC warning and make the parser a
16133 2000-10-02 Akim Demaille <akim@epita.fr>
16135 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16138 2000-10-02 Akim Demaille <akim@epita.fr>
16140 * src/derives.c, src/print.c, src/reduce.c: To ease the
16141 translation, move some `\n' out of the translated strings.
16143 2000-10-02 Akim Demaille <akim@epita.fr>
16145 The location tracking mechanism is precious for parse error
16146 messages. Nevertheless, it is enabled only when `@n' is used in
16147 the grammar, which is a different issue (you can use it in error
16148 message, but not in the grammar per se). Therefore, there should
16149 be another means to enable it.
16151 * src/getargs.c (getargs): Support `--locations'.
16152 (usage): Report it.
16153 * src/getargs.h (locationsflag): Export it.
16154 * src/lex.c (percent_table): Support `%locations'.
16155 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16156 with `locationsflag'.
16157 * doc/bison.texinfo: Document `--locations' and `%locations'.
16159 * tests/calc.m4: Test it.
16161 For regularity of the names, replace each
16162 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16163 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16164 In addition replace each `flag' with `_flag'.
16166 2000-10-02 Akim Demaille <akim@epita.fr>
16168 Also test parse error messages, including with YYERROR_VERBOSE.
16170 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16172 Use it to check the computations.
16173 Use it to check `nonassoc' is honored.
16174 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16175 `--yyerror-verbose'.
16176 (_AT_CHECK_CALC): Adjust to this option.
16177 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16179 2000-10-02 Akim Demaille <akim@epita.fr>
16181 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16182 the latter demonstrates a flaw in the handling of non debugging
16183 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16184 was used in order to simplify:
16200 unfortunately this leads to a CPP conflict when
16201 `--name-prefix=foo' is used since it produces `#define yydebug
16204 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16205 (YYDPRINTF): New macro.
16207 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16209 Also test `--verbose', `--defines' and `--name-prefix'.
16211 2000-10-02 Akim Demaille <akim@epita.fr>
16213 Improve the readability of the produced parsers.
16215 * src/bison.s1: Formatting changes.
16216 Improve the comment related to the `$' mark.
16217 (yydefault): Don't fall through to `yyresume': `goto' there.
16218 * src/output.c (output_parser): When the `$' is met, skip the end
16220 New variable, `number_of_dollar_signs', to check there's exactly
16221 one `$' in the parser skeleton.
16223 2000-10-02 Akim Demaille <akim@epita.fr>
16225 * lib/xstrdup.c: New file, from the fileutils.
16226 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16227 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16228 instead of strlen + xmalloc + strcpy.
16229 * src/symtab.c (copys): Remove, use xstrdup instead.
16231 2000-10-02 Akim Demaille <akim@epita.fr>
16233 * src/gram.h (associativity): New enum type which replaces the
16234 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16235 `right_assoc', `left_assoc' and `non_assoc'.
16236 Adjust all dependencies.
16237 * src/reader.c: Formatting changes.
16238 (LTYPESTR): Don't define it, use it as a literal in
16239 `reader_output_yylsp'.
16240 * src/symtab.h (symbol_class): New enum type which replaces the
16241 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16242 `sunknown', `stoken and `snterm'.
16244 2000-10-02 Akim Demaille <akim@epita.fr>
16246 * src/getargs.c (fixed_outfiles): Rename as...
16247 (yaccflag): for consistency and accuracy.
16248 Adjust dependencies.
16250 2000-10-02 Akim Demaille <akim@epita.fr>
16252 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16253 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16254 difficult and introduced a lot of core dump. It turns out that
16255 Bison used an implementation of `xmalloc' based on `calloc', and
16256 at various places it does depend upon the initialization to 0. I
16257 have not tried to isolate the pertinent places, and all the former
16258 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16259 someone should address this issue.
16261 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16262 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16264 Adjust dependencies.
16265 * src/warshall.h: New file.
16268 2000-10-02 Akim Demaille <akim@epita.fr>
16270 Various anti-`extern in *.c' changes.
16272 * src/system.h: Include `assert.h'.
16274 2000-10-02 Akim Demaille <akim@epita.fr>
16276 * src/state.h (nstates, final_state, first_state, first_shift)
16277 (first_reduction): Move their exportation from here...
16278 * src/LR0.h: to here.
16279 Adjust dependencies.
16280 * src/getargs.c (statisticsflag): New variable.
16281 Add support for `--statistics'.
16282 Adjust dependencies.
16284 Remove a lot of now useless `extern' statements in most files.
16286 2000-10-02 Akim Demaille <akim@epita.fr>
16288 * src/LR0.h: New file.
16291 2000-10-02 Akim Demaille <akim@epita.fr>
16293 * src/print.h: New file.
16295 * src/print.c: Formatting and ordering changes.
16296 (verbose, terse): Replace with...
16297 (print_results): this new function.
16298 Adjust dependencies.
16300 2000-10-02 Akim Demaille <akim@epita.fr>
16302 * src/conflicts.c (conflict_report): New function.
16303 (conflict_log, verbose_conflict_log): Replace with...
16304 (print_conflicts): this function.
16305 Adjust dependencies.
16306 * src/conflicts.h: New file.
16307 Propagate its inclusion.
16309 2000-10-02 Akim Demaille <akim@epita.fr>
16311 * src/nullable.h: New file.
16312 Propagate its inclusion.
16313 * src/nullable.c: Formatting changes.
16315 2000-10-02 Akim Demaille <akim@epita.fr>
16317 * src/reduce.h: New file.
16318 Propagate its inclusion.
16319 * src/reduce.c: Topological sort and other formatting changes.
16320 (bool, TRUE, FALSE): Move their definition to...
16321 * src/system.h: here.
16323 2000-10-02 Akim Demaille <akim@epita.fr>
16325 * src/files.c: Formatting changes.
16326 (tryopen, tryclose, openfiles): Rename as...
16327 (xfopen, xfclose, open_files): this.
16328 (stringappend): static.
16329 * src/files.h: Complete the list of exported symbols.
16332 2000-10-02 Akim Demaille <akim@epita.fr>
16334 * src/reader.h: New file.
16335 Propagate its use instead of tedious list of `extern' and
16337 * src/reader.c: Formatting changes, topological sort,
16340 2000-10-02 Akim Demaille <akim@epita.fr>
16342 * src/lex.h: Prototype `lex.c' exported functions.
16343 * src/reader.c: Adjust.
16344 * src/lex.c: Formatting changes.
16345 (safegetc): Rename as...
16348 2000-10-02 Akim Demaille <akim@epita.fr>
16350 * src/lalr.h: New file.
16351 Propagate its inclusion instead of prototypes and `extern'.
16352 * src/lalr.c: Formatting changes, topological sorting etc.
16354 2000-10-02 Akim Demaille <akim@epita.fr>
16356 * src/output.c (token_actions): Introduce a temporary array,
16357 YYDEFACT, that makes it possible for this function to use
16358 output_short_table.
16360 2000-10-02 Akim Demaille <akim@epita.fr>
16362 `user_toknums' is output as a `short[]' in `output.c', while it is
16363 defined as a `int[]' in `reader.c'. For consistency with the
16364 other output tables, `user_toknums' is now defined as a table of
16367 * src/reader.c (user_toknums): Be a short table instead of an int
16369 Adjust dependencies.
16371 Factor the short table outputs.
16373 * src/output.c (output_short_table): New function.
16374 * src/output.c (output_gram, output_stos, output_rule_data)
16375 (output_base, output_table, output_check): Use it.
16377 2000-10-02 Akim Demaille <akim@epita.fr>
16379 * src/output.c (output): Topological sort of the functions, in
16380 order to get rid of the `static' prototypes.
16381 No longer use `register'.
16382 * src/output.h: New file.
16383 Propagate its inclusion in files explicitly prototyping functions
16386 2000-09-21 Akim Demaille <akim@epita.fr>
16388 * src/atgeneral.m4: Update from Autoconf.
16390 2000-09-21 Akim Demaille <akim@epita.fr>
16392 * src/closure.h: New file.
16393 * src/closure.c: Formatting changes, topological sort over the
16394 functions, use of closure.h.
16395 (initialize_closure, finalize_closure): Rename as...
16396 (new_closure, free_closure): these. Adjust dependencies.
16397 * src/LR0.c: Formatting changes, topological sort, use of
16399 (initialize_states): Rename as...
16400 (new_states): this.
16401 * src/Makefile.am (noinst_HEADERS): Adjust.
16403 2000-09-20 Akim Demaille <akim@epita.fr>
16405 * src/acconfig.h: Don't protect config.h against multiple
16407 Don't define PARAMS.
16408 * src/system.h: Define PARAMS.
16409 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16410 purpose of config.h. system.h must not try to fix wrong
16411 definitions in config.h.
16413 2000-09-20 Akim Demaille <akim@epita.fr>
16415 * src/derives.h: New file.
16416 * src/main.c, src/derives.h: Use it.
16417 Formatting changes.
16418 * src/Makefile.am (noinst_HEADERS): Adjust.
16420 2000-09-20 Akim Demaille <akim@epita.fr>
16422 * tests/atgeneral.m4: Update from Autoconf.
16423 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16424 (AT_CHECK_CALC): New macros.
16425 Use these macros to test bison with options `', `--raw',
16426 `--debug', `--yacc', `--yacc --debug'.
16428 2000-09-19 Akim Demaille <akim@epita.fr>
16430 * src/output.c: Formatting changes.
16431 * src/machine.h: Remove, leaving its contents in...
16432 * src/system.h: here.
16434 Adjust all dependencies on stdio.h and machine.h.
16435 * src/getargs.h: New file.
16436 Let all `extern' declarations about getargs.c be replaced with
16437 inclusion of `getargs.h'.
16438 * src/Makefile.am (noinst_HEADERS): Adjust.
16440 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16442 (yyerror): Returns void, not int.
16443 * doc/bison.texinfo: Formatting changes.
16445 2000-09-19 Akim Demaille <akim@epita.fr>
16447 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16450 2000-09-18 Akim Demaille <akim@epita.fr>
16452 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16453 * src/Makefile.am (INCLUDES): Don't.
16454 Be ready to fetch headers in lib/.
16456 2000-09-18 Akim Demaille <akim@epita.fr>
16458 * doc/bison.texinfo: Update the copyright.
16459 ANSIfy and GNUify the examples.
16460 Remove the old menu.
16462 2000-09-18 Akim Demaille <akim@epita.fr>
16464 First set of tests: use the `calc' example from the documentation.
16466 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16467 is defined only when YYDEBUG is.
16468 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16469 * src/files.c (tryopen, tryclose): Formatting changes.
16470 Move to the top and be static.
16471 * src/reader.c (read_signed_integer): Likewise.
16472 * tests/calc.m4: New file.
16473 * Makefile.am, suite.m4: Adjust.
16474 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16476 2000-09-18 Akim Demaille <akim@epita.fr>
16478 Add support for an Autotest test suite for Bison.
16480 * m4/m4.m4, m4/atconfig.m4: New files.
16481 * m4/Makefile.am (EXTRA_DIST): Adjust.
16482 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16484 * src/getargs.c: Display a more standard --version message.
16485 * src/reader.c (reader): Formatting changes.
16486 No longer depend upon VERSION_STRING.
16487 * configure.in: No longer use `dnl'.
16488 Set up the test suite and the new directory `tests/.
16489 (VERSION_STRING): Remove.
16491 2000-04-14 Akim Demaille <akim@epita.fr>
16493 * src/reader.c (copy_comment2): New function, same as former
16494 `copy_comment', but outputs into two FILE *.
16495 (copy_comment): Use it.
16496 (parse_union_decl): Use it.
16497 (get_type, parse_start_decl): Use the same `invalid' message.
16498 (parse_start_decl, parse_union_decl): Use the same `multiple'
16500 (parse_union_decl, copy_guard, copy_action): Use the same
16501 `unmatched' message.
16502 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16504 2000-03-31 Akim Demaille <akim@epita.fr>
16506 * src/files.c (tryopen, tryclose): Move to the top.
16509 2000-03-31 Akim Demaille <akim@epita.fr>
16511 * src/main.c (main): Don't call `done', exit does it.
16513 2000-03-31 Akim Demaille <akim@epita.fr>
16515 * allocate.c: s/return (foo)/return foo/.
16516 * lalr.c: Likewise.
16518 * output.c: Likewise.
16519 * reader.c: Likewise.
16520 * symtab.c: Likewise.
16521 * vmsgetargs.c: Likewise.
16523 2000-03-31 Akim Demaille <akim@epita.fr>
16525 Clean up the error reporting functions.
16527 * src/report.c: New file.
16528 * src/report.h: Likewise.
16529 * src/Makefile.am: Adjust.
16530 * m4/error.m4: New file.
16531 * m4/Makefile.am: Adjust.
16532 * configure.in (jm_PREREQ_ERROR): Call it.
16533 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16535 (fatal, fatals): Remove. All callers use complain.c::fatal.
16536 (warn, warni, warns, warnss, warnss): Remove. All callers use
16537 complain.c::complain.
16538 (toomany): Remove, use fatal instead.
16539 * src/files.c (done): No argument, use complain_message_count.
16540 * src/main.c (main): Register `done' to `atexit'.
16542 * src/getargs.c (usage): More `fputs', less `fprintf'.
16544 2000-03-28 Akim Demaille <akim@epita.fr>
16546 * lib/: New directory.
16547 * Makefile.am (SUBDIRS): Adjust.
16548 * configure.in: Adjust.
16549 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16551 * src/alloca.c: Moved to lib/.
16552 * src/getopt.c: Likewise.
16553 * src/getopt1.c: Likewise.
16554 * src/getopt.h: Likewise.
16555 * src/ansi2knr.c: Likewise.
16556 * src/ansi2knr.1: Likewise.
16557 * src/Makefile.am: Adjust.
16558 * lib/Makefile.am: New file.
16560 2000-03-28 Akim Demaille <akim@epita.fr>
16562 * src/getargs.c (usage): Refresh the help message.
16564 2000-03-17 Akim Demaille <akim@epita.fr>
16566 * src/getopt1.c: Updated from textutils 2.0e
16567 * src/getopt.c: Likewise.
16568 * src/getopt.h: Likewise.
16570 2000-03-17 Akim Demaille <akim@epita.fr>
16572 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16573 the file name, not the whole `#line LINE FILE'.
16575 2000-03-17 Akim Demaille <akim@epita.fr>
16577 On syntax errors, report the token on which we choked.
16579 * src/bison.s1 (yyparse): In the label yyerrlab, when
16580 YYERROR_VERBOSE, add yychar in msg.
16582 2000-03-17 Akim Demaille <akim@epita.fr>
16584 * src/reader.c (copy_at): New function.
16585 (copy_guard): Use it.
16586 (copy_action): Use it.
16588 2000-03-17 Akim Demaille <akim@epita.fr>
16590 Be kind to translators, save some useless translations.
16592 * src/main.c (banner): New function.
16593 (fatal_banner): Use it.
16594 (warn_banner): Use it.
16596 2000-03-17 Akim Demaille <akim@epita.fr>
16598 * src/reader.c (copy_definition): Use copy_string and
16599 copy_comment. Removed now unused `match', `ended',
16601 (copy_comment, copy_string): Moved, to be visible from
16604 2000-03-17 Akim Demaille <akim@epita.fr>
16606 * src/reader.c (copy_string): Declare `static inline'. No
16607 problems with inline, since it is checked by configure.
16608 (copy_comment): Likewise.
16610 2000-03-17 Akim Demaille <akim@epita.fr>
16612 * src/reader.c (packsymbols): Formatting changes.
16614 2000-03-17 Akim Demaille <akim@epita.fr>
16616 * src/reader.c (copy_comment): New function, factored out from:
16617 (copy_action): Use it. Removed now unused `match', `ended',
16619 (copy_guard): Likewise.
16621 2000-03-17 Akim Demaille <akim@epita.fr>
16623 * src/reader.c (copy_string): New function, factored out from:
16624 (copy_action): Use it.
16625 (copy_guard): Likewise.
16627 2000-03-17 Akim Demaille <akim@epita.fr>
16629 Change the handling of @s so that they behave exactly like $s.
16630 There is now a pseudo variable @$ (readble and writable), location
16631 of the lhs of the rule (by default ranging from the location of
16632 the first symbol of the rhs, to the location of the last symbol,
16633 or, if the rhs is empty, YYLLOC).
16635 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16637 (yyparse): When providing a default semantic action, provide a
16638 default location action.
16639 (after the $): No longer change `*YYLSP', just stack YYLOC the
16640 same way you stack YYVAL.
16641 * src/reader.c (read_declarations): Use warns.
16642 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16643 (copy_action, case '@'): Likewise.
16644 Use a standard error message, to save useless work from
16647 2000-03-17 Akim Demaille <akim@epita.fr>
16649 * src/bison.s1: Formatting and cosmetics changes.
16650 * src/reader.c: Likewise.
16651 Update the Copyright notice.
16653 2000-03-17 Akim Demaille <akim@epita.fr>
16655 * src/bison.s1 (#line): All set to `#line' only, since the
16656 Makefile now handles them.
16658 2000-03-16 Akim Demaille <akim@epita.fr>
16660 * src/output.c (output_rule_data): Output the documentation of
16661 some of the tables.
16662 (Copyright notice): Update.
16663 Formatting changes.
16665 2000-03-16 Akim Demaille <akim@epita.fr>
16667 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16668 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16669 One `#if YYDEBUG' remains, since it uses variables which are
16670 defined only if `YYDEBUG != 0'.
16672 2000-03-16 Akim Demaille <akim@epita.fr>
16674 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16675 and related variables so that the similarities are highlighted.
16677 2000-03-16 Akim Demaille <akim@epita.fr>
16679 * src/bison.s1: Properly indent CPP directives.
16681 2000-03-16 Akim Demaille <akim@epita.fr>
16683 * src/bison.s1: Properly indent the `alloca' CPP section.
16685 2000-03-16 Akim Demaille <akim@epita.fr>
16687 Do not hard code values of directories in `configure.in'.
16688 Update the `configure' tool chain.
16690 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16692 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16693 (AC_OUTPUT): Add m4/Makefile.
16694 Bump to bison 1.28a, 1.29 has never been released.
16695 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16696 handled via src/Makefile.am.
16697 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16698 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16700 * Makefile.am (SUBDIRS): Add m4.
16701 (ACLOCAL_AM_FLAGS): New variable.
16702 (AUTOMAKE_OPTIONS): Add check-news.
16703 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16704 the proper line number and file name.
16705 (DEFS): Propagate the location of bison library files and of the
16707 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16709 * acinclude.m4: Remove, replaced by the directory m4.
16710 * m4/Makefile.am (EXTRA_DIST): New variable.
16711 * m4/gettext.m4: New file, from the fileutils.
16712 * m4/lcmessage.m4: Likewise
16713 * m4/progtest.m4: Likewise.
16714 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16716 2000-03-10 Akim Demaille <akim@epita.fr>
16719 Formatting changes of various comments.
16720 Respect the GNU coding standards at various places.
16721 Don't use `_()' when no translation is needed.
16723 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16726 OS/2 honors TMPDIR environment variable.
16728 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16730 * doc/bison.texinfo: Tweaked spelling and grammar.
16732 Removed reference to price of printed copy.
16733 Mention BISON_SIMPLE and BISON_HAIRY.
16735 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16737 * configure.in, NEWS:
16738 Bison 1.29 released.
16740 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16742 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16743 Added reference card.
16745 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16747 * po/ru.po: Added Russian translation.
16749 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16751 * configure.in: Added Russian translation.
16753 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16755 * configure.in, NEWS, README:
16756 Released version 1.28.
16758 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16761 Squashed redefinition warning on some systems.
16763 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16764 Have configure build version string instead of relying on ANSI string
16767 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16769 * po/POTFILES.in: Got rid of version.c.
16771 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16773 * acconfig.h, configure.in:
16774 Have configure build version string instead of relying on ANSI string
16777 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16780 Dropped mention of `+' for long-named options.
16782 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16784 * src/files.c: Added <unistd.h> for unlink().
16786 * src/Makefile.am, src/system.h:
16789 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16791 * README: Added a FAQ list.
16793 * configure.in, acconfig.h:
16796 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16798 * doc/FAQ, doc/Makefile.am:
16801 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16803 * src/alloc.h, src/symtab.h, src/version.c:
16804 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16806 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16808 * src/.cvsignore, src/Makefile.am:
16809 Reorganized: sources in `src', documentation in `doc'.
16811 * src/lex.c (literalchar):
16812 fixed the code for escaping double quotes (thanks
16815 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16817 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16818 Adjusted paths to reflect directory reorganization.
16820 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16822 * doc/.cvsignore, doc/Makefile.am:
16823 Reorganized: sources in `src', documentation in `doc'.
16825 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16828 Updated AC_INIT file to reflect directory reorganization.
16830 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16831 Reorganized: sources in `src', documentation in `doc'.
16833 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16836 Don't declare calloc() and realloc() if not necessary.
16838 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16840 * configure.in, acconfig.h, acinclude.m4:
16841 Don't declare calloc() and realloc() if not necessary.
16843 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16845 * po/.cvsignore: Added i18n support.
16847 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16849 * acconfig.h, configure.in, Makefile.am:
16850 Added i18n support.
16852 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16854 * src/bison.s1: Fixed #line numbers.
16856 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16858 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16859 Added PO files from Translation Project.
16861 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16864 Added support for non-ANSI compilers (ansi2knr).
16866 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16868 * configure.in: Bumped version number to 1.27.
16871 Added `bison.simple' to list of files removed by `make distclean'.
16873 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16875 * src/files.c, src/files.h:
16876 Defined locations of parser files in config.h instead of Makefile.
16878 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16880 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16881 Defined locations of parser files in config.h instead of Makefile.
16883 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16886 Removed inappropriate use of $< macro.
16888 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16890 * po/Makefile.in.in, po/POTFILES.in:
16891 Add `po' directory skeleton.
16893 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16895 * README: Document help-bison list.
16897 * configure.in: Add check for mkstemp().
16899 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16901 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16902 Hush a few compiler warnings.
16905 Add tryclose(), which verifies that fclose was successful.
16906 Hush a couple of compiler warnings.
16908 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16910 * Makefile.am, OChangeLog:
16911 ChangeLog is now automatically generated. Include the old version as
16914 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16916 * 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:
16917 Update FSF address.
16919 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16921 * doc/bison.texinfo: Fix formatting glitch.
16923 * doc/bison.texinfo: Update FSF address.
16925 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16927 * acconfig.h: Update FSF address.
16929 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16932 Don't define PACKAGE here, since config.h defines it.
16934 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16936 * src/reader.c: Update copyright date.
16939 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16940 favor of output directly to stderr (avoids buffer overruns).
16942 * src/reader.c: Some checks for premature EOF.
16944 * 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:
16945 Use prototypes if the compiler understands them.
16947 * src/files.c: Honor TMPDIR on Unix hosts.
16948 Use prototypes if the compiler understands them.
16951 Fix a couple of buffer overrun bugs.
16952 Use prototypes if the compiler understands them.
16954 * src/system.h: Include unistd.h and ctype.h.
16955 Use #ifdef instead of #if for NLS symbols.
16957 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16959 * doc/bison.texinfo:
16960 Delete comment "consider using @set for edition number, etc..." since
16961 we now are doing so.
16963 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16966 Use prototypes if the compiler understands them.
16968 * NEWS: Document 1.26 highlights.
16970 * Makefile.am: Require Automake 1.3 or later.
16973 Use prototypes if the compiler understands them.
16975 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16978 Use VERSION symbol from automake for version number.
16980 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16982 * acconfig.h, configure.in, version.cin:
16983 Use VERSION symbol from automake for version number.
16985 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16988 Distribute original version of simple parser (bison.s1), not built
16989 version (bison.simple).
16991 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16993 * doc/bison.texinfo: Add info dir entry.
16995 * doc/bison.texinfo:
16996 Let automake put version number into documentation.
16998 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17000 * src/bison.cld, src/build.com, src/vmshlp.mar:
17001 Add non-RCS files from /gd/gnu/bison.
17003 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17006 Document the BISON_HAIRY and BISON_SIMPLE variables.
17008 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17010 * src/version.c: Build version.c automatically.
17013 Fix token numbering (used to start at 258, not 257).
17015 * src/system.h: Include config.h.
17017 * src/getargs.c: Update bug report address.
17019 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17020 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17022 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17025 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17027 * configure.in, version.cin:
17028 Build version.c automatically.
17030 * AUTHORS: Add AUTHORS file.
17032 * README: Update bug report address.
17035 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17037 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17038 Add automake stuff.
17040 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17042 * doc/bison.texinfo: Clean up some formatting.
17044 1998-05-05 Richard Stallman <rms@gnu.org>
17046 * doc/bison.texinfo:
17047 Explain better why to make a pure parser.
17049 1998-01-05 Richard Stallman <rms@gnu.org>
17051 * src/files.c (openfiles):
17052 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17053 find a temporary directory, if possible. Do not unlink files while
17056 1997-08-25 Richard Stallman <rms@gnu.org>
17058 * src/reader.c (stack_offset;):
17059 Change some warni to warns.
17061 * src/lex.c (literalchar): Use warns, not warni.
17063 1997-06-28 Richard Stallman <rms@gnu.org>
17065 * src/bison.s1: Add a Bison version comment.
17067 * src/main.c (fatal, warn, berror):
17070 1997-06-28 Richard Stallman <rms@gnu.org>
17072 * Makefile.in (bison_version): New variable.
17073 (dist): Use that variable.
17074 (bison.s1): Substitute the Bison version into bison.simple.
17076 * bison.simple: Add a Bison version comment.
17078 1997-06-18 Richard Stallman <rms@gnu.org>
17080 * src/main.c (fatal, warn, berror):
17081 Make error messages standard.
17082 (toomany): Improve error message text.
17084 * 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:
17085 new.h renamed to alloc.h.
17087 1997-06-18 Richard Stallman <rms@gnu.org>
17089 * Makefile.in: new.h renamed to alloc.h.
17091 1997-05-24 Richard Stallman <rms@gnu.org>
17093 * src/lex.c (literalchar):
17094 Fix the code for escaping \, " and '.
17096 (lex): Avoid trouble when there are many chars
17097 to discard in a char literal with just several chars in it.
17099 1997-05-17 Richard Stallman <rms@gnu.org>
17102 Use malloc, if using alloca is troublesome.
17103 (YYSTACK_USE_ALLOCA): New flag macro.
17104 Define it for some systems and compilers.
17105 (YYSTACK_ALLOC): New macro.
17106 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17107 If it was malloc'd, free it.
17109 1997-05-17 Richard Stallman <rms@gnu.org>
17112 Use malloc, if using alloca is troublesome.
17113 (YYSTACK_USE_ALLOCA): New flag macro.
17114 Define it for some systems and compilers.
17115 (YYSTACK_ALLOC): New macro.
17116 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17117 If it was malloc'd, free it.
17119 1997-04-23 Richard Stallman <rms@gnu.org>
17122 (alloca) [__hpux]: Always define as __builtin_alloca.
17124 1997-04-23 Richard Stallman <rms@gnu.org>
17127 (alloca) [__hpux]: Always define as __builtin_alloca.
17129 1997-04-22 Richard Stallman <rms@gnu.org>
17132 [__hpux]: Include alloca.h (right for HPUX 10)
17133 instead of declaring alloca (right for HPUX 9).
17135 * src/bison.s1 (__yy_memcpy):
17136 Declare arg `count' as unsigned int.
17137 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17139 1997-04-22 Richard Stallman <rms@gnu.org>
17142 [__hpux]: Include alloca.h (right for HPUX 10)
17143 instead of declaring alloca (right for HPUX 9).
17145 * bison.simple (__yy_memcpy):
17146 Declare arg `count' as unsigned int.
17147 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17149 1997-01-03 Richard Stallman <rms@gnu.org>
17151 * src/allocate.c: [__STDC__ or _MSC_VER]:
17152 Declare calloc and realloc to return void *.
17154 1997-01-02 Richard Stallman <rms@gnu.org>
17157 [_MSC_VER]: Include stdlib.h and process.h.
17158 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17160 * src/main.c (main): Return FAILURE as a value.
17161 (printable_version): Declare arg as int, not char.
17163 1997-01-02 Richard Stallman <rms@gnu.org>
17165 * Makefile.in (dist):
17166 Explicitly check for symlinks, and copy them.
17168 1996-12-19 Richard Stallman <rms@gnu.org>
17171 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17173 1996-12-18 Paul Eggert <eggert@gnu.org>
17175 * src/bison.s1 (yyparse):
17176 If __GNUC__ and YYPARSE_PARAM are both defined,
17177 declare yyparse to have a void * argument.
17179 1996-12-18 Paul Eggert <eggert@gnu.org>
17181 * bison.simple (yyparse):
17182 If __GNUC__ and YYPARSE_PARAM are both defined,
17183 declare yyparse to have a void * argument.
17185 1996-12-17 Richard Stallman <rms@gnu.org>
17187 * src/reduce.c (nbits): Add some casts.
17189 1996-08-12 Richard Stallman <rms@gnu.org>
17191 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17193 1996-08-12 Richard Stallman <rms@gnu.org>
17195 * bison.simple: Test _MSDOS as well as _MSDOS_.
17197 1996-07-31 Richard Stallman <rms@gnu.org>
17200 [__sun && __i386]: Include alloca.h.
17202 1996-07-31 Richard Stallman <rms@gnu.org>
17205 [__sun && __i386]: Include alloca.h.
17207 1996-07-30 Richard Stallman <rms@gnu.org>
17209 * src/bison.s1: Comment change.
17211 * src/bison.s1: Test _MSDOS_, not MSDOS.
17213 1996-07-30 Richard Stallman <rms@gnu.org>
17215 * bison.simple: Comment change.
17217 * bison.simple: Test _MSDOS_, not MSDOS.
17219 1996-06-01 Richard Stallman <rms@gnu.org>
17221 * 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:
17222 Insert `_' macro around many string constants.
17225 Insert `_' macro around many string constants.
17227 (main): Call setlocale, bindtextdomain and textdomain.
17229 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17230 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17231 [ENABLE_NLS]: Include libintl.h.
17232 [ENABLE_NLS] (gettext): Define.
17233 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17234 (N_, PACKAGE, LOCALEDIR): New macros.
17236 1996-06-01 Richard Stallman <rms@gnu.org>
17238 * POTFILES.in: New file.
17240 * Makefile.in (allocate.o):
17241 Define target explicitly.
17243 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17244 (LDFLAGS): Set to @LDFLAGS@.
17245 (configure): Run autoconf only if preceding `cd' succeeds.
17246 (bison.s1): Redirect output to temporary file then move the
17247 temporary to the target, rather than redirecting directly to bison.s1.
17248 (clean): Remove config.status and config.log.
17249 (distclean): Don't remove config.status here.
17251 1996-05-12 Richard Stallman <rms@gnu.org>
17254 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17256 1996-05-12 Richard Stallman <rms@gnu.org>
17259 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17261 1996-05-11 Richard Stallman <rms@gnu.org>
17263 * src/bison.s1 (__yy_memcpy):
17264 Really reorder the args, as was supposedly done on Feb 14 1995.
17265 (yyparse): Calls changed accordingly.
17267 1996-05-11 Richard Stallman <rms@gnu.org>
17269 * Makefile.in (dist): Don't use $(srcdir).
17271 * bison.simple (__yy_memcpy):
17272 Really reorder the args, as was supposedly done on Feb 14 1995.
17273 (yyparse): Calls changed accordingly.
17275 1996-01-27 Richard Stallman <rms@gnu.org>
17277 * src/output.c (output_rule_data):
17278 Test YYERROR_VERBOSE in the conditional
17279 around the definition of ttyname.
17281 1995-12-29 Richard Stallman <rms@gnu.org>
17284 Fix line numbers in #line commands.
17286 1995-12-29 Richard Stallman <rms@gnu.org>
17289 Fix line numbers in #line commands.
17291 1995-12-27 Richard Stallman <rms@gnu.org>
17293 * src/bison.s1 (YYPARSE_PARAM_DECL):
17294 In C++, make it always null.
17295 (YYPARSE_PARAM_ARG): New macro.
17296 (yyparse): Use YYPARSE_PARAM_ARG.
17298 1995-12-27 Richard Stallman <rms@gnu.org>
17300 * bison.simple (YYPARSE_PARAM_DECL):
17301 In C++, make it always null.
17302 (YYPARSE_PARAM_ARG): New macro.
17303 (yyparse): Use YYPARSE_PARAM_ARG.
17305 1995-11-29 Richard Stallman <rms@gnu.org>
17307 * doc/bison.texinfo:
17308 Describe literal string tokens, %raw, %no_lines, %token_table.
17310 1995-11-29 Daniel Hagerty <hag@gnu.org>
17312 * doc/bison.texinfo: Fixed update date
17314 1995-10-16 Richard Stallman <rms@gnu.org>
17316 * src/version.c: Version 1.25.
17318 1995-10-16 Richard Stallman <rms@gnu.org>
17320 * NEWS: *** empty log message ***
17322 1995-10-16 Richard Stallman <rms@gnu.org>
17324 * doc/bison.1, doc/bison.rnh:
17327 1995-10-15 Richard Stallman <rms@gnu.org>
17329 * src/vmsgetargs.c, src/getargs.c:
17330 Added -n, -k, and -raw switches.
17331 (noparserflag, toknumflag, rawtoknumflag): New variables.
17333 * src/symtab.h (SALIAS):
17334 New #define for adding aliases to %token.
17335 (struct bucket): Added `alias' field.
17337 * src/reduce.c (reduce_grammar):
17338 Revise error message.
17339 (print_notices): Remove final `.' from error message.
17341 * src/reader.c (reader_output_yylsp):
17343 (readgram): Use `#if 0' around code that accepted %command
17344 inside grammar rules: The documentation doesn't allow it,
17345 and it will fail since the %command processors scan for the next %.
17346 (parse_token_decl): Extended the %token
17347 declaration to allow a multi-character symbol as an alias.
17348 (parse_thong_decl): New function.
17349 (read_declarations): Added %thong declarations.
17350 (read_declarations): Handle NOOP to deal with allowing
17351 % declarations as another means to specify the flags.
17352 (readgram): Allow %prec prior to semantics embedded in a rule.
17353 (skip_to_char, read_declarations, copy_definition)
17354 (parse_token_decl, parse_start_decl, parse_type_decl)
17355 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17356 (get_type_name, copy_guard, copy_action, readgram)
17357 (get_type, packsymbols): Revised most error messages.
17358 Changed `fatal' to `warnxxx' to avoid aborting for error.
17359 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17360 (read_declarations): Improve the error message for
17361 an invalid character. Do not abort.
17362 (read_declarations, copy_guard, copy_action): Use
17363 printable_version to avoid unprintable characters in printed output.
17364 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17365 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17366 Allow the type of a non-terminal can be given
17367 more than once, as long as all specifications give the same type.
17370 (output_headers, output_trailers, output, output_gram)
17371 (output_rule_data): Implement noparserflag variable.
17372 Implement toknumflag variable.
17373 (output): Call reader_output_yylsp to output LTYPESTR.
17375 * src/main.c (main):
17376 If reader sees an error, don't process the grammar.
17377 (fatals): Updated to not use VARARGS1.
17378 (printable_version, int_to_string, warn, warni, warns, warnss)
17379 (warnsss): New error reporting functions. Avoid abort for error.
17382 Added THONG and NOOP for alias processing.
17383 Added SETOPT for the new code that allows setting options with %flags.
17386 Include getopt.h. Add some extern decls.
17387 (safegetc): New function to deal with EOF gracefully.
17388 (literalchar); new function to deal with reading \ escapes.
17389 (lex): Use literalchar.
17390 (lex): Implemented "..." tokens.
17391 (literalchar, lex, parse_percent_token): Made tokenbuffer
17392 always contain the token. This includes growing the token
17393 buffer while reading an integer.
17394 (parse_percent_token): Replaced if-else statement with percent_table.
17395 (parse_percent_token): Added % declarations as another
17396 way to specify the flags -n, -l, and -r. Also added hooks for
17397 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17398 major changes to files.c.
17399 (lex) Retain in the incoming stream a character following
17401 (skip_white_space, lex): Revised most error messages
17402 and changed fatal to warn to avoid aborting.
17403 (percent_table): Added %thong declarations.
17405 * src/gram.h: Comment changes.
17407 * src/files.c (openfiles, open_extra_files, done):
17409 and actfile file. Handle noparserflag. Both for -n switch.
17411 * src/conflicts.c (resolve_sr_conflict):
17412 Remove use of alloca.
17414 1995-06-01 Jim Meyering <meyering@gnu.org>
17416 * doc/bison.texinfo: *** empty log message ***
17418 1995-05-06 Richard Stallman <rms@gnu.org>
17420 * src/bison.s1: Comment change.
17422 1995-05-06 Richard Stallman <rms@gnu.org>
17424 * bison.simple: Comment change.
17426 1995-05-03 Richard Stallman <rms@gnu.org>
17428 * src/version.c: Version now 1.24.
17430 * src/bison.s1: Change distribution terms.
17432 * src/version.c: Version now 1.23.
17434 1995-05-03 Richard Stallman <rms@gnu.org>
17436 * doc/bison.texinfo:
17437 Rewrite "Conditions for Using Bison".
17438 Update version to 1.24.
17440 1995-05-03 Richard Stallman <rms@gnu.org>
17442 * bison.simple: Change distribution terms.
17444 1995-02-23 Richard Stallman <rms@gnu.org>
17446 * src/files.c: Test __VMS_POSIX as well as VMS.
17448 1995-02-14 Jim Meyering <meyering@gnu.org>
17450 * src/bison.s1 (__yy_memcpy):
17451 Renamed from __yy_bcopy to avoid
17452 confusion. Reverse FROM and TO arguments to be consistent with
17455 1995-02-14 Jim Meyering <meyering@gnu.org>
17457 * bison.simple (__yy_memcpy):
17458 Renamed from __yy_bcopy to avoid
17459 confusion. Reverse FROM and TO arguments to be consistent with
17462 1994-11-10 David J. MacKenzie <djm@gnu.org>
17468 * Makefile.in (DISTFILES): Include NEWS.
17470 * Makefile.in (DISTFILES):
17471 Include install-sh, not install.sh.
17473 * configure.in: Update to Autoconf v2 macro names.
17475 1994-10-05 David J. MacKenzie <djm@gnu.org>
17477 * Makefile.in: fix typo
17479 * Makefile.in (prefix, exec_prefix):
17480 Let configure set them.
17482 1994-09-28 David J. MacKenzie <djm@gnu.org>
17484 * Makefile.in: Set datadir to $(prefix)/share.
17486 1994-09-15 Richard Stallman <rms@gnu.org>
17489 Update copyright notice and GPL version.
17491 1994-09-15 Richard Stallman <rms@gnu.org>
17494 Update copyright notice and GPL version.
17496 1994-07-12 Richard Stallman <rms@gnu.org>
17498 * src/reduce.c, src/reader.c:
17501 1994-05-05 David J. MacKenzie <djm@gnu.org>
17503 * Makefile.in: entered into RCS
17505 1994-03-26 Richard Stallman <rms@gnu.org>
17507 * src/bison.s1: entered into RCS
17509 1994-03-26 Richard Stallman <rms@gnu.org>
17511 * bison.simple: entered into RCS
17513 1994-03-25 Richard Stallman <rms@gnu.org>
17515 * src/main.c: entered into RCS
17517 1994-03-24 Richard Stallman <rms@gnu.org>
17519 * src/conflicts.c: entered into RCS
17521 1994-01-02 Richard Stallman <rms@gnu.org>
17523 * Makefile.in: *** empty log message ***
17525 1993-11-21 Richard Stallman <rms@gnu.org>
17527 * src/bison.s1: *** empty log message ***
17529 1993-11-21 Richard Stallman <rms@gnu.org>
17531 * doc/bison.texinfo: entered into RCS
17533 * doc/bison.texinfo: *** empty log message ***
17535 1993-11-21 Richard Stallman <rms@gnu.org>
17537 * bison.simple: *** empty log message ***
17539 1993-10-25 David J. MacKenzie <djm@gnu.org>
17541 * doc/bison.texinfo: *** empty log message ***
17543 1993-10-19 Richard Stallman <rms@gnu.org>
17545 * src/bison.s1: *** empty log message ***
17547 1993-10-19 Richard Stallman <rms@gnu.org>
17549 * bison.simple: *** empty log message ***
17551 1993-10-14 Richard Stallman <rms@gnu.org>
17553 * src/bison.s1: *** empty log message ***
17555 1993-10-14 Richard Stallman <rms@gnu.org>
17557 * bison.simple: *** empty log message ***
17559 1993-09-14 David J. MacKenzie <djm@gnu.org>
17561 * doc/bison.texinfo: *** empty log message ***
17563 1993-09-13 Noah Friedman <friedman@gnu.org>
17565 * Makefile.in: *** empty log message ***
17567 1993-09-10 Richard Stallman <rms@gnu.org>
17569 * src/conflicts.c: *** empty log message ***
17571 * src/system.h: entered into RCS
17573 1993-09-10 Richard Stallman <rms@gnu.org>
17575 * doc/bison.1: entered into RCS
17577 1993-09-06 Noah Friedman <friedman@gnu.org>
17579 * src/version.c: entered into RCS
17581 1993-09-06 Noah Friedman <friedman@gnu.org>
17583 * Makefile.in: *** empty log message ***
17585 1993-07-30 David J. MacKenzie <djm@gnu.org>
17587 * Makefile.in: *** empty log message ***
17589 1993-07-24 Richard Stallman <rms@gnu.org>
17591 * src/bison.s1: *** empty log message ***
17593 1993-07-24 Richard Stallman <rms@gnu.org>
17595 * bison.simple: *** empty log message ***
17597 1993-07-08 David J. MacKenzie <djm@gnu.org>
17599 * Makefile.in: *** empty log message ***
17601 1993-07-04 Richard Stallman <rms@gnu.org>
17603 * src/bison.s1: *** empty log message ***
17605 1993-07-04 Richard Stallman <rms@gnu.org>
17607 * bison.simple: *** empty log message ***
17609 1993-06-26 David J. MacKenzie <djm@gnu.org>
17611 * src/getargs.c: entered into RCS
17613 1993-06-26 David J. MacKenzie <djm@gnu.org>
17615 * doc/bison.texinfo: *** empty log message ***
17617 * doc/bison.1: New file.
17619 1993-06-25 Richard Stallman <rms@gnu.org>
17621 * src/getargs.c: New file.
17623 1993-06-16 Richard Stallman <rms@gnu.org>
17625 * src/bison.s1: *** empty log message ***
17627 1993-06-16 Richard Stallman <rms@gnu.org>
17629 * bison.simple: *** empty log message ***
17631 1993-06-03 Richard Stallman <rms@gnu.org>
17633 * src/bison.s1: New file.
17635 1993-06-03 Richard Stallman <rms@gnu.org>
17637 * doc/bison.texinfo: *** empty log message ***
17639 1993-06-03 Richard Stallman <rms@gnu.org>
17641 * bison.simple: New file.
17643 1993-05-19 Richard Stallman <rms@gnu.org>
17645 * doc/bison.texinfo: New file.
17647 1993-05-07 Noah Friedman <friedman@gnu.org>
17649 * Makefile.in: *** empty log message ***
17651 1993-04-28 Noah Friedman <friedman@gnu.org>
17653 * src/reader.c: *** empty log message ***
17655 1993-04-23 Noah Friedman <friedman@gnu.org>
17657 * src/alloc.h: entered into RCS
17659 1993-04-20 David J. MacKenzie <djm@gnu.org>
17661 * src/version.c: *** empty log message ***
17663 * src/files.c, src/allocate.c:
17666 * src/reader.c: *** empty log message ***
17668 * src/lex.c: entered into RCS
17670 * src/conflicts.c: New file.
17672 * src/symtab.c: entered into RCS
17674 * src/alloc.h: New file.
17676 * src/LR0.c: entered into RCS
17678 1993-04-18 Noah Friedman <friedman@gnu.org>
17680 * src/reader.c: New file.
17682 * src/version.c: *** empty log message ***
17684 1993-04-18 Noah Friedman <friedman@gnu.org>
17686 * Makefile.in: *** empty log message ***
17688 1993-04-17 Noah Friedman <friedman@gnu.org>
17690 * Makefile.in: *** empty log message ***
17692 1993-04-15 Richard Stallman <rms@gnu.org>
17694 * src/main.c, src/files.c:
17697 1993-04-15 Noah Friedman <friedman@gnu.org>
17699 * configure.in: entered into RCS
17701 * configure.in: *** empty log message ***
17703 * configure.in: New file.
17705 1993-04-14 Richard Stallman <rms@gnu.org>
17707 * Makefile.in: New file.
17709 1993-04-13 Richard Stallman <rms@gnu.org>
17711 * src/version.c: New file.
17713 1993-03-25 Richard Stallman <rms@gnu.org>
17715 * src/output.c: entered into RCS
17717 1992-09-25 Richard Stallman <rms@gnu.org>
17719 * configure.bat: entered into RCS
17721 1992-06-22 Richard Stallman <rms@gnu.org>
17723 * src/vmsgetargs.c: entered into RCS
17725 1992-06-22 Richard Stallman <rms@gnu.org>
17727 * doc/bison.rnh: entered into RCS
17729 1992-04-20 David J. MacKenzie <djm@gnu.org>
17731 * README: entered into RCS
17733 1992-01-22 Richard Stallman <rms@gnu.org>
17735 * src/machine.h: entered into RCS
17737 1991-12-21 Richard Stallman <rms@gnu.org>
17739 * src/lalr.c, src/closure.c:
17742 1991-12-20 Richard Stallman <rms@gnu.org>
17744 * src/state.h: entered into RCS
17746 1991-12-18 Richard Stallman <rms@gnu.org>
17748 * src/print.c, src/nullable.c, src/derives.c:
17751 1991-11-03 David J. MacKenzie <djm@gnu.org>
17753 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17756 1988-09-09 Richard Stallman <rms@gnu.org>
17758 * src/bison.hairy: entered into RCS
17760 1987-12-16 Richard Stallman <rms@gnu.org>
17762 * REFERENCES: entered into RCS
17767 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17768 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17769 Software Foundation, Inc.
17771 Copying and distribution of this file, with or without
17772 modification, are permitted provided the copyright notice and this
17773 notice are preserved.