1 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
3 maint: re-anchor all .gitignore entries.
4 * bootstrap: Copy from gnulib's latest for the fix to
5 automatically anchor entries it constructs.
6 * gnulib: Update to latest just so it has the same bootstrap.
7 * .gitignore, build-aux/.gitignore, doc/.gitignore:
8 * lib/.gitignore, m4/.gitignore, po/.gitignore:
9 * runtime-po/.gitignore: Re-anchor all entries.
11 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
13 Fix portability problem on OpenBSD 4.7.
15 Jim Meyering reported this in
16 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
17 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
18 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
20 * src/parse-gram.c, src/parse-gram.h: Regenerate.
21 * tests/regression.at: Tamper with the renamed witness.
23 Adjust to recent changes to gnulib bootstrap.
25 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
26 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
27 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
28 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
29 anymore and don't know of anybody else who does. If someone needs
30 these files, they can resurrect them.
31 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
32 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
33 Omit leading '/', since bootstrap omits it.
34 Adjust file names to match current contents better.
35 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
36 installed just for us.
37 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
38 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
39 needed somehow. Don't have time to look into why.
40 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
41 the GNU malloc behavior, where malloc (0) != NULL unless we're
42 out of storage? If not, we can omit malloc-gnu; but for now I left
45 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
48 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
51 * NEWS (2.4.3): Set date.
53 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
55 maint: add gettext version to release announcements.
56 Suggested by Paul Hilfinger at
57 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
58 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
59 * cfg.mk (bootstrap-tools): Add gettext.
61 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
63 doc: fix -W and %expect documentation some.
64 * NEWS (2.4.3): Mention that there are documentation fixes.
65 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
66 turns conflicts into errors not warnings.
67 (Shift/Reduce): Likewise.
68 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
70 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
72 -Werror: fix for rules useless in parser after conflicts.
73 * NEWS (2.4.3): Document fix.
74 * src/complain.c (error_message): Extend to handle incomplete
75 error messages so warn and warn_at can be used in more cases.
76 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
77 -Werror is always obeyed.
78 * src/reduce.c (reduce_print): Use warn so that the "warnings
79 being treated as errors" message is printed consistently before
80 the first warning message. This makes testing easier.
81 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
82 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
83 --warnings=error when warnings appear in bison's stderr.
85 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
87 maint: enable gnits only at stable releases.
88 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
89 version string should disable gnits. Explain in comments.
91 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
94 * po/POTFILES.in: Add src/graphviz.c.
96 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
99 * po/POTFILES.in: Add remaining gnulib files that have
100 translatable strings.
102 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
104 maint: use announce-gen's new --mail-headers.
105 * HACKING (Announce): Update instructions.
106 * cfg.mk (announcement_Cc_): Define.
107 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
108 required by latest gnulib.
109 * gnulib: Update to latest.
111 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
113 tests: handle Valgrind that complains about >&-.
114 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
115 (Output files: -dv >&-): Skip test group if running
116 maintainer-check-valgrind.
118 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
120 Update from GFDL GFDL 1.2 to 1.3.
121 * doc/bison.texinfo: Update GFDL version number.
122 * doc/fdl.texi: Update to version 1.3, taken from:
123 http://www.gnu.org/licenses/fdl.texi
125 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
127 Do not use date ranges in copyright notices.
128 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
130 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
131 * TODO, bootstrap, bootstrap.conf:
132 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
133 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
134 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
135 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
136 * data/lalr1.java, data/location.cc:
137 * data/xslt/bison.xsl:
138 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
139 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
140 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
141 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
142 * djgpp/subpipe.c, djgpp/subpipe.h:
143 * djgpp/testsuite.sed, doc/bison.texinfo:
144 * doc/refcard.tex, etc/README, etc/bench.pl.in:
145 * examples/calc++/Makefile.am, examples/extexi:
146 * lib/abitset.c, lib/abitset.h:
147 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
148 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
149 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
150 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
151 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
152 * lib/libiberty.h, lib/main.c, lib/timevar.c:
153 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
154 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
155 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
156 * src/AnnotationList.c, src/AnnotationList.h:
157 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
158 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
159 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
160 * src/complain.h, src/conflicts.c, src/conflicts.h:
161 * src/derives.c, src/derives.h, src/files.c, src/files.h:
162 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
163 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
164 * src/ielr.h, src/lalr.c, src/lalr.h:
165 * src/location.c, src/location.h, src/main.c:
166 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
167 * src/named-ref.h, src/nullable.c, src/nullable.h:
168 * src/output.c, src/output.h, src/parse-gram.y:
169 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
170 * src/print_graph.c, src/print_graph.h, src/reader.c:
171 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
172 * src/relation.h, src/scan-code.h, src/scan-code.l:
173 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
174 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
175 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
176 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
177 * tests/actions.at, tests/atlocal.in, tests/c++.at:
178 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
179 * tests/existing.at, tests/glr-regression.at:
180 * tests/headers.at, tests/input.at, tests/java.at:
181 * tests/local.at, tests/named-refs.at:
182 * tests/output.at, tests/push.at, tests/reduce.at:
183 * tests/regression.at, tests/sets.at, tests/skeletons.at:
184 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
185 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
186 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
188 Don't use date ranges in copyright notices.
190 2010-05-11 Akim Demaille <demaille@gostai.com>
192 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
193 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
194 header file to the implementation file, after the user %code
196 * NEWS (2.5): Document this.
198 2010-05-07 Akim Demaille <demaille@gostai.com>
201 * data/lalr1.cc (YYRHSLOC): New.
202 (YYLLOC_DEFAULT): Use it.
203 * data/glr.cc: If location_type was user defined, do not include
204 location.hh, and do not produce location.hh and position.hh.
205 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
206 Check that glr.cc supports user defined location_type.
207 * NEWS: Document this.
209 2010-05-10 Akim Demaille <demaille@gostai.com>
211 doc: fix lalr1.cc documentation.
212 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
213 (C++ Bison Interface): Fix lalr1.cc skeleton name.
214 (C++ Parser Interface): Fix semantic_type and location_type names.
215 Document yy::parser::token.
216 Reported by Jerry Quinn.
218 2010-05-04 Akim Demaille <demaille@gostai.com>
220 lalr1.cc: don't generate location.hh when location_type is defined
221 * data/bison.m4 (b4_percent_define_use): New.
222 (b4_percent_define_get): Use it.
223 Accept a default value.
224 * data/c++.m4: Do not provide a default value for the %define
225 variable location_type, rather, use b4_percent_define_get with a
226 default argument where its value is needed.
227 * data/lalr1.cc: Do not load location.cc (which outputs both
228 location.hh and position.hh) if the user defined location_type.
229 Do not include location.hh either.
230 * data/glr.cc: Likewise.
232 2010-05-04 Akim Demaille <demaille@gostai.com>
234 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
235 * tests/calc.at (Span): Instead of begin/end, as in the built-in
236 location class, use first and last.
237 Define YYLLOC_DEFAULT to adjust to these changes.
238 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
239 location_type changes.
241 2010-05-04 Akim Demaille <demaille@gostai.com>
243 tests: enhance AT_SYNCLINES_COMPILE.
244 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
246 (AT_SYNCLINES_COMPILE): here.
247 Add more distcc patterns.
249 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
251 tests: fix maintainer-xml-check.
252 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
253 Update output to include comments now produced by --graph.
254 (xsl:template match="automaton"): As for --graph, name the
255 digraph after the grammar file.
256 * src/print-xml.c (escape_bufs): Enlarge array.
257 (print_xml): Add bug-report and url attributes to
258 bison-xml-report element.
260 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
262 In DOT output, convert from "/*" comments to "//" comments.
263 This handles the possibility that a "*/" might appear in
264 variable portions of those comments at some point in the future.
265 * src/graphviz.c (start_graph): Implement.
267 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
269 Document that undefined %prec identifier warnings will remain.
270 * NEWS (2.4.3): Here.
273 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
275 Revert 2009-12-30 change for undefined %prec token complaints.
276 That is, keep them as warnings because that should be sufficient
277 to satisfy POSIX without creating backward compatibility issues.
278 Suggested by Richard Stallman at
279 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
280 * NEWS (2.5): Remove mention of complaint.
281 * src/reader.c (grammar_rule_check): Convert complaint back to
283 * tests/input.at (%prec's token must be defined): Update.
285 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
287 build: don't require src/bison during bootstrap.
288 Suggested by Eric Blake at
289 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
290 * bootstrap.conf (bootstrap_epilogue): New function to make sure
291 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
293 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
295 i18n: fix untranslatable string.
296 Reported by Goran Uddeborg at
297 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
298 * src/muscle-tab.c (muscle_percent_define_insert): Here.
300 2010-04-13 Akim Demaille <demaille@gostai.com>
302 tests: calc: minor refactoring.
303 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
305 2010-04-13 Akim Demaille <demaille@gostai.com>
307 tests: calc: simplify location management.
308 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
309 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
310 define the appropriate AT_LOC accessors.
311 * tests/calc.at: Use AT_LOC accessors.
313 2010-04-13 Akim Demaille <demaille@gostai.com>
316 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
317 Define AT_LOCATION_TYPE_IF.
318 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
319 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
320 used, provide a user location type and use it.
321 (Simple LALR1 C++ Calculator): Add a test case for location_type.
323 2010-04-13 Akim Demaille <demaille@gostai.com>
325 tests: check fclose's return value.
326 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
328 2010-04-13 Akim Demaille <demaille@gostai.com>
330 tests: don't depend on the actual location type.
331 * tests/calc.at: Use yy::parser::location_type rather than
332 yy::location, since the former is always right, and might point to
333 another type than the latter.
335 2010-04-13 Akim Demaille <demaille@gostai.com>
338 * tests/calc.at: Formatting changes.
340 2010-04-13 Akim Demaille <demaille@gostai.com>
342 lalr1.cc: remove useless forward declaration.
343 * data/lalr1.cc: Include location.hh before stack.hh.
344 Remove the useless forward declarations of position and location.
345 Reported by Chris Morley.
346 * data/glr.cc: Likewise.
348 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
350 * NEWS (2.4.3): Mention fix for Sun Studio C++.
352 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
354 tests: fix for newer Sun Studio C++.
355 Reported by Dagobert Michelsen at
356 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
357 * THANKS (Dagobert Michelsen): Add.
358 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
359 Autoconf macro for handling the restrict keyword.
360 * gnulib: Update to latest, which no longer overrides that macro
363 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
365 portability: fix pointer arithmetic to conform to C standard.
366 Reported by Tys Lefering at
367 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
368 This fix is already implemented in glr.c and does not apply to
370 * data/lalr1.cc (yy::parser::parse): Increase size of
371 yyerror_range and adjust subscripting so you don't have to
372 subtract one from the beginning of the array.
373 * data/yacc.c (b4_declare_parser_state_variables,
374 yyparse, yypush_parse): Likewise.
376 2010-04-05 Akim Demaille <demaille@gostai.com>
378 remove useless include.
379 * src/graphviz.h: Don't include stdbool.h.
381 2010-04-05 Akim Demaille <demaille@gostai.com>
383 graph: sign the output file.
384 * src/graphviz.c (start_graph): Issue comments about Bison.
385 Suggested by Tys Lefering.
387 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
389 portability: fix test suite for GCC 4.5's new #error message.
390 Reported by Tys Lefering at
391 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
392 * NEWS (2.4.3): Mention.
393 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
395 2010-03-30 Akim Demaille <demaille@gostai.com>
398 * src/graphviz.h: Add missing license notice.
401 2010-03-25 Akim Demaille <demaille@gostai.com>
403 tests: fix 250: parse.error=verbose overflow.
404 * tests/regression.at (parse.error=verbose overflow): Avoid the
405 double inclusion of stdlib.h as it triggers hard errors.
407 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
409 portability: fix for BSD make.
410 Reported by Johan van Selst at
411 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
412 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
413 this dependency list as in package.m4's target rule.
415 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
417 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
418 Reported by Johan van Selst at
419 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
421 * THANKS (Johan van Selst): Add.
422 * gnulib: Update to latest.
424 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
426 maint: update for changes to gnulib's announce-gen.
427 * HACKING (Announce): RELEASE_TYPE=major must now be written
430 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
433 * NEWS (2.4.2): Set version and date. For the recent test suite
434 portability fixes, don't be so optimistic about their success
435 given the lack of feedback on the affected platforms.
437 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
439 tests: fix maintainer-xml-check for recent changes.
440 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
441 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
442 output file whose name conflicts with a previous output file
443 is now never generated.
445 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
447 portability: fix several issues with M4 subprocess.
449 M4's output pipe was not being drained upon fatal errors during
450 scan_skel. As a result, broken-pipe messages from M4 were seen
451 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
452 failure in the test suite. The problem was that, on platforms
453 where the default disposition for SIGPIPE is ignore instead of
454 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
455 then reported it. However, there's some sort of race condition,
456 because the new test group occasionally succeeded.
457 Reported by Albert Chin at
458 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
460 There were also problems with the test suite livelocking on
461 Tru64 5.1b. Reported by Didier Godefroy at
462 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
463 Switching to create_pipe_bidi suggested by Akim Demaille.
465 To attempt to solve both of these problems, switch to gnulib's
466 create_pipe_bidi and register M4 process as a slave. Along the
467 way, clean up file name conflict handling, which was affected by
468 the broken-pipe problem before the switch.
469 * NEWS (2.4.2): Document.
470 * THANKS (Didier Godefroy): Add.
471 * bootstrap.conf (gnulib_modules): Add pipe.
472 * gnulib: Update to latest to make sure we have all the latest
474 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
476 * po/POTFILES.in (lib/subpipe.c): Remove.
477 * src/files.c (compute_output_file_names): Update invocations
478 of output_file_name_check.
479 (output_file_name_check): In the case that the grammar file
480 would be overwritten, use complain instead of fatal, but replace
481 the output file name with /dev/null. Use the /dev/null solution
482 for the case of two conflicting output files as well because it
483 seems safer in case Bison one day tries to open both files at
485 * src/files.h (output_file_name_check): Update prototype.
486 * src/output.c (output_skeleton): Use create_pipe_bidi and
487 wait_subprocess. Assert that scan_skel completely drains the
489 * src/scan-skel.l (at_directive_perform): Update
490 output_file_name_check invocation.
491 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
492 grammar file actually isn't overwritten.
493 (Conflicting output files: -o foo.y): Update expected output.
494 * tests/skeletons.at (Fatal errors but M4 continues producing
495 output): New test group.
497 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
500 * HACKING (Release Procedure): Add reminder about keeping
501 POTFILES files up-to-date.
502 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
504 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
507 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
508 which is already defined in atconfig.
510 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
512 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
514 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
516 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
517 * HACKING (Release Procedure): Update notes on copyright years.
518 * Makefile.am (update-package-copyright-year): New target rule.
519 * build-aux/update-package-copyright-year: New file.
520 * cfg.mk (update-copyright): Add update-package-copyright-year
523 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
525 * bootstrap: Import improvements from latest gnulib.
527 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
529 build: require Automake 1.11.1 to avoid a security flaw.
530 * HACKING (Release Procedure): Don't document Automake security
532 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
535 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
537 gnulib: update to latest.
539 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
541 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
543 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
545 Thank the developer of the initial push parser implementation.
546 This unfortunate oversight is several years old.
547 * THANKS (Odd Arild Olsen): Add.
549 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
551 Fix some comments concerning LR(0) versus LALR(1).
553 Stop equating LR(0) with nondeterminism and LALR(1) with
554 determinism. That is, if all states are consistent, then LR(0)
555 tables are deterministic. On the other hand, LALR(1) tables
556 might be nondeterministic before conflict resolution, and GLR
557 permits LALR(1) tables to remain nondeterministic.
558 * src/LR0.c, src/LR0.h: Here.
559 * src/lalr.c, src/lalr.h: Here.
560 * src/main.c (main): Here.
561 * src/state.c, src/state.h: Here.
563 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
566 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
568 maint: run "make update-copyright"
570 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
572 POSIX: complain if %prec's token was not defined.
573 * NEWS (2.5): Document.
574 * src/reader.c (grammar_rule_check): Convert warning to
576 * tests/input.at (%prec's token must be defined): Update.
578 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
580 POSIX: warn if %prec's token was not defined.
581 Reported by Florian Krohm at
582 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
583 * NEWS (2.4.2): Document.
584 * src/reader.c (grammar_rule_check): Implement.
585 (grammar_current_rule_prec_set): Add comments explaining that we
586 here assume a %prec identifier is a token, but we still manage
588 * tests/input.at (%prec's token must be defined): New test
591 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
593 * HACKING (Release Procedure): Recommend a secure automake.
595 2008-12-11 Akim Demaille <demaille@gostai.com>
597 Propagate i18n changes into glr.c.
598 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
599 building the error message format dynamically.
600 * data/lalr1.java: Formatting changes.
602 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
604 Port small part of master's 11707b2b so future ports are easier.
605 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
607 2008-12-11 Akim Demaille <demaille@gostai.com>
609 Simplify the i18n of the error messages.
610 * data/lalr1.cc: Comment changes.
612 2008-11-11 Akim Demaille <demaille@gostai.com>
615 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
618 2008-11-11 Akim Demaille <demaille@gostai.com>
620 Support i18n of the parse error messages.
621 * TODO (lalr1.cc/I18n): Remove.
622 * data/lalr1.cc (yysyntax_error_): Support the translation of the
623 error messages, as done in yacc.c.
624 Stay within the yy* pseudo namespace.
626 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
628 Port small part of master's 8901f32e so future ports are easier.
629 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
630 argument, but name it in the function definition only when
631 verbose error messages are enabled and it'll thus be used.
632 (yy::parser::parse): Update use of yysyntax_error_.
634 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
636 portability: `<' and `>' are not always defined on addresses.
637 Specifically, don't sort objects by their memory addresses when
638 they're not allocated in the same array or other object. Though
639 I haven't found a test case where that fails on my platform, C
640 says the behavior is undefined.
641 * src/AnnotationList.c (AnnotationList__insertInto): Remove
642 FIXME. Use new id field of InadequacyList nodes rather than
643 their memory addresses when sorting.
644 (AnnotationList__compute_from_inadequacies): Add
645 inadequacy_list_node_count argument to pass to
646 InadequacyList__new_conflict.
647 * src/AnnotationList.h
648 (AnnotationList__compute_from_inadequacies): Update prototype
649 and documentation for new argument.
650 * src/InadequacyList.c (InadequacyList__new_conflict): Add
651 node_count argument and use it to assign a unique ID.
652 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
653 (InadequacyList): Add id field.
654 (InadequacyList__new_conflict): Update prototype and
655 documentation for new argument.
656 * src/ielr.c (ielr_compute_annotation_lists): Update
657 AnnotationList__compute_from_inadequacies invocation.
659 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
661 Fix handling of yychar manipulation in user semantic actions.
662 The problem was that yacc.c didn't always update the yychar
663 translation afterwards. However, other skeletons appear to be
664 fine. glr.c appears to already translate yychar before every
665 use. lalr1.cc does not define yychar and does not document its
666 replacement, yyla, for users. It does provide yyclearin, but
667 that does not manipulate yyla and thus requires no translation
668 update. In lalr1.java, yychar is out of scope during semantic
670 * NEWS (2.5): Document.
671 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
673 (yyparse, yypush_parse): Instead, translate before every use of
674 yytoken, and add comments explaining this approach.
675 * tests/actions.at (Destroying lookahead assigned by semantic
676 action): New test group checking that translation happens before
677 lookahead destructor calls at parser return. Previously,
678 incorrect destructors were called.
679 * tests/conflicts.at (%error-verbose and consistent
680 errors): New test group checking that translation happens at
681 syntax error detection before the associated verbose error
682 message and the associated lookahead destructor calls. While
683 the destructor call is fixed by this patch, the verbose error
684 message is currently incorrect due to another bug (see
685 comments in test group), so this is an expected failure for now.
687 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
689 YYFAIL: warn about uses and remove from lalr1.java.
690 * NEWS (2.5): Document.
691 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
692 and make it private. Update all uses.
693 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
695 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
698 * NEWS (2.4.2): Document deprecation and the phase-out plan.
699 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
701 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
702 YYFAIL from GCC cpp's -Wunused-macros.
703 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
705 (LocalWords): Remove YYFAIL.
707 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
710 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
711 function, which is no longer used.
713 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
715 Add gcc's -Wundef to test suite and fix another warning from it.
716 * NEWS (2.4.2): Update description of -Wundef fix.
717 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
718 (WARN_CFLAGS_TEST): New substitution.
719 * data/glr.c: Avoid warning about __STRICT_ANSI__.
720 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
722 (NO_WERROR_CFLAGS): Likewise.
723 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
725 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
727 * data/yacc.c: Reformat m4 a little.
729 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
731 Document gcc -Wundef fix.
732 * NEWS (2.4.2): Here.
733 * THANKS (Jonathan Nieder): Add.
735 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
737 Simplify y.tab.c when location tracking is disabled.
738 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
739 tracking is not enabled. Instead, unconditionally define
740 YY_LOCATION_PRINT as a no-op for backward compatibility.
742 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
744 Avoid warnings from gcc -Wundef y.tab.c.
745 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
746 defined before using them.
747 * data/lalr1.cc: Likewise.
748 * data/yacc.c: Likewise.
750 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
752 autoconf: update to latest for fix of M4 detection.
753 Reported by Eric Blake.
754 * submodules/autoconf: Update.
756 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
758 portability: use -DGNULIB_POSIXCHECK.
759 Reported by Eric Blake. See discussions at
760 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
762 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
763 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
764 * bootstrap.conf (gnulib_modules): Add all the printf modules
765 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
766 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
767 (excluded_files): Remove m4/printf-posix.m4.
768 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
769 lib/libbison.a so gnulib libraries can be linked.
771 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
773 Enable assertion output and --disable-assert for configure.
774 * bootstrap.conf (gnulib_modules): Add assert module.
775 * src/system.h (aver): Define as assert, and summarize the
776 discussion on this issue.
778 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
780 Expand GLR acronym in summary of Bison.
781 Based on discussion with Akim Demaille starting at
782 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
783 * doc/bison.texinfo (Introduction): Here.
784 * src/getargs.c (usage): Here.
786 2009-10-03 Alex Rozenman <rozenman@gmail.com>
788 Document named references.
789 * doc/bison.texinfo (Actions): Add new example and xref to
790 Using Named References node.
791 (Using Named References): New node.
793 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
796 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
798 (Sbitset__isEmpty): Use Sbitset instead of char*.
799 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
800 instead of char. This helps to avoid casting errors.
801 (Sbitset__or): Use Sbitset instead of char*.
803 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
805 portability: don't assume 8-bit bytes.
806 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
807 * src/Sbitset.h (Sbitset__nbytes): Here.
808 (Sbitset__byteAddress): Here.
809 (Sbitset__bit_mask): Here.
810 (Sbitset__last_byte_mask): Here.
811 (Sbitset__ones): Here.
812 (SBITSET__FOR_EACH): Here.
814 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
816 portability: use va_start and va_end in the same function.
817 * src/complain.c (error_message): Move va_end from here...
818 (ERROR_MESSAGE): ... to here.
820 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
822 * data/bison.m4: Update comments for rename to muscle-tab.h.
824 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
826 Rename muscle_tab.* to muscle-tab.* for consistency with master.
827 * src/Makefile.am (bison_SOURCES): Update.
828 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
829 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
830 src/tables.c: Update include.
831 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
832 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
835 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
838 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
839 replace all uses with UNIQSTR_CONCAT.
840 * src/uniqstr.c (uniqstr_vsprintf): New function.
841 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
842 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
845 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
848 * src/parse-gram.y: Clean up sorting of declarations.
849 Use types to simplify %printer declarations where possible.
850 Provide %printer for BRACKETED_ID and symbol.prec.
851 * src/symtab.c: Whitespace change.
853 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
855 tests: skip tests of file names that platform does not support.
856 Reported by Michael Raskin at
857 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
858 * THANKS (Michael Raskin): Add.
859 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
860 to fail at least for file names containing ":" or "\".
862 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
864 yysyntax_error: avoid duplicate lookahead collection.
865 Except when memory reallocation is required, this change
866 eliminates the need to invoke yysyntax_error twice and thus to
867 repeat the collection of lookaheads. It also prepares for
868 future extensions that will make those repetitions more
869 expensive and that will require additional memory management in
870 yysyntax_error. Finally, it fixes an obscure bug already
871 exercised in the test suite.
872 * data/yacc.c (yysyntax_error): Add arguments for message
873 buffer variables stored in the parser. Instead of size, return
874 status similar to yyparse status but indicating success of
875 message creation. Other than the actual reallocation of the
876 message buffer, import and clean up memory management code
878 (yyparse, yypush_parse): ... here.
879 * tests/regression.at (%error-verbose overflow): No longer an
882 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
884 yysyntax_error: test memory management more.
885 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
886 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
888 (%error-verbose overflow): New test group that reveals an
889 obscure bug. Expected fail for now.
891 2008-12-11 Akim Demaille <demaille@gostai.com>
893 Pass the token type to yysyntax_error.
894 * data/yacc.c (yysyntax_error): Take the transated token instead
898 2008-12-11 Akim Demaille <demaille@gostai.com>
900 Simplify the i18n of the error messages.
901 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
902 of building dynamically the format string.
904 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
907 * src/symtab.c (symbol_pack): Here because every symbol's number
908 is always defined by this time.
910 2009-10-03 Alex Rozenman <rozenman@gmail.com>
912 Add additional space after periods in NEWS.
915 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
917 Use the correct conversion specifier for size_t.
918 Reported by Jim Meyering.
919 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
920 because Sbitset__Index is size_t.
921 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
923 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
925 tests: don't abuse AT_BISON_CHECK.
926 * tests/regression.at (parse-gram.y: LALR = IELR): Move
927 additional shell commands outside of AT_BISON_CHECK.
929 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
931 tests: check that parse-gram.y's IELR and LALR are identical.
932 * tests/atlocal.in (abs_top_srcdir): New shell variable.
933 * tests/regression.at (parse-gram.y: LALR = IELR): New test
936 2009-09-16 Akim Demaille <demaille@gostai.com>
938 doc: comment changes.
939 * doc/bison.texinfo: Comment changes.
941 2009-09-16 Akim Demaille <demaille@gostai.com>
944 * doc/bison.texinfo: here.
946 2009-09-19 Alex Rozenman <rozenman@gmail.com>
948 Keep sub-messages aligned. Fix strings for translation.
949 * src/location.h (location_print): Add return value.
950 * src/location.c (location_print): Return number of printed
952 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
954 * src/complain.cpp (indent_ptr): New static variable.
955 (error_message, complain_at_indent, warn_at_indent): Implement
956 the alignment mechanism.
957 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
958 for translations. Use new alignment mechanism.
959 * tests/named-ref.at: Adjust test-cases.
960 * NEWS (2.5): Add an announcement about named references.
962 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
964 tests: clean up push.at test group titles.
965 * tests/push.at: Remove "Push Parsing: " from test group titles
966 because these are already under the banner "Push Parsing Tests".
968 2009-09-12 Alex Rozenman <rozenman@gmail.com>
970 Provide an additional sub-message for clarity.
971 Add "symbol not found in production" error message when
972 an "invalid reference" is detected in named references
974 * src/scan-code.l: Update "invalid reference" case.
975 * tests/named-ref.at: Adjust test-cases.
977 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
979 Clean up yacc.c a little.
980 * data/yacc.c: Clean up M4 for readability, and make output
981 whitespace more consistent. For the main parse function
982 comment, instead of saying "yyparse or yypush_parse", say either
983 "yyparse" or "yypush_parse" depending on which it actually is.
985 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
987 Complain about unused %define variables and %code qualifiers.
988 * NEWS (2.5): Document.
989 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
990 * doc/bison.texinfo (Decl Summary): Document complaint, and
991 improve %define documentation a little otherwise.
992 * tests/input.at (Reject unused %code qualifiers): Update.
993 (%define errors): Update.
994 (%define, --define, --force-define): Update.
995 (%define backward compatibility): Update.
996 (Unused %define api.pure): Update.
997 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
999 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1001 Use aver not assert.
1002 * src/output.c: Don't include assert.h.
1003 (output_skeleton): Use aver not assert.
1004 * src/system.h (aver): In documentation of why, add links to
1005 Paul Eggert's explanations in the mailing lists.
1007 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1009 Use "Unresolved reference" error message when no symbols were found
1010 in a symbolic reference resolution. Remove .expr and -expr from
1011 the shown reference when the reference is unresolved.
1012 * src/scan-code.l: Change the error message, adjust location columns,
1013 rename variable "exact_mode" to "explicit_bracketing".
1014 * tests/named-ref.at: Adjust existing tests and add a new one.
1016 2009-09-03 Akim Demaille <demaille@gostai.com>
1018 * NEWS (2.4.2): Add "Internationalization" item.
1020 2009-09-03 Akim Demaille <demaille@gostai.com>
1022 bootstrap: fix/improve find_tool.
1023 * bootstrap (find_tool): Improve error messages.
1024 Fix typo about find_tool_names.
1026 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1028 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1030 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1031 * src/scan-code.h (code_props_rule_action_init): Rename
1032 named_ref arg to name so it doesn't shadow named_ref type. This
1033 makes it consistent with the function definition in scan-code.l
1036 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1038 %define: accept unquoted values.
1039 * NEWS (2.5): Group all %define changes together, and document
1040 this one. Remove quotes in IELR and canonical LR entry.
1041 * doc/bison.texinfo: Remove quotes in most examples throughout.
1042 (Decl Summary): Update %define documentation.
1043 (Table of Symbols): Likewise.
1044 * src/ielr.c (LrType): Update documentation.
1045 * src/parse-gram.y (content.opt): Add production for ID.
1046 * tests/calc.at: Remove quotes in most tests.
1047 * tests/existing.at: Likewise.
1048 * tests/input.at: Likewise.
1049 * tests/local.at: Likewise.
1050 * tests/push.at: Likewise.
1051 * tests/reduce.at: Likewise.
1052 * tests/torture.at: Likewise.
1054 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1056 %define lr.type: make values lowercase IDs.
1057 That is, "LALR" => "lalr", "IELR" => "ielr", and
1058 "canonical LR" => "canonical-lr".
1059 * NEWS (2.5): Update documentation.
1060 * doc/bison.texinfo (Decl Summary): Likewise.
1061 * src/ielr.c (ielr): Use new values.
1062 * src/ielr.h (ielr): Update documentation.
1063 * src/reader.c (prepare_percent_define_front_end_variables): Use
1064 and validate new values.
1065 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1067 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1069 2009-08-27 Eric Blake <ebb9@byu.net>
1071 scan-gram: avoid portability trap with ctype usage.
1072 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1073 Avoid compiler warning.
1075 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1077 tests: use perl for printing special sequences to files.
1078 And skip tests if perl is not available. This is better than
1079 playing tricks with shell portability. Suggested by Akim
1081 * tests/input.at (Bad character literals): Use it here for
1082 omitting final newlines.
1083 (Bad escapes in literals): Use it here for special characters.
1085 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1087 tests: show a use of %define lr.default-reductions "consistent"
1088 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1089 prevents the omission of expected tokens for %error-verbose.
1091 2009-08-26 Akim Demaille <demaille@gostai.com>
1093 tests: portability fix.
1094 * tests/input.at (Bad escapes in literals): Don't expect "echo
1095 '\0'" to output \ then 0.
1097 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1099 Actually handle the yytable zero value correctly this time.
1100 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1101 mention zero values in the YYTABLE comments.
1102 * data/glr.c (yytable_value_is_error): Don't check for zero
1104 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1105 * data/yacc.c (yytable_value_is_error): Likewise.
1106 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1107 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1108 * src/tables.h: In header comments, explain why it's useless to
1109 check for a zero value in yytable.
1111 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1113 More fixes related to last two patches.
1114 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1116 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1117 yytable comments: zero indicates syntax error not default
1119 * data/glr.c (yyis_pact_ninf): Rename to...
1120 (yypact_value_is_default): ... this.
1121 (yyisDefaultedState): Update for rename.
1122 (yyis_table_ninf): Rename to...
1123 (yytable_value_is_error): ... this, and check for value zero
1124 besides just YYTABLE_NINF.
1125 (yygetLRActions): Check for default value from yypact. It
1126 appears that this check is always performed before this function
1127 is invoked, and so adding the check here is probably redundant.
1128 However, the code may evolve after this subtlety is forgotten.
1129 Also, update for rename to yytable_value_is_error. Because that
1130 macro now checks for zero, a different but equivalent branch of
1131 the if-then-else here is evaluated.
1132 (yyreportSyntaxError): Update for rename to
1133 yytable_value_is_error. The zero condition was mishandled
1135 (yyrecoverSyntaxError): Update for renames. No behavioral
1137 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1139 (yy_table_value_is_error_): New function.
1140 (parse): Use new functions where possible. No behavioral
1142 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1143 The zero condition was mishandled before.
1144 * data/yacc.c (yyis_pact_ninf): Rename to...
1145 (yypact_value_is_default): ... this.
1146 (yyis_table_ninf): Rename to...
1147 (yytable_value_is_error): ... this, and check for value zero
1148 besides just YYTABLE_NINF.
1149 (yysyntax_error): Update for rename to yytable_value_is_error.
1150 The zero condition was mishandled before.
1151 (yyparse): Update for renames. No behavioral changes.
1152 * src/tables.h: Improve comments about yypact, yytable, etc.
1153 more. Most importantly, say yytable value of zero means syntax
1154 error not default action.
1156 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1158 Fix %error-verbose for conflicts resolved by %nonassoc.
1159 * NEWS (2.5): Document.
1160 * data/glr.c (yyreportSyntaxError): Fix this by checking
1162 * data/yacc.c (yysyntax_error): Likewise.
1163 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1165 * data/lalr1.java (yysyntax_error): Likewise.
1166 * tests/conflicts.at (%nonassoc and eof): Update expected output
1169 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1171 Some code and documentation improvements.
1172 * data/c.m4 (b4_table_value_equals): New macro to capture
1174 * data/glr.c (yyis_pact_ninf): Use it here.
1175 (yyis_table_ninf): Likewise.
1176 (yyreportSyntaxError): Improve internal comments.
1177 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1178 Use it everywhere possible.
1179 (yyis_table_ninf): Likewise.
1180 (yysyntax_error): Improve internal comments.
1181 * data/lalr1.cc (yysyntax_error_): Likewise.
1182 * data/lalr1.java (yysyntax_error): Likewise.
1183 * src/tables.h: Improve comments about yypact, yytable, etc.
1185 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1187 Use locale when quoting.
1188 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1189 quote rather than implementing quoting here.
1191 2009-08-20 Eric Blake <ebb9@byu.net>
1193 Make previous patch more robust.
1194 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1196 (output_skeleton): Use it.
1197 Suggested by Akim Demaille.
1199 Import latest m4/m4.m4.
1200 * submodules/autoconf: Update to autoconf 2.64.
1201 * configure.ac (M4_GNU_OPTION): New define.
1202 * src/output.c (output_skeleton): Use it to resolve FIXME.
1203 * NEWS: Mention this.
1205 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1207 Fix complaints about escape sequences.
1208 Discussed starting at
1209 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1210 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1211 For a \0 and similar escape sequences meaning the null
1212 character, report an invalid escape sequence instead of an
1213 invalid null character because the latter does not actually
1214 appear in the user's input.
1215 In all escape sequence complaints, don't escape the initial
1216 backslash, and don't quote when the sequence appears at the end
1217 of the complaint line unless there's whitespace that quotearg
1219 Consistently say "invalid" not "unrecognized".
1220 Consistently prefer "empty character literal" over "extra
1221 characters in character literal" warning for invalid escape
1222 sequences; that is, consistently discard those sequences.
1223 * tests/input.at (Bad escapes in literals): New.
1225 2009-08-19 Akim Demaille <demaille@gostai.com>
1228 * doc/bison.texinfo: Fix minor Texinfo errors.
1230 2009-08-19 Akim Demaille <demaille@gostai.com>
1232 doc: %initial-action to initialize yylloc.
1233 Reported by Bill Allombert.
1234 * doc/bison.texinfo: Set fill-column to 76.
1235 (Location Type): Document the use of %initial-action to initialize
1238 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1240 maint: update for gnulib's recent update-copyright changes
1242 * .x-update-copyright (COPYING): Add as it's no longer implied
1243 when .x-update-copyright is present.
1244 * cfg.mk (update-copyright-local): Remove, now ignored.
1245 (update-copyright): Declare update-b4-copyright as a dependency.
1247 2009-08-17 Akim Demaille <demaille@gostai.com>
1249 build: require gettext 0.17.
1251 Suggested by Bruno Haible.
1252 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1253 * configure.ac: require gettext 0.17 to ensure compatibility with
1256 2009-08-17 Akim Demaille <demaille@gostai.com>
1258 build: lower gettext requirements.
1260 Bison was uselessly requiring the formatstring macros from
1261 gettext, which resulted in mo files not being installed on systems
1262 that perfectly supported Bison mo files. Lower the requirement.
1263 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1265 * configure.ac: Require need-ngettext instead of
1266 need-formatstring-macros.
1267 Reported by Martin Jabocs.
1268 Suggested by Bruno Haible.
1269 * INSTALL: Restructure.
1270 (Internationalization): New.
1272 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1274 maint: fix use of copyright year intervals.
1276 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1277 as now recommended in gnulib/NEWS.
1278 * build-aux/update-b4-copyright: Fix.
1279 * cfg.mk (update-copyright-env): Configure update-copyright.
1281 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1283 Make it easier to write deterministic tests.
1284 Continues Akim's work from his 2009-06-10 commits.
1285 * src/reader.c (check_and_convert_grammar): Don't add any
1286 symbols after the first symbols_do invocation.
1287 * src/symtab.c (symbols_sorted): New static global.
1288 (user_token_number_redeclaration): Update comments.
1289 (symbol_from_uniqstr): If a new symbol is being created, assert
1290 that symbols_sorted hasn't been allocated yet.
1291 (symbols_free): Free symbols_sorted.
1292 (symbols_cmp, symbols_cmp_qsort): New functions.
1293 (symbols_do): Sort symbol_table into symbols_sorted on first
1295 * tests/input.at (Numbered tokens): Recombine tests now that the
1296 output should be deterministic across multiple numbers.
1298 2009-08-12 Akim Demaille <demaille@gostai.com>
1302 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1304 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1306 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1308 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1310 Miscellaneous code readability improvements.
1312 * src/reader.c (reader): Move %define front-end variable
1313 defaults and checking into...
1314 (prepare_percent_define_front_end_variables): ... this new
1317 * src/scan-gram.l (INITIAL): For consistency with string
1318 literals, don't store open quote on character literal. It's
1319 discarded before returning anyway.
1320 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1321 Make length test more readable, and make the character stored
1322 for an empty literal more obvious while consistent with the
1325 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1326 USER_NUMBER_HAS_STRING_ALIAS throughout.
1327 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1328 that is repeated in symtab.h. Improve argument names to make it
1329 clear which side of the symbol-string alias pair is which.
1330 (symbol_check_alias_consistency): Improve local variable names
1331 for the same purpose.
1332 * src/symtab.h (struct symbol): Make comments about aliases
1334 (symbol_make_alias): Improve comments and argument name.
1335 * src/output.c (token_definitions_output): Update for rename to
1336 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1338 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1340 Convert "misleading reference" messages to warnings.
1341 * src/scan-code.l: New function 'show_sub_messages', more
1343 * tests/named-ref.at: Adjust tests.
1345 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1347 maint: run "make update-copyright"
1349 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1351 maint: make update-b4-copyright easier to use
1352 * build-aux/update-b4-copyright: In warnings, report line
1353 numbers rather than character positions.
1354 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1355 that update-copyright runs it.
1358 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1360 maint: clean up update-b4-copyright code
1361 * build-aux/update-b4-copyright: Do not accept 2-digit
1362 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1363 Don't accept a `[' in a b4_copyright argument.
1364 Format code more consistently.
1365 Don't assume b4*copyright never occurs.
1367 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1369 maint: automate b4_copyright updates.
1370 * Makefile.am (update-b4-copyright): New target rule.
1371 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1372 * build-aux/update-b4-copyright: New.
1373 * data/yacc.c: Remove stray characters around b4_copyright
1376 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1378 maint: automate annual package-wide copyright-year update.
1379 * .x-update-copyright: New.
1380 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1381 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1382 update-copyright. Remove gnumakefile, which is implied by
1383 maintainer-makefile.
1384 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1386 * maint.mk: Remove, now copied from gnulib.
1387 * examples/extexi: Add missing "(C)" in copyright statement so
1388 update-copyright can recognize it.
1389 * src/LR0.h: Likewise.
1390 * src/print.h: Likewise.
1391 * src/print_graph.h: Likewise.
1392 * src/gram.c: Add missing comma in copyright statement.
1393 * src/gram.h: Likewise.
1395 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1397 Fix "make distcheck".
1398 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1401 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1403 Pacify "gcc -Wunused" for the input function from Flex.
1404 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1406 * src/scan-code.l: Add "%option noinput", which I cannot find in
1407 the Flex manual, but which Flex has supported since at least as
1408 far back as 2.5.4. However, if any of our developers still use
1409 Flex 2.5.4, they'll need to stop configuring with
1410 --enable-gcc-warnings because "%option noinput" didn't work
1411 correctly until Flex 2.5.6.
1412 * src/scan-gram.l: Likewise.
1413 * src/scan-skel.l: Likewise.
1415 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1417 Fix --enable-gcc-warnings problems.
1418 * src/reader.c: Adjust variable names.
1419 * src/scan-code.l: Fix prototypes and adjust names.
1420 * src/named-ref.c: Remove redundant "if".
1422 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1424 Fix a --enable-gcc-warnings problem.
1425 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1428 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1430 Fix some memory leaks.
1431 * src/named-ref.c: Add a pointer check (named_ref_free).
1432 * src/scan-code.l: New function (variant_table_free). Called in
1434 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1436 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1438 Warn about character literals not of length one.
1439 * NEWS (2.5): Document.
1440 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1442 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1443 * tests/input.at (Bad character literals): New test group.
1445 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1447 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1449 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1451 Some M4 cleanup in the testsuite.
1452 Suggested by Eric Blake at
1453 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1454 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1455 complicate the code by distinguishing between a missing value
1456 and an empty string value for an optional argument. This fix is
1457 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1458 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1459 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1460 arguments are not needed because of the following changes.
1462 Bison developers should use GNU M4 and should not use
1463 POSIXLY_CORRECT when building the test suite, so do not
1464 complicate the code by avoiding $10 and above.
1465 Do not quote an empty string value for an optional argument, and
1466 do not distinguish between a missing value and an empty string
1469 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1471 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1473 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1475 Revert unnecessary column realignment in --help output.
1476 Reported by Akim Demaille at
1477 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1478 * src/getargs.c (usage): Here.
1480 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1482 Alphabetical order in src/Makefile.am.
1483 * src/Makefile.am: Adjust.
1485 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1487 Style changes and factoring.
1488 * src/named-ref.h: Add comments.
1489 * src/parse-gram.y: Readability and style changes.
1490 * src/reader.c: Factoring: assign_named_ref function.
1491 * src/scan-code.l: Factoring and style changes. Rename
1492 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1493 Use "unsigned" type for variant index. Improve readablity.
1494 * src/scan-gram.l: Change error messages and add comments.
1495 * src/symlist.h: symbol_list_null: New function decl.
1496 * src/symlist.c: symbol_list_null: Implement here.
1497 * tests/named-refs.at: Adjust for new error messages.
1499 2009-06-29 Eric Blake <ebb9@byu.net>
1501 scan-code: avoid compiler warnings
1502 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1504 2009-06-29 Akim Demaille <demaille@gostai.com>
1506 build: avoid concurrent extraction of calc++.
1507 * examples/calc++/Makefile.am (calc.stamp): New.
1508 Depend on it to create the sources of calc++ so that concurrent
1509 builds don't launch several "extexi" in parallel.
1510 Not only this is inefficient, this also builds incorrect sources
1511 with several extractions mixed together.
1513 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1515 Implement support for named symbol references.
1516 * src/parse-gram.y: Add new syntax (named_ref.opt).
1517 * src/reader.c: Store named refs in symbol lists.
1518 * src/reader.h: New argument for symbol_append and
1519 action_append functions.
1520 * src/scan-code.h: Add new field (named_ref) into
1521 code_props data structure. Keeps named ref of midrule
1523 * src/scan-code.l: Support for named refs in semantic
1524 action code. New function 'parse_named_ref'.
1525 * src/scan-gram.l: Support bracketed id.
1526 * src/symlist.c: Store named refs in symbol lists.
1527 * src/symlist.h: New field in symbol list: named_ref.
1528 * src/named-ref.h: New file, a struct for named_ref.
1529 * src/named-ref.cp: New file, named_ref_new function.
1530 * src/local.mk: Add two new files.
1531 * tests/testsuite.at: Include new test group:
1532 * tests/named-refs.at: this new file.
1534 2009-06-25 Akim Demaille <demaille@gostai.com>
1536 hash: check insertion for memory exhaustion.
1537 * src/uniqstr.c (uniqstr_new): New.
1539 2009-06-11 Akim Demaille <demaille@gostai.com>
1542 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1543 * src/print-xml.c: Style changes.
1544 * tests/conflicts.at: Comment changes.
1546 2009-06-11 Akim Demaille <demaille@gostai.com>
1548 xml: beware of user strings used to give a %prec to rules.
1549 * tests/conflicts.at (%prec with user strings): New.
1550 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1553 2009-06-11 Akim Demaille <demaille@gostai.com>
1555 hash: check insertion for memory exhaustion.
1556 * src/muscle-tab.c (muscle_insert, muscle_grow)
1557 * src/state.c (state_hash_insert): Check the return value of
1560 2009-06-10 Akim Demaille <demaille@gostai.com>
1562 deterministic test suite.
1563 Some consistency checks on symbols are performed after all the
1564 symbols were read, by an iteration over the symbol table. This
1565 traversal is nondeterministic, which can be a problem for test
1568 Addresses another form of nondeterminism reported by Joel E. Denny.
1569 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1571 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1573 Use different file names for the three tests to make the
1576 2009-06-10 Akim Demaille <demaille@gostai.com>
1578 deterministic user-token-number redeclaration errors.
1579 Address nondeterminism reported by Joel E. Denny.
1580 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1582 * src/uniqstr.h: Comment changes.
1583 * src/location.h (boundary_cmp, location_cmp): New.
1584 * src/symtab.c (user_token_number_redeclaration): New.
1585 (symbol_translation): Use it.
1586 * tests/input.at (Numbered tokens): Adjust the expected output.
1588 2009-05-25 Akim Demaille <demaille@gostai.com>
1591 * gnulib: Update to latest.
1592 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1593 * m4/.gitignore: Regen.
1594 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1595 Call xalloc_die on hash_insert failures.
1596 Requested by the new __warn_unused_result__ attribute of
1599 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1601 Convert multiple variable definition warnings to complaints.
1602 * NEWS (2.5): Add a new entry for that change.
1603 * doc/bison.texinfo (Decl Summary): Update %define entry.
1604 (Bison Options): Update -D/--define/-F/--force-define entry.
1605 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1606 * src/muscle_tab.h (muscle_percent_define_insert): Update
1608 * tests/input.at (`%define errors'): Update.
1609 (`%define, --define, --force-define'): Update.
1611 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1613 -F/--force-define and relative %define/-D/--define priorities.
1614 * NEWS (2.5): Add documentation to -D/--define entry.
1615 * build-aux/cross-options.pl: Hard-code association of
1616 --force-define with %define.
1617 * doc/bison.texinfo (Decl Summary): In %define entry,
1618 cross-reference command-line options.
1619 (Bison Options): Add documentation to -D/--define entry.
1620 (Option Cross Key): Widen column for --force-define row.
1621 * src/getargs.c (usage): Document -F/--force-define. Realign
1623 (short_options, long_options, getargs): Parse -F/--force-define,
1624 and update muscle_percent_define_insert invocation.
1625 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1626 (muscle_percent_define_insert): Add argument with that type.
1627 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1628 -F/--force-define behavior and priorities.
1629 * src/parse-gram.y (prologue_declaration): Update
1630 muscle_percent_define_insert invocations.
1631 * tests/input.at (`%define, --define'): Rename to...
1632 (`%define, --define, --force-define'): ... this and extend.
1634 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1636 Update some comments to make sense for -D.
1637 * data/bison.m4 (b4_check_user_names): In header comments, say
1638 "user occurrence" instead of "grammar occurrence".
1639 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1640 (muscle_percent_code_grow): Likewise just for consistency.
1642 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1644 * data/c++.m4: Update copyright year.
1646 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1648 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1650 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1652 Handle a trailing `:' in a user-supplied C++ namespace better.
1653 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1654 among the closing braces here. This fix might make the
1655 generated code easier to debug, but otherwise it should be
1656 insignificant because a trailing `:' is a C++ error already.
1658 2009-05-19 Akim Demaille <demaille@gostai.com>
1660 remove useless variable.
1661 * src/getargs.c (skeleton_arg): Remove now useless variable.
1662 Should help the compiler see that this printf-like call is sane.
1664 2009-05-11 Akim Demaille <demaille@gostai.com>
1666 doc: use C++ headers.
1667 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1670 2009-05-05 Akim Demaille <demaille@gostai.com>
1672 fix hexadecimal token number support.
1673 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1675 2009-05-05 Akim Demaille <demaille@gostai.com>
1677 tests: check token numbers.
1678 * tests/input.at (Numbered tokens): New.
1680 2009-05-04 Akim Demaille <demaille@gostai.com>
1682 bison: catch bad symbol names.
1683 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1684 * tests/input.at: Adjust.
1686 2009-05-04 Akim Demaille <demaille@gostai.com>
1689 * src/scan-gram.l: Untabify to be robust to zealous editors.
1691 2009-05-04 Akim Demaille <demaille@gostai.com>
1693 identifiers: dashes are letters.
1694 Dashes can now start identifiers (symbols and directives).
1696 * src/scan-gram.l ({letter}): Add dash.
1698 * tests/input.at (Symbols): Adjust.
1699 Remove stray comment.
1700 * tests/regression.at (Invalid inputs): Adjust error message.
1701 * doc/bison.texinfo (Symbols): Update.
1703 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1705 Declare %code to be a permanent feature.
1706 * NEWS (2.4.2): Here.
1707 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1709 (Decl Summary): Likewise.
1711 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1713 Convert underscores to dashes in some %define variable names.
1714 For now, just api.push-pull and lr.keep-unreachable-states.
1715 Maintain old names for backward compatibility.
1716 * NEWS (2.5): Document.
1717 * data/c.m4 (b4_identification): Update comment.
1718 * data/yacc.c: Update access.
1719 * doc/bison.texinfo: Update.
1720 * etc/bench.pl.in (bench_grammar): Update use.
1721 * src/files.c (tr): Move to...
1722 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1723 think of a better place to expose it. My logic is that, for all
1724 uses of tr so far, command-line arguments can be involved, and
1725 getargs.h is already included.
1726 * src/main.c (main): Update access.
1727 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1728 variable names to new variable names before assigning value.
1729 * src/reader.c (reader): Update setting default.
1730 * tests/calc.at: Update uses.
1731 * tests/conflicts.at (Unreachable States After Conflict
1732 Resolution): Update use.
1733 * tests/input.at (%define enum variables): Update use.
1734 (%define backward compatibility): New test group.
1735 * tests/push.at: Update uses.
1736 * tests/reduce.at: Update uses.
1737 * tests/torture.at: Update uses.
1739 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1741 Set all front-end %define defaults in one place.
1742 * src/main.c (main): Move lr.keep_unreachable_states default...
1743 * src/reader.c (reader): ... to here.
1745 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1747 Rename lr.default_reductions to lr.default-reductions.
1749 * doc/bison.texinfo: Here.
1750 * src/lalr.c (initialize_LA): Here.
1751 * src/print.c (print_reductions): Here.
1752 * src/reader.c (reader): Here.
1753 * src/tables.c (action_row): Here.
1754 * tests/input.at (%define enum variables): Here.
1755 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1757 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1759 Pacify ./configure --enable-gcc-warnings.
1760 * tests/input.at (Symbols): Prototype yyerror and yylex.
1762 2009-04-21 Akim Demaille <demaille@gostai.com>
1764 tests: check the use of dashes and periods in symbols.
1765 * tests/input.at (Symbol): New test group.
1767 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1769 Document how `%define "var" "value"' is not M4-friendly.
1770 * src/parse-gram.y (variable): In comments here.
1772 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1774 Add copyright updates missed during previous cherry pick.
1775 * src/output.c: Here.
1776 * src/parse-gram.y: Here.
1777 * src/scan-gram.l: Here.
1779 2009-04-20 Akim Demaille <demaille@gostai.com>
1781 variables: accept dashes.
1782 * src/scan-gram.l ({id}): Also accept dashes after the initial
1784 ({directive}): Use {id}.
1785 * src/parse-gram.y: Comment and formatting changes.
1786 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1788 * src/complain.h, src/complain.c (yacc_at): New.
1789 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1791 * src/output.c (token_definitions_output): Do not #define token
1794 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1796 Clean up recent patches a little.
1797 Reported by Akim Demaille.
1798 * doc/bison.texinfo (Understanding): Fix typos.
1799 * src/print.c (print_reductions): Don't use negated variable.
1801 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1803 List accepted values for a %define enum variable with an invalid value.
1804 Suggested by Akim Demaille at
1805 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1806 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1807 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1808 * tests/input.at (%define lr.default_reductions invalid values): Merge
1810 (%define enum variables): ... here, and update output.
1812 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1814 Rename "default rule" to "default reduction".
1815 This includes changing variable names in code, changing
1816 comments, and renaming %define lr.default_rules to %define
1817 lr.default_reductions.
1818 * NEWS (2.5): Update IELR documentation.
1819 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1820 Adjust YYDEFACT and yydefact_ documentation.
1821 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1822 and lr.type documentation. Make some other wording
1824 (Glossary): Adjust cross-references and Default Reduction
1826 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1827 Remove a confusing comment pointed out by Akim Demaille.
1828 (initialize_LA): Adjust code.
1829 * src/print-xml.c (print_reductions): Adjust code.
1830 * src/print.c (print_reductions): Adjust code.
1831 * src/reader.c (reader): Adjust code.
1832 * src/tables.c (action_row): Adjust code.
1833 (token_actions): Adjust code.
1834 * src/tables.h: Adjust YYDEFACT documentation.
1835 * tests/input.at (%define lr.default_rules invalid values):
1836 Rename test group to...
1837 (%define lr.default_reductions invalid values): ... this, and
1838 update grammar file and expected output.
1839 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1840 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1842 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1844 Document %define lr.type and lr.default_rules.
1845 * NEWS (2.5): Add an entry.
1846 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1847 besides just LALR(1) and GLR(1).
1848 * doc/bison.texinfo (Introduction): Likewise.
1849 (Language and Grammar): Bison is no longer limited to LALR(1)
1851 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1852 when trying to distinguish from GLR. Talk about LR(1) grammars
1853 rather than LALR(1) grammars.
1854 (Decl Summary): In %define api.push_pull entry, say it applies
1855 to deterministic parsers in C rather than LALR(1) parsers in C.
1856 Add lr.default_rules entry.
1858 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1860 (Generalized LR Parsing): Same changes as for the previous GLR
1862 (Memory Management): Say deterministic rather than LALR(1).
1863 (Understanding): Correct some bison output.
1864 Index discussion of "accepting state".
1865 Say deterministic rather than LALR(1).
1866 (Bison Options): In --yacc entry, say deterministic rather than
1868 In --report, --graph, and --xml entries, just don't mention
1870 (C++ Parsers): Say deterministic rather than LALR(1).
1871 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1872 (Glossary): Add Accepting State, Consistent State, Default Rule,
1873 and IELR(1) definitions.
1874 In Generalized LR (GLR) definition, make same changes as in
1875 previous GLR sections.
1876 In LALR(1) definition, say Bison uses LALR(1) by default rather
1877 than implying Bison is limited to LALR(1).
1878 (LocalWords): Add IELR.
1880 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1882 Finish implementing %define lr.type.
1883 Its value can be "LALR", "IELR", or "canonical LR".
1884 * lib/timevar.def (TV_IELR_PHASE1): New var.
1885 (TV_IELR_PHASE2): New var.
1886 (TV_IELR_PHASE3): New var.
1887 (TV_IELR_PHASE4): New var.
1888 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1889 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1890 Sbitset.h, ielr.h, and ielr.c.
1891 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1892 trace_types): Add trace_ielr.
1893 * src/lalr.h, src/lalr.c (ngotos): Export it.
1895 (goto_follows): ... this, update all uses, and export it.
1896 (set_goto_map): Export it.
1897 (map_goto): Export it.
1898 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1900 (initialize_LA): Export it. Move lookback allocation to...
1901 (lalr): ... here because, for canonical LR, initialize_LA must
1902 be invoked but lookback and much of the rest of LALR isn't
1904 * main.c (main): Instead of lalr, invoke ielr, which invokes
1906 * src/reader.c (reader): Default lr.type to "LALR".
1907 Default lr.default_rules to "accepting" if lr.type is "canonical
1908 LR". Leave the default as "all" otherwise.
1909 Check for a valid lr.type value.
1910 * src/state.h, src/state.c (struct state_list): Add state_list
1912 (state_new): Initialize state_list member to NULL.
1913 (state_new_isocore): New function, exported.
1914 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1915 exercises all values of lr.type.
1916 (GNU AWK Grammar): Rename test group to...
1917 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1918 AT_TEST_EXISTING_GRAMMAR.
1919 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1920 (GNU pic Grammar): Rename test group to...
1921 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1922 AT_TEST_EXISTING_GRAMMAR.
1923 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1924 all values of lr.type.
1925 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1926 (Lane Split): Likewise.
1927 (Complex Lane Split): Likewise.
1928 (Split During Added Lookahead Propagation): Likewise.
1930 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1932 Add new files for IELR and canonical LR implementation.
1933 * src/AnnotationList.c: New.
1934 * src/AnnotationList.h: New.
1935 * src/InadequacyList.c: New.
1936 * src/InadequacyList.h: New.
1937 * src/Sbitset.c: New.
1938 * src/Sbitset.h: New.
1942 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1944 Implement %define lr.default_rules.
1945 Its value describes the states that are permitted to contain
1946 default rules: "all", "consistent", or "accepting".
1947 * src/reader.c (reader): Default lr.default_rules to "all".
1948 Check for a valid lr.default_rules value.
1949 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1950 is "accepting", then only mark the accepting state as
1952 (initialize_LA): Tell state_lookahead_tokens_count whether
1953 lr.default_rules is "accepting".
1954 * src/tables.c (action_row): If lr.default_rules is not "all",
1955 then disable default rules in inconsistent states.
1956 * src/print.c (print_reductions): Use this opportunity to
1957 perform some assertions about whether lr.default_rules was
1959 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1960 helps with checking the parser tables for a grammar.
1961 * tests/input.at (%define lr.default_rules invalid values): New
1963 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1964 AT_TEST_TABLES_AND_PARSE.
1965 (`no %define lr.default_rules'): New test group generated by
1966 AT_TEST_LR_DEFAULT_RULES.
1967 (`%define lr.default_rules "all"'): Likewise.
1968 (`%define lr.default_rules "consistent"'): Likewise.
1969 (`%define lr.default_rules "accepting"'): Likewise.
1971 2009-04-20 Akim Demaille <demaille@gostai.com>
1973 Consistently refer to Yacc, not YACC.
1974 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1976 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1978 Pacify make maintainer-check-posix.
1979 * tests/input.at (%define, --define): Move bison command-line
1980 options before grammar file name.
1982 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1984 Document semicolon warnings.
1987 2008-12-08 Akim Demaille <demaille@gostai.com>
1989 Fix portability issue in the test suite.
1990 * tests/local.at (AT_MATCHES_CHECK): New.
1991 Based on Perl instead of Sed. Sed has too many portability
1992 pitfalls, not ever Sed is GNU Sed.
1993 * tests/actions.at (Fix user actions without a trailing semicolon):
1996 2008-12-07 Di-an Jan <dianj@freeshell.org>
1998 Implement the FIXME that ends an user action with a semicolon
1999 if it seems necessary.
2000 * src/scan-code.l (flex rules section): Flag cpp directive from
2001 any `#' to the first unescaped end-of-line. Semicolon is not
2002 needed after `;', `{', '}', or cpp directives and is needed after
2003 any other token (whitespaces and comments have no effect).
2004 * tests/actions.at (Fix user actions without a trailing semicolon):
2006 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2007 to make user actions complete statements.
2008 Adjust column numbers in error messages.
2009 * tests/regression.at (Fix user actions without a trailing semicolon):
2010 Remove. Covered by new test.
2012 2009-04-14 Akim Demaille <demaille@gostai.com>
2015 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2016 (Table of Symbols): Remove duplicate entry for %debug.
2018 2009-04-10 Eric Blake <ebb9@byu.net>
2020 submodules: update to latest
2021 * submodules/autoconf: Use latest upstream Autoconf.
2023 2009-04-06 Eric Blake <ebb9@byu.net>
2025 Work around autoconf 2.63b bug in testsuite.
2026 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2027 autoconf bug related to # in test.
2029 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2031 * NEWS (2.5): Describe new -D/--define feature.
2033 2008-11-10 Akim Demaille <demaille@gostai.com>
2036 * src/getargs.h, src/getargs.c (trace_muscle): New.
2037 (trace_types, trace_args): Support it.
2038 * src/output.c (output_skeleton): Use it.
2040 2008-11-10 Akim Demaille <demaille@gostai.com>
2043 * src/output.c (muscles_output): New, extracted from...
2044 (output_skeleton): here.
2047 2008-11-21 Akim Demaille <demaille@gostai.com>
2049 Display the changes in cross-options.texi.
2050 * build-aux/cross-options.pl ($sep): New, to separate items.
2051 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2054 2008-11-20 Di-an Jan <dianj@freeshell.org>
2056 Improves options in the manual.
2057 * doc/bison.texinfo (-g, -x): Add space before argument.
2058 (Option Cross Key): Implement FIXME: listing directives also.
2059 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2060 (Short Option): Special case -d. Put arguments inside @option.
2061 (Bison Directive): Add column, automatically extracted from
2062 src/scan-gram.l (actual name passed as the first argument)
2063 with special case for %define.
2064 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2065 to build-aux/cross-options.pl.
2066 * src/getargs.c (usage): Document limitations of cross-options.pl.
2067 * src/scan-gram.l: Likewise.
2069 2009-02-25 Akim Demaille <demaille@gostai.com>
2072 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2074 2008-12-08 Akim Demaille <demaille@gostai.com>
2076 Install autoconf as a submodule to get m4sugar.
2077 * .gitmodules: Add submodules/autoconf.
2078 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2079 submodules/autoconf.
2081 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2083 Simplify last patch slightly.
2084 * src/getargs.c (getargs): Here.
2086 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2088 Fix last warning from --enable-gcc-warnings.
2089 * src/getargs.c (getargs): Don't assign const address to non-const
2092 2008-11-17 Di-an Jan <dianj@freeshell.org>
2094 Handle --enable-gcc-warnings.
2095 * src/getargs.c (command_line_location): Set parameters to void.
2097 2008-11-11 Akim Demaille <demaille@gostai.com>
2100 * tests/actions.at, tests/regression.at: Use it.
2102 2008-11-07 Akim Demaille <demaille@gostai.com>
2104 Pass command line location to skeleton_arg and language_argmatch.
2105 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2106 The location argument is now mandatory.
2107 Adjust all dependencies.
2108 (getargs): Use command_line_location.
2110 2008-11-07 Akim Demaille <demaille@gostai.com>
2113 * src/getargs.c (usage): Document -D.
2114 Fix help string for --locations.
2115 (command_line_location): New.
2116 (short_options, long_options, getargs): Support -D, --define.
2117 (getargs): Move -d support at the right place.
2118 * doc/bison.texinfo (Bison Options): Update.
2119 * tests/input.at (%define, --define): New.
2121 2008-11-07 Akim Demaille <demaille@gostai.com>
2123 Initialize the muscle table before parsing the command line.
2124 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2125 (getargs): Define file_name.
2126 * src/main.c (main): Initialize muscle_tab before calling
2128 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2129 its value is not available yet.
2131 2008-11-09 Akim Demaille <demaille@gostai.com>
2133 Require the generation of parse-gram.output.
2134 * src/Makefile.am (YACC): Pass --report=all.
2136 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2138 * NEWS (2.5): New stub.
2140 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2142 Fix options documentation.
2143 * build-aux/cross-options.pl: As in --help output, write optional
2144 arguments as [=ARG] not =[ARG].
2145 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2147 2008-11-07 Akim Demaille <demaille@gostai.com>
2150 * src/getargs.c (usage): Fix help string for -W.
2152 2008-11-07 Akim Demaille <demaille@gostai.com>
2154 Handle more general types of option arguments.
2155 * build-aux/cross-options.pl: The argument ends at the first
2156 space, not the first non-symbol character.
2157 Use @var for each word appearing the argument description.
2159 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2161 Remove spurious initial empty lines.
2162 * data/location.cc: End the @output lines with an @.
2164 2008-11-04 Akim Demaille <demaille@gostai.com>
2166 Remove spurious initial empty lines.
2167 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2168 * data/yacc.c: End the @output lines with an @.
2170 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2172 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2173 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2174 requirements for a correct m4 are stricter.
2175 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2176 * configure.ac: Update to use AC_PROG_GNU_M4.
2177 Reported by Eric Blake.
2179 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2181 Help with updating web manual.
2182 * HACKING: Incorporate instructions from gnulib/doc/README.
2183 * bootstrap.conf (gnulib_modules): Add gendocs.
2185 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2187 Fix strange %define locations for default values.
2188 Reported by Akim Demaille at
2189 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2190 and discussed again starting at
2191 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2192 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2193 because location information is bogus.
2194 Use angle brackets to delimit fake file name because square brackets
2195 look like underexpanded m4. Choose a better fake file name.
2196 Use negative line numbers.
2197 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2198 * src/location.c (location_print): If line for a boundary is negative,
2199 only print that boundary's file name.
2200 * src/location.h: Document that.
2201 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2202 defaults): Update output.
2204 2008-11-07 Akim Demaille <demaille@gostai.com>
2206 Locations without columns for command line arguments.
2207 * src/location.c (location_print): Don't display negative columns.
2208 * src/location.h: Document this.
2210 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2212 Add reminder about uploading public key to keys.gnupg.net.
2213 * HACKING (Release Procedure): Here.
2215 2009-03-31 Akim Demaille <demaille@gostai.com>
2217 bootstrap: --help to stdout.
2218 * bootstrap (usage): Don't send --help to stderr.
2219 Use a here doc instead of a long string.
2221 2009-03-31 Akim Demaille <demaille@gostai.com>
2223 bootstrap: README-hacking no longer exists
2224 * bootstrap (checkout_only_file): Set to HACKING.
2226 2009-03-26 Akim Demaille <demaille@gostai.com>
2228 doc: merge HACKING and README-hacking.
2229 Two files is confusing.
2230 Reported by Alexandre Duret-Lutz.
2232 * README-hacking: Merge into...
2233 * HACKING (Working from the repository): here.
2235 2009-03-26 Akim Demaille <demaille@gostai.com>
2237 doc: update README-hacking.
2238 * README-hacking: We now use git and git submodules.
2239 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2241 2009-03-26 Akim Demaille <demaille@gostai.com>
2243 lalr1.cc: avoid GCC 4.3 warnings.
2244 GCC 4.3 now warns about "a || b && c" and asks for explicit
2246 Reported by Alexandre Duret-Lutz.
2247 * data/location.cc: Update copyright years.
2248 (Position::operator==): Use parens to make precedence explicit.
2249 Compare lines and columns first, as they are more likely to be
2250 different, and they are faster to compare.
2252 2009-03-26 Akim Demaille <demaille@gostai.com>
2255 * gnulib: Update to latest.
2256 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2259 2009-01-08 Akim Demaille <demaille@gostai.com>
2261 Fix grep portability issues.
2262 Grep on Solaris does not support -q.
2263 Reported by Summum Bonum.
2265 * NEWS: Add a stub for 2.4.2.
2266 * THANKS: Add Summum Bonum.
2267 * tests/atlocal.in (EGREP): New.
2268 (CC, CXX, XSLTPROC): Make it possible to override them via
2270 * tests/java.at: Use $EGREP instead of egrep.
2271 Use AT_CHECK's ignore instead of grep's -q.
2273 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2276 * NEWS: Set version and date.
2277 * lib/Makefile.am: Update copyright year.
2278 * tests/atlocal.in: Update copyright year.
2280 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2282 Semicolon feature removal is not about future language support.
2283 * NEWS: The semicolon feature is no longer active for newer languages,
2284 so don't claim that it causes trouble for them.
2286 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2288 * gnulib: Update submodule to HEAD.
2290 2008-12-09 Akim Demaille <demaille@gostai.com>
2293 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2295 2008-12-05 Eric Blake <ebb9@byu.net>
2297 Build testsuite with newer autoconf.
2298 * tests/output.at (m4_expand): Don't override in newer autoconf,
2299 where the underlying implementation changed.
2300 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2301 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2302 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2303 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2304 since some of them contain unbalanced ')'.
2306 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2308 * NEWS: Clarify a little.
2310 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2312 * NEWS: Update for recent changes.
2314 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2316 Fix unexpanded macros in GLR defines file.
2317 Reported by Csaba Raduly at
2318 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2319 * THANKS (Csaba Raduly): Add.
2320 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2321 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2322 lexer in a separate module that includes the defines file.
2323 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2325 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2326 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2327 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2328 (AT_DATA_SOURCE_PROLOGUE): New.
2329 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2330 (AT_DATA_SOURCE): New.
2331 (AT_FULL_COMPILE): New, copied from master branch and extended to
2332 support an additional source file.
2334 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2336 Don't let maintainer-*-check targets force a version update.
2337 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2340 2008-11-17 Di-an Jan <dianj@freeshell.org>
2342 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2343 Align menus. Adjust word wrapping. Use node names for menu names.
2344 (Examples): Don't abbreviate node names.
2345 (LocalWords): Remove abbreviations.
2346 (Copying): Make description a sentence.
2347 (Java Action Features): Remove period to match the rest of menu.
2349 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2351 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2352 * configure.ac: Adjust usage.
2353 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2354 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2355 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2357 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2359 Don't add a semicolon to actions for %skeleton or %language.
2360 It breaks Java test cases as reported by Akim Demaille.
2361 * src/scan-code.l: Implement.
2363 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2365 Clean up %skeleton and %language priority implementation.
2366 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2367 remove static qualifier because others will soon need to see it.
2368 (language_prio): Likewise.
2369 (getargs): Use command_line_prio rather than 0.
2370 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2372 (skeleton_prio): Extern it.
2373 (language_prio): Extern it.
2374 * src/parse-gram.y: Use grammar_prio rather than 1.
2376 2008-11-04 Akim Demaille <demaille@gostai.com>
2378 * NEWS: Mention the trailing semicolon in action.
2380 2008-11-04 Akim Demaille <demaille@gostai.com>
2383 * NEWS: Use more outline-mode markup.
2384 Suggested by Jim Meyering.
2386 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2388 Fix user actions without a trailing semicolon.
2389 Reported by Sergei Steshenko at
2390 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2391 * THANKS (Sergei Steshenko): Add.
2392 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2393 * tests/regression.at (Fix user actions without a trailing semicolon):
2396 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2398 Initiate further development.
2399 * NEWS: Create an empty section for new entries.
2400 * gnulib: Update submodule to HEAD.
2402 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2404 * NEWS: Version 2.4.
2406 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2408 Prepare for next release.
2409 * NEWS: Briefly mention changes since 2.3b.
2410 * README: Say GNU m4 1.4.6, which we've been requiring in release
2411 announcements already, not 1.4.3, which breaks the build.
2413 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2415 Say %language is experimental.
2416 We're thinking of extending it's effect on output file naming. See the
2418 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2419 * NEWS: Say it's experimental.
2420 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2421 recommend it over %skeleton for now.
2422 (Bison Options): Likewise.
2423 (C++ Bison Interface): Use %skeleton not %language.
2424 (Calc++ Parser): Use %skeleton not %language.
2425 * src/getargs.c (usage): Say it's experimental.
2427 2008-11-01 Di-an Jan <dianj@freeshell.org>
2428 Paolo Bonzini <bonzini@gnu.org>
2430 Support all Java parser class modifiers.
2431 * data/java.m4 (b4_percent_define_get3): New.
2432 (b4_final_if, b4_strictfp_if): New.
2433 * data/lalr1.java (final, strictfp, extends, implements): Support.
2434 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2436 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2437 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2438 (AT_CHECK_JAVA_GREP): New.
2439 (Java parser class modifiers): New test.
2440 (Java parser class extends and implements): New test.
2442 Model exception propagation better with throws and lex_throws.
2443 * data/java.m4 (b4_list2): New.
2444 (throws): Change default.
2445 * data/lalr1.java (yyaction): Add throws.
2446 (parse): Add lex_throws in addition to throws.
2447 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2448 * tests/java.at (Java throws specifications): New test.
2450 Improve documentation for Java parsers.
2451 * doc/bison.texinfo (Java Parsers): Add subsections.
2452 Don't quote first argument of %define.
2453 (Java Bison Interface): Document output files. Move documentation
2454 of parser class and merge into Java Parser Interface. Document
2455 features that error out. Document directives with no effect.
2456 Move note about Javadoc higher.
2457 (Java Semantic Values): Explicitly mention stype.
2458 Document that generic types cannot be used.
2459 (Java Location Values): Use @deftypeivar. Document constructors.
2460 Correct return value for toString.
2461 (Java Parser Interface): List undocumented constants/fields.
2462 Move documentation of fields added by %parse-param closer to list
2463 of members. Document that token names are added as fields.
2464 Document constructors accurately. Remove error method.
2465 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2466 Interface. Describe %code lexer and yylex accutately.
2467 Remove documentation that does not match the code.
2468 (Java Action Features): New.
2469 (Java Differences): Add reference. Add item on semantic values.
2470 Add note about @{ ... @}. Clarify %% epilogue placement.
2471 (Java Declarations Summary): New.
2474 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2475 (b4_remove_comma): Quote test argument.
2476 (b4_identification): Remove "bison" field.
2477 * tests/java.at (Java parser class and package names): New test.
2478 (Java %parse-param and %lex-param): New test.
2479 (Java stype, position_class and location_class): New test.
2481 2008-10-31 Di-an Jan <dianj@freeshell.org>
2483 * data/lalr1.jave: Update copyright years.
2484 (YYParser): Correct name of "generated from" file in Javadoc:
2485 use b4_file_name instead of @ofile@.
2486 (Location constructor): Correct Javadoc parameter name.
2487 (yylloc): Add missing opening m4 quote after b4_location_if.
2488 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2489 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2490 (YYParser constructor): Correct Javadoc parameter name.
2492 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2494 Always put auxiliary code files in the same dir as other output files.
2495 * src/files.c (compute_file_name_parts): When the user specifies
2496 --output but not --file-prefix, extract the directory prefix from the
2497 file prefix not from the grammar file name. This affects the location
2498 of files like location.hh generated by the C++ skeleton. The includes
2499 in the other output files require this fix.
2500 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2501 for expected output files.
2502 (Output files): Add a test for the above.
2504 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2506 * gnulib: Update submodule to HEAD.
2508 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2510 Update copyright year.
2511 * src/files.c: Here.
2513 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2515 Don't overwrite the input file.
2516 * src/files.c (output_file_name_check): Fatal error if using input file
2518 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2520 (Conflicting output files): Add test.
2522 2008-10-28 Akim Demaille <demaille@gostai.com>
2525 * data/lalr1.cc: Formatting changes.
2527 2008-10-28 Akim Demaille <demaille@gostai.com>
2529 Don't define debugging functions when !YYDEBUG.
2530 * data/lalr1.cc (debug_stream, set_debug_stream)
2531 (debug_level_type, debug_level, set_debug_level): Don't
2532 declare them when YYDEBUG is not defined.
2533 The implementation are already YYDEBUG-aware.
2535 2008-10-28 Akim Demaille <demaille@gostai.com>
2537 Prefer "continue" for empty loop bodies.
2538 * etc/bench.pl.in: Use "continue" instead of {}.
2540 2008-10-28 Akim Demaille <demaille@gostai.com>
2542 Space and comments changes.
2543 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2544 * data/c.m4, data/lalr1.cc: Space changes.
2546 2008-10-28 Akim Demaille <demaille@gostai.com>
2548 Make gnulib a submodule.
2550 * .gitmodules (gnulib): New.
2552 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2554 Fix yyerror_range for user-defined location type in C++. Reported by
2556 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2557 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2558 * THANKS (Georg Sauthoff): Add.
2560 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2562 Update several administrative files mainly to facilitate releasing.
2563 * HACKING (Administrivia): Make the git-merge-changelog notes more
2565 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2566 (Release Procedure): Update for git and add numerous details that were
2568 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2569 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2570 that announcements don't claim we bootstrapped with whatever bison
2571 happened to be in PATH. Add flex as a bootstrap tool.
2572 * Makefile.maint: Remove, previously replaced by maint.mk.
2573 * Makefile.cfg: Remove, and migrate settings to...
2574 * cfg.mk: ... here for the sake of `make announcement'.
2575 * bootstrap.conf (gnulib_modules): Add announce-gen.
2576 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2579 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2581 Small but important bugfixes for the Java skeleton.
2582 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2583 (yy_symbol_print): Call toString on yyvaluep.
2585 2008-08-29 Akim Demaille <demaille@gostai.com>
2587 Clarify UPDATED use.
2588 * doc/bison.texinfo: It refers to the last edition of this file,
2589 not to the release date of Bison.
2590 Reported by Joel E. Denny.
2592 2008-08-29 Akim Demaille <demaille@gostai.com>
2594 * README: Update FAQ pointer.
2595 Reported by Joel E. Denny.
2597 2008-08-27 Eric Blake <ebb9@byu.net>
2599 Resync m4sugar from autoconf.
2600 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2601 (m4_init): Adjust to latest m4.git changes.
2602 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2604 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2605 (_m4_list_cmp): Reduce side effects.
2607 2008-08-27 Akim Demaille <demaille@gostai.com>
2609 Check yyerrok in calc.at.
2610 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2611 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2614 2008-08-27 Akim Demaille <demaille@gostai.com>
2616 Support yyerrok in lalr1.cc.
2617 YYBACKUP is still to import back into lalr1.cc.
2618 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2620 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2622 For maintainer-check*, don't recompile for a $(VERSION) update.
2624 (_is-dist-target): Override the one in GNUmakefile.
2625 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2627 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2629 Update for recent change to gnulib.
2630 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2633 2008-08-15 Eric Blake <ebb9@byu.net>
2635 Remaining m4sugar merge from autoconf.
2636 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2637 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2638 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2639 * src/output.c (output_skeleton): Tell m4 how to find it.
2641 Partial m4sugar merge from autoconf: m4_map.
2642 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2643 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2644 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2645 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2647 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2649 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2652 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2654 Keep .version and PACKAGE_VERSION in sync.
2655 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2656 dependency, and add comments justifying this in more detail. Discussed
2658 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2660 2008-08-06 Eric Blake <ebb9@byu.net>
2662 Partial m4sugar merge from autoconf: m4_shiftn.
2663 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2664 (m4_shift2, m4_shift3): New macros.
2665 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2666 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2667 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2668 * data/java.m4 (b4_remove_comma): Likewise.
2670 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2671 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2672 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2673 (m4_init): Consolidate wrapped text into single m4_wrap.
2674 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2677 2008-08-05 Eric Blake <ebb9@byu.net>
2679 Partial m4sugar merge from autoconf: builtins, version.m4.
2680 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2681 (m4_prepend): Remove, as it is unused and inherently quadratic,
2682 whereas m4_append is linear in newer m4.
2683 (m4_mkstemp): New builtin.
2684 (m4_symbols): Make rename conditional.
2685 (m4_version_prereq): Ensure fatal error if used in bison, which
2686 intentionally lacks version.m4.
2688 Fix comments in m4sugar.
2689 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2691 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2693 Update for recent .gitignore fix in Gnulib.
2694 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2695 anchored .gitignore entries.
2697 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2699 Set gnu or gnits strictness.
2700 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2701 development and gnits strictness for releases. Based on Eric Blake's
2703 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2705 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2707 * NEWS: Clarify documentation of %language.
2709 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2711 Support usage of git-merge-changelog.
2712 * .gitattributes: New.
2713 * HACKING: Document usage of git-merge-changelog.
2714 * bootstrap: Install git-merge-changelog entries in .git/config
2717 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2719 Remove remaining dependence on CVS Id keyword.
2720 * ChangeLog: For the sake of people still using CVS, don't use dollars
2722 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2724 * data/xslt/xml2dot.xsl: Likewise.
2725 * data/xslt/xml2text.xsl: Likewise.
2726 * data/xslt/xml2xhtml.xsl: Likewise.
2727 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2728 * doc/Makefile.am (neutralize): Remove, no longer needed.
2729 (.x.1): Don't use neutralize.
2730 (edit): Don't substitute for ID.
2731 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2733 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2735 Fix dependence on computed configure variables.
2736 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2737 $(top_srcdir)/configure.ac so that changes to computed variables, such
2738 as PACKAGE_VERSION, are seen.
2739 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2741 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2743 Update copyright dates for recent changes.
2744 * Makefile.am: Here.
2745 * src/Makefile.am: Here.
2746 * src/reduce.c: Here.
2747 * tests/reduce.at: Here.
2749 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2751 Use git-version-gen for version names between releases.
2752 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2753 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2754 * .prev-version: New.
2755 * .version.in: Remove.
2756 * ChangeLog: Remove the Id previously used for capturing the CVS
2758 * GNUmakefile: Remove, now copied from Gnulib.
2759 * Makefile.am: Add code suggested by comments in
2760 build-aux/git-version-gen.
2761 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2762 .prev-version, and .version.
2763 * NEWS (2.3b+): Rename to...
2764 (?.?): ... this because we're dropping the "+" version naming scheme,
2765 but, in general, we still can't be sure of our next release name.
2766 * bootstrap: Add a quick hack to remove from .gitignore the
2767 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2768 entry. This should really be fixed in gnulib instead.
2769 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2770 * configure.ac (AC_INIT): Set version name by invoking
2771 build-aux/git-version-gen.
2772 (AC_CONFIG_FILES): Remove .version, now generated by
2773 build-aux/git-version-gen.
2774 * maint.mk: New, copied from coreutils.
2775 * doc/.cvsignore (bison.1): Add.
2776 * doc/.gitignore (/bison.1): Add.
2777 * doc/bison.1: Remove, generated.
2778 * src/.cvsignore (revision.c): Remove.
2779 * src/.gitignore (/revision.c): Remove.
2780 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2781 (BUILT_SOURCES): Remove revision.c.
2782 (revision.c): Remove.
2783 * src/getargs.c (version): Don't print revision after the VERSION.
2784 * src/revision.h: Remove.
2786 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2788 Fix untranslatable composition of sentences. Reported by Goran
2790 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2791 * THANKS (Goran Uddeborg): Add.
2792 * src/reduce.c (reduce_print): Report the number of nonterminals and
2793 rules useless in the grammar in separate sentences.
2794 * tests/reduce.at (Useless Rules): Update output.
2795 (Reduced Automaton): Likewise.
2796 (Underivable Rules): Likewise.
2797 (Empty Language): Likewise.
2799 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2801 Fix some .gitignore and .cvsignore problems.
2802 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2803 (insert_vc_ignore): ... this new function, which prepends `/' to all
2804 .gitignore entries before passing them to insert_sorted_if_absent.
2805 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2806 .cvsignore files are maintained even though Bison developers run
2807 bootstrap while using Git.
2808 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2811 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2812 unneeded. Reported by Eric Blake.
2813 * lib/.gitignore (/*~): Add.
2814 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2815 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2817 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2819 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2821 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2822 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2823 * bootstrap.conf (gnulib_modules): Add unsetenv.
2824 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2825 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2827 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2828 the first argument because it may become position-dependent, and unset
2829 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2830 Add comments explaining these issues in more detail.
2832 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2834 Add .gitignore everywhere based on .cvsignore.
2836 * build-aux/.gitignore: New.
2837 * data/.gitignore: New.
2838 * doc/.gitignore: New.
2839 * etc/.gitignore: New.
2840 * examples/.gitignore: New.
2841 * examples/calc++/.gitignore: New.
2842 * lib/.gitignore: New.
2843 * m4/.gitignore: New.
2844 * po/.gitignore: New.
2845 * runtime-po/.gitignore: New.
2846 * src/.gitignore: New.
2847 * tests/.gitignore: New.
2849 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2851 * NEWS (2.3b+): New section, empty for now.
2852 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2854 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2856 * NEWS (2.3b): Update release date since there has been a delay in
2857 getting the announcements and tarballs out.
2859 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2861 * NEWS: Version 2.3b.
2862 * configure.ac (AC_INIT): Likewise.
2863 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2865 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2867 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2868 been doing it for years.
2869 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2870 (Release Procedure): Add FIXME about make alpha being unmaintained.
2872 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2874 * data/yacc.c: Reformat m4 a little for readability.
2875 * src/lalr.c (build_relations): Correct comment.
2877 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2879 DJGPP specific issue.
2880 * djgpp/config.sed: Fixes required to run configure scripts generated
2883 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2885 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2886 coordinator@translationproject.org.
2888 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2890 * THANKS: Add Eric Blake.
2892 2008-04-23 Eric Blake <ebb9@byu.net>
2894 Revert prior patch, by working around autoconf regression.
2895 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2896 ("Output file name: ("): Uncomment test.
2897 ("Output file name: )"): Likewise.
2898 Based on an idea from Noah Misch.
2900 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2902 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2903 2.61. Reported by Juan Manuel Guerrero at
2904 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2905 * tests/output.at ("Output file name: ("): Comment out test case for
2907 ("Output file name: )"): Likewise.
2909 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2911 * GNUmakefile: Update git-version-gen invocation so make dist
2914 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2916 Update to the current gnulib CVS repository, and fix trigraph handling
2918 * bootstrap: Update gnulib CVS repository URL.
2919 (symlink_to_dir): Encapsulate the code that guarantees the destination
2920 directory exists into...
2921 (check_dst_dir): ... this new function, and...
2922 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2923 fail when copying files into lib/uniwidth/.
2924 * src/output.c (prepare_symbols): When writing yytname muscles, where
2925 symbol names will be encoded in C-string literals, tell quotearg to
2926 escape trigraphs. This used to be the default in gnulib.
2927 * tests/regression.at (Token definitions): Because of the change in
2928 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2929 escapes trigraphs in symbol names. Thus, yytname no longer has
2930 trigraphs unnecessarily doubly escaped. Update test case output.
2931 Extend test case to be sure Bison's own error messages will no longer
2932 have trigraphs in symbol names unnecessarily escaped once.
2934 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2936 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2937 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2938 * .cvsignore: Add .version.
2940 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2941 * configure.ac (AC_CONFIG_FILES): Add .version.
2942 * build-aux/.cvsignore: Add git-version-gen.
2944 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2946 * NEWS (2.3a+): Mention that -g now takes an argument.
2947 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2948 consistency. Update the -g and -x entries now that they take
2949 arguments. Use brackets to indicate optional arguments.
2950 * src/getargs.c (usage): Explain the relationship between arguments of
2951 long and short options more completely. Document --defines and -d
2952 separately since the former takes an argument but, for POSIX Yacc, the
2954 (short_options): Let -W take an optional argument like --warnings.
2955 (getargs): Sort cases.
2957 2008-02-28 Akim Demaille <demaille@gostai.com>
2959 * doc/bison.texinfo: Fix a few typos.
2961 2008-02-28 Akim Demaille <akim@epita.fr>
2963 * doc/bison.texinfo (Bison Options): Document -W.
2964 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2966 2008-02-28 Akim Demaille <akim@epita.fr>
2968 * src/getargs.c (short_options): Split and sort for readability.
2969 -g and -x take optional arguments, just like their long options.
2970 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2972 Fix the handling of $opt which resulted in all the argument to be
2973 considered as optional.
2975 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2977 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2978 say its interface is experimental.
2979 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2981 (Bison Options): In the -L and --language entry, mention Java.
2982 (Java Bison Interface): Say the interface is experimental.
2983 * src/getargs.c (usage): Mention -L and --language.
2985 * NEWS (2.3a+): Say the push parsing interface is experimental.
2986 * doc/bison.texinfo (Push Decl): Likewise.
2987 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2988 (Push Parser Function): Likewise.
2989 (Pull Parser Function): Likewise.
2990 (Parser Create Function): Likewise.
2991 (Parser Delete Function): Likewise.
2992 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2993 yypull_parse, and yypush_parse entries.
2995 * NEWS (2.3a+): Mention XML support, and say the schema is
2997 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2998 * src/getargs.c (usage): Say the XML schema is experimental.
3000 * NEWS (2.3a+): Say option instead of flag.
3002 2008-02-21 Wojciech Polak <polak@gnu.org>
3004 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3007 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3009 Fix impure push parser compile error reported by Bob Rossi at
3010 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3011 * data/yacc.c: Clean up whitespace in the output a little.
3012 (yypstate_allocated): Define for impure push parsers regardless of
3013 whether the pull interface is also requested.
3014 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3015 check impure push parsers without the pull interface.
3017 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3018 yyerror takes arguments specified by %parse-param while yypstate_new
3020 * doc/bison.texinfo (Parser Create Function): Document that
3021 yypstate_new returns 0 for multiple impure parser instances.
3022 * tests/push.at (Push Parsing: Multiple impure instances): Update
3023 expected stderr output.
3025 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3027 * runtime-po/POTFILES.in (push.c): Remove.
3029 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3031 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3032 * data/push.c: Rename to...
3033 * data/yacc.c: ... this, overwriting it.
3034 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3035 `%push-pull-parser' -> `%define api.push_pull "both"'.
3036 Remove old yacc.c tests, and update push.c tests to yacc.c.
3038 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3040 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3041 `"%code top" blocks' instead of `%code "top" blocks'.
3042 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3043 Clean up whitespace in the output a little.
3045 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3047 Fix documentation problems reported by Tim Josling at
3048 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3049 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3050 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3051 integers. Explain the effect of literal string aliases on error
3052 messages. Copy token 0 documentation from the C++ skeleton
3055 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3057 Accept a token number in a %left, %right, or %nonassoc for POSIX
3058 conformance. Reported by Tim Josling at
3059 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3060 * NEWS (2.3a+): Mention.
3061 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3062 and code numbers are treated by precedence declarations.
3063 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3065 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3067 (symbol.prec): New, just like symbol but allows INT.
3068 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3070 * tests/regression.at (Token number in precedence declaration): New
3073 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3075 DJGPP specific issues.
3076 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3077 be changed. Copyright timestamp adjusted.
3078 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3079 be changed. Copyright timestamp adjusted.
3080 * djgpp/config.site: Copyright timestamp adjusted.
3081 * djgpp/config_h.sed: Copyright timestamp adjusted.
3082 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3083 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3084 filename translation list.
3085 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3086 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3087 files shall be created. Before trying to use the temp dir where the
3088 environment variable points to check that the dir really exists. If
3089 not default to the cwd as temp dir. Copyright timestamp adjusted.
3090 * djgpp/subpipe.h: Copyright timestamp adjusted.
3091 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3093 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3095 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3097 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3099 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3100 Problem reported by Claudio Saavedra in
3101 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3103 2008-01-05 Wojciech Polak <polak@gnu.org>
3105 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3106 document's title with the input grammar file name.
3108 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3110 Automate regression testing of the XML/XSLT implementation. Discussed
3112 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3113 * configure.ac (XSLTPROC): New substitution.
3114 * Makefile.am (maintainer-xml-check): New phony target invoking...
3115 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3116 invoking make maintainer-check with BISON_TEST_XML=1.
3117 * tests/atlocal.in (XSLTPROC): New.
3118 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3119 not to report reachable memory when Bison is expected to have a
3120 non-zero exit status and (2) to compare XML/XSLT output with --graph
3121 and --report=all output for every working grammar when
3123 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3124 (AT_BISON_CHECK_XML): New.
3125 (AT_QUELL_VALGRIND): New.
3126 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3127 (AT_CHECK): ... don't redefine this since this was the old way to
3129 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3130 AT_BISON_CHECK invocations.
3131 * tests/c++.at: Likewise.
3132 * tests/calc.at: Likewise.
3133 * tests/conflicts.at: Likewise.
3134 * tests/cxx-type.at: Likewise.
3135 * tests/existing.at: Likewise.
3136 * tests/glr-regression.at: Likewise.
3137 * tests/headers.at: Likewise.
3138 * tests/input.at: Likewise.
3139 * tests/java.at: Likewise.
3140 * tests/output.at: Likewise.
3141 * tests/push.at: Likewise.
3142 * tests/reduce.at: Likewise.
3143 * tests/regression.at: Likewise.
3144 * tests/sets.at: Likewise.
3145 * tests/skeletons.at: Likewise.
3146 * tests/synclines.at: Likewise.
3147 * tests/torture.at: Likewise.
3148 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3149 tends to hang xsltproc.
3150 (Big horizontal): Likewise.
3152 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3154 In XML output, remove redundant class attribute on symbol element.
3155 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3156 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3157 look up a symbol to determine whether it's a nonterminal or terminal.
3158 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3159 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3161 Add prec/assoc information to XML output.
3162 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3163 %prec, add a percent_prec attribute.
3164 * src/print-xml.c (print_grammar): For each terminal that has a
3165 precedence or associativity, add a prec or assoc attribute.
3167 (xml_puts): Use xml_indent.
3168 (xml_printf): Use xml_indent.
3169 * src/print-xml.h (xml_indent): Prototype.
3171 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3172 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3174 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3176 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3177 (bison:ruleByNumber): ... this for clarity.
3178 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3179 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3180 (xsl:template match="reduction"): Update.
3181 (xsl:template match="item"): Update.
3182 (xsl:template match="reduction"): Update.
3184 In the XML output, don't print the list of rules where symbols appear.
3185 Compute it in XSLT instead. Discussed at
3186 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3187 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3188 (bison:ruleByRhs): New.
3189 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3191 (xsl:template match="terminal/rule"): Remove.
3192 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3194 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3196 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3197 bison:ruleByRhs and mode="number-link" for rule template.
3198 (xsl:template match="terminal/rule"): Remove.
3199 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3200 bison:ruleByRhs and mode="number-link" for rule template.
3201 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3203 (xsl:template match="rule" mode="number-link"): ... this.
3204 * src/print-xml.c (print_grammar): Don't print the list of rules.
3206 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3208 Don't let --report affect XML output; always print all information.
3210 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3211 * src/conflicts.c (log_resolution): Implement.
3212 * src/print-xml.c (print_core): Implement.
3213 (print_state): Implement.
3214 (print_xml): Implement.
3216 * NEWS (2.3a+): Fix quotes.
3217 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3218 don't let %verbose clear the list specified by --report.
3220 2007-11-26 Akim Demaille <akim@epita.fr>
3222 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3224 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3226 In the XML output, list useless and unused symbols and rules with the
3227 useful ones and add a "usefulness" attribute. Discussed starting at
3228 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3229 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3230 (grammar_rules_print_xml): Print all rules instead of just those
3231 useful in the grammar, and add a "usefulness" attribute.
3232 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3233 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3234 (print_grammar): Print all nonterminals instead of just useful ones,
3235 and add a "usefulness" attribute to nonterminals and terminals.
3236 (print_xml): Don't print a separate "reductions" or
3237 "rules-useless-in-parser" element.
3238 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3239 (reduce_xml): Remove.
3240 (reduce_token_unused_in_grammar): New.
3241 (reduce_nonterminal_useless_in_grammar): New.
3242 * src/reduce.h (reduce_xml): Remove prototype.
3243 (reduce_token_unused_in_grammar): Add prototype.
3244 (reduce_nonterminal_useless_in_grammar): Add prototype.
3245 * data/xslt/xml2text.xsl: Update for XML changes.
3246 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3247 * tests/reduce.at (Useless Terminals): Update output.
3248 (Useless Rules): Update output.
3249 (Reduced Automaton): Update output.
3251 Say "Terminals unused in grammar" instead of "Unused terminals".
3252 * NEWS (2.3a+): Update.
3253 * doc/bison.texinfo (Understanding): Update example output.
3254 * src/reduce.c (reduce_output): Implement.
3255 * data/xslt/xml2text.xsl: Implement.
3256 * data/xslt/xml2xhtml.xsl: Implement.
3258 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3260 Accept --report-file=FILE to override the default `.output' filename.
3261 * NEWS (2.3a+): Mention.
3262 * doc/bison.texinfo (Bison Options): Add an entry.
3263 * src/files.c (compute_output_file_names): Don't override
3264 spec_verbose_file if already set.
3265 * src/getargs.c (usage): Document --report-file.
3266 (REPORT_FILE_OPTION): New anonymous enum member.
3267 (long_options): Add entry for it.
3268 (getargs): Add case for it setting spec_verbose_file.
3270 * build-aux/cross-options.pl: Don't record a short option just because
3272 * doc/.cvsignore: Add yacc.1.
3274 2007-11-14 Akim Demaille <akim@epita.fr>
3276 * doc/yacc.1.in: New.
3277 * configure.ac, doc/Makefile.am: Adjust.
3278 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3280 Use AC_SUBST for assignments too.
3281 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3283 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3285 * src/gram.c: Remove comments that duplicate comments in gram.h.
3287 When reporting useless rules and nonterminals, say "useless in grammar"
3288 instead of "useless", and say "useless in parser" instead of "never
3289 reduced". Discussed starting at
3290 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3291 * NEWS (2.3a+): Mention this change.
3292 * data/xslt/xml2text.xsl: Update output text and expected input XML
3293 element names to match changes below.
3294 * data/xslt/xml2xhtml.xsl: Likewise.
3295 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3296 Contents: "Rules useless in parser due to conflicts".
3297 * doc/bison.texinfo (Decl Summary): Reword a little.
3298 (Understanding): Update example output for changes below.
3299 * src/gram.c: (rule_useful_p): Rename to...
3300 (rule_useful_in_grammar_p): ... this.
3301 (rule_useless_p): Rename to...
3302 (rule_useless_in_grammar_p): ... this.
3303 (rule_never_reduced_p): Rename to...
3304 (rule_useless_in_parser_p): ... this.
3305 (grammar_rules_print): Update for renames.
3306 (grammar_rules_print_xml): Update for renames.
3307 (grammar_rules_never_reduced_report): Rename to...
3308 (grammar_rules_useless_report): ... this since it is used for either
3309 kind of useless rule.
3310 * src/gram.h: Reword comments and update function names in prototypes.
3311 * src/main.c (main): Say "rule useless in parser due to conflicts".
3312 * src/print-xml.c (print_rules_never_reduced): Rename to...
3313 (print_rules_useless_in_parser): ... this, and rename output XML
3314 element "rules-never-reduced" to "rules-useless-in-parser".
3315 (print_xml): Update for rename.
3316 * src/print.c (print_results): Say "Rules useless in parser due to
3318 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3319 (nonterminals_reduce): Say "nonterminal useless in grammar".
3320 (reduce_output): Say "Nonterminals useless in grammar".
3321 Say "Rules useless in grammar".
3322 (reduce_xml): Rename output XML element "useless" to
3323 "useless-in-grammar".
3324 (reduce_print): Don't report the count of grammatically useless rules
3325 as "rules never reduced" just because %yacc is specified.
3326 In the correct report of this count, say nonterminal(s) and rule(s)
3327 "useless in grammar".
3328 * tests/conflicts.at (S/R in initial): Update expected output.
3329 (Defaulted Conflicted Reduction): Likewise.
3330 (Unreachable States After Conflict Resolution): Likewise.
3331 * tests/existing.at (GNU pic Grammar): Likewise.
3332 * tests/reduce.at (Useless Nonterminals): Likewise.
3333 (Useless Rules): Likewise.
3334 (Reduced Automaton): Likewise.
3335 (Underivable Rules): Likewise.
3336 (Empty Language): Likewise.
3338 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3340 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3341 here document and before the EOF so that BSD's implementation of Bourne
3342 shell doesn't parse the delimiter as part of the here document.
3343 * doc/.cvsignore: Add cross-options.texi.
3344 * src/getargs.c (usage): Add a blank line after the warning categories.
3346 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3348 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3350 2007-11-05 Akim Demaille <akim@epita.fr>
3352 Remove Id: from bison.1.
3353 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3354 (perl -0777 -pi -e 's/\.PP\nId): New.
3355 (.x.1): Use it to ignore the version control revision.
3357 2007-11-05 Akim Demaille <demaille@gostai.com>
3359 * build-aux/Makefile.am: Ship cross-options.pl.
3360 * doc/Makefile.am: Always refer to cross-options.texi with
3362 (MAINTAINERCLEANFILES): Add it.
3364 2007-11-04 Akim Demaille <demaille@gostai.com>
3366 Generate the long/short option cross-table.
3367 * build-aux/cross-options.pl: New.
3368 * doc/Makefile.am (cross-options.texi): New.
3369 * doc/bison.texinfo: Use it.
3371 2007-11-04 Akim Demaille <demaille@gostai.com>
3373 Generate bison.1 using help2man.
3374 * doc/common.x, doc/bison.x: New.
3375 * doc/Makefile.am (bison.1, .x.1): New.
3376 The code is taken from autoconf-2.61/man/Makefile.am.
3377 * configure.ac: Look for help2man.
3379 2007-11-04 Akim Demaille <demaille@gostai.com>
3382 * src/getargs.c (usage): Document -W, make it clear that -d,
3383 -g and -x have optional arguments.
3385 2007-11-04 Akim Demaille <demaille@gostai.com>
3387 Find sha1sum when named gsha1sum.
3388 * bootstrap (find_tool): New.
3391 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3393 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3395 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3396 * NEWS (2.3a+): Mention.
3397 * data/bison.m4 (b4_pure_if): Don't define it here.
3398 * data/c.m4 (b4_identification): Depend on individual skeletons to
3399 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3400 values of the %define variables api.pure or api.push_pull. Define
3401 YYPURE, YYPUSH, and YYPULL accordingly.
3402 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3403 glr.cc has already defined b4_pure_flag.
3404 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3405 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3406 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3407 * doc/bison.texinfo (Pure Decl): Update.
3408 (Push Decl): Update.
3409 (Decl Summary): Add api.pure to %define entry.
3410 In %pure-parser entry, say it's deprecated and reference %define.
3411 (Pure Calling): Update.
3412 (Error Reporting): Update.
3413 (C++ Scanner Interface): Update.
3414 (How Can I Reset the Parser): Update.
3415 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3417 * src/getargs.c (pure_parser): Remove global variable.
3418 * src/getargs.h (pure_parser): Remove extern.
3419 * src/output.c (prepare): Don't define pure_flag muscle.
3420 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3421 wrapper around `%define api.pure'.
3422 * tests/calc.at (Simple LALR Calculator): Update.
3423 (Simple GLR Calculator): Update.
3424 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3426 (GLR: Resolve ambiguity, pure, locations): Update.
3427 (GLR: Merge conflicting parses, pure, no locations): Update.
3428 (GLR: Merge conflicting parses, pure, locations): Update.
3429 * tests/glr-regression.at (Uninitialized location when reporting
3431 * tests/input.at (Unused %define api.pure): New test case.
3432 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3433 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3434 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3436 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3438 %define push_pull -> %define api.push_pull. Discussed starting at
3439 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3440 * data/push.c: Expect the new name.
3441 * data/yacc.c: Likewise.
3442 * doc/bison.texinfo (Push Decl): Update.
3443 (Decl Summary): Update %define entry.
3444 (Push Parser Function): Update.
3445 (Pull Parser Function): Update.
3446 (Parser Create Function): Update.
3447 (Parser Delete Function): Update.
3448 * tests/calc.at (Simple LALR Calculator): Update.
3449 * tests/input.at (%define enum variables): Update.
3450 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3451 (Push Parsing: Multiple impure instances): Update.
3452 (Push Parsing: Unsupported Skeletons): Update.
3453 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3454 (Exploding the Stack Size with Malloc): Update.
3456 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3459 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3461 For the XML output's terminal element, rename @number to @token-number,
3462 and add @symbol-number. In the nonterminal element, rename @number to
3463 @symbol-number. Discussed starting at
3464 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3465 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3467 (xsl:template match="nonterminal"): Likewise.
3468 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3469 (xsl:template match="nonterminal"): Likewise.
3470 * src/print-xml.c (print_grammar): Implement.
3472 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3474 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3475 2007-10-11 change, the child elements here are items not rules.
3476 (xsl:template match="item"): New.
3477 (xsl:template match="rule"): Update for new reduced itemset.
3478 (xsl:template match="point"): Remove.
3479 (xsl:template match="empty"): For consistency with --graph, don't
3480 output "/* empty */".
3481 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3482 line-wrap, don't pass a negative value as first-line-length since this
3483 won't work with the following changes.
3484 (xsl:template name="line-wrap"): Simplify slightly.
3485 (xsl:template name="ws-search"): Eliminate recursion.
3486 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3487 set next to an item whose dot is not at the end of the RHS even if it
3488 happens to be associated with the same rule.
3490 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3492 Add %define lr.keep_unreachable_states.
3493 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3494 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3495 * src/main.c (main): Implement it.
3496 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3497 Extend to test it, and fix a typo.
3499 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3501 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3502 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3503 the example .output text.
3504 * tests/regression.at (Extra lookahead sets in report): Improve wording
3507 2007-10-17 Wojciech Polak <polak@gnu.org>
3509 * src/print-xml.c (print_grammar): Renamed
3510 <terminal> and <nonterminal> attributes:
3511 "type" to "number" and "symbol" to "name".
3512 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3513 Use new attribute names.
3514 (xsl:template match="nonterminal"): Likewise.
3515 * data/xslt/xml2xhtml.xsl: Likewise.
3517 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3519 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3520 (Option Cross Key): Likewise.
3522 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3523 next to an item whose dot is not at the end of the RHS even if it
3524 happens to be associated with the same rule.
3525 * src/print.c (print_core): Likewise.
3526 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3527 (Resolved SR Conflicts): Update output.
3528 * tests/regression.at (Extra lookahead sets in report): New test case.
3530 2007-10-11 Wojciech Polak <polak@gnu.org>
3532 * src/print-xml.c (print_core): Remove item set
3534 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3535 Improve processing time. Suggested by Joel E. Denny.
3536 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3537 Write xsl:param "required" attribute as comment.
3538 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3539 (xsl:template match="rule"): Support new reduced itemset.
3540 (xsl:template match="point"): Remove.
3541 * data/xslt/xml2xhtml.xsl: Likewise.
3543 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3545 * src/getargs.c (version): Update copyright year.
3547 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3549 Make xml2dot.xsl and --graph produce the same output.
3550 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
3551 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3553 (xsl:template name="output-node"): Use the new escape template instead
3554 of the string-replace template directly.
3555 (xsl:template name="output-edge"): Likewise.
3556 (xsl:template name="escape"): New, escapes backslashes and newlines in
3557 addition to quotation marks.
3558 * src/graphviz.c (start_graph, output_node, output_edge): Add
3559 whitespace to output for legibility.
3561 Make xml2text.xsl and --report produce the same output, and remove the
3562 XML "conflicts" element since a conflict summary is easily extracted
3564 * data/xslt/bison.xsl: New.
3565 (xsl:template match="state" mode="bison:count-conflicts): New.
3566 * data/xslt/xml2text.xsl: Import bison.xsl.
3567 (xsl:template match="bison-xml-report"): Instead of styling the
3568 "conflicts" element, style the "automaton" element with mode
3569 "conflicts". Unlike the former, the latter lists S/R and R/R
3570 conflicts for a state on the same line.
3571 (xsl:template match="conflicts"): Remove.
3572 (xsl:template match="conflict"): Remove.
3573 (xsl:template match="terminal"): Line-wrap the list of rules in which
3574 the terminal is used.
3575 (xsl:template match="nonterminal"): Likewise for nonterminals.
3576 (xsl:template match="automaton" mode="conflicts"): New.
3577 (xsl:template match="state" mode="conflicts"): New.
3578 (xsl:template name="line-wrap"): New.
3579 (xsl:template name="ws-search"): New.
3580 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3581 (xsl:template match="bison-xml-report"): Instead of styling the
3582 "conflicts" element, style the "automaton" element with mode
3584 (xsl:template match="conflicts"): Remove.
3585 (xsl:template match="conflict"): Remove.
3586 (xsl:template match="automaton" mode="conflicts"): New.
3587 (xsl:template match="state" mode="conflicts): New.
3588 * src/conflicts.c (conflicts_output_xml): Remove.
3589 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3590 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3591 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3592 the corresponding XSLT is easier. Also, never wrap between a word and
3593 the comma that follows it.
3595 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3597 Improve C++ namespace support. Discussed starting at
3598 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3599 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3600 b4_namespace_close): New macros that interpret the %define variable
3601 "namespace" so its value can contain "::" to indicate nested
3603 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3605 * data/lalr1.cc (b4_namespace): Likewise.
3606 * data/location.cc (b4_namespace): Likewise.
3607 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3608 inside a new table in the general %define entry. Document `%define
3609 namespace' there as well. Point the %name-prefix entry to it since it
3610 explains it more completely in the case of C++.
3611 (C++ Bison Interface): Mention `%define namespace' instead of
3613 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3615 * tests/c++.at (Relative namespace references): New test case.
3616 (Absolute namespace references): New test case.
3617 (Syntactically invalid namespace references): New test case.
3618 * tests/input.at (C++ namespace reference errors): New test case.
3620 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3622 Add syncline support and location accessor to internal %define
3624 * data/bison.m4 (b4_percent_define_get_loc): New.
3625 (b4_percent_define_get_syncline): New.
3626 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3627 (b4_percent_define_default): Record defining location as line 1 rather
3628 than 0 for the sake of synchronizing #line's, and define
3629 b4_percent_define_syncline(VARIABLE).
3630 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3631 * src/muscle_tab.c (muscle_syncline_grow): New.
3632 (muscle_code_grow): Use muscle_syncline_grow.
3633 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3634 define b4_percent_define_syncline(VARIABLE).
3635 (muscle_percent_define_get_loc): New.
3636 (muscle_percent_define_get_syncline): New.
3637 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3638 remove some unused variables.
3639 (muscle_percent_define_default): Record defining location as line 1
3640 rather than 0 for the sake of synchronizing #line's, and define
3641 b4_percent_define_syncline(VARIABLE).
3642 (muscle_percent_define_check_values): Use
3643 muscle_percent_define_get_loc.
3644 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3645 (muscle_percent_define_get_syncline): Prototype.
3646 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3647 defaults): Update output for location change.
3648 (Complaining during macro argument expansion): Extend to test
3649 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3651 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3653 Fix some error-reporting macro bugs.
3654 * data/bison.m4 (b4_cat): New.
3655 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3656 to stdout so they don't become arguments to other macros. Update
3657 comments and add examples.
3658 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3660 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3661 after printing the error directive so that M4 doesn't report subsequent
3662 problems that are induced by this problem.
3663 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3664 instead of just in them. Recognize @\n in both places. Both expand to
3665 the empty string. Needed by b4_cat.
3666 * tests/skeletons.at (Complaining during macro argument expansion):
3668 (Fatal errors make M4 exit immediately): New test case.
3670 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3672 Implement --print-datadir.
3673 * src/getargs.c (usage): Mention.
3674 (PRINT_DATADIR_OPTION): New anonymous enum member.
3675 (long_options): Add entry for it.
3676 (getargs): Add case for it calling compute_pkgdatadir.
3677 * src/output.c (output_skeleton): Encapsulate data directory
3678 computation from here...
3679 (prepare): ... and from here...
3680 (compute_pkgdatadir): ... into this new function.
3681 * src/output.h (compute_pkgdatadir): Prototype.
3683 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3685 * src/print-xml.c (escape_bufs): New static global variable
3687 (xml_escape_n): ... the static local variable buf here.
3688 (print_xml): Free memory for escape_bufs.
3689 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3691 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3693 Replace `%push-parser' and `%push-pull-parser' with
3694 `%define push_pull "push"' and `%define push_pull "both"'.
3695 `%define push_pull "pull"' is the default.
3696 * doc/bison.texinfo (Push Decl, Push Parser Function,
3697 Pull Parser Function, Parser Create Function, Parser Delete Function):
3698 Update declarations.
3699 (Decl Summary, Table of Symbols): Replace %push-parser and
3700 %push-pull-parser entries with a %define push_pull entry.
3701 * data/bison.m4 (b4_percent_define_check_values): New macro.
3702 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3704 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3706 * data/push.c: ... to here and compute them from the value of the
3707 %define variable push_pull.
3708 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3709 parsing requests here...
3710 * data/yacc.c: ... hack this to switch to push.c any time
3711 b4_use_push_pull_flag or the %define variable push_pull is set. This
3712 will go away when we mv push.c yacc.c.
3713 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3714 push parsing is not supported since unused %define variables are
3716 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3717 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3718 comments for consistency with b4_percent_define_check_values.
3719 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3721 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3723 (prologue_declaration): Remove %push-parser and %push-pull-parser
3725 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3726 * tests/calc.at: Update declarations.
3727 * tests/input.at (%define enum variables): New test case.
3728 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3730 (Push Parsing: Multiple impure instances): Update declaration.
3731 (Push Parsing: Unsupported Skeletons): New test case.
3732 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3734 (Exploding the Stack Size with Malloc): Update declaration.
3736 2007-09-24 Wojciech Polak <polak@gnu.org>
3738 Add XSLT transformations.
3740 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3741 * data/xslt/xml2text.xsl: Transform XML into plain text.
3742 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3743 * data/Makefile.am (xsltdir): New variable.
3744 (dist_xslt_DATA): Add xslt/*.xsl files.
3746 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3748 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3749 Problem reported by Wojciech Polak.
3750 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3751 (xml_printf): Undo change I made on 21 September; that is,
3752 indent 2 spaces, not 1.
3754 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3756 Pacify ./configure --enable-gcc-warnings.
3757 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3758 `char const *' instead of `char *'.
3759 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3760 local variable `sep'.
3762 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3764 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3766 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3767 (xml_printf): Indent just 1 space for level.
3768 (e_char, xlate_char): Remove.
3769 (xml_escape_string): Rewrite to avoid undefined behavior (used
3770 storage that was freed from the stack).
3771 (xml_escape_n): Don't bother checking for subscript error.
3773 2007-09-21 Wojciech Polak <polak@gnu.org>
3775 Add Bison XML Automaton Report.
3777 Add support for an -x option to generate an XML report.
3778 It is not documented yet.
3779 * src/print-xml.c: New file.
3780 * src/print-xml.h: Likewise.
3781 * lib/timevar.def (TV_XML): New var.
3782 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3783 * src/conflicts.c: Include print-xml.h.
3784 (solved_conflicts_xml_obstack): New var.
3785 (log_resolution, conflicts_solve, conflicts_free):
3786 Add support for XML report.
3787 (conflicts_output_val): New function.
3788 * src/conflicts.h (conflicts_output_val): New decl.
3789 * src/files.c (spec_xml_file): New var.
3790 (compute_output_file_names, output_file_names_free): Add XML support.
3791 * src/files.h (spec_xml_file): New decl.
3792 * src/getargs.c (xml_flag): New var.
3793 (usage, short_options, long_options, getargs): Add XML support.
3794 * src/getargs.h (xml_flag): New decl.
3795 * src/gram.c: Include print-xml.h.
3796 (rule_lhs_print_xml, rule_rhs_print_xml):
3797 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3799 * src/gram.h: Declare external ones.
3800 * src/main.c: Include print-xml.h.
3801 (main): Add XML support.
3802 * src/reduce.c: Include print-xml.h.
3803 (reduce_xml): New function.
3804 * src/reduce.h: Declare it.
3805 * src/state.c: Include print-xml.h.
3806 (state_new): Add XML support.
3807 (state_rule_lookahead_tokens_print_xml): New function.
3808 * src/state.h: Declare it.
3809 (struct state): New member solved_conflicts_xml.
3810 * src/symtab.c (symbol_class_get_string): New function.
3811 * src/symtab.h: Declare it.
3813 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3815 * GNUmakefile: Switch to coreutils's version.
3816 * bootstrap: Likewise.
3817 * Makefile.cfg: Adjust to new GNUmakefile.
3818 * README-hacking: Likewise.
3822 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3823 Bruno Haible <bruno@clisp.org>
3825 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3826 and is a script that invokes bison. Tighten the code. Add comments.
3828 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3830 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3831 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3832 * doc/bison.texinfo (Decl Summary): Fix.
3833 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3834 * tests/input.at (Boolean %define variables): Update output.
3835 * tests/skeletons.at (%define boolean variables: invalid skeleton
3836 defaults): Rename to...
3837 (%define Boolean variables: invalid skeleton defaults): ... this and
3840 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3842 In impure push mode, don't allow more than one yypstate to be allocated
3843 since multiple impure parsers would corrupt yynerrs.
3844 * data/push.c (yypstate_allocated): New static global variable
3846 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3847 exhaustion if yypstate_allocated is 1, but still return 2.
3848 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3849 already 1. Otherwise, set it to 1.
3850 (yypstate_delete): Set it to 0.
3851 * tests/push.at (Push Parsing: Multiple impure instances): New test
3854 2007-08-17 Bob Rossi <bob@brasko.net>
3856 * doc/bison.texinfo (Push Decl): Document the push parser.
3857 (Table of Symbols): Ditto.
3859 (Decl Summary): Ditto.
3860 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3861 Parser Create Function, Parser Delete Function):
3862 Add new push parser symbols.
3863 (Table of Symbols): Document push-parser, push-pull-parser,
3864 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3866 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3869 * doc/gpl-3.0.texi: New file.
3870 * doc/gpl.texi: Remove.
3871 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3872 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3873 * README-hacking, TODO, bootstrap, bootstrap.conf:
3874 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3875 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3876 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3877 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3878 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3879 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3880 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3881 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3882 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3883 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3884 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3885 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3886 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3887 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3888 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3889 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3890 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3891 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3892 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3893 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3894 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3895 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3896 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3897 * src/complain.c, src/complain.h, src/conflicts.c:
3898 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3899 * src/files.h, src/flex-scanner.h, src/getargs.c:
3900 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3901 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3902 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3903 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3904 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3905 * src/print.c, src/print.h, src/print_graph.c:
3906 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3907 * src/reduce.h, src/relation.c, src/relation.h:
3908 * src/revision.h, src/scan-code.h, src/scan-code.l:
3909 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3910 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3911 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3912 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3913 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3914 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3915 * tests/existing.at, tests/glr-regression.at:
3916 * tests/headers.at, tests/input.at, tests/java.at:
3917 * tests/local.at, tests/output.at, tests/push.at:
3918 * tests/reduce.at, tests/regression.at, tests/sets.at:
3919 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3923 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3925 Get rid of broken %no-parser, -n, and --no-parser implementation and
3927 * TODO: Don't mention them.
3928 * doc/bison.1: Likewise.
3929 * doc/bison.texinfo (Decl Summary): Likewise.
3930 (Bison Options): Likewise.
3931 (Option Cross Key): Likewise.
3932 * src/getargs.c (no_parser_flag): Remove global variable.
3933 (usage): Don't print description of -n and --no-parser.
3934 (long_options): Remove --no-parser entry here.
3935 (getargs): Remove -n case in the switch here.
3936 * src/getargs.h (no_parser_flag): Remove extern.
3937 * tests/regression.at (Web2c Actions): Remove comment that mentions
3940 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3942 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3943 name user variables starting with `yy'. Just pass NULL instead of a
3944 dummy local &yylval to yypush_parse.
3945 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3948 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3950 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3951 true since it's then always used regardless of whether yyoverflow is
3952 defined. Reported by Christian Burger at
3953 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3954 * THANKS: Add Christian Burger.
3956 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3957 node names: say "Decl Summary" not "Bison Declaration Summary".
3959 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3961 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3962 determine whether this function has already complained about an invalid
3963 value for a %define boolean variable, don't check whether Bison has
3964 ever examined the value. As written, the check was a tautology.
3965 Instead, record and check for this complaint using a separate muscle.
3967 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3969 Fix push parsing memory leak reported by Brandon Lucia at
3970 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3971 * THANKS: Add Brandon Lucia.
3972 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3973 but the parse never completed and thus freed it.
3974 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3975 * tests/testsuite.at: Include push.at.
3976 * test/push.at: New.
3977 (Push Parsing: Memory Leak for Early Deletion): New test case.
3979 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3981 Improve handling of multiple S/R conflicts in the same state and of S/R
3982 conflicts involving multiple reductions.
3983 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3984 set for a state here or Bison will abort if it is reassigned on a
3985 later conflicted reduction in the same state.
3986 Similarly, don't finalize and assign the solved conflicts report here
3987 or it will be lost if it is reassigned on a later conflicted reduction
3989 (set_conflicts): Instead, assign them both here after all S/R conflicts
3990 in the state have been fully examined.
3991 * src/print.c (shift_set): Rename to...
3992 (no_reduce_set): ... this.
3993 (print_reductions): Update for rename, and add %nonassoc error action
3994 tokens to no_reduce_set so that, when printing the first remaining
3995 reduction on an error action token, the reduction is enclosed in
3997 (print_results): Update for rename.
3998 * tests/conflicts.at (Solved conflicts report for multiple reductions
3999 in a state): New test case.
4000 (%nonassoc error actions for multiple reductions in a state): New test
4003 * src/main.c (main): Don't depend on C99 features.
4005 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4007 * build-aux/.cvsignore: Add compile.
4008 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4011 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4013 * bootstrap (slurp): Create target directories that don't exist.
4014 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4016 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4018 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4020 * closure.c (closure): Likewise.
4021 * state.h (reductions): Comment sorting of rules.
4022 (state): Comment sorting of items.
4024 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4026 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4027 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4028 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4029 definition in order to avoid Gnulib headers since we don't use config.h
4031 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4032 rather than AT_DATA so that config.h is included.
4034 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4036 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4037 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4038 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4039 and so that YYFPRINTF is guaranteed to be defined here.
4041 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4043 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4045 (muscle_percent_define_check_values): ... this more helpful function.
4046 Again, it's not used yet, but it will be.
4047 * src/muscle_tab.h: Likewise.
4049 Improve some comments in parser table construction.
4050 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4051 (generate_states): Don't mention ruleset, which is internal to closure.
4052 * src/closure.c (closure): Explain sorting of core and itemset, which
4053 is required for this function to behave correctly.
4054 * src/closure.h (closure): Mention sorting.
4056 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4058 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4059 move the check for disabled transitions to an aver since conflict
4060 resolution hasn't happened yet.
4062 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4063 labels a state as inconsistent just because it has error transitions.
4064 The original form of this check appeared in revision 1.1 of lalr.c,
4065 which was committed on 1991-12-21. Now (at least), changing the
4066 consistency label on such a state appears to have no useful effect in
4067 any of the places it is examined, which I enumerate below. The key
4068 point to understanding each item in this enumeration is that a state
4069 with an error transition is labelled consistent in the first place only
4070 if it has no rules, so the check cannot matter for states that have
4071 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4072 to try to identify its conflicts, and a state must have *rules* to have
4073 conflicts. (2) Labelling a state as inconsistent will affect how
4074 action_row sets the default *rule* for the state. (3) Labelling a
4075 state as inconsistent will cause build_relations to add lookback edges
4076 to *rules* in that state.
4077 * src/state.h (struct state): Word the comment for member consistent
4080 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4082 Don't depend on C99 features.
4083 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4084 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4085 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4086 * src/state.c (state_mark_reachable_states): Fix for-loop.
4087 (state_remove_unreachable_states): Fix for-loop.
4089 Don't widen struct state with member reachable just to temporarily
4090 record reachability. Instead, use a local bitset.
4091 * src/state.h (struct state): Remove member.
4092 * src/state.c (state_new): Don't initialize it.
4093 (state_mark_reachable_states): Rename to...
4094 (state_record_reachable_states): ... this, and use bitset.
4095 (state_remove_unreachable_states): Use bitset.
4097 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4099 * src/Makefile.am (yacc): Quote target action commands properly so
4100 that the yacc script isn't corrupt. Reported by Hans Aberg at
4101 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4103 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4104 the case of pure parsers. Reported by Frans Englich at
4105 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4106 * THANKS: Add Frans Englich.
4108 * NEWS (2.3a+): In the %code entry, reference section `Bison
4109 Declaration Summary' from the manual now since the %code summary has
4111 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4112 in the rules section must be terminated by semicolons.
4114 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4116 Extend the front-end API for %define variables to more completely
4117 mirror the back-end. This will be useful in the future.
4118 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4119 Update comments to mention the new front-end counterparts of these
4121 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4122 for muscle_string_decode and muscle_location_decode.
4123 (muscle_string_decode): New static function.
4124 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4125 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4127 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4128 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4129 implementation more closely.
4130 (muscle_percent_define_invalid_value): New function.
4131 * src/muscle_tab.h (muscle_percent_define_get,
4132 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4135 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4137 * NEWS (2.3a+): Mention yesterday's state-removal change.
4138 (2.3a): Remove the %language entry, which was added after 2.3a.
4139 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4140 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4141 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4142 tests/existing.at: Update copyright date.
4144 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4146 If conflict resolution makes states unreachable, remove those states,
4147 report rules that are then unused, and don't report conflicts in those
4149 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4150 New global function.
4151 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4153 * src/main.c (main): After conflict resolution, remove the unreachable
4154 states and update all data structures that reference states by number.
4155 * src/state.c (state_new): Initialize each state's reachable member to
4157 (state_mark_reachable_states): New static function.
4158 (state_remove_unreachable_states): New global function.
4159 * src/state.h (struct state): Add member bool reachable.
4160 (state_remove_unreachable_states): Prototype.
4161 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4163 * tests/existing.at (GNU pic Grammar): Update test case output now that
4164 an unused rule is discovered.
4166 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4168 Minor code cleanup in parser table construction.
4169 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4170 (new_itemsets, save_reductions): Update for rename to nitemset.
4171 * src/closure.c (nritemset): Rename to...
4172 (nitemset): ... this since the "r" appears to meaningless and isn't
4173 used in the comments.
4174 (closure): Update for rename.
4175 * src/closure.h (nritemset): Update extern to...
4176 (nitemset): ... this.
4177 * src/lalr.c (LA): Fix a typo in comments.
4178 * src/print.c (print_core): Update for rename to nitemset.
4179 * src/print_graph.c (print_graph): Likewise.
4180 * src/state.h: Fix some typos in header comments.
4182 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4184 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4185 still sticks to ASCII. Sorry!
4187 * README-hacking: New file, taken mostly from coreutils, with changes
4188 for Bison. Contains much of the contents of:
4189 * README-cvs: Remove.
4190 * bootstrap: Sync from gnulib.
4191 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4192 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4194 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4196 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4198 (Java Differences): Fix some typos.
4199 * THANKS: Add Sebastian Setzer.
4201 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4203 * data/java.m4 (b4_single_class_if): Remove.
4204 (b4_abstract_if): Look at "%define abstract".
4206 (b4_union_name): Rename...
4207 (b4_yystype): ... to this. Map to "%define stype".
4208 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4209 b4_maybe_throws): Fix quoting.
4210 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4211 * data/lalr1.java (Lexer interface): Always define.
4212 (Lexer interface within parser class): Remove.
4213 (YYLexer class): New, used when "%code lexer" is present.
4214 (constructor): When "%code lexer" is used, pass %lex-param
4215 to the lexer constructor.
4216 (yylex, yyparse): Remove %lex-param from method invocations
4217 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4219 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4220 abstract". Rename "%define union_name" to "%define stype".
4221 Rename method names according to previous patch.
4222 (Java Scanner Interface): Describe "%code lexer" instead of
4223 "%pure-parser" and "%define single_class".
4224 (Java Differences): Mention "%code lexer".
4226 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4227 Include scanner here, using macros from tests/local.at.
4228 (AT_DATA_CALC_Y): Remove final argument.
4229 (_AT_CHECK_JAVA_CALC): Likewise.
4230 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4231 of %locations and %error-verbose.
4232 (main): Test with and without %lex-param.
4233 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4234 (AT_BISON_OPTION_POPDEFS): Pop it.
4236 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4238 DJGPP spefic issue. Inhibit the use of disallowed characters for
4239 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4240 and concern testsuite case 46.
4241 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4242 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4243 * djgpp/config.bat: Inhibit the use of disallowed characters.
4245 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4247 Miscellaneous %define and %code cleanup.
4248 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4249 values are interpreted.
4250 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4251 documentation a little more.
4252 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4253 muscle_percent_define_insert, muscle_percent_code_grow): New
4255 * src/muscle_tab.h (muscle_percent_define_insert,
4256 muscle_percent_code_grow): Prototype.
4257 * src/parse-gram.y (prologue_declaration): Use
4258 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4259 %define and %code directives.
4261 Make it easy to share %define boolean variables between the front-end
4262 and back-end. Though not used yet, this will be useful in the future.
4263 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4264 Bison uses of names rather than just skeleton uses of names.
4265 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4266 b4_percent_define_skeleton_variables(VARIABLE) to
4267 b4_percent_define_bison_variables(VARIABLE).
4268 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4269 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4270 b4_percent_code_bison_qualifiers(QUALIFIER).
4271 (b4_check_user_names_wrap): Update for renames.
4272 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4273 muscle_percent_define_default): New functions mimicking
4274 b4_percent_define_flag_if and b4_percent_define_default.
4276 For %define variables, report locations for invalid values and
4278 * data/bison.m4 (b4_percent_define_flag_if): Read
4279 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4281 (b4_percent_define_default): Save a special location in
4282 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4283 must later be reported as invalid.
4284 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4286 (muscle_percent_define_insert): Record the location of VARIABLE in
4287 muscle percent_define_loc(VARIABLE), and use it to report the previous
4288 location for a redefinition.
4289 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4290 (muscle_percent_define_default): Update like b4_percent_define_default.
4291 (muscle_grow_user_name_list): Rename to...
4292 (muscle_user_name_list_grow): ... this for consistency and use
4293 muscle_location_grow.
4294 * src/muscle_tab.h (muscle_location_grow): Prototype.
4295 * tests/input.at (%define errors): Update expected output.
4296 * tests/skeletons.at (%define boolean variables: invalid skeleton
4297 defaults): New test case.
4299 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4301 * src/print.c (lookahead_set, state_default_rule): Remove.
4302 (print_reductions): Replace state_default_rule invocation with
4303 equivalent use of yydefact, which was computed in token_actions in
4305 (print_results): Don't allocate lookahead_set.
4307 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4309 * data/lalr1.java: Prefix all private members with yy.
4311 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4313 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4314 Sebastien Fricker at
4315 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4316 * THANKS: Add Sebastien Fricker.
4317 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4318 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4319 accept a variable number of arguments.
4321 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4323 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4325 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4327 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4328 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4329 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4331 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4333 Undo my 2007-02-07 change, switching back to the c-strcase module
4334 introduced in the 2007-02-03 change. Bruno Haible reported that
4335 the 2007-02-07 change would be dangerous in Turkish if we add a
4336 language whose name contains "i", since "i" is not lowercase "I"
4338 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4339 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4340 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4341 * m4/.cvsignore: Remove strcase.m4.
4342 * src/getargs.c: Revert 2007-02-07 change, as follows.
4343 Include c-strcase.h.
4344 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4346 2007-02-11 Bruno Haible <bruno@clisp.org>
4348 Enable the Java related testsuite tests when the only Java compiler
4349 found is a gcj < 4.3. Discussed at
4350 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4351 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4353 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4355 * data/Makefile.am: Update copyright date.
4356 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4357 yypstate_new returns NULL.
4358 (yypstate_new): Return NULL if malloc does.
4359 * src/reader.c (packgram): Move translation of rule actions from the
4360 beginning of packgram to...
4361 (check_and_convert_grammar): ... here right before packgram is invoked
4362 so it's easier to write more complete comments, and remove redundant
4365 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4367 As in semantic actions, make @$ in %initial-action, %destructor, and
4368 %printer imply %locations.
4369 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4371 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4372 (@$ in %initial-action implies %locations,
4373 @$ in %destructor implies %locations,
4374 @$ in %printer implies %locations): ... these new test cases.
4376 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4378 Undo most of the 2007-02-03 change, switching to the strcase module
4379 now that gnulib strcase has been fixed.
4380 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4381 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4382 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4383 * m4/.cvsignore: Add strcase.m4.
4384 * src/getargs.c: Revert 2007-02-03 change, as follows.
4385 Don't include c-strcase.h.
4386 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4387 strcasecmp has "unspecified behavior" outside the POSIX locale,
4388 but it works fine in practice if at least one argument is ASCII,
4389 as is the case in Bison.
4391 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4393 * tests/java.at: Skip tests if only one of javac/java is present.
4394 Reported by Joel E. Denny.
4395 * tests/atlocal.in: Adjust copyright years.
4397 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4399 * data/lalr1.java (Stack): Work around old verifiers that disallow
4400 access to the private fields of an inner class, from the outer class.
4401 We can make Stack's fields public because user code doesn't have access
4402 to the instance of Stack used by parse(). Reported by Paul Eggert.
4404 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4406 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4407 the right spot for these files?
4408 * bootstrap.conf (gnulib_modules): Add c-strcase.
4409 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4411 * src/getargs.c: Include c-strcase.h.
4412 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4413 to avoid unspecified behavior.
4415 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4417 * doc/bison.texinfo (Decl Summary): Correct typo.
4419 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4421 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4422 Complain if the value does not match empty, "true" or "false".
4423 * data/c++.m4: Adjust default definitions of %define variables.
4424 * data/java.m4: Adjust default definitions of %define variables.
4425 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4427 * tests/input.at (Boolean %define variables): Test new behavior.
4429 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4431 * NEWS: Mention java.
4432 * TODO: Remove things that are done.
4433 * bootstrap.conf: Add javacomp-script and javaexec-script.
4434 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4436 * data/Makefile.am: Add new files.
4437 * data/java-skel.m4: New.
4438 * data/java.m4: New.
4439 * data/lalr1.java: New.
4441 * doc/bison.texinfo: Put "A Complete C++ Example" under
4442 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4443 under Other Languages.
4445 * src/getargs.c (valid_languages): Add Java.
4446 * src/getargs.h (struct bison_language): Update size of string fields.
4448 * tests/Makefile.am: Add java.at.
4449 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4450 * tests/java.at: New.
4451 * tests/testsuite.at: Include it.
4453 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4456 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4457 at_directive_argv arguments so these no longer have to be global
4458 variables. Also, update the implementation for the following changes.
4459 (fail_for_at_directive_too_many_args,
4460 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4461 (at_directive_name): Remove as at_directive_argv[0] will be used for
4463 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4464 for the directive name.
4465 (at_directive_argc, at_directive_argv): Make these local within
4466 skel_lex instead of global.
4467 (INITIAL): Update directive start action for above changes.
4468 (SC_AT_DIRECTIVE_ARG): Rename to...
4469 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4470 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4471 (scan_skel): Move yylex_destroy to...
4472 (skel_scanner_free): ... here.
4473 * tests/skeletons.at (installed skeleton file name): Rename to...
4474 (installed skeleton file names): ... this.
4476 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4478 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4479 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4480 Summary" not "Directives".
4481 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4482 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4483 since the former is now the more complete one.
4484 (Prologue Alternatives): Likewise and do the same for %defines.
4485 (Table of Symbols): Add summary of %code, add summary of %define, and
4486 move full %code documentation to...
4487 (Decl Summary): ... here for consistency with other entries in these
4489 Move %define entry in order to keep this list alphabetized.
4490 Reword %define entry a little to put less emphasis on the skeleton
4491 concept, which most users shouldn't have to think about.
4493 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4495 Adjust to recent gnulib changes.
4496 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4497 Add string.h, string_.h, unistd_.h, wchar_.h.
4498 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4499 * src/system.h: Don't include <stpcpy.h>; this is now done by
4502 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4504 Simplify implementation of unqualified %code, implement macros for
4505 uniform treatment of boolean %define flags. Document %define.
4506 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4507 b4_percent_code_ifdef): New.
4508 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4509 * data/c++.m4: Define default value for global_tokens_and_yystype.
4510 * data/glr.cc: Likewise.
4511 * data/location.cc: Use b4_percent_define_flag_if.
4513 * doc/bison.texinfo (Decl Summary): Document %define.
4515 * src/parse-gram.y (Unqualified %code): Change muscle name to
4517 (content.opt): Default to empty.
4519 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4521 Implement support for relative and absolute skeleton file names.
4522 Discussed starting at
4523 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4524 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4525 (Bison Options): Document in --skeleton entry.
4526 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4527 full_skeleton can't necessarily hold all of pkgdatadir.
4528 If the specified skeleton file name contains a `/', don't prepend
4530 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4531 file name contains a `/', prepend the grammar file directory.
4532 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4533 * skeletons.at: New file.
4534 (relative skeleton file names): New test case.
4535 (installed skeleton file names): New test case.
4536 * tests/testsuite.at: Include skeletons.at.
4538 * bootstrap: Update copyright to 2007.
4540 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4542 * bootstrap: Remove occurrences of .#bootmp from the files.
4544 2007-01-17 Akim Demaille <akim@epita.fr>
4546 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4548 Use per-type %printer.
4550 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4552 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4553 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4554 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4555 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4556 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4557 tests/glr-regression.at, tests/input.at, tests/local.at,
4558 tests/output.at, tests/torture.at: Update copyright to 2007.
4560 2007-01-16 Akim Demaille <akim@epita.fr>
4562 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4564 (Calc++ Scanner): Exit with failure if we can't open the input
4566 Accept "-" standing for stdin.
4567 (Calc++ Top Level): Print the result only if the parsing was
4570 2007-01-16 Akim Demaille <akim@epita.fr>
4572 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4574 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4575 and Joel E. Denny <jdenny@ces.clemson.edu>
4577 Clean up %define and %code implementation in M4 some. Most
4578 importantly, rename all related macros to be in the b4_percent_define
4579 and b4_percent_code namespaces. Also, complete support for `.' in
4580 %define variable names and %code qualifiers.
4581 * data/bison.m4 (b4_check_user_names): Check for special
4582 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4584 (b4_get_percent_define, b4_get_percent_code): Rename to...
4585 (b4_percent_define_get, b4_percent_code_get): ... these.
4586 Extend documentation with examples.
4587 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4588 b4_percent_define_skeleton_variables and
4589 b4_percent_code_skeleton_qualifiers.
4590 Expect any value for the %define variable `foo' to be stored in the
4591 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4592 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4593 expect any unqualified %code blocks to be stored in a macro named
4594 `b4_percent_code_unqualified'.
4595 Use m4_indir so that %define variable names and %code qualifiers can
4596 contain `.', which is allowed by the grammar parser.
4597 (b4_percent_define_default): New macro to set a default value for a
4599 (m4_wrap): Update wrapped code, and fix some underquoting.
4600 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4601 Expect grammar uses of %define variables and %code qualifiers to be
4602 defined in b4_percent_define_user_variables and
4603 b4_percent_code_user_qualifiers.
4604 * data/c++.m4: Use b4_percent_define_default rather than
4605 m4_define_default. Fix some underquoting. Skeleton usage of %define
4606 variable define_location_comparison now implies skeleton usage of
4607 %define variable filename_type.
4608 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4609 data/push.c, data/yacc.c: Update macro names.
4610 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4613 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4615 DJGPP specific issues.
4617 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4618 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4620 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4622 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4623 run parsers in all tests so that Valgrind is invoked during
4624 maintainer-check-valgrind.
4625 (Duplicate representation of merged trees): Free all semantic values.
4626 (Duplicated user destructor for lookahead): Likewise.
4628 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4630 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4631 command-line prefix.
4632 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4633 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4634 miss Valgrind messages.
4635 (Exploding the Stack Size with Malloc): Likewise.
4637 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4639 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4640 locals. Reported by Juan Manuel Guerrero at
4641 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4642 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4643 Fix some indentation also.
4644 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4645 explaining this issue.
4647 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4648 and Joel E. Denny <jdenny@ces.clemson.edu>
4650 Simplify union and prologue handling, and escape union and lex/parse
4651 params with digraphs.
4652 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4653 values to the empty string since these are no longer guaranteed
4654 initialized by the front-end.
4655 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4656 braces around b4_user_stype since this is no longer done by the
4658 * src/files.c, src/files.h (pre_prologue_obstack,
4659 post_prologue_obstack): Remove.
4660 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4661 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4662 with digraphs. This fixes lex params and parse params.
4663 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4664 * src/output.c (prepare): Remove muscle insertion of the prologues.
4665 (output): Remove freeing of pre_prologue_obstack and
4666 post_prologue_obstack.
4667 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4668 than prologue_augment for prologue parsing so you don't need prologue
4670 (grammar_declaration): For %union RHS, use `braceless' instead of
4671 "{...}" so that braces are already stripped and code is escaped with
4673 * src/reader.c (prologue_augment): Remove.
4674 (reader): Remove initialization of pre_prologue_obstack and
4675 post_prologue_obstack.
4676 * src/reader.h (prologue_augment): Remove.
4678 * data/c.m4: Remove stray parenthesis.
4680 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4682 Remove quotes from variables names in %define directives and from
4683 qualifiers in %code directives, and restrict the characters that are
4684 allowed in them to M4-friendly ones. For %define, continue to support
4685 the quoted form as a deprecated feature. Discussed starting at
4686 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4687 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4689 * doc/bison.texinfo (Prologue Alternatives): Update.
4690 (Decl Summary): In %defines entry, update mention of `%code requires'
4691 and `%code provides'.
4692 (C++ Location Values): Update %define uses.
4693 (Calc++ Parser Interface): Likewise.
4694 (Calc++ Parser): Likewise, and update `%code requires' uses.
4695 (Table of Symbols): Update %code documentation.
4696 * src/parse-gram.y (prologue_declaration): For %define variables, use
4697 `variable' instead of `STRING'.
4698 (grammar_declaration): For %code qualifiers, use `ID' instead of
4700 (variable): New nonterminal that takes an `ID' or a `STRING'.
4701 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4703 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4704 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4705 (%define errors): Update %define uses.
4707 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4709 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4710 instead of muscle_insert for %define values so that M4-special
4711 characters are replaced with digraphs.
4712 * tests/input.at (%define errors): Extend to check weird values.
4714 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4716 Instead of having skeletons declare all valid %define variables and
4717 %code qualifiers, provide macros that retrieve the associated values
4718 and build these lists automatically. Thus Bison will now warn when a
4719 variable or qualifier is not used by the skeleton in the current
4720 invocation regardless of whether it might sometimes be used by that
4721 skeleton in other invocations. Also, move all %define value macros to
4722 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4723 form, which is replaced by %code.
4724 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4725 (b4_check_user_names): ... this, and change the series of valid name
4726 arguments to a single list argument for names used in the skeleton
4727 similar to the existing list argument for names used in the grammar.
4728 Warn instead of complaining.
4729 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4730 values and %code code, to format %code code properly, and to build
4731 lists of all %define variables and %code qualifiers used in the
4732 skeleton: b4_skeleton_percent_define_variables and
4733 b4_skeleton_percent_code_qualifiers.
4734 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4736 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4737 the skeleton names lists can finish building first. In place of
4738 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4739 expect the lists b4_user_percent_define_variables and
4740 b4_user_percent_code_qualifiers.
4741 * data/c++.m4: Where setting default values for b4_parser_class_name,
4742 b4_location_type, b4_filename_type, b4_namespace, and
4743 b4_define_location_comparison, update their names to the
4744 b4_percent_define_ namespace.
4745 * data/glr.c: Don't use b4_check_percent_define_variables and
4746 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4747 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4748 (b4_parser_class_name, b4_namespace): Define these using
4749 b4_get_percent_define for parser_class_name and namespace.
4750 * data/location.cc: Use b4_get_percent_define.
4751 * data/push.c: Don't use b4_check_percent_define_variables and
4752 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4753 * data/yacc.c: Likewise, and don't call m4_exit in
4754 b4_use_push_for_pull_if or m4_wrap code will never execute.
4755 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4757 (muscle_grow_user_name_list): ... this for consistency with the
4758 terminology used in bison.m4.
4759 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4760 %define variable names, and rename muscle used_percent_define_variables
4761 to user_percent_define_variables.
4762 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4763 user_percent_code_qualifiers.
4765 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4766 {CODE} form is no longer accepted.
4767 * tests/input.at (Reject bad %code qualifiers): Rename to...
4768 (Reject unused %code qualifiers): ... this, and update test output.
4769 (%define error): Update test output.
4771 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4773 Check for unrecognized %define variables similar to checking for
4774 unrecognized %code qualifiers. Check for redefined %define variables.
4775 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4777 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4778 (b4_check_percent_define_variables): New, also wraps it.
4779 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4780 variables using b4_check_percent_define_variables.
4781 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4782 all those exercised in the test suite and all those listed in the
4783 `Default values' section of c++.m4. Are there others?
4784 * data/push.c, data/yacc.c: Declare no valid %define variables.
4785 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4786 similar to muscle_find, but it works even when the muscle stores a
4788 (muscle_grow_used_name_list): New function for constructing the used
4789 name list muscles that b4_check_for_unrecognized_names requires.
4790 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4791 %define'd more than once. Define the b4_used_percent_define_variables
4792 muscle with muscle_grow_used_name_list.
4793 (grammar_declaration): Abbreviate %code code with
4794 muscle_grow_used_name_list.
4795 * tests/input.at (%define errors): New.
4797 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4799 Provide warn_at, complain_at, and fatal_at function callbacks to the
4800 skeletons, and use this for %code qualifier complaints.
4801 * data/bison.m4 (b4_error_at): New, invoked by...
4802 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4803 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4804 @fatal_at(...@) directives.
4805 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4806 qualifiers in b4_used_percent_code_qualifiers and to use
4808 * src/location.c, src/location.h (boundary_set_from_string): New global
4810 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4812 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4813 to b4_used_percent_code_qualifiers.
4814 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4816 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4817 (lineno): Rename to...
4818 (out_lineno): ... this so I don't misunderstand it again.
4819 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4820 here; these newlines are in the input but not the output file.
4821 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4822 (at_directive_perform): ... this new static function, and add handling
4823 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4825 * tests/input.at (Reject bad %code qualifiers): Update test output with
4826 locations and extend.
4828 * tests/output.at (Output file name: [, Output file name: ]): Remove
4829 bogus comment about these tests failing.
4831 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4833 Clean up b4_check_percent_code_qualifiers a little.
4834 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4835 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4836 documentation and add examples.
4837 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4840 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4842 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4843 unreliable -- especially when they're hidden inside another macro.
4844 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4845 data/c.m4: Remove m4_divert(-1).
4846 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4847 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4848 m4_divert_push(0) and m4_divert_pop(0).
4849 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4850 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4851 pushed and popped by m4sugar, should be first on the stack.
4853 Provide warn, complain, and fatal function callbacks to the skeletons.
4854 This provides more flexibility than m4_fatal, improves the error
4855 message format, and captures messages for translation. Discussed
4857 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4858 * data/bison.m4 (b4_error): New, invoked by...
4859 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4860 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4861 directives. Because these M4 macros might be called when the current
4862 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4863 the previous removal of uses of m4_divert, which caused trouble.
4864 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4865 m4_fatal to report unrecognized %code qualifiers.
4866 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4867 push parser requests.
4868 * data/glr.c: Use b4_complain instead of m4_fatal to report
4869 non-deterministic push parser requests.
4870 Update @output usage to @output(...@) form.
4871 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4872 report missing %defines. Update @output usage to @output(...@) form.
4873 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4875 * src/main.c (main): Invoke skel_scanner_free.
4876 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4877 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4878 obstack_for_string from flex-scanner.h.
4879 (YY_DECL): Use to declare skel_lex static.
4880 (decode_at_digraphs): Remove; now handled in the new
4881 SC_AT_DIRECTIVE_ARG start condition.
4882 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4884 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4885 at_directive_argv): New static globals.
4886 (INITIAL): Use fail_for_invalid_at.
4887 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4888 recognize the start of a generalized `@directive(...@)' form and
4890 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4891 directive args (using the new obstack_for_string), to decode the
4892 contained @ diagraphs, and to perform the directive. It recognizes
4893 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4895 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4896 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4898 (scan_skel): Initialize obstack_for_string on the first call.
4899 (skel_scanner_free): New function to free obstack_for_string.
4900 * tests/input.at (Reject bad %code qualifiers): Update test output.
4902 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4904 Consolidate the 4 prologue alternative directives (%code, %requires,
4905 %provides, and %code-top) into a single %code directive with an
4906 optional qualifier field. Discussed at
4907 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4908 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4910 * doc/bison.texinfo (Prologue Alternatives): Update.
4911 (Decl Summary): Update to %code "requires" and %code "provides".
4912 (Calc++ Parser): Update to %code "requires".
4913 (Table of Symbols): Remove entries for %requires, %provides, and
4914 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4915 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4916 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4917 which are skeleton-specific.
4918 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4919 declare what %code qualifiers it supports and to complain if any other
4920 qualifiers were used in the grammar.
4921 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4922 and b4_user_code([b4_percent_code_provides]) in place of
4923 b4_user_requires and b4_user_provides.
4924 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4925 Add b4_user_code([b4_percent_code_top]) and
4926 b4_user_code([b4_percent_code]).
4927 Invoke b4_check_percent_code_qualifiers.
4928 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4929 PERCENT_REQUIRES): Remove.
4930 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4931 %requires. Rewrite the %code RHS as the unqualified form defining the
4932 muscle b4_percent_code. Add another RHS for the qualified %code form,
4933 which defines muscles of the form b4_percent_code_QUALIFIER and the
4934 b4_used_percent_code_qualifiers muscle.
4935 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4936 PERCENT_REQUIRES): Remove.
4937 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4938 %code "requires" and %code "provides".
4939 * tests/input.at (Reject bad %code qualifiers): New.
4941 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4943 Use the new code_props interface for destructors and printers.
4944 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4945 printer_location members, and change the type of the destructor and
4946 printer members to code_props.
4947 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4948 symbol_printer_get, semantic_type_destructor_set,
4949 semantic_type_printer_set, default_tagged_destructor_set,
4950 default_tagless_destructor_set, default_tagged_printer_set,
4951 default_tagless_printer_set): Use code_props in arguments and return
4952 types in place of char const * and location.
4953 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4954 since the locations are now contained in the return of
4955 symbol_destructor_get and symbol_printer_get.
4956 * src/output.c (symbol_destructors_output, symbol_printers_output):
4958 (symbol_code_props_output): ... this to eliminate duplicate code.
4959 (output_skeleton): Update to use symbol_code_props_output.
4960 * src/reader.c (symbol_should_be_used): Update use of
4961 symbol_destructor_get.
4962 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4963 Update uses of the various _destructor_set and _printer_set functions.
4964 * src/symtab.c: (default_tagged_destructor_location,
4965 default_tagless_destructor_location, default_tagged_printer_location,
4966 default_tagless_printer_location): Remove since we...
4967 (default_tagged_destructor, default_tagless_destructor,
4968 default_tagged_printer, default_tagless_printer): ... change the type
4969 of these to code_props.
4970 (symbol_new, semantic_type_new, symbol_destructor_set,
4971 semantic_type_destructor_set, symbol_destructor_get,
4972 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4973 symbol_check_alias_consistency, default_tagged_destructor_set,
4974 default_tagless_destructor_set, default_tagged_printer_set,
4975 default_tagless_printer_set): Update.
4976 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4977 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4979 (symbol_print): Use SYMBOL_CODE_PRINT.
4981 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4983 Use the new code_props interface for rule actions.
4984 * src/symlist.h (symbol_list): Replace action, action_location, and
4985 used members with a code_props action_props member.
4986 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4987 grammar_midrule_action, grammar_current_rule_merge_set,
4988 grammar_current_rule_symbol_append, packgram): Update.
4989 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4990 * src/scan-code.l (handle_action_dollar): Update.
4991 (translate_rule_action): Remove, no longer used.
4992 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4994 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4996 Use the new code_props interface in parse-gram.y.
4997 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4998 Update all uses of translate_* functions to use the new code_props
4999 interface and to use gram_scanner_last_string_free and
5000 code_scanner_last_string_free where possible.
5001 (grammar_declaration): symbol_list_destructor_set and
5002 symbol_list_printer_set now perform the translation, so don't do it
5003 here. Use gram_scanner_last_string_free where possible.
5004 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5005 translate_code): Remove, no longer used.
5006 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5007 symbol_list_printer_set): Perform code translation here rather than
5008 depending on the caller to do so.
5010 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5011 * src/scan-gram.h (gram_last_string): Remove declaration.
5012 * src/scan-gram.l (last_string): Declare it static.
5014 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5016 Encapsulate code properties and related functionality for the various
5017 destructors, printers, and actions into a code_props structure and
5018 interface. This patch merely implements code_props in scan-code.h and
5019 scan-code.l. Future patches will rewrite other modules to use it.
5020 Discussed starting at
5021 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5022 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5023 consistently initialize const structs that have an empty location
5025 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5026 to ensure consistency.
5027 * src/scan-code.h (code_props): New structure.
5028 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5029 function, macro, and const global variable for initializing a
5030 code_props with no code.
5031 (code_props_plain_init, code_props_symbol_action_init,
5032 code_props_rule_action_init, code_props_translate_code): The rest of
5033 the new code_props functional interface. Among other things, the init
5034 functions set the code_props kind field so that
5035 code_props_translate_code will know whether to behave like
5036 translate_symbol_action, translate_rule_action, or translate_code.
5037 These old translate functions must remain until all other modules are
5038 updated to use the new code_props interface.
5039 (code_scanner_last_string_free): New function similar to
5040 gram_scanner_last_string_free.
5041 (code_scanner_free): Add documentation.
5042 * src/scan-code.l: Implement the new interface.
5043 (code_lex): Make it static, add a code_props* argument, and remove the
5045 (last_string): New static global similar to the one in scan-gram.l.
5046 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5048 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5049 code_props since Bison may one day use this information for destructors
5051 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5052 (handle_action_dollar): Use symbol_list_n_get and set used flag
5053 directly since symbol_list_n_used_set is removed.
5054 (translate_action): Add a code_props* argument and remove the rule,
5055 action, and location arguments. Pass the code_props* on to code_lex.
5056 (translate_rule_action, translate_symbol_action, translate_code):
5057 Rewrite as wrappers around the new code_props interface.
5058 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5059 it would eventually need to break the encapsulation of code_props.
5061 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5063 * etc/.cvsignore: New.
5065 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5067 Add maintainer-push-check to run maintainer-check using push parsing in
5068 place of pull parsing where available.
5069 * Makefile.am (maintainer-push-check): New.
5070 * data/bison.m4 (b4_use_push_for_pull_if): New.
5071 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5072 appropriately based on their existing values.
5073 (yypush_parse): Don't print push-parser-specific diagnostics if push
5074 parsing is being used in place of pull parsing.
5075 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5077 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5078 variable, and insert b4_use_push_for_pull_flag into muscles.
5079 * tests/Makefile.am (maintainer-push-check): New.
5081 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5083 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5084 (whether successful or failed) so that yypush_parse can be invoked
5085 again to start a new parse using the same yypstate.
5086 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5087 check multiple yypull_parse invocations on the same yypstate. For pull
5088 mode, extend to check multiple yyparse invocations.
5089 (Exploding the Stack Size with Alloca): Extend to try with
5091 (Exploding the Stack Size with Malloc): Likewise.
5093 * tests/calc.at (Simple LALR Calculator): Don't specify
5094 %skeleton "push.c" since %push-pull-parser implies that now.
5095 * tests/headers.at (export YYLTYPE): Don't check for the push
5096 declarations. Otherwise, this test case can't be used to see if push
5097 mode can truly emulate pull mode.
5098 * tests/input.at (Torturing the Scanner): Likewise.
5099 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5100 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5101 AT_YACC_IF, which now includes the case of push mode since %skeleton
5102 need not be used for push mode. This will be more intuitive once
5103 push.c is renamed to yacc.c.
5105 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5107 For push mode, convert yyparse from a macro to a function, invoke yylex
5108 instead of passing a yylexp argument to yypull_parse, and don't
5109 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5110 Discussed starting at
5111 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5112 * data/bison.m4 (b4_pull_if): New.
5113 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5114 * data/push.c: Improve M4 quoting a little.
5115 (b4_generate_macro_args, b4_parenthesize): Remove.
5116 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5117 any time a pull parser is requested.
5118 Don't #define this as a wrapper around yypull_parse. Instead, when
5119 both push and pull are requested, make it a function that does that
5121 (yypull_parse): If there's a b4_prefix, #define this to
5122 b4_prefix[pull_parse] when both push and pull are requested.
5123 Don't define this as a function unless both push and pull are
5125 Remove the yylexp argument and hard-code yylex invocation instead.
5126 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5128 * src/getargs.c (pull_parser): New global initialized to true.
5129 * getargs.h (pull_parser): extern it.
5130 * src/output.c (prepare): Insert pull_flag muscle.
5131 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5132 (prologue_declaration): Set both push_parser and pull_parser = true for
5133 %push-pull-parser. Set push_parser = true and pull_parser = false for
5135 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5136 %push-parser since there's no backward-compatibility concern here.
5137 Scan %push-pull-parser.
5138 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5139 instead of %push-parser.
5140 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5141 prototype it in the module that calls yyparse.
5142 * tests/input.at (Torturing the Scanner): Likewise.
5143 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5145 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5147 Update etc/bench.pl. Optimize push mode a little (the yyn change
5148 deserves most of the credit).
5149 * Makefile.am (SUBDIRS): Add etc subdirectory.
5150 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5151 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5152 yytoken, yyval, and yyloc declarations to...
5153 (yyparse or yypush_parse): ... here to improve performance. For
5154 yypush_parse invocations after the first, be sure to assign yyn its old
5156 (yypstate_new): Don't bother initializing the yyresult field since the
5157 initial value isn't used.
5158 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5159 remove the #define that, in push mode, set it to yyps->NAME.
5160 * etc/Makefile.am: New.
5161 * etc/bench.pl: Remove and build it instead from...
5162 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5163 "tests/bison" from the build directory by default rather than just
5164 invoking "bison" from $PATH.
5165 (calc_grammar): Update push parser code: don't declare yylval globally,
5166 don't define yyparse_wrapper, and don't #define yyparse.
5167 (bench_grammar): Update to check all working combinations of yacc.c,
5168 push.c, impure, pure, pull, and push.
5170 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5172 For push mode, add pull wrappers around yypush_parse.
5173 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5174 (yypull_parse): New function wrapping yypush_parse.
5175 (yyparse): New #define wrapping yypull_parse.
5176 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5178 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5179 prototype yylex in the module that calls yyparse, and don't prototype
5180 yyparse there. Otherwise, the yyparse expansion won't compile.
5181 * tests/input.at (Torturing the Scanner): Likewise.
5183 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5185 Enable push parsers to operate in impure mode. Thus, %push-parser no
5186 longer implies %pure-parser. The point of this change is to move
5187 towards being able to test the push parser code by running the entire
5188 test suite as if %push-parser had been declared.
5189 * data/push.c (yypush_parse): For impure mode, remove the
5190 yypushed_char, yypushed_val, and yypushed_loc arguments.
5191 Instead, declare these as local variables initialized to the global
5192 yychar, yylval, and yylloc.
5193 For the first yypush_parse invocation only, restore the initial values
5194 of these global variables when it's time to read a token since they
5195 have been overwritten.
5196 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5198 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5199 %pure-parser along with %push-parser since this test case was designed
5200 for pure push parsers.
5201 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5202 (AT_YACC_OR_PUSH_IF): New.
5203 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5204 add a note that it's still wrong for some cases (as it has been for a
5206 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5207 %push-parser no longer implies %pure-parser.
5209 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5211 Remove some unnecessary differences between the pull parser code and
5212 the push parser code. This patch enables yynerrs in push mode.
5213 * data/push.c: Reformat M4 a little.
5214 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5215 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5216 because push mode is on. Instead, if pure mode is on, move yynerrs
5218 (b4_declare_parser_state_variables): ... here.
5219 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5220 to yyps->NAME so it can be used in yypush_parse.
5221 (yypush_parse): Don't omit uses of yynerrs in push mode.
5223 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5225 Fix bug such that the first pushed token's value and location are
5226 sometimes overwritten (sometimes by %initial-action) before being used.
5227 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5228 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5229 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5230 more closely mimic the pull parser logic.
5231 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5232 time to read a token, which is after any initialization of yylval and
5234 (gottoken): Rename label to...
5235 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5238 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5240 Rearrange initialization of the parser state variables so that the
5241 skeleton doesn't have to have a copy for pull mode and another for push
5242 mode. This patch also fixes at least a bug such that yylloc was not
5243 initialized (with b4_location_initial_line and
5244 b4_location_initial_column) upon calling yypush_parse. However, that
5245 initialization now overwrites the first token's location;
5246 %initial-action assigning @$ already did the same thing, and both bugs
5247 will be fixed in a later patch.
5248 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5249 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5250 yyss, yyvs, yyls, and yystacksize.
5251 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5252 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5254 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5255 yyps->NAME so it can be used in yypush_parse.
5256 (yyparse or yypush_parse): For yypush_parse, don't print the
5257 "Starting parse" diagnostic for invocations after the first.
5258 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5259 yypush_parse, only do it for the first invocation.
5260 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5261 initialization to occur in yypush_parse but only on the first
5264 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5266 * data/push.c: Add CPP guards around push parser declarations in both
5267 the header and the code file.
5268 In the code file, move the push parser declarations to the same place
5269 they appear in the header file.
5270 Clean up the M4 some, especially the inconsistent underquoting in
5271 some b4_c_function_def and b4_c_function_decl uses.
5273 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5275 Encapsulate the push parser state variables into an M4 macro so the
5276 push skeleton doesn't have to list them again for pull mode's yyparse.
5277 For push mode, remove yypush_parse's local equivalents of these
5278 variables to eliminate unnecessary copying between the two sets at
5279 run-time. This patch also fixes at least a bug related to multiple
5280 %initial-action invocations in push mode.
5281 * data/push.c (b4_declare_parser_variables): Rename to...
5282 (b4_declare_scanner_communication_variables): ... this for clarity and
5284 (b4_declare_yyparse_variables): Remove and move its contents to the one
5285 spot where it was invoked.
5286 (b4_declare_parser_state_variables): New macro containing the parser
5287 state variables required by push mode.
5288 (struct yypstate): Replace all fields but yynew with
5289 b4_declare_parser_state_variables.
5290 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5291 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5292 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5293 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5294 parser state variable declarations with
5295 b4_declare_parser_state_variables.
5296 Don't initialize parser state variables when calling yypush_parse since
5297 yypstate_new already does that.
5298 Invoke the user's initial action only upon the first yypush_parse
5300 Remove all code that copies between the local parser state variables
5303 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5305 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5306 prevent a name collision in a future patch where these names will
5307 sometimes be #define'd.
5308 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5309 since it no longer has the same name as the existing argument.
5310 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5312 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5313 and Joel E. Denny <jdenny@ces.clemson.edu>
5315 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5316 that the argument is case-insensitive, and there's no `=' here.
5317 For the %skeleton entry, mention that %language is better.
5318 (Bison Options): Likewise for --language and --skeleton. Move the
5319 --skeleton entry so that the `Tuning the parser' section is sorted
5320 alphabetically on long options.
5321 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5322 %language directive in detail here; cross-reference the %language
5323 documentation instead.
5324 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5325 `%require "2.3b"' so that the example is always up-to-date.
5326 (Table of Symbols): Add entries for %language and %skeleton.
5327 * examples/extexi (normalize): Instead of replacing every %require
5328 argument with the current Bison version, just substitute for
5329 `@value{VERSION}'. This guarantees that we're testing what actually
5330 appears in the documentation.
5331 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5332 rather than `@VERSION@'.
5334 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5336 * NEWS: Reword the %language news a bit, and put it earlier.
5338 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5339 Rewrite to simplify the logic.
5340 (language_argmatch): Likewise.
5341 (program_name): We now own this var.
5342 * src/getargs.h (struct bison_language): Use char[] rather than
5345 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5347 * src/complain.c (program_name): Remove decl; no longer needed.
5348 * src/main.c (program_name): Remove; now belongs to getargs.
5350 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5352 * NEWS: Document %language.
5354 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5356 * data/c-skel.m4, data/c++-skel.m4: New files.
5357 * data/glr.c: Complain on push parsers.
5359 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5361 (Decl Summary): Document %language and %skeleton.
5362 (Command line): Document -L.
5364 * examples/extexi: Rewrite %require directive.
5365 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5367 * src/files.c (compute_exts_from_gc): Look in language structure
5369 (compute_file_name_parts): Check whether .tab should be added.
5370 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5371 (language, skeleton_arg, language_argmatch): New.
5372 (long_options): Add --language.
5373 (getargs): Use skeleton_arg, add -L/--language.
5374 * src/getargs.h: Include location.h.
5375 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5376 * src/output.c (prepare): Pick default skeleton from struct language.
5377 Don't dispatch C skeletons here.
5378 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5379 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5380 * src/scan-gram.l ("%language"): New rule.
5382 * tests/calc.at: Test %skeleton and %language.
5383 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5384 (AT_GLR_IF): Look for %skeleton "glr.cc".
5385 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5386 (AT_YACC_IF): Reject %language.
5388 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5390 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5391 since it wasn't used; only the typedef name 'semantic_type' is needed.
5392 Also, omit trailing white space.
5394 * bootstrap: Sync from coreutils.
5395 (gnulib_extra_files): Add build-aux/announce.gen.
5396 (slurp): Adjust .gitignore files like .cvsignore files.
5397 * build-aux/announce-gen: Remove from CVS, since bootstrap
5400 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5402 Make %push-parser imply %pure-parser. This fixes several bugs; see
5403 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5404 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5406 * data/push.c: Don't bother testing b4_push_if when deciding whether
5407 to expand b4_declare_parser_variables globally.
5408 (yypush_parse): Likewise in here.
5410 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5411 (yy_reduce_print): Reformat M4 for readability.
5413 2006-12-15 Bob Rossi <bob@brasko.net>
5414 and Joel Denny <jdenny@ces.clemson.edu>
5416 * data/push.c (yypstate): Add typedef, and update all uses of
5417 struct yypstate to just yypstate.
5418 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5420 2006-12-14 Bob Rossi <bob@brasko.net>
5422 * data/push.c (yypush_parse): Declare prototype regardless of
5425 2006-12-14 Bob Rossi <bob@brasko.net>
5427 * data/push.c (yyparse): Remove the prototype and the #define when in
5430 2006-12-13 Bob Rossi <bob@brasko.net>
5432 * data/push.c (yypstate_init): Rename to...
5433 (yypstate_new): ... this and use b4_c_function_def.
5434 (yypstate_delete): New.
5435 (yypush_parse): Change parameters yynval and yynlloc to be const.
5436 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5437 yypstate_delete functions.
5439 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5441 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5442 strange test case titles. Reported by Bob Rossi.
5444 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5446 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5447 of potential ambiguities in GLR grammers.
5449 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5451 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5452 `bison ', use m4_index instead of m4_substr since chopping up a string
5453 containing M4-special characters causes problems here.
5455 Fix a couple of bugs related to special characters in user-specified
5456 file names, and make it easier for skeletons to compute output file
5457 names with the same file name prefix as Bison-computed output file
5459 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5460 b4_parser_file_name and b4_spec_defines_file instead of
5461 @output_parser_name@ and @output_header_name@, which are now redundant.
5462 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5463 b4_parser_file_name, b4_spec_defines_file, and the new
5464 @basename(FILENAME@) instead of @output_parser_name@ and
5465 @output_header_name@, which inappropriately escaped the file names as
5467 * src/files.c (all_but_ext): Remove static qualifier.
5468 (compute_output_file_names): Move `free (all_but_ext)' to...
5469 (output_file_names_free): ... here since all_but_ext is needed later.
5470 * src/files.h (all_but_ext): Extern.
5471 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5472 exactly what MUSCLE_INSERT_STRING used to do.
5473 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5474 characters are escaped properly.
5475 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5477 For pkgdatadir muscle, maintain previous functionality by using
5478 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5479 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5480 digraphs would never be expanded. Hopefully no one has M4-special
5481 characters in his Bison installation path.
5482 * src/scan-skel.l: Don't parse @output_header_name@ and
5483 @output_parser_name@ anymore since they're now redundant.
5484 In @output, use decode_at_digraphs.
5485 Parse a new @basename command that invokes last_component.
5486 (decode_at_digraphs): New.
5487 (BASE_QPUTS): Remove unused.
5488 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5489 (Output file name): New tests.
5491 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5493 Warn about output files that are generated by the skeletons and that
5494 conflict with other output files.
5495 * data/glr.c: Don't generate the header file here when glr.cc does.
5496 * src/files.c (file_names, file_names_count): New static globals.
5497 (compute_output_file_names): Invoke output_file_name_check for files
5498 not generated by the skeletons and remove existing checks.
5499 (output_file_name_check): New function that warns about conflicting
5501 (output_file_names_free): Free file_names.
5502 * src/files.h (output_file_name_check): Declare.
5503 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5505 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5506 (Conflicting output files): New tests.
5508 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5510 * doc/bison.texinfo: Fix a couple of typos.
5512 2006-12-08 Bob Rossi <bob@brasko.net>
5514 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5516 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5518 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5519 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5521 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5522 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5524 2006-12-07 Bob Rossi <bob@brasko.net>
5525 and Joel Denny <jdenny@ces.clemson.edu>
5527 * data/push.c (yypvarsinit): Change return type from void* to struct
5528 yypvars*. No longer cast to void* on return.
5529 (struct yypvars): Remove yylen since it need not be remembered between
5530 yypushparse invocations.
5531 (yypushparse): Don't copy between yylen and pv->yylen.
5533 2006-12-05 Bob Rossi <bob@brasko.net>
5535 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5536 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5537 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5538 (struct yypvars): Remove b4_declare_parser_variables.
5539 (yypvarsinit): Remove init code for removed variables.
5540 (global scope): Do not declare b4_declare_parser_variables if
5542 (yypushparse): Add b4_declare_parser_variables.
5543 Init new local variables, and remove init code for removed
5546 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5547 and yyparse for other modes.
5548 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5549 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5550 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5551 (AT_PURE_LEX_IF): True if pure or push parser.
5553 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5555 Document Yacc prologue alternatives and default %destructor's and
5556 %printer's as experimental. Don't mention Java yet. Discussed at
5557 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5558 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5559 (2.3a): Annotate this entry to say the old forms of these features were
5561 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5562 Table of Symbols): Say they're experimental. Comment out any mention
5563 of Java (we'll want this back eventually).
5565 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5567 Support a file name argument to %defines. Deprecate `=' in
5568 %file-prefix, %name-prefix, and %output. Discussed at
5569 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5570 * NEWS (2.3a+): Mention.
5571 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5572 form of %defines, and remove `=' from entries for %file-prefix,
5573 %name-prefix, and %output.
5574 * src/parse-gram.y (prologue_declaration): Implement.
5575 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5576 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5577 all but one occurrence of %name-prefix.
5578 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5579 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5580 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5581 occurrence of each of %file-prefix and %output. Add check for %defines
5583 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5584 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5585 Remove the `=' from %output.
5587 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5589 Don't escape $ in test case titles since Autoconf 2.61 now does that
5591 * tests/actions.at (Default %printer and %destructor are not for error
5592 or $undefined): Here.
5593 (Default %printer and %destructor are not for $accept): Here.
5594 * tests/input.at (Invalid $n and @n): Here.
5596 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5598 Rename <!> to <>. Discussed starting at
5599 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5600 * NEWS (2.3a+): Update.
5601 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5603 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5604 * src/scan-gram.l (INITIAL): Implement.
5605 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5606 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5608 * tests/actions.at (Default tagless %printer and %destructor,
5609 Default tagged and per-type %printer and %destructor,
5610 Default %printer and %destructor are not for error or $undefined,
5611 Default %printer and %destructor are not for $accept,
5612 Default %printer and %destructor for mid-rule values): Update.
5613 * tests/input.at (Default %printer and %destructor redeclared,
5614 Unused values with default %destructor): Update.
5616 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5618 Don't let %prec take a nonterminal.
5619 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5621 * tests/input.at (%prec takes a token): New test checking that %prec
5622 won't take a nonterminal.
5624 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5626 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5627 it was double-quoted.
5628 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5629 grammar is maintained with Bison's highest standards.
5630 * src/getargs.c: Fix some typos in Doxygen comments.
5632 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5634 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5635 later. Reported by Paul Eggert in
5636 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5637 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5638 * src/scan-code.l (translate_action): Don't bother invoking
5639 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5640 (code_scanner_free): Instead of invoking
5641 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5643 * src/scan-gram.l (gram_scanner_free): Likewise.
5644 * src/scan-skel.l (scan_skel): Likewise.
5646 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5648 * src/files.c (tr): Change return type to void.
5649 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5650 has been called previously for the same key.
5651 (muscle_find): Return storage instead of value so that
5652 --enable-gcc-warnings doesn't produce warnings that the return discards
5653 const. aver that the value and storage are the same since storage
5654 could potentially be NULL when value is not.
5655 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5658 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5660 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5661 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5662 us a slightly cleaner distribution, and also works.
5663 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5666 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5667 and Paul Eggert <eggert@cs.ucla.edu>
5669 Don't let Bison leak memory except when it complains.
5670 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5671 (spec_defines_file, dir_prefix): Now char *, not const char *,
5672 since they are freed.
5673 * src/files.c: Likewise.
5674 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5676 (tr): Now operates in-place. All uses changed.
5677 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5679 (compute_file_name_parts, compute_output_file_names): Don't store
5680 read-only data in variables that will be freed.
5681 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5682 src_extension, and header_extension.
5683 (output_file_names_free): New public function to free
5684 spec_verbose_file, spec_graph_file, spec_defines_file,
5685 parser_file_name, and dir_prefix.
5686 * src/getargs.c (getargs): Don't store read-only data in variables that
5688 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5689 (which previously existed but was unused), and quotearg_free.
5690 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5691 * src/muscle_tab.c: Likewise.
5692 (muscle_entry): Make the value char const *,
5693 and add a new storage member that is char * and can be freed.
5694 (muscle_entry_free): New private function.
5695 (muscle_init): Use it instead of free.
5696 (muscle_insert, muscle_grow): Update and use new storage member.
5697 (muscle_code_grow): Free the string passed to muscle_grow
5698 since it's not needed anymore.
5699 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5700 add a new `char *code' member.
5701 ("{...}"): Declare semantic type as code.
5702 * src/scan-code.h (translate_rule_action):
5703 (translate_symbol_action, translate_code, translate_action): Return
5704 `char const *' rather than `char *' since external code should not free
5706 * src/scan-code.l: Likewise.
5707 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5708 which is "{...}" in the parser.
5709 * tests/Makefile.am (maintainer-check-valgrind): Set
5710 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5712 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5714 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5715 expecting a non-zero exit status sets --leak-check=summary and
5716 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5717 this case, and we don't want to hear about it.
5719 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5721 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5722 instead of from the template, to simplify configuration a bit.
5723 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5724 and m4/wint_t.m4, as they are needed with the latest gnulib.
5726 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5728 Disable unset/unused mid-rule value warnings by default, and recognize
5729 --warnings=midrule-values to enable them. Discussed starting at
5730 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5731 * NEWS (2.3a+): Mention.
5732 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5733 warnings): Add entry for midrule-values subargument.
5734 * src/reader.c (symbol_should_be_used): Don't return true just because
5735 the value is a set/used mid-rule value unless
5736 --warnings=midrule-values was specified.
5737 * tests/input.at (Unused values, Unused values before symbol
5738 declarations): Run tests with and without --warnings=midrule-values.
5740 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5741 than LIST_FREE directly.
5743 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5745 Finish implementing --warnings=error, which should not be implied by
5746 --warnings=all (or by its synonyms -W and --warnings without
5748 * src/complain.c (set_warning_issued): New function to report that
5749 warnings are being treated as errors and to record an error if so.
5751 (warn_at, warn): ... here.
5752 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5753 "error - warnings are errors" does not appear above "all - all of the
5755 (getargs): For -W and --warnings without subarguments, don't let
5756 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5757 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5759 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5761 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5762 empty subargument list. For example: `bison --warnings= parser.y'.
5764 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5766 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5767 the parser header file so that gcc doesn't warn.
5769 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5771 Split the default %destructor/%printer into two kinds: <*> and <!>.
5772 Discussed starting at
5773 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5774 * NEWS (2.3a+): Mention.
5775 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5776 previous change today related to mid-rules.
5777 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5778 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5779 (TYPE_TAG_ANY): Add as <*>.
5780 (TYPE_TAG_NONE): Add as <!>.
5781 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5783 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5784 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5785 * src/symlist.c (symbol_list_default_new): Split into tagged and
5787 (symbol_list_destructor_set, symbol_list_printer_set): Split
5788 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5789 SYMLIST_DEFAULT_TAGLESS.
5790 * src/symlist.h: Update symbol_list_default*_new prototypes.
5791 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5792 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5793 * src/symtab.c (default_destructor, default_destructor_location,
5794 default_printer, default_printer_location): Split each into tagged and
5796 (symbol_destructor_get, symbol_destructor_location_get,
5797 symbol_printer_get, symbol_printer_location_get): Implement tagged
5798 default and tagless default cases.
5799 (default_destructor_set, default_printer_set): Split each into tagged
5800 and tagless versions.
5801 * src/symtab.h: Update prototypes.
5802 * tests/actions.at (Default %printer and %destructor): Rename to...
5803 (Default tagless %printer and %destructor): ... this, and extend.
5804 (Per-type %printer and %destructor): Rename to...
5805 (Default tagged and per-type %printer and %destructor): ... this, and
5807 (Default %printer and %destructor for user-defined end token): Extend.
5808 (Default %printer and %destructor are not for error or $undefined):
5810 (Default %printer and %destructor are not for $accept): Update.
5811 (Default %printer and %destructor for mid-rule values): Extend.
5812 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5813 (Unused values with default %destructor): Extend.
5815 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5817 Don't apply the default %destructor/%printer to an unreferenced midrule
5819 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5820 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5821 like $@n instead of just @n so that the default %destructor/%printer
5822 logic doesn't see them as user-defined symbols.
5823 (symbol_is_dummy): Check for both forms of the name.
5824 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5825 name for which the midrule value is referenced in any action.
5826 * tests/actions.at (Default %printer and %destructor for mid-rule
5828 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5829 for change to dummy symbol names.
5831 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5833 Warn about unset midrule $$ if the corresponding $n is used.
5834 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5836 (packgram): Before invoking grammar_rule_check on any rule, make sure
5837 all actions have already been scanned in order to set `used' flags.
5838 Otherwise, checking that a midrule's $$ is set will not always work
5839 properly because the midrule check must forward-reference the midrule's
5841 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5844 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5846 More improvements to the documentation of the prologue alternatives:
5847 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5849 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5850 some text to clarify the relative importance of the new directives and
5851 to show how these directives may be viewed as code labels.
5853 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5855 Similar to the recently removed %before-header, add %code-top as the
5856 alternative to the pre-prologue. Mentioned at
5857 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5858 Also, let the prologue alternatives appear in the grammar section.
5859 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5860 (prologue_declaration): Move the existing prologue alternatives to...
5861 (grammar_declaration): ... here and add %code-top.
5862 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5864 Clean up and extend documentation for the prologue alternatives.
5865 * NEWS (2.3a+): Describe prologue alternatives.
5866 * doc/bison.texinfo (Prologue): Move discussion of prologue
5868 (Prologue Alternatives): ... this new section, and extend it to discuss
5869 all 4 directives in detail.
5870 (Table of Symbols): Clean up discussion of prologue alternatives and
5873 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5875 DJGPP specific issues.
5877 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5878 config.bat accordingly.
5879 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5880 * djgpp/config.site: Likewise.
5882 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5884 Replace %*-header with %provides, %requires, %code. See discussion at
5885 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5887 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5888 (b4_user_start_header): Remove.
5889 * data/glr.c: Use new macros instead of b4_*start_header
5891 * data/glr.cc: Likewise.
5892 * data/lalr1.cc: Likewise.
5893 * data/push.c: Likewise.
5894 * data/yacc.c: Likewise.
5896 * doc/bison.texinfo: Remove %before-header, rename
5897 %{start,end,after}-header to %requires, %provides, %code.
5899 * src/parse-gram.y: Likewise (also rename token names accordingly).
5900 * src/scan-gram.l: Likewise.
5901 * tests/actions.at: Likewise.
5903 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5905 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5906 Problem reported by Joel E. Denny.
5908 2006-10-14 Jim Meyering <jim@meyering.net>
5910 (Sync from coreutils.)
5911 Work also when the working directory (with e.g. coreutils sources)
5912 is version controlled with git, rather than CVS.
5913 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5915 In messages and comments, say e.g., "checked-out sources",
5916 rather than "CVS sources".
5917 (version_controlled_file): New function. Work for git as well as
5918 for CVS. Don't use grep's -q option.
5919 (slurp): Call it here, in place of CVS-specific code.
5921 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5923 Fix testsuite for ./configure --enable-gcc-warnings:
5924 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5925 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5926 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5927 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5928 * test/regression.at (Diagnostic that expects two alternatives):
5931 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5933 * bootstrap.conf (gnulib_modules): Add config-h.
5934 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5935 worry about HAVE_CONFIG_H.
5936 * lib/abitset.c: Likewise.
5937 * lib/bitset.c: Likewise.
5938 * lib/bitset_stats.c: Likewise.
5939 * lib/bitsetv-print.c: Likewise.
5940 * lib/bitsetv.c: Likewise.
5941 * lib/ebitset.c: Likewise.
5942 * lib/get-errno.c: Likewise.
5943 * lib/lbitset.c: Likewise.
5944 * lib/subpipe.c: Likewise.
5945 * lib/timevar.c: Likewise.
5946 * lib/vbitset.c: Likewise.
5947 * lib/bitset.c: Include "bitset.h" first, to test interface.
5948 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5949 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5950 * lib/bitsetv.c: Include "bitsetv.h" first.
5951 * lib/get-errno.c: Include "get-errno.h" first.
5952 * m4/.cvsignore: Add config-h.m4.
5953 * tests/actions.at (Default %printer and %destructor for ...):
5954 Adjust expected line numbers in output to reflect removal of #if
5955 HAVE_CONFIG_H lines.
5956 * tests/glr-regression.at (Missed %merge type warnings when ...):
5958 * tests/regression.at (Braced code in declaration in rules section):
5960 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5961 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5962 Include <config.h> unconditionally.
5964 * bootstrap: Sync from coreutils, as follows:
5966 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5968 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5969 variable was sometimes used without being initialized. This
5970 messed up the installation of the INSTALL file in some cases.
5972 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5974 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5975 --copy. Inspired by a suggestion from Bruno Haible.
5977 2006-10-03 Jim Meyering <jim@meyering.net>
5979 * bootstrap: Undo last change to this file, since now gnulib-tool
5980 sticks with the automake default in generating dependencies.
5982 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5984 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5985 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5987 * doc/bison.1: Add copyright notice.
5989 * data/glr.c: Don't include <stdarg.h>; not used.
5991 * NEWS: The -g and --graph options now output graphs in Graphviz
5992 DOT format, not VCG format.
5993 * doc/bison.1: Likewise.
5994 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5995 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5997 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5998 * TODO: Remove Graphviz entry.
5999 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6000 remove vcg.c, vcg.h, vcg_defaults.h.
6001 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6002 * src/graphviz.c, src/graphviz.h: New files.
6003 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6004 * src/files.h: Make comment more generic.
6005 * src/main.c (main): Likewise.
6006 * src/print_graph.h: Likewise.
6007 * src/getargs.c (usage): Make usage description more generic.
6008 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6009 (static_graph, fgraph): Remove. All uses changed to pass
6010 arguments instead of sharing a static var.
6011 (print_core, print_actions, print_state, print_graph):
6012 Output graphviz format rather than VCG format.
6013 * tests/.cvsignore: Remove *.vcg; add *.dot.
6014 * tests/output.at: Expect *.dot files, not *.vcg files.
6016 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6017 accommodates the 2006-10-08 change.
6019 2006-10-11 Bob Rossi <bob@brasko.net>
6021 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6022 (b4_yyssa, b4_yyerror_range): New macros.
6023 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6024 (yypvarsinit): Remove init of removed fields.
6025 (yypushparse): Remove use of removed fields; use new macros instead.
6027 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6029 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6030 in a push parser. Reindent slightly to match yacc.c better.
6032 2006-10-11 Bob Rossi <bob@brasko.net>
6034 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6036 (yypvarsinit, yypushparse): Remove init of removed fields.
6037 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6039 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6041 * THANKS: Add Paolo Bonzini and Bob Rossi.
6043 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6045 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6046 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6047 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6048 b4_define_user_cde and uses): Remove.
6049 (b4_comment, b4_prefix, b4_sync_start): New.
6050 * data/bison.m4: New file, with most of the content removed from c.m4.
6051 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6052 * src/output.c (output_skeleton): Pass bison.m4.
6053 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6056 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6058 Fix test failure reported by Tom Lane in
6059 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6060 and try to make such failures easier to catch in the future.
6061 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6062 that's now the caller's responsibility.
6063 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6064 Set yychar = YYEOF if it's negative.
6065 * tests/actions.at (yylex): Abort if asked to read past EOF.
6066 * tests/conflicts.at (yylex): Likewise.
6067 * tests/cxx-type.at (yylex): Likewise.
6068 * tests/glr-regression.at (yylex): Likewise.
6069 * tests/input.at (yylex): Likewise.
6070 * tests/regression.at (yylex): Likewise.
6071 * tests/torture.at (yylex): Likewise.
6073 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6075 Fix problems with translating English-language diagnostics.
6076 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6077 respect to bison-runtime pot generation. The YY_ stuff
6078 wasn't being captured.
6079 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6080 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6081 * runtime-po/POTFILES.in: Add data/push.c.
6083 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6085 Merge bootstrap changes from coreutils.
6087 2006-09-28 Jim Meyering <jim@meyering.net>
6089 Automatically generated dependencies are important even
6090 when all of the sources in a directory come from gnulib.
6091 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6092 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6094 2006-09-23 Jim Meyering <jim@meyering.net>
6096 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6098 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6100 * bootstrap: Add support for --force.
6101 (usage): New function. Describe usage less tersely.
6102 (CVS_only_file): New var.
6104 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6106 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6107 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6108 Adjust white space and comments to match GNU style better.
6110 2006-09-20 Bob Rossi <bob@brasko.net>
6112 * data/push.c (yyresult_get): Remove function.
6113 (YYPUSH_MORE): Add #define.
6114 (yypushparse): Modify return value.
6116 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6118 * stamp-h.in: Remove; no longer needed.
6119 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6120 Remove config.h, config.hin, intl (no longer created).
6121 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6124 Sync bootstrap from coreutils, as follows:
6126 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6128 * bootstrap (symlink_to_gnulib): New function.
6129 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6130 to copies-of-gnulib.
6131 (cp_mark_as_generated, slurp, gnulib_files):
6132 Avoid making a copy if it's the same as the old version.
6133 (gnulib_files): Add support for this variable (used by Bison).
6135 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6137 * src/getargs.c (usage): Rework to use conventions similar to
6138 coreutils, to make translation a bit easier and the code a bit
6139 smaller. Problem reported by Tim Van Holder.
6141 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6143 Use some of gnulib's new modules, taken from coreutils.
6145 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6146 * bootstrap.conf: New file.
6147 (gnulib_modules): Add configmake, inttypes, unistd.
6148 (XGETTEXT_OPTIONS): Add complain, complain_at,
6149 fatal, fatal_at, warn, warn_at, unexpected_end.
6150 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6151 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6153 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6155 (GNULIB_AUTOCONF_SNIPPET): Remove.
6156 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6158 * lib/.cvsignore: Add inttypes_.h.
6159 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6160 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6161 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6162 no-longer-necessary initializations.
6163 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6164 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6165 use the unistd module.
6166 * src/system.h: Likewise.
6167 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6168 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6169 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6170 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6171 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6172 * src/system.h: Include inttypes.h unconditionally, now that we
6173 use the inttypes module. Don't bother to include stdint.h, since
6174 inttypes.h now does that for us.
6175 (LOCALEDIR): Remove, now that we use the configmake module.
6176 * src/getargs.c: Include configmake.h.
6177 * src/main.c: Likewise.
6178 * src/output.c: Likewise.
6179 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6180 not from $abs_top_builddir, since config.h moved.
6183 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6184 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6186 * src/parse-gram.y (symbol_declaration): Don't put statements
6187 before declarations; it's not portable to C89.
6188 * src/scan-code.l (handle_action_at): Likewise.
6190 * src/scan-code.l: Always initialize braces_level; the old code
6191 left it uninitialized and therefore had undefined behavior.
6193 Don't attempt to redefine 'assert', since it runs afoul of
6194 systems where standard headers (mistakenly) include <assert.h>.
6195 Instead, define and use our own alternative, called 'aver'.
6196 * src/reader.c: Don't include assert.h, since we no longer
6198 * src/scan-code.l: Likewise.
6199 * src/system.h (assert): Remove, replacing with....
6200 (aver): New function, taking a bool arg. All uses changed.
6201 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6202 not merely an integer.
6204 2006-09-15 Bob Rossi <bob@brasko.net>
6206 Add support for push parsing. Based on the original work of
6207 Odd Arild Olsen <oao@fibula.no>.
6208 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6209 * data/c.m4 (YYPUSH): New.
6210 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6211 * data/push.c: New file.
6212 * src/getargs.c (push_parser): New var.
6213 * src/getargs.h (push_parser): New declaration.
6214 * src/output.c (prepare): Add macro insertion of `push_flag'.
6215 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6216 (prologue_declaration): Parse %push-parser.
6217 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6218 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6219 list of removed lines from the traces observed.
6220 (AT_CHECK_CALC_LALR): Added push parser tests.
6222 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6224 * NEWS: Version 2.3a.
6225 * configure.ac (AC_INIT): Likewise.
6227 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6228 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6229 due to header ordering dependencies. I don't know why the #define
6232 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6233 runtime cost when YYDEBUG is not defined, and so that some tests
6234 that used to fail now work. Problem and initial suggestion by
6236 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6237 * data/glr.cc (b4_parser_class_name):
6238 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6239 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6240 (yydebug_) [YYDEBUG]: New member.
6241 (yycdebug_): Now defined only if YYDEBUG.
6242 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6243 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6244 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6246 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6247 Define only if YYDEBUG.
6248 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6250 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6251 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6252 AT_CHECK_CALC_GLR_CC that are working now.
6254 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6256 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6257 We don't need them in glr.cc, and glr.c defines them.
6258 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6259 assumes that defining it to anything is the same as defining
6260 it to 1. Problem reported by Paolo Bonzini.
6262 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6264 * data/c.m4 (b4_null, b4_case): Define.
6265 * src/output.c (prepare_symbols): Use b4_null.
6266 (user_actions_output): Use b4_case.
6268 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6270 * data/glr.c (b4_shared_declarations): Put start-header first,
6271 before any #includes that we generate, so that feature-test
6272 macros work. Problem reported by Michael Deutschmann in
6273 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6274 * data/lalr1.cc: Likewise.
6275 * doc/bison.texinfo (Prologue): Document that feature-test macros
6276 should be defined before any Bison declarations.
6277 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6278 that depend on location.hh after, not before, Bison decls, since
6279 we now include location.hh after the first user prologue.
6281 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6282 Sander Brandenburg in
6283 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6284 Also, fix minor white space and comment issues.
6285 (Prologue): Mention that it's better to define feature-test macros
6286 before Bison declarations. Problem reported by Michael Deutschmann.
6288 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6290 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6291 This adjusts to recent gnulib changes.
6293 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6295 Finish implementation of per-type %destructor/%printer. Discussed
6297 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6299 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6300 * NEWS (2.3+): Add a description of this feature to the default
6301 %destructor/%printer description.
6302 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6303 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6304 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6305 list node contains a semantic type.
6306 * src/symtab.c, src/symtab.h: Extend with a table that associates
6307 semantic types with their %destructor's and %printer's.
6308 (semantic_type_from_uniqstr, semantic_type_get,
6309 semantic_type_destructor_set, semantic_type_printer_set): New functions
6310 composing the public interface of that table.
6311 (symbol_destructor_get, symbol_destructor_location_get,
6312 symbol_printer_get, symbol_printer_location_get): If there's no
6313 per-symbol %destructor/%printer, look up the per-type before trying
6315 * tests/actions.at (Per-type %printer and %destructor): New test case.
6316 * tests/input.at (Default %printer and %destructor redeclared):
6317 Extend to check that multiple occurrences of %symbol-default in a
6318 single %destructor/%printer declaration is an error.
6319 (Per-type %printer and %destructor redeclared, Unused values with
6320 per-type %destructor): New test cases.
6322 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6324 Require default %destructor/%printer to be declared using
6325 %symbol-default instead of an empty symbol list, and start working on
6326 new per-type %destructor/%printer. Discussed at
6327 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6328 * NEWS (2.3+): Add %symbol-default to example.
6329 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6330 (Table of Symbols): Add entry for %symbol-default.
6331 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6332 (generic_symlist, generic_symlist_item): New nonterminals for creating
6333 a list in which each item is a symbol, semantic type, or
6335 (grammar_declaration): Use generic_symlist in %destructor and %printer
6336 declarations instead of symbols.1 or an empty list.
6337 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6338 for changes to symbol_list.
6339 * src/reader.c: Update for changes to symbol_list.
6340 * src/scan-code.l: Likewise.
6341 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6342 * src/symlist.c, src/symlist.h: Extend such that a list node may
6343 represent a semantic type or a %symbol-default in addition to just an
6344 ordinary symbol. Add switched functions for setting %destructor's and
6346 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6347 %destructor/%printer declarations.
6349 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6351 Whether the default %destructor/%printer applies to a particular symbol
6352 isn't a question of whether the user *declares* that symbol (in %token,
6353 for example). It's a question of whether the user by any means
6354 *defines* the symbol at all (by simply using a char token, for
6355 example). $end is defined by Bison whereas any other token with token
6356 number 0 is defined by the user. The error token is always defined by
6357 Bison regardless of whether the user declares it with %token, but we
6358 may one day let the user define error as a nonterminal instead.
6359 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6360 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6361 the meaning of "user-defined".
6362 * tests/actions.at (Default %printer and %destructor for user-declared
6363 end token): Rename to...
6364 (Default %printer and %destructor for user-defined end token): ...
6367 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6368 computation of whether to apply the default, don't maintain a list of
6369 every Bison-defined symbol. Instead, just check for a first character
6370 of '$', which a user symbol cannot have, and check for the error token.
6372 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6374 Don't apply the default %destructor or %printer to the error token,
6375 $undefined, or $accept. This change fits the general rule that the
6376 default %destructor and %printer are only for user-declared symbols,
6377 and it solves several difficulties that are described in the new test
6379 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6380 * tests/actions.at (Default %printer and %destructor are not for error
6381 or $undefined, Default %printer and %destructor are not for $accept):
6384 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6386 Allow %start after the first rule.
6387 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6388 when parsing the first rule.
6389 (check_and_convert_grammar): Search for it here after all grammar
6390 declarations have been parsed. Skip midrules, which have dummy LHS
6392 * src/symtab.c (symbol_is_dummy): New function.
6393 * src/symtab.h (symbol_is_dummy): Declare it.
6394 * tests/input.at (%start after first rule): New test.
6396 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6398 Redo some of the previous commit: add back the ability to use
6399 non-aliased/undeclared string literals since it might be useful to
6400 those declaring %token-table.
6401 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6402 commit: don't worry about complaints from symbols_pack.
6403 * src/symtab.c (symbol_new, symbol_class_set,
6404 symbol_check_alias_consistency): Undo changes in previous commit: count
6405 each string literal as a new symbol and token, assign it a symbol
6406 number, and don't complain about non-aliased string literals.
6407 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6408 and token counts but does still set aliased tokens to the same number,
6409 symbol_pack_processor now leaves empty slots in the symbols array.
6411 * tests/regression.at (Undeclared string literal): Remove test case
6412 added in previous commit since non-aliased string literals are allowed
6414 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6415 remove unnecessary string literal declarations.
6416 * tests/sets.at (Firsts): Likewise.
6418 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6420 Don't allow an undeclared string literal, but allow a string literal to
6421 be used before its declaration.
6422 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6423 symbols_pack complained.
6424 * src/symtab.c (symbol_new): Don't count a string literal as a new
6426 (symbol_class_set): Don't count a string literal as a new token, and
6427 don't assign it a symbol number since symbol_make_alias does that.
6428 (symbol_make_alias): It's not necessary to decrement the symbol and
6429 token counts anymore. Don't assume that an alias declaration occurs
6430 before any uses of the identifier or string, and thus don't assert that
6431 one of them has the highest symbol number so far.
6432 (symbol_check_alias_consistency): Complain if there's a string literal
6433 that wasn't declared as an alias.
6434 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6435 symbol_pack asserts that every token has been assigned a symbol number
6436 although undeclared string literals have not.
6437 * tests/regression.at (String alias declared after use, Undeclared
6438 string literal): New test cases.
6439 (Characters Escapes, Web2c Actions): Declare string literals as
6441 * tests/sets.at (Firsts): Likewise.
6443 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6445 In the grammar scanner, STRING_FINISH unclosed constructs and return
6446 them to the parser in order to improve error messages.
6447 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6448 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6449 * tests/input.at (Unclosed constructs): New test case.
6450 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6453 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6456 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6458 Handle string aliases for character tokens correctly.
6459 * src/symtab.c (symbol_user_token_number_set): If the token has an
6460 alias, check and set its alias's user token number instead of its own,
6461 which is set to indicate the alias. Previously, every occurrence of
6462 the character token in the grammar overwrote that alias indicator with
6464 * tests/input.at (String aliases for character tokens): New test.
6466 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6468 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6470 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6472 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6473 to prevent failures when building on older platforms.
6474 Check for autopoint failure.
6475 Set XGETTEXT_OPTIONS to values that check for C format strings,
6476 so that translators are warned about them (this also helps
6477 prevent core dumps).
6479 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6480 function, since it simplifies our code a bit.
6482 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6483 rather than -W, so we don't get bogus warnings about sign comparisons.
6484 Add -Wpointer-arith, since that warning is useful (it reports code
6485 that does not conform to C89 and that some compilers reject).
6486 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6487 since it's no longer needed.
6489 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6491 Clean up scanners a bit.
6492 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6493 definitions so gcc won't warn when obstack_for_string is unused.
6494 * src/scan-code.l: config.h and system.h are already #include'd by
6495 scan-code-c.c, so get rid of them here.
6496 * src/scan-gram.l: Likewise.
6497 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6498 definitions rather than duplicating the rest of it.
6499 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6501 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6503 Suppress signed/unsigned comparison warnings for yycheck.
6504 * data/c.m4 (b4_safest_int_type): New macro.
6505 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6506 a signed int type, cast it to b4_safest_int_type first.
6507 * data/yacc.c: Likewise.
6508 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6511 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6513 * doc/bison.texinfo: Fix some typos.
6515 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6517 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6518 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6520 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6521 the latest gnulib does this a different way.
6522 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6523 translation was patched, so stop omitting it.
6525 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6527 Enable declaration of default %printer/%destructor. Make the parser
6528 use these for all user-declared grammar symbols for which the user does
6529 not declare a specific %printer/%destructor. Thus, the parser uses it
6530 for token 0 if the user declares it but not if Bison generates it as
6531 $end. Discussed starting at
6532 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6533 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6535 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6536 * NEWS (2.3+): Mention.
6537 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6538 declare a %destructor for a mid-rule's semantic value. It's just
6539 impossible to declare one specific to it.
6540 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6541 code. Describe default %destructor form.
6542 * src/parse-gram.y (grammar_declaration): Parse default
6543 %printer/%destructor declarations.
6544 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6545 and symbol_destructor_location_get rather than accessing the destructor
6546 and destructor_location members of struct symbol.
6547 (symbol_printers_output): Likewise but for %printer's.
6548 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6550 * src/symtab.c (default_destructor, default_destructor_location,
6551 default_printer, default_printer_location): New static global
6552 variables to record the default %destructor and %printer.
6553 (symbol_destructor_get, symbol_destructor_location_get,
6554 symbol_printer_get, symbol_printer_location_get): New functions to
6555 compute the appropriate %destructor and %printer for a symbol.
6556 (default_destructor_set, default_printer_set): New functions to set the
6557 default %destructor and %printer.
6558 * src/symtab.h: Prototype all those new functions.
6559 * tests/actions.at (Default %printer and %destructor): New test to
6560 check that the right %printer and %destructor are called, that they're
6561 not called for $end, and that $$ and @$ work correctly.
6562 (Default %printer and %destructor for user-declared end token): New
6563 test to check that the default %printer and %destructor are called for
6564 a user-declared end token.
6565 * tests/input.at (Default %printer and %destructor redeclared, Unused
6566 values with default %destructor): New tests to check related grammar
6567 warnings and errors.
6569 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6571 Clean up handling of %destructor for the end token (token 0).
6572 Discussed starting at
6573 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6575 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6577 Make the skeletons consistent in how they pop the end token and invoke
6579 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6580 state, which has token number 0, since this would invoke the
6581 %destructor for the end token.
6582 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6583 until after shifting the end token, or else it won't be popped.
6584 * data/yacc.c (yyparse): Likewise.
6586 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6587 it's the end token. Upon termination, destroy an unshifted lookahead
6588 even when it's the end token.
6589 * data/lalr1.cc (yy::parser::parse): Likewise.
6590 * data/yacc.c (yyparse): Likewise.
6592 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6593 value warnings for the end token when the user gives the end token a
6596 * tests/actions.at (Printers and Destructors): Test all the above.
6598 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6600 Update to latest gnulib and gettext versions.
6601 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6603 (gnulib_files): Add m4/warning.m4. Don't worry about files
6604 overwritten by autopoint.
6605 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6606 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6608 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6609 so that we can remove the intl files at a better time.
6610 (intl_files_to_remove): Remove aclocal.m4, since it gets
6611 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6612 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6613 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6614 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6615 Remove datarootdir hack; no longer needed.
6616 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6617 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6618 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6620 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6621 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6623 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6625 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6626 it with --assume-autoconf='latest-stable'.
6628 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6630 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6631 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6633 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6634 those from muscle_tab.c since the old ones are misleading.
6636 2006-07-13 Akim Demaille <akim@epita.fr>
6638 Support %define "KEY" {VALUE}.
6639 * src/scan-code.h, src/scan-code.l (translate_action)
6640 (translate_rule_action, translate_symbol_action, translate_code):
6641 Return char *, not const char *.
6642 * src/parse-gram.y (declaration): Rename as...
6643 (prologue_declaration): this.
6644 (string_content): Remove this nonterminal, use STRING.
6645 (braceless, content, content.opt): New nonterminal.
6647 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6649 * src/scan-gram.l (getargs.h): Don't include it.
6651 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6653 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6654 rather than a for-loop that declares a local bool variable. This
6655 should work around a compatibility problem with a Cray x1e C++
6656 compiler reported by Hung Nguyen in
6657 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6658 The for-loop was introduced in the 2004-11-17 change but I don't
6659 know why it was needed.
6661 2006-07-12 Akim Demaille <akim@epita.fr>
6663 * data/c.m4: Comment changes.
6665 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6667 * src/complain.c (error_message, ERROR_MESSAGE): New.
6669 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6670 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6672 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6674 * NEWS: Instead of %union, you can define and use your own union type
6675 YYSTYPE if your grammar contains at least one <type> tag.
6676 Your YYSTYPE need not be a macro; it can be a typedef.
6677 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6678 (Union Decl, Decl Summary): Document this.
6679 * data/glr.c (YYSTYPE): Implement this.
6680 * data/glr.cc (YYSTYPE): Likewise.
6681 * data/lalr1.cc (YYSTYPE): Likewise.
6682 * data/yacc.c (YYSTYPE): Likewise.
6683 * src/output.c (prepare): Output tag_seen_flag.
6684 * src/parse-gram.y (declaration, grammar_declaration):
6685 Use 'union_seen' rather than 'typed' to determine whether
6686 %union has been seen, since grammars can now be typed without
6688 (symbol_declaration, type.opt, symbol_def):
6689 Keep track of whether a tag has been seen.
6690 * src/reader.c (union_seen, tag_seen): New vars.
6692 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6693 * src/scan-code.l (untyped_var_seen): New variable.
6694 (handle_action_dollar): Adjust to above changes.
6695 (handle_action_dollar, handle_action_at):
6696 Improve overflow checking for outlandish numbers.
6697 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6698 avoid new diagnostics generated by above changes.
6699 * tests/regression.at (YYSTYPE typedef): Add test to check
6700 for type tags without %union.
6702 * src/symlist.c (symbol_list_length): Return int, not unsigned
6703 int, since callers expect int. This may need to get revisited
6704 once we have proper integer overflow checking.
6706 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6707 object is now static.
6709 * src/getargs.c (flags_argmatch): Return void, not int,
6710 to pacify ./configure --enable-gcc-warnings.
6712 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6713 since last_string is already defined to FLEX_PREFIX (last_string).
6715 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6717 Implement --warnings/-W.
6718 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6720 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6722 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6723 (warnings_args, warnings_types): New.
6724 (getargs, short_options, long_options): Accept -W/--warnings.
6725 Sort the options by alphabetical order, upper case letter right
6726 before its lower case.
6728 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6730 Change %merge result type clash warnings to errors. Discussed at
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6732 * src/reader.c (record_merge_function_type): Use complain_at.
6733 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6734 declared later): Update test case results.
6736 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6738 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6739 to be in alphabetical order.
6740 (trace_args): Spelling fixes.
6742 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6744 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6745 so they don't collide with user-defined macros.
6746 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6747 this was never guaranteed, and now that we're using gnulib stdint,
6748 which defines int_fast16_t to long int, the problem is exposed.
6750 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6752 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6753 need the full POSIX semantics (and weren't implementing them
6756 Adjust to Autoconf 2.60 and today's gnulib.
6757 * bootstrap (gnulib_modules): Add stdint.
6758 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6759 no longer copies it.
6760 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6761 since stdint needs the former and wcwidth (which is now required
6762 by mbswidth) needs the latter.
6763 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6764 work around a compatibility glitch between gettext 0.14.6 and
6766 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6767 Do not check for uintptr_t, since new stdint module does the right
6769 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6770 Add stdint.h, stdint_.h, wcwidth.h.
6771 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6772 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6773 stdint.m4, wchar_t.m4, wcwidth.m4.
6774 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6775 usual order for ../lib/*.h files.
6776 (file_name_split): Use last_component, not base_name, to adjust
6778 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6779 for ../lib/*.h files.
6780 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6781 Define unconditionally, since we now assume the stdint module.
6782 * src/scan-skel.l: Include <dirname.h>.
6783 (BASE_QPUTS): Use last_component, not base_name.
6784 * src/system.h: Include <unlocked-io.h> in the usual order
6785 for ../lib/*.h files. Include <stdint.h> unconditionally,
6786 since we now use the stdint module.
6787 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6788 HAVE_UINTPTR_T, since we now use the stdint module.
6789 (base_name): Remove decl, since files now include <dirname.h>
6792 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6794 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6796 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6797 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6799 * tests/calc.at: Adjust.
6801 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6803 * data/c.m4 (b4_basename): New.
6804 (b4_syncline): Also output the location of its invocation (from
6806 (b4_user_action, b4_define_user_action, b4_user_actions)
6807 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6808 (b4_user_stype): New.
6809 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6811 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6813 In the grammar file, the first column is 1 not 0 on the first line as
6814 on every other line.
6815 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6816 * tests/input.at (Torturing the Scanner): Update output.
6818 * src/scan-gram.l (scanner_cursor): Declare it static.
6820 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6822 In warnings, say "previous declaration" rather than "first
6824 * src/symtab.c (redeclaration): Do that here.
6825 * src/reader.c (record_merge_function_type): In the case of a result
6826 type clash, report the previous declaration rather than the very first
6827 one in the grammar file.
6828 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6829 declared later): Add a third declaration to check this behavior.
6830 * tests/input.at (Incompatible Aliases): Update output.
6832 2006-06-27 Akim Demaille <akim@epita.fr>
6834 * doc/Doxyfile.in: New.
6835 * doc/Makefile.am: Use it.
6836 * src/lalr.h, src/symtab.h: Initial doxygenation.
6838 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6840 Don't miss %merge result type warnings just because the LHS types are
6841 declared after the %merge. This continues the effort of the previous
6843 * src/reader.c (get_merge_function): Don't set the merger type yet.
6844 (record_merge_function_type): New function for setting the merger type
6845 and checking for clashes.
6846 (grammar_current_rule_merge_set): Set the location of the %merge for
6848 (packgram): Invoke record_merge_function_type for each rule now that
6849 all symbol type declarations have been parsed.
6850 * src/reader.h (merger_list.type_declaration_location): New member
6851 storing the location of the first %merge from which the type for this
6852 merging function was derived.
6853 * src/symlist.h (symbol_list.merger_declaration_location): New member
6854 storing the location of a rule's %merge, if any.
6855 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6856 declared later): New test to catch the error fixed by the above patch.
6858 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6860 Get action warnings (grammar_rule_check) right even when symbol
6861 declarations appear after the rules. Discussed at
6862 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6864 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6865 Don't mistake the type of $$ in a midrule to be that of its parent
6867 * src/reader.c (grammar_current_rule_end): Don't invoke
6868 grammar_rule_check yet since not all symbol declarations may have been
6870 (grammar_midrule_action): Likewise.
6871 Don't record whether the midrule's $$ has been used yet since actions
6872 haven't been translated yet.
6873 Record the midrule's parent rule and its RHS index within the parent
6875 (grammar_current_rule_action_append): Don't translate the action yet
6876 since not all symbol declarations may have been parsed yet and, thus,
6877 warnings about types for $$, $n, @$, and @n can't be reported yet.
6878 (packgram): Translate the action and invoke grammar_rule_check now that
6879 all symbol declarations have been parsed.
6880 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6881 after parsing the entire grammar file, the symbol list here in the case
6882 of a midrule is actually the midrule's empty RHS, so reference its
6883 parent rule's RHS where necessary.
6884 On the other hand, now that you can already know it's a midrule, you
6885 aren't forced to think $$ has the same type as its parent rule's $$.
6886 (handle_action_at): In the case of a midrule, reference the parent rule
6888 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6890 (symbol_list_length): Now that this is invoked after all rules have
6891 been parsed, a NULL symbol (rather than a NULL symbol list node)
6892 terminates a rule. symbol_list_print already does this correctly.
6893 * src/symlist.h (symbol_list.midrule_parent_rule,
6894 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6895 remember their relationships with their parents.
6896 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6897 fixed by the above patch.
6898 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6900 (Unused values): ... this old test case and...
6901 (Unused values before symbol declarations): ... this new test case.
6902 This one is the same as `Unused values' except that all symbol
6903 declarations appear after the rules in order to catch the rest of the
6904 errors fixed by the above patch.
6906 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6909 * src/reader.c (current_rule): Declare it static since it's no longer
6910 used outside this file.
6911 (grammar_current_rule_action_append): Remove redundant arguments from
6912 translate_rule_action invocation.
6913 * src/reader.h (current_rule): Remove this unused extern.
6914 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6915 * src/scan-code.l (translate_rule_action): Likewise.
6917 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6919 Clean up yesterday's patch.
6920 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6922 * src/reader.c (grammar_current_rule_action_append): ... here for
6923 consistency with grammar_current_rule_symbol_append.
6924 * tests/regression.at (Braced code in declaration in rules section):
6925 Make yyerror and yylex static as usual.
6927 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6929 Fix bug that mistakes braced code in a declaration in the rules section
6930 to be a rule action. Mentioned at
6931 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6932 * src/scan-gram.l: Move midrule action detection from the start of the
6933 scanning of any braced code to...
6934 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6935 action. For readability, use $2 and @2 rather than the equivalent
6937 * tests/regression.at (Braced code in declaration in rules section):
6938 New test to catch the error fixed by the above patch.
6940 Work on code readability some.
6941 * src/scan-code.l (current_rule): Get rid of this misleading and
6942 redundant declaration: it's actually extern'ed in reader.h.
6943 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6944 translate_action): Add a rule argument and use it instead of the global
6946 (translate_rule_action): This already receives current_rule through an
6947 argument, so pass it on to translate_action instead of assigning
6948 current_rule to current_rule.
6949 (translate_symbol_action, translate_code): Pass rule = NULL to
6952 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6954 Rename %before-definitions to %start-header and %after-definitions to
6955 %end-header. Don't use these declarations to separate pre-prologue
6956 blocks from post-prologue blocks. Add new order-independent
6957 declarations %before-header and %after-header as alternatives to the
6958 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6959 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6960 * NEWS (2.3+): Update for these changes.
6961 * data/glr.c (b4_before_definitions): Update to...
6962 (b4_start_header): ... this.
6963 (b4_after_definitions): Update to...
6964 (b4_end_header): ... this.
6965 * data/glr.cc: Likewise.
6966 * data/lalr1.cc: Likewise.
6967 * data/yacc.c: Likewise.
6968 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6969 prologue blocks with %*-header declarations.
6970 (Calc++ Parser): Likewise.
6971 (Decl Summary): Update names.
6972 (Table of Symbols): Update description.
6973 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6974 (PERCENT_END_HEADER): ... this.
6975 (PERCENT_BEFORE_DEFINITIONS): Update to...
6976 (PERCENT_START_HEADER): ... this.
6977 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6978 (declaration): Update token names and m4 macro names.
6979 When parsing %end-header and %start-header, invoke translate_code
6980 before muscle_code_grow, and no longer set global booleans to remember
6981 whether these declarations have been seen.
6982 Parse new %after-header and %before-header.
6983 * src/reader.c (before_definitions, after_definitions): Remove.
6984 (prologue_augment): Accept a new bool argument to specify whether to
6985 augment the pre-prologue or post-prologue.
6986 * src/reader.h (before_definitions, after_definitions): Remove these
6988 (prologue_augment): Add new bool argument.
6989 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6990 (PERCENT_END_HEADER): ... this.
6991 (PERCENT_BEFORE_DEFINITIONS): Update to...
6992 (PERCENT_START_HEADER): ... this.
6993 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6994 * tests/actions.at (Printers and Destructors): Update names.
6996 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6998 Add comparison operators for C++ location classes. Discussed at
6999 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7000 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7001 declaration indicating whether filename_type has an operator==. If
7002 filename_type is `std::string', it defaults to `1', `0' otherwise.
7003 * data/location.cc: Iff b4_define_location_comparison is `1', add
7004 operator== and operator!= for class position and for class location.
7007 * src/scan-action.l: Remove unused file.
7008 * src/symtab.c (symbol_printer_set): Use printer_location not
7009 destructor_location.
7010 * src/symtab.h (struct symbol): Replace incorrect source comment for
7012 * tests/input.at (Incompatible Aliases): Update output with correct
7015 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7017 Don't put the pre-prologue in the header file. For the yacc.c code
7018 file and the glr.c header and code files, move the pre-prologue before
7019 the token definitions. Add new %before-definitions and
7020 %after-definitions to declare code that will go in both the header file
7021 and code file. Discussed at
7022 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7023 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7025 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7026 * NEWS (2.3+): Describe these changes.
7027 * data/glr.c (b4_pre_prologue): Move from within to before...
7028 (b4_shared_declarations): ... this.
7029 Add new b4_before_definitions before b4_token_enums.
7030 Add new b4_after_definitions at the end.
7031 * data/glr.cc (b4_pre_prologue): Replace with...
7032 (b4_before_definitions): ... this in the header file.
7033 (b4_after_definitions): New near the end of the header file.
7034 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7035 code file right before including the header file.
7036 (b4_before_definitions): New in the previous position of
7037 b4_pre_prologue in the header file.
7038 (b4_after_definitions): New near the end of the header file.
7039 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7040 (b4_token_enums_defines): In the code file, move to right before
7041 YYSTYPE for consistency with the header file.
7042 (b4_before_definitions): New right before b4_token_enums_defines in
7043 both the header and code file.
7044 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7045 header and code file.
7046 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7047 of prologues for %union dependencies.
7048 (Decl Summary): In %defines description, mention the effect of
7049 %before-definitions and %after-definitions on the header file.
7050 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7051 than in the pre-prologue so that make check succeeds.
7052 (Table of Symbols): Add entries for %before-definitions and
7054 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7055 %before-definitions.
7056 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7057 (declaration): Parse those declarations and append to
7058 b4_before_definitions and b4_after_definitions, respectively.
7059 * src/reader.c (before_definitions, after_definitions): New bools to
7060 track whether those declarations have been seen.
7061 (prologue_augment): Add to the post-prologue if %union,
7062 %before-definitions, or %after-definitions has been seen.
7063 * src/reader.h (before_definitions, after_definitions): New extern's.
7064 * src/scan-gram.l: Scan the new declarations.
7065 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7066 prologue block in a %before-definitions or a %after-definitions based
7067 on whether the %union is declared.
7068 * tests/regression.at (Early token definitions with --yacc, Early token
7069 definitions without --yacc): Move tests for token definitions into the
7070 post-prologue since token names are no longer defined in the
7073 2006-06-20 Akim Demaille <akim@epita.fr>
7075 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7076 (symbol_get): Use it.
7077 * src/parse-gram.y: Use it.
7079 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7081 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7082 build succeeds when configured with --enable-gcc-warnings.
7084 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7086 * src/parse-gram.y (char_name): New function.
7087 (CHAR, STRING, string_content): For %printer, properly escape.
7088 (ID): Prefer fputs to fprintf.
7089 (id): Reindent to be consistent with other rules.
7090 Properly quote char.
7092 The Translation Project changed its way of publishing translations
7093 to maintainers. I haven't received any responses to my request
7094 for supporting the old way, or for documenting the new way. I
7095 have modified 'bootstrap' to use screen scraping
7096 (in this case, HTML scraping). This is unreliable and inelegant,
7097 but I don't see any better way. Yuck.
7098 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7099 (get_translations): New function, which uses HTML scraping to
7100 deduce locations of latest translations.
7101 Use this function to grab both bison and bison-runtime .po files.
7102 Don't bother priming the pump for the runtime-po domain any more,
7103 as it's now translated better than bison is.
7105 2006-06-19 Akim Demaille <akim@epita.fr>
7107 * src/scan-gram.l: No longer "parse" things after `%union' until
7108 `{'. Rather, return a single "%union" token.
7109 No longer make symbols: return strings, and leave the conversion
7110 to symbols to the parser.
7111 (SC_PRE_CODE, token_type): Remove.
7112 * src/parse-gram.y (%union): New field `character'.
7115 (ID, ID_COLON): Now that the scanner no longer makes them
7116 identifiers, adjust all uses to invoke symbol_get.
7117 (id_colon): New, wraps the conversion from string to symbol.
7118 (%union): Accept a possible union_name.
7119 (symbol): Now can be a char.
7120 * data/c.m4 (b4_union_name): Leave a default value.
7121 * data/glr.c, data/yacc.c: Use it.
7123 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7125 For associating token numbers with token names for "yacc.c", don't use
7126 #define statements unless `--yacc' is specified; always use enum
7127 yytokentype. Most important discussions start at:
7128 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7129 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7131 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7132 * NEWS (2.3+): Mention.
7133 * data/c.m4 (b4_yacc_if): New.
7134 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7136 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7137 on token name definitions.
7138 * src/getargs.c (usage): Capitalize `Yacc' in English.
7139 * src/output.c (prepare): Define b4_yacc_flag.
7140 * tests/regression.at (Early token definitions): Test that tokens names
7141 are defined before the pre-prologue not just before the post-prologue.
7142 Remove this test case and copy to...
7143 (Early token definitions with --yacc): ... this to test #define's.
7144 (Early token definitions without --yacc): ... and this to test enums.
7146 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7148 * NEWS: Reword the post-2.3 change to not be so optimistic about
7149 removing the old "look-ahead" spelling.
7150 Update previous look-ahead/lookahead change reports.
7151 * REFERENCES: look-ahead -> lookahead (since that's
7152 what he actually wrote).
7153 * doc/refcard.tex: look ahead -> lookahead,
7154 look-ahead -> lookahead
7156 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7158 For consistency, use `lookahead' instead of `look-ahead' or
7159 `look_ahead'. Discussed starting at
7160 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7162 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7163 * NEWS: For the next release, note the change to `--report'.
7164 * TODO, doc/bison.1: Update English.
7165 * doc/bison.texinfo: Update English.
7166 (Understanding Your Parser, Bison Options): Document as
7167 `--report=lookahead' rather than `--report=look-ahead'.
7168 * src/conflicts.c: Update English in comments.
7169 (lookahead_set): Rename from look_ahead_set.
7170 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7171 (resolve_sr_conflict): Rename local look_ahead_tokens to
7172 lookahead_tokens, and update other uses.
7173 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7174 count_rr_conflicts, conflicts_free): Update uses.
7175 * src/getargs.c (report_args): Move "lookahead" before alternate
7177 (report_types): Update uses.
7178 (usage): For `--report' usage description, state `lookahead' spelling
7179 rather than `look-ahead'.
7180 * src/getargs.h (report.report_lookahead_tokens): Rename from
7181 report_look_ahead_tokens.
7182 * src/lalr.c: Update English in comments.
7183 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7184 (state_lookahead_tokens_count): Rename from
7185 state_look_ahead_tokens_count.
7186 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7187 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7188 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7190 Update English in output.
7191 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7192 * src/print.c: Update English in comments.
7193 (lookahead_set): Rename from look_ahead_set.
7194 (print_reduction): Rename argument lookahead_token from
7196 (print_core, state_default_rule, print_reductions, print_results):
7198 * src/print_graph.c: Update English in comments.
7199 (print_core): Update uses.
7200 * src/state.c: Update English in comments.
7201 (reductions_new): Update uses.
7202 (state_rule_lookahead_tokens_print): Rename from
7203 state_rule_look_ahead_tokens_print, and update other uses.
7204 * src/state.h: Update English in comments.
7205 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7206 (state_rule_lookahead_tokens_print): Rename from
7207 state_rule_look_ahead_tokens_print.
7208 * src/tables.c: Update English in comments.
7209 (conflict_row, action_row): Update uses.
7210 * tests/glr-regression.at
7211 (Incorrect lookahead during deterministic GLR,
7212 Incorrect lookahead during nondeterministic GLR): Rename
7213 print_look_ahead to print_lookahead.
7214 * tests/torture.at: Update English in comments.
7215 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7216 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7217 (Many lookahead tokens): Update uses.
7218 * data/glr.c: Update English in comments.
7219 * lalr1.cc: Likewise.
7221 * src/conflicts.h: Likewise.
7222 * src/lalr.h: Likewise.
7223 * src/main.c: Likewise.
7224 * src/output.c: Likewise.
7225 * src/parse-gram.c: Likewise.
7226 * src/tables.h: Likewise.
7227 * tests/calc.at: Likewise.
7229 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7231 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7233 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7235 * TODO: Add request from Nelson H. F. Beebe to be able to install
7236 Bison without installing the yacc script.
7238 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7240 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7241 and yytext if they're already #define'd.
7242 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7243 * src/scan-code-c.c: ... here.
7244 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7247 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7249 Get Bison to build again when configured with --enable-gcc-warnings.
7250 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7252 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7253 loc argument as it shadows a global.
7254 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7257 * src/.cvsignore: Add scan-code.c.
7259 2006-06-07 Akim Demaille <akim@epita.fr>
7261 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7263 * src/scan-code.l: here.
7264 * tests/input.at (Torturing the Scanner): Fix another location
7267 2006-06-07 Akim Demaille <akim@epita.fr>
7269 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7271 2006-06-06 Akim Demaille <akim@epita.fr>
7273 Extract the parsing of user actions from the grammar scanner.
7274 As a consequence, the relation between the grammar scanner and
7275 parser is much simpler. We can also split "composite tokens" back
7277 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7278 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7280 * src/location.h, src/location.c (add_column_width)
7281 (location_compute): these.
7282 Fix the column count: the initial column is 0.
7283 (location_print): Be robust to ending column being 0.
7284 * src/location.h (boundary_set): New.
7285 * src/main.c: Adjust to scanner_free being renamed as
7287 * src/output.c: Include scan-code.h.
7288 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7290 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7291 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7292 which is now, again, a separate token.
7293 Adjust all dependencies.
7294 Whereever actions with $ and @ are used, use translate_code.
7295 (action): Remove this nonterminal which is now useless.
7296 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7297 (grammar_current_rule_action_append): Use translate_code.
7298 (packgram): Bound check ruleno, itemno, and rule_length.
7299 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7300 (last_string, last_braced_code_loc, max_left_semantic_context)
7301 (scanner_initialize, scanner_free, scanner_last_string_free)
7302 (gram_out, gram_lineno, YY_DECL_): Move to...
7303 * src/scan-gram.h: this new file.
7304 (YY_DECL): Rename as...
7306 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7307 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7308 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7309 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7310 Move these declarations, and...
7311 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7313 * src/flex-scanner.h: this new file.
7314 * src/scan-gram.l (rule_length, rule_length_overflow)
7315 (increment_rule_length): Remove.
7316 (last_braced_code_loc): Rename as...
7317 (gram_last_braced_code_loc): this.
7318 Adjust to the changes of the parser.
7319 Move all the handling of $ and @ into...
7320 * src/scan-code.l: here.
7321 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7322 (handle_action_dollar, handle_action_at): Move to...
7323 * src/scan-code.l: here.
7324 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7325 scan-code.h, scan-code-c.c, scan-gram.h.
7326 (EXTRA_bison_SOURCES): Add scan-code.l.
7327 (BUILT_SOURCES): Add scan-code.c.
7328 (yacc): Be robust to white spaces.
7330 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7331 * tests/regression.at: Adjust the column numbers.
7332 * tests/regression.at: Adjust the error message.
7334 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7336 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7337 Use Akim's wording from
7338 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7340 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7342 Between Bison releases, manually append `+' to the previous Bison
7343 release number, and use that as a signal to automatically print the
7344 ChangeLog's CVS Id keyword from --version. Discussed starting at
7345 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7346 * ChangeLog: Add Id header.
7347 * configure.ac (AC_INIT): Append `+' to `2.3'.
7348 * src/.cvsignore: Add revision.c.
7349 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7350 (BUILT_SOURCES): Add revision.c.
7351 (revision.c): New target rule. This file defines a new global variable
7352 named revision. It initializes it with either the Id from ChangeLog
7353 or, if VERSION doesn't contain `+', with the empty string.
7354 * src/getargs.c (version): Print the value of revision.
7355 * src/revision.h: Extern revision.
7357 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7359 * NEWS: Version 2.3.
7360 * configure.ac (AC_INIT): Likewise.
7362 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7364 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7365 with no arguments, not as an object-like macro. This is for
7366 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7367 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7368 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7371 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7373 * src/getargs.c (usage): Back out yesterday's modification of the
7374 --help output so that we don't have to wait for translation before
7377 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7379 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7380 Problem reported by Akim Demaille.
7382 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7384 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7386 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7388 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7389 generated source code. Problem reported by Frans Englich in
7390 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7392 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7394 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7395 shell, not within 'make', so that 'make' by an ordinary builder
7396 (using GNU make) does not worry about configuring gzip. This also
7397 works around a bug reported independently by Keith Thompson and by
7398 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7399 stderr rather than stdout, messing up the build logs.
7401 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7403 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7404 to make sure that YYID will never be unused. This fixes a 'make
7405 maintainer-check' failure caused by the recent changes to the 'Trivial
7406 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7408 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7410 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7412 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7413 state before an empty RHS is always resolved here. Only the location
7414 of that state is guaranteed to be resolved, and that's enough. This
7415 fixes the remaining bug reported by Derek M. Jones in
7416 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7417 * tests/glr-regression.at (Uninitialized location when reporting
7418 ambiguity): Test the above case.
7419 Also, the embedded comments in this test case claim it checks the case
7420 of an empty RHS that has inherited the initial location. However, the
7421 corresponding LHS was already resolved, so yyresolveLocations didn't
7422 actually have reason to modify it. Fix this by forcing
7423 nondeterministic operation at the beginning of the parse.
7425 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7427 * data/c.m4 (b4_yy_symbol_print_generate):
7428 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7429 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7430 of the bugs reported today by Derek M Jones in
7431 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7432 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7433 defined to be a type name without parens or brackets.
7434 (Location Type): Similarly for YYLTYPE.
7435 * tests/regression.at (Trivial grammars): Put in a test for this
7436 bug that will be caught by 'make maintainer-check' (though not,
7437 alas, by 'make check' unless your compiler is picky).
7439 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7441 * NEWS: Version 2.2.
7442 * configure.ac (AC_INIT): Likewise.
7444 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7446 * data/glr.c (yyreportTree): Make room in yystates for the state
7447 preceding the RHS. This fixes the segmentation fault reported by Derek
7449 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7450 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7451 to the user. Reported for yyreportTree by Derek M. Jones later in the
7453 * THANKS: Add Derek M. Jones.
7454 Update my email address.
7455 Fix typo in Steve Murphy's name.
7457 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7459 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7460 checking against YYLAST that caused the parser to miss a potential
7461 alternative in its diagnostic.
7462 Problem reported by Maria Jose Moron Fernandez in
7463 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7464 * data/lalr1.cc (yysyntax_error_): Likewise.
7465 * data/yacc.c (yysyntax_error): Likewise.
7466 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7467 tokens, in case we run into an older C compiler.
7468 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7469 Use them to check for the off-by-one error fixed above.
7471 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7472 YYSIZE_T, not size_t.
7473 * tests/regression.at (Trivial grammars): New test, to catch
7474 the error fixed by the above patch.
7476 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7478 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7480 Reported by Steve Murphy.
7482 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7484 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7485 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7487 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7489 Implement --trace=m4.
7490 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7491 * src/output.c (output_skeleton): When set, pass -dV to m4.
7493 Factor the handling of flags in m4.
7494 * src/output.c (prepare): Rename the muscle names debug, defines,
7495 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7496 * data/c.m4: Adjust.
7497 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7498 Use b4_define_flag_if to define other b4_FLAG_if macros.
7499 (b4_location_if): As a consequence, rename as...
7500 (b4_locations_if): this, for consistency.
7501 Adjust all the skeletons.
7503 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7505 * etc/bench.pm: Shorten bench names.
7507 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7509 * src/output.h, src/output.c (error_verbose): Move to...
7510 * src/getargs.h, src/getargs.c: here.
7512 Adjust dependencies.
7514 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7516 * data/c.m4 (b4_copyright): Put the special exception for Bison
7517 skeletons here, so we don't have to put it in each skeleton. All
7518 uses changed. Suggested by Akim Demaille. Also, wrap the
7519 copyright notice, in case it is longer than 80 columns. Replace
7520 comma by newline after title.
7522 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7524 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7525 incompatibility, not a bug. Mention that it wasn't fixed as of
7528 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7530 * examples/extexi: Enforce the precedence of concatenation over
7532 Reported by Tommy Nordgren.
7534 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7536 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7537 with the member "token".
7538 Reported by Martin Nylin.
7540 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7542 * data/glr.c: Switch to Bison 2.2 special-exception language in
7543 the copyright notice. Use more-regular format for titles and
7545 * data/glr.cc: Likewise.
7546 * data/location.cc: Likewise.
7547 * data/yacc.cc: Likewise.
7548 * doc/bison.texinfo (Conditions): Document this.
7549 * NEWS: likewise. Upgrade version to 2.2.
7551 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7553 * data/glr.cc: Remove dead code.
7555 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7557 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7558 that variable and the line breaks the bootstrap. Problem reported
7559 by Juan M. Guerrero.
7561 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7563 * doc/bison.texinfo (Multiple start-symbols): New.
7565 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7567 * etc/README, etc/bench.pl: New.
7569 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7571 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7573 Reported by Mickael Labau.
7574 * tests/input.at (Torturing the Scanner): Test it.
7576 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7578 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7579 Problem reported by Bob Rossi.
7581 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7583 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7584 and didn't really work.
7585 For the index, use @ifnotinfo, not @iftex.
7586 Minor cleanups of spacing and terminology.
7588 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7590 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7591 of AT_NAME_PREFIX when %name-prefix is not used.
7593 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7595 Apply --prefix to C++ skeletons too: they change the namespace.
7596 The test suite already exercize these cases.
7597 * data/c++.m4 (b4_namespace): New.
7598 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7599 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7600 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7601 * doc/bison.texinfo: Document it.
7602 (Option Cross Key): Use @multitable in all formats. It looks
7603 nicer, even in TeX outputs.
7604 (Rules): Use the same code whatever the output type is.
7605 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7606 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7607 * tests/calc.at: Use it, instead of hard coding `yy'.
7609 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7611 * TODO: Remove dead items.
7613 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7615 * doc/FAQ: Remove, merged into...
7616 * doc/bison.texinfo (FAQ): this.
7617 * doc/Makefile.am (EXTRA_DIST): Adjust.
7619 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7621 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7623 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7624 * doc/bison.texinfo (Calc++ Scanner): Use it.
7626 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7628 Fix two nits reported by twlevo, plus one more that I discovered.
7630 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7631 this is the usual Bison style.
7632 * src/location.h (location_print): Likewise.
7634 * src/reader.h (token_name): Likewise.
7636 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7638 Fix some nits reported by twlevo.
7639 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7640 and "POSIX". Use more-modern syntax for URLs. Mention C++
7641 and ask for Java. Don't hardwire OS version numbers. Add
7643 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7644 * src/conflicts.c (solved_conflicts_obstack): Now static.
7646 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7648 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7649 page. Say "you can use it" not "you may use it" as on the web page;
7650 we're describing capabilities not granting permission.
7652 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7654 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7655 shadowing warnings. Use usual patter for iterating through RHS.
7656 * tests/glr-regression.at
7657 (Uninitialized location when reporting ambiguity):
7658 Modify yylex so that it uses its argument, rather than trying
7659 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7660 const char -> char const.
7662 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7663 Don't use tabs inside commands; it messes up 'ps'.
7664 Problem reported by twlevo.
7666 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7668 * tests/glr-regression.at (Uninitialized location when reporting
7669 ambiguity): New test case.
7670 * data/glr.c (yyresolveLocations): New function, which uses
7672 (yyresolveValue): Invoke yyresolveLocations before reporting an
7674 * doc/bison.texinfo (Default Action for Locations): Note
7675 YYLLOC_DEFAULT's usage for ambiguity locations.
7676 (GLR Semantic Actions): Cross-reference those notes.
7678 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7680 * tests/glr-regression.at (Leaked semantic values when reporting
7681 ambiguity): Remove unnecessary union and type declarations.
7682 (Leaked lookahead after nondeterministic parse syntax error): New test
7684 * data/glr.c (yyparse): Check for zero stacks remaining before
7685 attempting to shift the lookahead so that you don't lose it.
7687 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7689 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7690 * tests/glr-regression.at (Leaked semantic values when reporting
7691 ambiguity): New test case.
7692 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7693 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7694 now unnecessary yystackp parameter.
7695 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7696 destructors can be called.
7698 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7699 in existing testcases.
7701 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7703 Don't leak semantic values for parent RHS when a user action cuts the
7704 parser, and clean up related code a bit.
7705 * tests/glr-regression.at (Leaked merged semantic value if user action
7706 cuts parse): Rename to...
7707 (Leaked semantic values if user action cuts parse): ... this. Add check
7708 for leaked parent RHS values.
7709 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7710 between an unresolved state (non-empty chain of semantic options) and
7711 an incomplete one (signaled by an empty chain).
7712 (yyresolveStates): Document the interface. Move all manipulation of a
7713 successfully or unsuccessfully resolved yyGLRState to...
7714 (yyresolveValue): ... here so that yyresolveValue always leaves a
7715 yyGLRState with consistent data and thus is easier to understand.
7716 Remove the yyvalp and yylocp parameters since they are always just
7717 taken from the yys parameter. When reporting a discarded merged value
7718 in debugging output, note that it is incompletely merged. Document the
7720 (yyresolveAction): If resolving any of the RHS states fails, destroy
7721 them all rather than leaking them. Thus, as long as user actions are
7722 written to clean up the RHS correctly, yyresolveAction always cleans up
7723 the RHS of a semantic option. Document the interface.
7725 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7727 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7728 led to a segmentation fault in GNU Pascal. Problem reported
7731 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7733 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7734 mid-rule action inside a nonterminal symbol in order to declare a
7735 destructor for its semantic value.
7737 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7739 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7740 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7741 __cplusplus && ! defined _STDLIB_H && !
7742 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7743 defined free))]: Include <stdlib.h> rather than rolling our own
7744 declarations of malloc and free, to avoid problems with
7745 incompatible declarations (using 'throw') C++'s stdlib.h. This
7746 should fix Debian bug 340012
7747 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7748 reported by Guillaume Melquiond.
7750 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7752 * NEWS: Clarify symbols versus types in unused-value warnings.
7754 * configure.ac (AC_INIT): Bump version number.
7756 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7758 * NEWS: Version 2.1a.
7759 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7760 since C99 requires this.
7762 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7764 * m4/c-working.m4: New file.
7765 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7767 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7769 * Makefile.maint: Merge from coreutils.
7771 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7773 More portability fixes for problems summarized by Nelson H. F. Beebe.
7775 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7776 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7777 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7778 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7779 messes up because C++ code is compiled in 32-bit mode but linked
7782 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7784 More portability fixes for problems summarized by Nelson H. F. Beebe.
7786 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7787 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7789 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7790 nodist_PROGRAMS, since we don't need to actually compile the
7791 example if we're just doing a plain 'make'. This avoids bothering
7792 the installer unnecessarily about problems due to weird C++
7795 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7797 More portability fixes for problems summarized by Nelson H. F. Beebe.
7799 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7800 than #include "...", and compile with -I'.'. The old method was
7801 not portable, according to Posix and the C standard, and it does
7802 not work with Sun C 5.7, where previous #line directives affect
7803 the working directory used in later #include "..." directives.
7805 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7807 Various DJGGP specific issues in /djgpp
7809 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7811 More portability fixes for problems summarized by Nelson H. F. Beebe.
7813 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7814 '#include <map>' works and that you can apply ++ to iterators.
7816 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7818 Work around portability problems summarized by Nelson H. F. Beebe in
7819 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7821 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7822 that '#include <string>' works.
7824 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7825 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7826 "warning: sorry: semantics of inline function static data `const
7827 unsigned char translate_table[262]' are wrong (you'll wind up with
7830 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7831 or, xor to not_, and_, or_, and xor_, respectively. This works
7832 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7833 random system header somewhere that includes the equivalent of
7836 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7837 -E" works; it apparently doesn't work with PathScale EKO Compiler
7840 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7842 During deterministic GLR operation, user actions should be able to
7843 influence the parse by changing yychar. To make this easier to fix and
7844 to make glr.c easier to evolve in general, don't maintain yytoken in
7845 parallel with yychar; just compute yytoken when needed.
7846 * tests/glr-regression.at (Incorrect lookahead during deterministic
7847 GLR): Check that setting yychar in a user action has the intended
7849 * data/glr.c (yyGLRStack): Remove yytokenp member.
7850 (yyclearin): Don't set *yytokenp.
7851 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7852 yychar rather than *yytokenp to determine the current lookahead.
7853 Compute yytoken locally when needed.
7854 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7857 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7858 after `--report' documentation.
7860 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7862 * src/parse-gram.y (grammar_declaration): Location of printer
7863 symbol is @1, not list->location. Bug reported by twlevo.
7864 * tests/input.at (Incompatible Aliases): Adjust to above change.
7866 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7868 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7869 all the test at once. This makes the output easier to read in the
7872 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7873 got from <http://bro-ids.org/download.html>. The bug is that
7874 when two actions appeared in succession, the second one was
7875 scanned before the first one was added to the grammar rule
7876 as a midrule action. Bison then output the incorrect warning
7877 "parse.y:905.17-906.36: warning: unused value: $3".
7878 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7879 associated with a value.
7880 (rhs): Don't invoke grammar_current_rule_action_append.
7881 (action): Invoke it here instead.
7882 * src/reader.c (grammar_midrule_action): Now extern.
7883 (grammar_current_rule_action_append): Don't invoke
7884 grammar_midrule_action; that is now the scanner's job.
7885 * src/reader.h (last_string, last_braced_code_loc):
7886 (grammar_midrule_action): New decls.
7887 * src/scan-gram.l (last_string): Now extern, sigh.
7888 (last_braced_code_loc): New extern variable.
7889 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7890 rule already has an action.
7891 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7892 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7893 Add some tests to check that the above changes fixed the bug.
7895 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7897 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7898 All used changed. Check whether the symbol has a destructor,
7899 not whether it is typed.
7900 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7901 that the values are still reported as unused. All line numbers
7904 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7906 Work around a bug in bro 0.8, which underparenthesizes its
7907 definition of YYLLOC_DEFAULT.
7908 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7910 * data/lalr1.cc: Likewise.
7911 * data/yacc.cc: Likewise.
7913 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7915 Work around a bug in Pike 7.0, and give the Pike folks a
7916 better way to override the usual int widths.
7917 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7918 user can override the types.
7919 (short): #undef, to work around a bug in Pike 7.0.
7920 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7921 (union yyalloc.yyss): Use yytype_int16 rather than short.
7923 (yysigned_char): Remove.
7924 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7925 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7926 * tests/regression.at (Web2c Actions): Adjust to above changes.
7928 * src/reader.c (check_and_convert_grammar): New function.
7929 (reader): Close the input file even if something went wrong during
7930 parsing. Minor file descriptor leak reported by twlevo.
7932 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7933 to pacify gcc -Wswitch-default.
7934 * src/scan-gram.l (adjust_location): Use a default: break; case
7935 to pacify gcc -Wswitch-default.
7936 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7937 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7938 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7939 Move these decls to scan-skel.l, since they don't need to be
7941 * src/scan-skel.l: Accept the above decls.
7942 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7945 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7947 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7948 since we don't want to insist on a version number at the start
7949 of the changelog every time.
7950 * Makefile.maint: Sync from coreutils a bit better.
7951 (sc_trailing_blank): Renamed from sc_trailing_space.
7953 (sc_no_if_have_config_h, sc_require_config_h):
7954 (sc_prohibit_assert_without_use): New rules.
7955 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7956 (sc_dd_max_sym_length): Fix leading spaces in rule.
7957 (sc_system_h_headers): Prefix with @.
7958 (sc_useless_cpp_parens, m4-check): Output line numbers.
7959 (changelog-check): Allow version only in head.
7960 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7961 satisfy new Makefile.maint rule.
7962 * data/glr.c: Likewise.
7963 * data/glr.cc: Likewise.
7964 * data/lalr1.cc: Likewise.
7965 * data/yacc.c: Likewise.
7966 * lib/ebitsetv.c: Likewise.
7967 * lib/lbitset.c: Likewise.
7968 * lib/subpipe.c: Likewise.
7969 * lib/timevar.c: Likewise.
7970 * src/system.h: Likewise.
7971 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7972 * djgpp/Makefile.maint: Add copyright notice.
7973 * djgpp/README.in: Likewise.
7974 * djgpp/config.bat: Likewise.
7975 * djgpp/config.site: Likewise.
7976 * djgpp/config_h.sed: Likewise.
7977 * djgpp/djunpack.bat: Likewise.
7978 * djgpp/config.sed: Fix copyright notice to match standard format.
7979 * djgpp/subpipe.h: Likewise.
7980 * lib/bitsetv-print.c: Likewise.
7981 * lib/bitsetv.c: Likewise.
7982 * lib/subpipe.h: Likewise.
7983 * lib/timevar.c: Likewise.
7984 * lib/timevar.h: Likewise.
7985 * djgpp/subpipe.c: Use standard recipe for config.h.
7986 * lib/abitset.c: Likewise.
7987 * lib/bitset.c: Likewise.
7988 * lib/bitset_stats.c: Likewise.
7989 * lib/bitsetv-print.c: Likewise.
7990 * lib/bitsetv.c: Likewise.
7991 * lib/ebitsetv.c: Likewise.
7992 * lib/get-errno.c: Likewise.
7993 * lib/lbitset.c: Likewise.
7994 * lib/subpipe.c: Likewise.
7995 * lib/timevar.c: Likewise.
7996 * lib/vbitset.c: Likewise.
7997 * tests/local.at: Likewise.
7998 * src/scan-gram.l: Don't include verify.h, since system.h does
8000 * .x-sc_require_config_h: New file.
8001 * .x-sc_unmarked_diagnostics: New file.
8003 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8005 Be a bit more systematic about using 'abort'.
8006 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8007 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8008 Put 'default: abort ();' before some other case, to satisfy older
8010 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8011 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8012 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8013 * src/conflicts.c (resolve_sr_conflict): Likewise.
8014 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8015 (get_decision_str, get_orientation_str, get_node_alignment_str):
8016 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8017 (get_linestyle_str, get_arrowstyle_str): Likewise.
8018 * src/conflicts.c (resolve_sr_conflict):
8019 Use a default case rather than one for the one remaining enum
8020 value, to catch invalid enum values as well.
8021 * src/lalr.c (set_goto_map, map_goto):
8022 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8023 * src/nullable.c (nullable_compute, token_definitions_output):
8025 * src/reader.c (packgram, reader): Likewise.
8026 * src/state.c (transitions_to, state_new, state_reduction_find):
8028 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8029 (symbol_pack): Likewise.
8030 * src/tables.c (conflict_row, pack_vector): Likewise.
8031 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8032 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8033 * src/system.h: Don't include <assert.h>.
8034 (assert): New macro.
8036 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8037 (Destructor Decl, Parser Function, Pure Calling):
8038 Describe rules for braces inside C code more carefully.
8040 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8042 Fix some porting glitches found by Nelson H. F. Beebe.
8043 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8044 compilers that don't understand that abort () does not return.
8045 * src/state.c (transitions_to): Likewise.
8046 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8047 that '#include <cstdlib>' works.
8048 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8049 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8050 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8051 for the benefit of some pre-C99 compilers.
8053 * bootstrap: Undo changes to gnulib files that autoreconf made.
8055 Minor fixups to get 'make maintainer-check' to work.
8056 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8057 with the new verify.h implementation.
8058 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8059 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8060 * data/yacc.c (YYUSE): Likewise.
8061 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8062 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8063 * src/parse-gram.y (declaration): Don't pass a string constant
8064 to a function that expects char *, since GCC might complain
8065 about the constant value.
8066 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8067 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8068 before #defining them.
8069 * tests/glr-regression.at
8070 (Incorrectly initialized location for empty right-hand side in GLR):
8071 In yyerror, use the msg arg.
8072 (Corrupted semantic options if user action cuts parse):
8073 (Incorrect lookahead during deterministic GLR):
8074 (Incorrect lookahead during nondeterministic GLR):
8075 Don't name a local var 'index'; it shadows string.h's 'index'.
8077 2006-01-19 Akim Demaille <akim@epita.fr>
8079 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8080 location, not just parts of it.
8082 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8084 * NEWS: Document the fact that multiple %unions are now allowed.
8085 * doc/bison.texinfo (Union Decl): Likewise.
8086 * TODO: This feature is now implemented, so remove it from
8089 * Makefile.maint: Merge with coreutils Makefile.maint.
8090 (CVS_LIST): Use build-aux version if available.
8091 (VERSION_REGEXP): New macro.
8092 (syntax-check-rules): Add sc_no_if_have_config_h,
8093 sc_prohibit_assert_without_use, sc_require_config_h,
8094 sc_useless_cpp_parens.
8095 (sc_obsolete_symbols): Check for O_NDELAY.
8096 (sc_dd_max_sym_length): Track coreutils.
8097 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8098 (sc_useless_cpp_parens): New rule.
8099 (news-date-check): Look for version or today's date.
8100 (changelog-check): Don't require version number near head.
8101 (copyright-check): Use current year instead of hardwiring 2005.
8102 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8103 (announcement): Add --gpg-key-ID.
8105 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8108 Avoid undefined behavior that addressed just before the start of an
8109 array. Problem reported by twlevo.
8110 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8111 * src/lalr.c (build_relations): Rely on new sentinel.
8112 * src/gram.c (gram_free): Adjust to new sentinel.
8114 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8116 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8117 yylookaheadNeeds. All uses updated.
8118 (yysplitStack): Rename local yynewLookaheadStatuses to
8119 yynewLookaheadNeeds.
8120 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8121 GLR): In comments, change `lookahead status' to `lookahead need'.
8123 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8125 * data/glr.c (yysplitStack): A little stylistic rewrite.
8127 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8129 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8131 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8133 * doc/bison.texinfo: Fix some typos.
8134 (GLR Semantic Actions): New subsection discussing special
8135 considerations because GLR semantic actions might be deferred.
8136 (Actions): Mention look-ahead usage of yylval.
8137 (Actions and Locations): Mention look-ahead usage of yylloc.
8138 (Special Features for Use in Actions): Add YYEOF entry and mention it
8139 in the yychar entry.
8140 In the yychar entry, remove mention of the local yychar case (pure
8141 parser) since this is irrelevant information when writing semantic
8142 actions and since it's already discussed in `Table of Symbols' where
8143 yychar is otherwise described as an external variable.
8144 In the yychar entry, don't call it the `current' look-ahead since it
8145 isn't when semantic actions are deferred.
8146 In the yychar and yyclearin entries, add note about deferred semantic
8148 Add yylloc and yylval entries discussing look-ahead usage.
8149 (Look-Ahead Tokens): When discussing yychar, don't call it the
8150 `current' look-ahead, and do mention yylval and yylloc.
8151 (Error Recovery): Cross-reference `Action Features' when mentioning
8153 (Table of Symbols): In the yychar entry, don't call it the `current'
8155 In the yylloc and yylval entries, mention look-ahead usage.
8157 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8159 * tests/glr-regression.at: Update copyright year to 2006.
8161 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8163 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8164 use during nondeterministic operation to track which stacks have
8165 actually needed the current lookahead.
8166 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8167 Allocate, deallocate, resize, and otherwise shuffle space for
8168 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8169 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8170 appropriately during nondeterministic operation.
8171 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8172 members to store the current lookahead to be used by the deferred
8174 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8175 from which the RHS is taken. Set the lookahead members of the new
8176 yySemanticOption according to the lookahead status for stack yyk.
8177 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8178 yyaddDeferredAction.
8179 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8180 members of yySemanticOption before invoking yyuserAction, and then set
8181 them back to their current values afterward.
8182 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8183 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8184 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8185 titles for consistency.
8186 (Leaked merged semantic value if user action cuts parse): In order to
8187 suppress lint warnings, use arguments in merge function, and assign
8188 char value < 128 in main.
8189 (Incorrect lookahead during deterministic GLR): New test case.
8190 (Incorrect lookahead during nondeterministic GLR): New test case.
8192 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8194 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8195 !yyvaluep as signal that no semantic value is available to print.
8196 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8197 to print a semantic value.
8199 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8201 * tests/glr-regression.at: For consistency with my newer test cases,
8204 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8206 * data/glr.c (yyresolveValue): When merging semantic options, if at
8207 least one user action succeeds but a later one cuts the parse, then
8208 destroy the semantic value before returning rather than leaking it.
8209 (yyresolveStates): If a user action cuts the parse and thus
8210 yyresolveValue fails, ignore the (unset) semantic value rather than
8211 corrupting the yyGLRState, and empty the semantic options list since
8212 the user actions should have called all necessary destructors.
8213 Simplify code with YYCHK.
8214 * tests/glr-regression.at (Corrupted semantic options if user action
8215 cuts parse): New test case.
8216 (Undesirable destructors if user action cuts parse): New test case.
8217 Before applying any of this patch, this test case never actually failed
8218 for me... but only because the corrupted semantic options usually
8220 (Leaked merged semantic value if user action cuts parse): New test
8223 2006-01-05 Akim Demaille <akim@epita.fr>
8225 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8227 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8229 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8230 _MSC_VER. Problem reported by Cenzato Marco.
8231 (b4_c_function_def): Use it.
8232 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8234 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8235 than rolling our own.
8237 2006-01-04 Akim Demaille <akim@epita.fr>
8239 Also warn about non-used mid-rule values.
8240 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8242 (symbol_list_new): Adjust.
8243 * src/reader.c (symbol_typed_p): New.
8244 (grammar_rule_check): Use it.
8245 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8247 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8249 * tests/actions.at (Exotic Dollars): Adjust.
8251 2006-01-04 Akim Demaille <akim@epita.fr>
8253 * src/reader.c (grammar_midrule_action): If $$ is set in a
8254 mid-rule, move the `used' bit to its lhs.
8255 * tests/input.at (Unused values): New.
8256 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8258 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8260 * doc/bison.texinfo (Bison Options): Say more accurately what
8262 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8263 about declarations in the grammar when in Yacc mode, as POSIX does
8264 not require a diagnostic when the grammar uses extensions.
8266 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8268 Warn about dubious constructions like "%token T T".
8270 * src/symtab.h (struct symbol.declared): New member.
8271 * src/symtab.c (symbol_new): Initialize it to false.
8272 (symbol_class_set): New arg DECLARING, specifying whether
8273 this is a declaration that we want to warn about, if there
8274 is more than one of them. All uses changed.
8276 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8277 Allow multiple %union directives, whose contents concatenate.
8278 * src/parse-gram.y (grammar_declaration): Likewise.
8279 Use muscle_code_grow, so that we don't need stype_line any more.
8282 * src/muscle_tab.c (muscle_grow): Fix comment.
8284 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8285 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8286 Update copyright year to 2006.
8288 2006-01-03 Akim Demaille <akim@epita.fr>
8290 Have glr.cc pass (some of) the calc.at tests.
8291 * data/glr.cc (b4_parse_param_orig): New.
8292 (b4_parse_param): Improve its definition, and bound it more
8293 clearly in the skeleton.
8294 (b4_epilogue): Append, instead of prepending, in order to keep
8296 Simplify the generation of auxiliary functions: locations and
8297 purity are mandated.
8298 (b4_global_tokens_and_yystype): Honor it.
8299 * data/location.cc (c++.m4): Don't include it.
8300 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8302 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8304 Be sure to initialize the first position's filename.
8305 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8307 (AT_CHECK_CALC_GLR_CC): New.
8308 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8310 2006-01-02 Akim Demaille <akim@epita.fr>
8312 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8314 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8315 * data/glr.cc: Do not include stack.hh.
8317 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8319 * data/glr.c: Reformat whitespace with tabs.
8320 (b4_lpure_formals): Remove this unused m4 macro.
8321 * tests/cxx-type.at: Reformat whitespace with tabs.
8322 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8323 since it's a member. Rename type to isNterm for clarity.
8325 2005-12-29 Akim <akim@sulaco.local>
8327 Let glr.cc catch up with symbol_value_print.
8328 * data/glr.cc (b4_yysymprint_generate): Replace by...
8329 (b4_yy_symbol_print_generate): this.
8330 (yy_symbol_print, yy_symbol_value_print): Declare them.
8332 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8334 * src/location.h (boundary): Note that a line or column equal
8335 to INT_MAX indicates an overflow.
8336 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8337 (rule_length_overflow, increment_rule_length, add_column_width):
8339 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8340 (<SC_BRACED_CODE>"}"):
8341 Use increment_rule_length rather than incrementing it by hand.
8342 (adjust_location, handle_syncline): Diagnose overflow.
8343 (handle_action_dollar, handle_action_at):
8344 Fix bug with monstrosities like $-2147483648.
8345 Remove now-unnecessary checks.
8346 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8347 (convert_ucn_to_byte): Verify assumptions.
8348 (handle_syncline): New arg LOC. All callers changed.
8349 Don't store through a value derived from char const * pointer.
8351 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8354 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8356 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8357 Remove unnecessary forward static decls.
8359 2005-12-27 Akim Demaille <akim@epita.fr>
8361 * src/reader.c (grammar_current_rule_check): Also check that $$
8363 Take the rule to check as argument, hence rename as...
8364 (grammar_rule_check): this.
8365 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8367 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8368 (grammar_midrule_action, grammar_symbol_append): Now static.
8369 * tests/torture.at (input): Don't rely on the default action
8370 being always performed.
8371 * tests/calc.at: "Set" $$ even when the action is "cut" with
8373 * tests/actions.at (Exotic Dollars): Instead of using unused
8374 values, check that the warning is issued.
8376 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8378 * NEWS: Improve wording for unused-value warnings.
8380 2005-12-22 Akim Demaille <akim@epita.fr>
8382 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8383 (b4_yysymprint_generate): Rename as...
8384 (b4_yy_symbol_print_generate): this.
8385 Generate yy_symbol_print instead of yysymprint.
8386 Generate also yy_symbol_value_print, and use it.
8388 2005-12-22 Akim Demaille <akim@epita.fr>
8390 * NEWS: Warn about unused values.
8391 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8393 (symbol_list_n_get, symbol_list_n_used_set): New.
8394 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8395 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8396 * src/reader.c (grammar_current_rule_check): Check that values are
8398 * src/symtab.c (symbol_print): Accept 0.
8399 * tests/existing.at: Remove the type information.
8401 Remove useless actions (beware of mid-rule actions: perl -000
8402 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8403 * tests/actions.at (Exotic Dollars): Use unused values.
8404 * tests/calc.at: Likewise.
8405 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8408 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8411 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8413 Undo 2005-12-01 tentative license wording change. The wording is
8414 still being reviewed by the lawyers, and we don't want to wait for
8415 them before publishing a test release. For now, revert to the
8417 * NEWS: Undo 2005-12-01 change.
8418 * data/glr.c: Revert to previous license wording.
8419 * data/glr.cc: Likewise.
8420 * data/lalr1.cc: Likewise.
8421 * data/location.cc: Likewise.
8422 * data/yacc.c: Likewise.
8424 * NEWS: Reword %destructor vs YYABORT etc.
8425 * data/glr.c: Use American spacing, for consistency.
8426 * data/glr.cc: Likewise.
8427 * data/lalr1.cc: Likewise.
8428 * data/yacc.c: Likewise.
8429 * data/yacc.c: Reformat comments slightly.
8430 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8431 for consistency. Fix some spelling errors and reword recently-included
8433 * tests/cxx-type.at: Cast results of malloc, for C++.
8435 2005-12-21 Joel E. Denny <address@hidden>
8437 * tests/cxx-type.at: Construct a tree, count the parents of shared
8438 nodes, and free each node once and only once. Previously, the memory
8439 for semantic values was leaked instead.
8441 2005-12-21 Joel E. Denny <address@hidden>
8443 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8444 (yylval, yylloc): If pure, #define to yystackp->yyval and
8445 yystackp->yyloc similar to yychar and yynerrs.
8446 (yyparse): If pure, remove local yylval and yylloc. Add local
8447 yystackp to accommodate pure definitions of yylval and yylloc.
8448 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8449 yylvalp and yyllocp to &yylval and &yylloc.
8450 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8451 namespace. Previously, nerrs and char were missing, but lval and lloc
8453 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8454 yylvalp and yyllocp parameters since, if pure, these are now always
8455 accessible through yystackp. If not pure, they are still accessible
8457 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8458 `if (YYID (N))' to pacify lint.
8460 2005-12-21 Akim Demaille <akim@epita.fr>
8462 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8463 destroy the RHS symbols of a rule.
8464 * data/yacc.c (yylen): Initialize to 0.
8465 Keep its value to the number of items to possibly shift.
8466 In particular, a regular successful parse that ends on YYFINAL by
8467 a (internal) YYACCEPT must not have yylen != 0.
8468 (yyerrorlab, yyreturn): Pop the RHS.
8469 Reorder a bit to emphasize the `shifting' bits of code.
8470 (YYPOPSTACK): Now accept a number of items to pop.
8471 * data/lalr1.cc: Likewise.
8472 * data/glr.c: Formatting changes.
8473 Use goto instead of fall through.
8474 * doc/bison.texinfo (Destructor Decl): Complete.
8476 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8478 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8479 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8480 * djgpp/config.bat: Replace every occurence of the file name
8481 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8482 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8483 * djgpp/config.sed: Replace every occurence of the file name
8484 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8485 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8486 * djgpp/djunpack.bat: DJGPP specific file.
8487 * djgpp/fnchange.lst: DJGPP specific file.
8488 * djgpp/README.in: Add new information about how to unpack the bison
8489 source on MSDOS and other systems which have 8.3 file name restrictions
8490 using djunpack.bat and fnchange.lst.
8492 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8494 * bootstrap (build_cvs_prefix): Remove; unused.
8495 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8496 when getting gnulib.
8498 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8500 * data/glr.c: Reorder typedef declarations for structs to match order
8501 of struct declarations.
8502 Rename yystack everywhere to yystackp except in yyparse where it's not
8504 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8506 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8507 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8508 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8511 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8513 * tests/sets.at (Accept): Fix typos in regular expression used to
8514 sed out the final state number.
8516 Work around portability problem on Solaris 10: flex-generated
8517 files include <stdio.h> before <config.h>, which messes up
8518 because the latter defines __EXTENSIONS__. Address the problem
8519 by creating two new little files that include <config.h> first,
8520 then include the flex-generated files. Rewrite everyone else
8521 to include <config.h> first, as well.
8522 * lib/timevar.c: Always include "config.h".
8523 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8524 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8525 (EXTRA_bison_SOURCES): New macro.
8526 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8527 * src/system.h: Don't include config.h.
8528 * src/LR0.c: Include <config.h> first.
8529 * src/assoc.c: Likewise.
8530 * src/closure.c: Likewise.
8531 * src/complain.c: Likewise.
8532 * src/conflicts.c: Likewise.
8533 * src/derives.c: Likewise.
8534 * src/files.c: Likewise.
8535 * src/getargs.c: Likewise.
8536 * src/gram.c: Likewise.
8537 * src/lalr.c: Likewise.
8538 * src/location.c: Likewise.
8539 * src/main.c: Likewise.
8540 * src/muscle_tab.c: Likewise.
8541 * src/nullable.c: Likewise.
8542 * src/output.c: Likewise.
8543 * src/parse-gram.y: Likewise.
8544 * src/print.c: Likewise.
8545 * src/print_graph.c: Likewise.
8546 * src/reader.c: Likewise.
8547 * src/reduce.c: Likewise.
8548 * src/relation.c: Likewise.
8549 * src/state.c: Likewise.
8550 * src/symlist.c: Likewise.
8551 * src/symtab.c: Likewise.
8552 * src/tables.c: Likewise.
8553 * src/uniqstr.c: Likewise.
8554 * src/vcg.c: Likewise.
8556 * src/parse-gram.y: Fix minor problems uncovered by lint.
8557 (current_lhs, current_lhs_location): Now static.
8558 (current_assoc): Remove unused variable.
8560 Cleanups so that Bison-generated parsers have less lint.
8561 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8562 Prepend /*ARGSUSED*/, for lint's sake.
8563 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8564 definition if 'lint' is defined.
8565 (YYID): New macro (or function, if lint).
8566 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8567 * data/yacc.c: Likewise.
8568 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8569 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8570 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8572 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8573 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8574 Use YYID(0) rather than 0, for lint.
8575 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8576 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8578 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8580 * tests/glr-regression.at
8581 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8582 Close memory leak reported by twlevo.
8584 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8586 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8588 (yyparse): Iterate another stack in order to call user destructors.
8589 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8591 (Duplicated user destructor for lookahead): This test now is expected
8594 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8596 * NEWS: Document the following change.
8597 * data/yacc.c: Say "parser skeleton" rather than "file", since
8598 it's no longer just a file.
8599 * data/glr.c: Grant a special exception for C GLR parsers, that
8600 reads like the already-existing exception for C LALR(1) parsers.
8601 * data/glr.cc: Likewise.
8602 * data/lalr1.cc: Likewise.
8603 * data/location.cc: Likewise.
8604 * data/yacc.c: Reword the "written by" statement to clarify that
8605 it was the parser skeleton, not the entire output file.
8606 * data/glr.c: Written by Paul Hilfinger.
8607 * data/glr.cc: Written by Akim Demaille.
8608 * data/lalr1.cc: Likewise.
8610 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8612 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8613 Fix typos in previous change that broke 'make check'.
8614 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8616 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8617 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8618 We can revert this once things settle down.
8620 * src/conflicts.c (conflicts_print): Don't print file name twice
8621 when %expect fails because there were no conflicts.
8622 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8624 * tests/conflicts.at (%expect not enough, %expect too much):
8625 (%expect with reduce conflicts): Adjust to new behavior.
8627 2005-11-18 Akim Demaille <akim@epita.fr>
8629 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8631 * NEWS: Document this.
8632 * doc/bison.texinfo (Expect Decl): Likewise.
8634 2005-11-16 Akim Demaille <akim@epita.fr>
8636 Generalize the display of semantic values and locations in traces.
8637 * data/glr.c (yy_reduce_print): Fix indices (again).
8638 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8640 * data/lalr1.cc (yyreduce_print): Rename as...
8641 (yy_reduce_print): this.
8642 Display values and locations.
8643 * data/yacc.c (yy_reduce_print): Likewise.
8644 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8645 (yysymprint): Move higher to be visible from yy_reduce_print).
8647 * tests/calc.at: Adjust the expected length of the traces.
8649 2005-11-14 Akim Demaille <akim@epita.fr>
8651 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8652 from 1 to N, while values and location start at 0.
8653 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8655 2005-11-14 Akim Demaille <akim@epita.fr>
8657 * data/glr.c (yy_reduce_print): Fix the $ number.
8659 2005-11-14 Akim Demaille <akim@epita.fr>
8661 "Use" parse parameters.
8662 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8663 * data/glr.c, data/glr.cc: Use them.
8664 * data/glr.c (YYUSE): Have a C++ definition that supports
8667 2005-11-14 Akim Demaille <akim@epita.fr>
8669 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8671 2005-11-14 Akim Demaille <akim@epita.fr>
8674 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8676 2005-11-12 Akim Demaille <akim@epita.fr>
8678 Let position and location be PODs.
8679 * data/location.cc (position::initialize, location::initialize): New.
8680 (position::position, location::location): Define only if
8681 b4_location_constructors is defined.
8682 * data/lalr1.cc (b4_location_constructors): Define it for backward
8684 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8686 2005-11-12 Akim Demaille <akim@epita.fr>
8688 * data/lalr1.cc: Move the body of the ctor and dtor into the
8689 parser file (instead of the header).
8690 Wrap the implementations in a "namespace yy".
8692 2005-11-12 Akim Demaille <akim@epita.fr>
8694 Have glr.c include its header file when created.
8695 * data/glr.c (b4_shared_declarations): New.
8696 Output them verbatim in the parser if !%defines, otherwise
8697 output then in the header file, and include it instead.
8699 2005-11-11 Akim Demaille <akim@epita.fr>
8701 * data/glr.c: Comment changes.
8703 2005-11-11 Akim Demaille <akim@epita.fr>
8705 When yydebug, report semantic and location values for reductions.
8706 * data/glr.c (yy_reduce_print): Report the semantic values and the
8708 (YY_REDUCE_PRINT): Adjust.
8709 (yyglrReduce): Use them.
8710 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8711 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8712 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8715 2005-11-10 Akim Demaille <akim@epita.fr>
8717 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8718 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8719 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8721 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8723 * m4/cxx.m4, examples/Makefile.am: Don't build
8724 examples/calc++ if no C++ compiler is available. (trivial change)
8726 2005-11-09 Akim Demaille <akim@epita.fr>
8728 * src/scan-skel.l: Use a couple of asserts.
8730 2005-11-03 Akim Demaille <akim@epita.fr>
8732 In some (weird) cases, the final state number is incorrect.
8733 Reported by Alexandre Duret-Lutz.
8734 * src/LR0.c (state_list_append): Remove the computation of
8736 (save_reductions): Do it here.
8737 (get_state): Alpha conversion.
8738 (generate_states): Use a for loop.
8739 * src/gram.h (item_number_is_rule_number)
8740 (item_number_is_symbol_number): New.
8741 * src/state.c: Use assert.
8742 * src/system.h: Include assert.h.
8743 * tests/sets.at (Accept): New.
8745 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8747 * data/glr.c (yyfill): Adjust comment.
8748 (yyresolveAction): Initialize default location properly
8749 for empty right-hand sides.
8750 (yydoAction): Ditto.
8751 Add comment explaining apparently dead code.
8752 * tests/glr-regression.at
8753 (Incorrectly initialized location for empty right-hand side in GLR):
8756 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8758 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8759 gnulib when interrupted. This fixes some race conditions and
8760 works around some portability problems (one noted by Paul
8763 2005-10-22 Akim <akim@epita.fr>
8765 * Makefile.cfg: Adjust to config -> build-aux.
8768 2005-10-21 Akim Demaille <akim@epita.fr>
8770 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8772 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8773 * data/yacc.c (b4_Pure_if): Rename as...
8774 (b4_yacc_pure_if): this.
8775 (YY_SYMBOL_PRINT, yyparse): Adjust.
8776 * doc/bison.texinfo: Formatting changes.
8778 2005-10-21 Akim Demaille <akim@epita.fr>
8780 Finish the transition config -> build-aux.
8781 * configure.ac, Makefile.am: Use build-aux.
8782 * config/prev-version, config/announce-gen, config/Makefile.am:
8784 * build-aux/prev-version, build-aux/announce-gen,
8785 * build-aux/Makefile.am: here.
8787 2005-10-14 Akim Demaille <akim@epita.fr>
8789 * examples/calc++/test: Use set -x only when VERBOSE.
8791 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8793 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8794 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8796 2005-10-13 Akim Demaille <akim@epita.fr>
8798 * src/scan-skel.l: Output the base name parts of the parser and
8800 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8802 Use this to exercise C++ outputs in subdirs.
8803 Reported by Oleg Smolsky.
8805 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8807 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8808 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8809 Problem reported by John P. Hartmann.
8810 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8813 2005-10-12 Akim Demaille <akim@epita.fr>
8815 * src/parse-gram.y (version_check): Exit 63 to please missing
8816 (stands for "version mismatch).
8817 * tests/input.at, doc/bison.texinfo: Adjust.
8819 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8821 Work around portability problems with Visual Age C compiler
8822 (xlc and xlC_r) reported by John P. Hartmann.
8823 * data/location.cc (initial_column, initial_line): Remove.
8824 All uses replaced by 0 and 1.
8825 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8826 that xlc complains about.
8827 * src/scan-skel.l (skel_wrap): Likewise.
8828 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8830 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8831 __STDC_VERSION__. Use it everywhere instead of looking at
8832 __STDC__ and __cplusplus.
8834 2005-10-10 Akim Demaille <akim@epita.fr>
8836 * examples/calc++/test: Be quiet unless VERBOSE.
8838 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8840 * data/c.m4 (yydestruct, yysymprint):
8841 Use YYUSE instead of casting to void.
8842 * data/glr.c (YYUSE): New macro.
8843 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8844 Use it instead of rolling our own.
8845 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8847 Use /*CONSTCOND*/ to suppress lint warnings.
8848 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8849 (YY_STACK_PRINT): Use 'false' not '0'.
8851 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8852 * data/yacc.c (YYUSE): New macro.
8853 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8854 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8855 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8858 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8859 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8861 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8863 Undo the parts of the unlocked-I/O change that substituted
8864 putc or puts for printf. This might hurt performance a bit,
8865 but some people prefer the printf style.
8866 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8867 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8868 All uses replaced by YYFPRINTF and YYDPRINTF.
8869 * data/yacc.c: Likewise.
8870 * lib/bitset.c (bitset_print): Likewise.
8871 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8873 * lib/lbitset.c (debug_lbitset): Likewise.
8874 * src/closure.c (print_firsts, print_fderives): Likewise.
8875 * src/gram.c (grammar_dump): Likewise.
8876 * src/lalr.c (look_ahead_tokens_print): Likewise.
8877 * src/output.c (escaped_output): Likewise.
8878 (user_actions_output): Break apart two printfs.
8879 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8880 * src/reduce.c (reduce_print): Likewise.
8881 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8882 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8884 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8885 Use assignments rather than casts-to-void to suppress
8886 unused-variable warnings. This pacifies 'lint'.
8887 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8888 unused-variable warnings.
8890 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8892 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8894 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8896 Use unlocked I/O for a minor performance improvement on hosts like
8897 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8898 is to use the gnlib unlocked-io module, and to prefer putc and
8899 puts to printf when either will work (since the latter doesn't
8900 come in an unlocked flavor).
8901 * bootstrap (gnulib_modules): Add unlocked-io.
8902 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8903 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8904 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8905 and similarly for puts and putc and printf.
8906 * data/yacc.c: Likewise.
8907 * lib/bitset.c (bitset_print): Likewise.
8908 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8909 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8911 * lib/lbitset.c (debug_lbitset): Likewise.
8912 * src/closure.c (print_firsts, print_fderives): Likewise.
8913 * src/gram.c (grammar_dump): Likewise.
8914 * src/lalr.c (look_ahead_tokens_print): Likewise.
8915 * src/output.c (escaped_output): Likewise.
8916 (user_actions_output): Coalesce two printfs.
8917 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8918 * src/reduce.c (reduce_print): Likewise.
8919 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8920 * src/system.h: Include unlocked-io.h rather than stdio.h.
8922 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8923 this confuses xgettext.
8925 2005-10-02 Akim Demaille <akim@epita.fr>
8927 * bootstrap (gnulib_modules): Add strverscmp.
8928 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8929 * m4/.cvsignore: Add strverscmp.m4.
8930 * src/parse-gram.y (%require): New token, new rule.
8931 (version_check): New.
8932 * src/scan-gram.l (%require): Adjust.
8933 * tests/input.at (AT_REQUIRE): New.
8935 * doc/bison.texinfo (Require Decl): New.
8936 (Calc++ Parser): Use %require.
8938 2005-10-02 Akim Demaille <akim@epita.fr>
8940 * data/location.cc: New.
8942 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8943 Akim Demaille <akim@epita.fr>
8945 Make sure -odir/foo.cc creates dir/location.hh etc.
8946 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8947 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8948 (spec_defines_file): Now const.
8950 (short_base_name): Remove.
8951 * src/files.c: Adjust.
8952 (dirname.h): Include.
8953 (base_name): Don't prototype it.
8954 (finput): Remove, duplicates gram_in.
8955 (full_base_name, short_base_name): Replace by...
8956 (all_but_ext, all_but_tab_ext): these.
8957 (compute_base_names): Rename as...
8958 (compute_file_name_parts): this.
8959 Update to compute the new variables, including dir_prefix.
8960 Adjust dependencies.
8961 * src/output.c (prepare): Output them.
8962 * src/reader.c: Adjust to use gram_in, not finput.
8963 * src/scan-skel.l (@dir_prefix@): New.
8965 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8967 * lib/subpipe.c: New function end_of_output_subpipe() added
8968 to allow support for non-posix systems. This is a no-op function
8971 * lib/subpipe.h: New function end_of_output_subpipe() added
8972 to allow support for non-posix systems. This is a no-op function
8975 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8976 handle the lack of pipe/fork functionality on non-posix systems.
8978 * djgpp/Makefile.maint: DJGPP specific file.
8980 * djgpp/README.in: DJGPP specific file.
8982 * djgpp/config.bat: DJGPP specific configuration file.
8984 * djgpp/config.sed: DJGPP specific configuration file.
8986 * djgpp/config.site: DJGPP specific configuration file.
8988 * djgpp/config_h.sed: DJGPP specific configuration file.
8990 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8992 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8994 2005-10-02 Akim Demaille <akim@epita.fr>
8996 * data/location.cc: New, extract from...
8997 * data/lalr1.cc: here.
8998 (location.hh): Include it after the user prologue, in case the
8999 filename type is defined by the user.
9000 Forward declation location and position before the pre-prologue.
9001 (yyresult_): Rename as...
9002 (yyresult): this, it's a local variable, not an attribute.
9003 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9005 2005-10-01 Akim Demaille <akim@epita.fr>
9007 * examples/extexi: Restore the #line generation.
9009 2005-09-30 Akim Demaille <akim@epita.fr>,
9010 Alexandre Duret-Lutz <adl@gnu.org>
9012 Move the token type and YYSTYPE in the parser class.
9013 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9014 (parser::token): New, from the moved free definition of tokens.
9015 (parser::semantic_value): Now a full definition instead of an
9016 indirection to YYSTYPE.
9017 (b4_post_prologue): No longer included in the header file, but
9018 in the implementation file.
9019 * doc/bison.texi (C+ Language Interface): Update.
9020 * src/parse-gram.y: Support unary %define.
9021 * tests/actions.at: Define global_tokens_and_yystype for backward
9022 compatibility until we update the tests.
9023 * tests/calc.at: Idem.
9024 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9025 to simplify the code.
9027 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9029 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9030 Ah, the good old days! Problem reported by Peter Klein.
9031 * bootstrap (gnulib_modules): Add strerror, strtoul.
9032 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9033 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9035 2005-09-29 Akim Demaille <akim@epita.fr>
9037 * data/c.m4 (b4_error_verbose_if): New.
9038 * data/lalr1.cc: Use it.
9039 (YYERROR_VERBOSE_IF): Remove.
9040 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9041 parser members, replaced by...
9042 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9044 (yysyntax_error_): Takes the state number as argument.
9045 (yyreduce_print_): Use the argument yyrule, not the former
9048 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9050 * bootstrap (gnulib_modules): Add verify.
9051 * lib/.cvsignore: Add verify.h.
9052 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9053 * src/system.h (verify): Remove.
9054 Include verify.h instead.
9055 * src/tables.c (tables_generate): Use new API for 'verify'.
9057 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9059 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9060 local variables whose names begin with 'yy'.
9061 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9062 Trivial changes from Joel E. Denny.
9064 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9066 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9067 don't use alloca any more.
9069 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9070 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9071 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9072 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9073 to match yacc.c, to test more hosts.
9075 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9077 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9078 doesn't affect behavior.
9079 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9081 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9082 This works a bit better with glibc, if user code has already included
9084 * doc/bison.texinfo (Bison Parser): Document that users can't
9085 arbitrarily use malloc and free for other purposes. Document
9086 that <alloca.h> and <malloc.h> might be included.
9087 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9088 user must declare alloca.
9090 * HACKING (release): Forwarn the Translation Project about
9093 2005-09-20 Akim Demaille <akim@epita.fr>
9095 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9097 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9099 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9100 (YYSTACK_ALLOC_MAXIMUM): Use it.
9101 (yysyntax_error): New function.
9102 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9103 multiple syntax errors are reported, and alloca is being used.
9104 Instead, reallocate buffers twice as big each time, so that
9105 we waste at most half the allocated memory. Start with a small
9106 (128-byte) buffer that will suffice in most cases anyway.
9107 Use yysyntax_error to do most of the work.
9109 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9110 yynerrs is the number of errors reported, not the number of
9113 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9114 Mark it as expected to fail.
9115 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9116 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9117 Don't start user-code symbols with "yy", to avoid name space problems.
9119 2005-09-19 Akim Demaille <akim@epita.fr>
9121 Remove the traits, failed experiment.
9122 It never proved useful, and anyway because of the current
9123 definition, it was not possible to have several specialization of
9124 this traits, making it useless.
9125 * data/lalr1.cc (yy:traits): Remove.
9126 Inline its definitions in the parser class.
9128 2005-09-19 Akim Demaille <akim@epita.fr>
9130 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9131 least Mac OSX with a /usr/local install of gettext.
9133 2005-09-19 Akim Demaille <akim@epita.fr>
9135 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9136 and yytoken for similarity with the other skeletons.
9138 2005-09-19 Akim Demaille <akim@epita.fr>
9140 * NEWS, configure.ac: update version number to 2.1a.
9142 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9144 * NEWS: Version 2.1.
9146 * NEWS: Remove notice of yytname change, since it was never in an
9148 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9150 * src/output.c (prepare): Likewise.
9151 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9152 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9153 is not defined. This is an awful hack, but it's enough for now.
9154 All callers changed.
9155 * tests/glr-regression-at (make_value): Args are const pointers now,
9156 to avoid GCC warning.
9157 (Duplicated user destructor for lookahead): New test. Currently
9158 skipped. It fails on my host but I'm not sure it'll always fail.
9160 2005-09-16 Akim Demaille <akim@epita.fr>
9162 * src/symtab.h (struct symbol): Declare the printer and destructor
9163 as const, to avoid accidental calls to free.
9164 (symbol_destructor_set, symbol_printer_set): Adjust.
9165 * src/symtab.c: Adjust.
9167 2005-09-16 Akim Demaille <akim@epita.fr>
9169 * data/c.m4 (b4_token_enums): New.
9170 (b4_token_defines): Rename as...
9171 (b4_token_enums_defines): this.
9172 (b4_token_defines): New, output only the #defines.
9173 * data/yacc.c, data/glr.c: Adjust.
9174 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9175 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9178 2005-09-16 Akim Demaille <akim@epita.fr>
9180 * data/lalr1.cc (yylex_): Remove, inline its code.
9181 (yyreport_syntax_error_): Remove, replaced by...
9182 (yysyntax_error_): this which returns a string and leaves to the
9183 caller the call to the users' error function.
9184 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9185 Move from members of the parser object...
9186 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9187 to local variables of the parse function.
9189 2005-09-16 Akim Demaille <akim@epita.fr>
9191 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9192 since it's in Bison's name space.
9194 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9196 * data/glr.c (yyresolveValue): Add default case to pacify
9197 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9199 * NEWS: Document when yyparse started to return 2.
9200 * doc/bison.texinfo (Parser Function): Document when yyparse
9203 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9204 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9206 (class position): file_name -> filename (reverting). All uses changed.
9208 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9210 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9211 do anything if $@ exists. This reverts part of the 2005-07-07
9214 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9216 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9217 contains obsolete information and isn't worth distributing as a
9218 separate file anyway.
9219 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9220 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9221 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9222 (yyparse): Abort if user code uses longjmp to throw an unexpected
9225 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9227 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9228 Suggested by twlevo@xs4all.nl.
9230 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9231 This avoids a diagnostic from gcc -Wswitch-enum.
9232 Problem reported by twlevo@xs4all.nl.
9234 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9235 standards. Use "file name" or "file" or "name", depending on
9237 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9238 not to hack/foo.tab.c.
9239 (Calc++ Top Level): 2nd arg of main is not const.
9240 * data/glr.c: b4_filename -> b4_file_name.
9241 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9243 (class position): filename -> file_name. All uses changed.
9244 * data/yacc.c: b4_filename -> b4_file_name.
9245 * lib/bitset.h: filename -> file_name in local vars.
9246 * lib/bitset_stats.c: Likewise.
9247 * src/files.c: Likewise.
9248 * src/scan-skel.l ("@output ".*\n): Likewise.
9249 * src/files.c (file_name_split): Renamed from filename_split.
9250 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9252 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9254 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9255 to accommodate latest gnulib.
9257 * tests/glr-regression.at (Duplicate representation of merged trees):
9258 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9260 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9263 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9265 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9266 All uses changed. Invoke user destructor after an error during a
9267 split parse (trivial change from Joel E. Denny).
9269 * tests/glr-regression.at
9270 (User destructor after an error during a split parse): New test case.
9271 Problem reported by Joel E. Denny in:
9272 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9274 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9276 * README-cvs: Give URLs for recommended tools.
9277 Mention Gzip version problem, and bootstrapping issues.
9278 Remove troubleshooting section, as it's somewhat obsolete.
9280 * bootstrap (no_cache): New var, to accommodate different wget
9281 variants. Use it instead of '-C off'. Problem reported by
9284 * data/glr.c (yydestroyStackItem): New function.
9285 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9286 debugging information. Problem reported by Joel E. Denny.
9288 2005-08-25 Akim Demaille <akim@epita.fr>
9290 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9292 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9294 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9295 Don't invoke destructor on unresolved entries.
9296 * tests/glr-regression.at
9297 (User destructor for unresolved GLR semantic value): New test case.
9298 Problem reported by Joel E. Denny in:
9299 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9301 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9303 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9305 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9306 lib-prefix.m4, po.m4.
9308 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9309 in yydestruct diagnostic, since it might not be an error.
9310 Problem reported by Joel Denny near end of
9311 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9312 * data/lalr1.cc (yyerturn): Likewise.
9313 * data/yacc.c (yyreturn): Likewise.
9314 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9316 * src/files.c: Remove obsolete FIXME comment.
9318 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9319 with the other templates, and to fix bogus run-on messages such
9320 as the one reported at the end of
9321 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9322 All callers changed to avoid the newline.
9323 (yyprocessOneStack): Output two lines rather than one, to accommodate
9324 the above change. This changes the debug output format slightly.
9326 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9327 reported by Joel E. Denny in
9328 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9330 * tests/glr-regression.at (Duplicate representation of merged trees):
9331 New test, from Joel E. Denny in:
9332 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9333 * THANKS: Add Joel E. Denny.
9335 * configure.ac (AC_INIT): Bump to 2.0c.
9337 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9339 * NEWS: Version 2.0b.
9341 * Makefile.am (SUBDIRS): Put examples before tests, so that
9342 "make check" doesn't finish with "All 1 tests passed".
9344 * tests/regression.at (Token definitions): Don't rely on
9345 AT_PARSER_CHECK for data that contains backslashes. It currently
9346 uses 'echo', and 'echo' isn't portable if its argument contains
9347 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9348 that the byte '\0xff' is not printable in the C locale; it is,
9349 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9350 not printable, so use '\0x81' to test.
9352 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9353 version of GCC, since the macro is used with non-GCC compilers.
9355 Fix core dump reported by Pablo De Napoli in
9356 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9357 * tests/regression.at (Invalid inputs with {}): New test.
9358 * src/parse-gram.y (token_name): Translate type before using
9361 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9362 the user's name space. All uses changed to __attribute__
9364 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9365 Add __attribute__ ((__noreturn__)).
9367 * etc/clcommit: Remove. We weren't using it, and it failed
9368 "make maintainer-distcheck".
9369 * Makefile.maint: Merge from coreutils.
9370 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9371 (syntax-check-rules): Change list of rules as described below.
9372 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9373 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9374 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9375 (sc_trailing_space): New rules.
9376 (sc_xalloc_h_in_src): Remove.
9377 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9378 (sc_space_tab, sc_error_exit_success, sc_changelog):
9379 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9380 (makefile-check, po-check, author_mark_check):
9381 (makefile_path_separator_check, copyright-check):
9382 Use grep -n, to make it easier to find violations.
9383 Use CVS_LIST and CVS_LIST_EXCEPT.
9384 (header_regexp, h_re): Remove.
9386 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9387 (my-distcheck): Use more-modern GCC flags.
9388 (signatures, %.asc): Remove.
9389 (rel-files, announcement): Remove signatures.
9390 Restore old updating code, even though we don't use it, so
9391 that we're the same as coreutils.
9392 (alpha, beta, major): Depend on news-date-check.
9393 Make the upload commands.
9395 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9396 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9397 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9398 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9399 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9400 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9401 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9402 * tests/sets.at: Likewise.
9404 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9405 we comment out the Autoconf version number.
9406 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9407 it's error-prone and "make maintainer-distcheck" rejects it.
9409 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9410 Indent calls to "error" to pacify "make maintainer-distcheck",
9411 when the calls are not intended to be translated.
9412 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9414 * src/Makefile.am (DEFS): Use +=, to pacify
9415 "make maintainer-distcheck".
9416 (bison_SOURCES): Add scan-skel.h.
9417 (sc_tight_scope): New rule, from coreutils.
9419 * src/files.c (src_extension, header_extension):
9420 Now static, not extern.
9421 * src/getargs.c (short_options): Likewise.
9422 * src/muscle_tab.c (muscle_table): Likewise.
9423 * src/parse-gram.y (current_class, current_type, current_prec):
9425 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9426 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9427 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9428 void, to avoid warning when NLS is disabled.
9429 * src/output.c: Include scan-skel.h.
9430 (scan_skel): Remove decl, since scan-skel.h does this.
9432 Indent calls to "error" to pacify "make maintainer-distcheck".
9433 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9434 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9435 "make maintainer-distcheck".
9436 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9437 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9438 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9439 (skel_lex_destroy, scan_skel): Move these decls to...
9440 * src/scan-skel.h: New file.
9441 * src/uniqstr.c (uniqstr_assert):
9442 Indent calls to "error" to pacify "make maintainer-distcheck".
9444 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9447 * tests/torture.at: Revamp to avoid misuse of atoi that
9448 "make maintainer-distcheck" complained about.
9450 * examples/extexi (message): Don't print a message more than once,
9451 and omit line-number decoration that makes Emacs compile think
9452 that informative messages are worth worrying about.
9454 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9456 * configure.ac: Update version number.
9458 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9460 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9461 autogenerated by the maintainer.
9462 * examples/calc++/.cvsignore: Add *.yy.
9464 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9465 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9466 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9468 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9470 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9471 from maintainer-distcheck about casting the argument of 'free'.
9473 * NEWS: Mention recent yytname changes.
9474 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9476 * bootstrap: For translations that have not yet been upgraded to
9477 the new runtime-po domain, prime the pump by extracting the
9478 relevant strings from the obsolete translations. This code can be
9479 removed once the bison-runtime domain has been translated by each
9482 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9483 now that token names are already quoted.
9485 Fix problem reported by Anthony Heading.
9486 * data/glr.c (YYTOKEN_TABLE): New macro.
9487 (yytname): Define if YYTOKEN_TABLE.
9488 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9489 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9490 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9491 * src/output.c (prepare_symbols): Output token_table_flag.
9493 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9495 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9496 again if the first call fails.
9498 * data/glr.c (yytnamerr): New function.
9499 (yyreportSyntaxError): Use it to dequote most string literals.
9500 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9501 with other skeletons. All uses changed.
9502 (yytnameerr_): New function.
9503 (yyreport_syntax_error): Use it to dequote most string literals.
9504 * data/yacc.c (yytnamerr): New function.
9505 (yyerrlab): Use it to decode most string literals.
9506 * doc/bison.texinfo (Decl Summary, Calling Convention):
9507 Clarify quoting convention of yytname.
9508 * src/output.c (prepare_symbols): Quote all names. This undoes
9509 the 2005-04-17 change, which is now accomplished (mostly) via
9510 changes in the parsers as described above.
9511 * tests/regression.at (Token definitions, Web2c Actions):
9512 Undo most 2005-04-17 change here, too.
9514 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9516 Fix more problems reported by twlevo@xs4all.nl.
9517 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9518 remove trailing spaces. This loses the exit status of ./types,
9519 and isn't needed since ./types shouldn't be emitting trailing
9521 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9522 as the stack isn't valid in that case.
9524 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9525 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9526 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9527 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9529 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9530 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9531 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9534 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9535 overly-picky compilers that reject 'char *foo = "bar";'.
9537 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9538 to FILE * parameter, not to stderr. This fixes a typo introduced
9539 in the 2005-07-12 change.
9541 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9542 warnings from GCC 4.
9544 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9545 (yyglrShiftDefer, yysplitStack):
9546 Remove unused parameters b4_pure_formals. All uses changed.
9547 (yyglrShift): Remove unused parameters b4_user_formals.
9549 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9551 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9553 Destructor cleanups and regularization among the three skeletons.
9554 * NEWS: Document the behavior changes.
9555 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9556 stack before failing, as the cleanup code will do it for us now.
9557 * data/lalr1.cc (yyerrlab): Likewise.
9558 * data/glr.c (yyparse): Pop everything off the stack before
9559 freeing it, so that destructors get called properly.
9560 * data/lalr1.cc (yyreturn): Likewise.
9561 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9562 This is more consistent.
9563 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9564 why destructors might be called. 1.875 -> 2.1.
9565 (Destructor Decl, Decl Summary, Table of Symbols):
9566 Some English-language cleanups for %destructor.
9567 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9568 Add output line for destructor of start symbol.
9569 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9570 because of that same extra output line.
9572 * NEWS: Document minor wording changes in diagnostics of
9573 Bison-generated parsers.
9574 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9575 Remove unused formals. All uses changed.
9576 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9577 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9578 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9579 Rename yyoverflowab to yyexhaustedlab.
9580 When memory exhaustion occurs during syntax-error reporting,
9581 report it separately rather than in a single diagnostic; this
9583 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9584 (Memory Exhausted): Renamed from Parser Stack Overflow.
9585 Revamp wording slightly to prefer "memory exhaustion".
9586 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9588 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9590 Add i18n support to the GLR skeleton. Partially fix the C++
9591 skeleton; a C++ expert needs to finish this. Remove debugging
9592 msgids; there's little point to having them translated, since they
9593 can be understood only by someone who can read the
9594 (English-language) source code.
9596 Generate runtime-po/bison-runtime.pot automatically, so that we
9597 don't have to worry about garbage getting in that file. We'll
9598 make sure after the next official release that old msgids don't
9600 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9602 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9604 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9605 Fix typos in explanations of the runtime file.
9606 * bootstrap: Change gettext keyword from YYI18N to YY_.
9607 Use standard Makefile.in.in in runtime-po, since we'll arrange
9608 for backward-compatible bison-runtime.po files in a different way.
9609 * data/glr.c (YY_): New macro, from yacc.c.
9610 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9611 Translate messages intended for users.
9612 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9613 the wording in the other skeletons. We don't know that the memory
9615 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9616 Use same method that yacc.c uses.
9617 Don't translate debugging messages.
9618 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9619 it doesn't work (yet), and requires C++ expertise to fix.
9620 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9621 Move defn to a more logical place, to be consistent with other
9623 Don't translate debugging messages.
9624 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9625 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9626 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9627 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9629 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9630 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9632 * tests/glr-regression.at (Badly Collapsed GLR States):
9634 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9635 yylex should return 0 at EOF rather than aborting.
9637 Improve tests for stack overflow in GLR parser.
9638 Problem reported by twlevo@xs4all.nl.
9639 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9641 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9642 can handle the problem.
9643 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9644 (yyparse): New local variable yyresult to record the result.
9645 Use result of setjmp to set it, rather than storing itinto
9647 (yyDone): Remove label.
9648 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9649 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9650 if YYABORT is used).
9651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9652 yyparse status; put status > 1 into diagnostic.
9653 Check that status==2 works.
9654 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9655 Use exit status 3 for failure to open (which shouldn't happen).
9657 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9659 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9660 1 on syntax error; just let yyparse do its thing.
9661 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9662 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9663 (Exploding the Stack Size with Alloca):
9664 (Exploding the Stack Size with Malloc):
9665 Expect exit status 2, not 1, since the parser is supposed to blow
9666 its stack. Problem reported by twlevo@xs4all.nl.
9668 * data/glr.c (yyparse): Don't assume that the initial calls
9669 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9670 Print a stack-overflow message and fail instead.
9671 Initialize the line-number information before creating the stack,
9672 so that the stack-overflow message can report line zero safely.
9674 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9676 Fix problems reported by twlevo@xs4all.nl.
9677 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9678 (yyuserMerge): Provide a default case if b4_mergers is empty.
9679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9680 * tests/glr-regression.at
9681 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9682 Add casts to pacify C++ compilers.
9683 * tests/glr-regression.at (Improper merging of GLR delayed action
9684 sets): Declare yylex before using it.
9685 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9686 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9687 test for valgrind; valgrind is independent of g++.
9688 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9689 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9690 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9691 Use a destructor, so that we can expand the stack. Change
9692 YYSTYPE to char * so that we can free it. Cast result of malloc.
9694 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9696 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9697 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9699 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9701 * PACKAGING: New file, suggested by Bruno Haible and taken from
9702 similar wording in gettext's PACKAGING file.
9703 * NEWS: Mention PACKAGING.
9704 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9706 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9708 * NEWS: Document recent i18n improvements.
9709 * bootstrap: Get runtime translations into runtime-po.
9710 Create runtime-po files automatically, if possible.
9711 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9712 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9713 does not infringe on the user's name space.
9714 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9715 * doc/bison.texinfo (Internationalization): Revamp the English
9716 and Texinfo syntax a bit, to try to make it clearer.
9717 (Bison Options, Option Cross Key): Mention --print-localedir.
9718 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9719 YYENABLE_NLS. Quote a bit more.
9720 * runtime-po/.cvsignore: New file.
9721 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9722 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9723 * runtime-po/quot.sed: Likewise.
9724 * runtime-po/boldquot.sed: Likewise.
9725 * runtime-po/en@quot.header: Likewise.
9726 * runtime-po/en@boldquot.header: Likewise.
9727 * runtime-po/insert-header.sin: Likewise.
9728 * runtime-po/remove-potcdate.sin: Likewise.
9729 * runtime-po/Makevars: Likewise.
9730 * runtime-po/LINGUAS: Likewise.
9731 * runtime-po/de.po: Likewise; we will rely on the translation project
9732 to maintain this, so "bootstrap" should get it.
9733 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9735 * src/main.c (main): Bind the bison-runtime domain, too.
9737 2005-07-12 Bruno Haible <bruno@clisp.org>
9739 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9740 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9741 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9742 * runtime-po: New directory.
9743 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9744 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9745 * runtime-po/Rules-quot: New file, copied from po/.
9746 * runtime-po/quot.sed: Likewise.
9747 * runtime-po/boldquot.sed: Likewise.
9748 * runtime-po/en@quot.header: Likewise.
9749 * runtime-po/en@boldquot.header: Likewise.
9750 * runtime-po/insert-header.sin: Likewise.
9751 * runtime-po/remove-potcdate.sin: Likewise.
9752 * runtime-po/Makevars: New file.
9753 * runtime-po/POTFILES.in: New file.
9754 * runtime-po/LINGUAS: New file.
9755 * runtime-po/bison-runtime.pot: New file.
9756 * runtime-po/de.po: New file.
9757 * m4/bison.m4: New file.
9758 * Makefile.am (SUBDIRS): Add runtime-po.
9759 (aclocaldir, aclocal_DATA): New variables.
9760 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9762 * src/getargs.c (usage): Document --print-localedir option.
9763 (PRINT_LOCALEDIR_OPTION): New enum item.
9764 (long_options): Add --print-localedir option.
9765 (getargs): Handle --print-localedir option.
9766 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9767 (Internationalization): New section.
9769 2005-07-12 Akim Demaille <akim@epita.fr>
9771 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9772 for consistency with the rest of the code.
9773 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9776 2005-07-12 Akim Demaille <akim@epita.fr>
9778 * src/parse-gram.y: Use %printer instead of YYPRINT.
9780 2005-07-12 Akim Demaille <akim@epita.fr>
9782 * src/symtab.h, src/symtab.c (symbol_print): New.
9783 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9784 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9786 2005-07-12 Akim Demaille <akim@epita.fr>
9788 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9789 b4_at_dollar and b4_dollar_dollar.
9791 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9793 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9794 and Pennello's paper.
9796 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9798 * data/yacc.c (yyparse): Undo previous patch. Instead,
9799 set yylsp[0] and yyvsp[0] only if the initial action
9800 sets yylloc and yylval, respectively.
9802 * data/yacc.c (yyparse): In the initial action, set
9803 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9804 This avoids the use of undefined variables if the initial
9805 action does not set yylloc and/or yylval.
9807 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9809 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9810 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9811 Remove from CVS. These files are automatically generated.
9812 * examples/extexi: Clarify that this file is now part of Bison,
9813 not GNU M4, and that it works with any POSIX-compatible Awk.
9814 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9815 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9816 so that we also get calc++-parser.yy. Geneate it.
9817 Use $(AWK), not gawk, since any conforming Awk will do.
9818 Put comment before action, since older 'make' can't handle comment
9820 $(BUILT_SOURCES): List all built sources, not just some of them.
9821 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9822 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9823 $($(calc_sources_generated)): Remove unnecessary test for existence
9824 of target. (This had a shell syntax error anyway; a stray "x".)
9825 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9827 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9829 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9830 implied by the other modules.
9832 2005-07-06 Akim Demaille <akim@epita.fr>
9834 Bind examples/calc++ to the package.
9835 * examples/calc++/Makefile: Remove, replaced by...
9836 * examples/calc++/Makefile.am: ... this new file.
9837 * examples/calc++/test: Remove input.
9838 * examples/calc++/compile: Remove.
9839 * examples/Makefile.am: New.
9840 * configure.ac, Makefile.am: Adjust.
9841 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9843 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9845 * data/glr.c (yyFail): Drastically simplify; since the format argument
9846 never had any % directives, we can simply pass it to yyerror.
9847 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9848 be modified later, as that is the usual style in glr.c.
9849 Problems reported by Paul Hilfinger.
9851 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9852 and size overflow errors.
9853 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9854 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9855 (YYSIZEMAX): New macro.
9856 (yystpcpy): New function, taken from yacc.c.
9857 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9858 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9859 so that we don't have to maintain their signatures.
9860 (yyFail): Check for buffer overflow, by using vsnprintf rather
9861 than vsprintf. Allocate a bigger buffer if possible.
9862 Report an error if buffer allocation fails.
9863 (yyStackOverflow): New function.
9864 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9865 the initialization was successful. It might fail if storage was
9867 (yyexpandGLRStack): Add more checks for storage allocation failure.
9868 Use yyStackOverflow to report failures.
9869 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9870 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9871 Don't assume stack number fits in int.
9872 (yysplitStack): Check for storage allocation failure.
9873 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9874 can print diagnostics on storage allocation failure. All callers
9876 (yyresolveValue): Use yybool for boolean.
9877 (yyreportSyntaxError): Check for size-calculation overflow.
9878 This code is taken from yacc.c.
9879 (yyparse): Check for storage allocation errors when allocating
9882 2005-07-05 Akim Demaille <akim@epita.fr>
9884 Extract calc++ from the documentation.
9885 * doc/bison.texinfo (Calc++): Add the extraction marks.
9886 * examples/extexi: New, from the aborted GNU Programming 2E.
9887 Separate the different paragraph of a file with empty lines.
9888 * examples/Makefile: Use it to extract the whole calc++ example.
9890 2005-06-24 Akim Demaille <akim@epita.fr>
9892 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9895 2005-06-22 Akim Demaille <akim@epita.fr>
9897 * doc/bison.texinfo (C++ Language Interface): First stab.
9898 (C++ Parsers): Remove.
9900 2005-06-22 Akim Demaille <akim@epita.fr>
9902 * data/lalr1.cc (yylex_): Honor %lex-param.
9904 2005-06-22 Akim Demaille <akim@epita.fr>
9906 Start a set of simple examples.
9907 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9908 * examples/calc++/calc++-driver.hh,
9909 * examples/calc++/calc++-parser.yy,
9910 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9911 * examples/calc++/compile, examples/calc++/test: New.
9913 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9915 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9916 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9917 which stems from the 2005-05-27 patch.
9919 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9921 * data/glr.c: Modify treatment of unused parameters to permit use
9922 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9924 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9926 Fix infringement on user name space reported by Janos Zoltan Szabo.
9927 * data/yacc.c (yyparse): strlen -> yystrlen.
9929 2005-05-30 Akim Demaille <akim@epita.fr>
9931 * data/lalr1.cc (_): New.
9932 Translate the various messages.
9934 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9936 Fix infringement on user name space reported by Bruno Haible.
9937 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9938 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9939 the user's name space.
9940 (alloca): Include <stdlib.h> to get it, if it's not built in.
9941 (YYMALLOC, YYFREE): Define only if needed.
9942 (malloc, free): Declare, but only if needed, as this infringes on
9943 the user name space.
9945 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9947 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9948 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9950 * lib/ebitset.c (min, max): Undef before defining.
9951 * lib/vbitset.c (min, max): Likewise.
9952 * lib/subpipe.c (create_subpipe): Save local variables in case
9953 vfork clobbers them.
9955 2005-05-24 Bruno Haible <bruno@clisp.org>
9957 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9958 error message syntax used by gcc-4.0.
9960 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9962 * README: Mention m4 1.4.3. Remove obsolete advice about
9963 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9965 * bootstrap: Remove workaround for problem I encountered with
9966 gettext 0.14.1; it seems to be fixed now.
9968 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9970 * NEWS: Version 2.0a.
9972 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9973 the previous change.
9975 Various maintainer cleanups.
9976 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9977 conftest*, for benefit of CVS commands run at the same time as
9978 "configure". Add build-aux, since "bootstrap" now creates it and
9980 * Makefile.cfg (move_if_change): Remove.
9981 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9982 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9983 (po_repo, do-po-update, po-update, wget_files, get-targets):
9984 (config.guess-url_prefix, config.sub-url_prefix):
9985 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9986 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9987 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9989 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9990 this is now the recommended name.
9991 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9992 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9993 ylwrap. These files now go into build-aux.
9994 * config/move-if-change: Remove.
9995 * config/prev-version.txt: Bump from 1.75 to 2.0.
9997 * bootstrap: Add stdio-safer, unistd-safer modules.
9998 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10000 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10001 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10002 * lib/subpipe.c: Include "unistd-safer.h".
10003 (create_subpipe): Make sure all the newly-created
10004 file descriptors are > 2, so that diagnostics don't
10005 get sent down them (which might cause Bison to hang, in theory).
10006 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10007 * src/files.c (xfopen): Use fopen_safer, not fopen.
10009 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10010 yesterday's yacc.c fix.
10012 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10014 * data/glr.c, data/lalr1.cc: Update copyright date.
10016 Fix a destructor bug reported by Wolfgang Spraul in
10017 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10018 * data/yacc.c (yyabortlab): Don't call destructor, and
10019 don't set yychar to EMPTY.
10020 (yyoverflowlab): Don't call destructor.
10021 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10022 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10023 since we no longer output the message "discarding lookahead token
10026 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10028 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10029 fix a small glitch in debugging output.
10030 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10031 after YY_SYMBOL_PRINT where needed.
10033 (struct yyGLRState): Add some comments.
10034 (struct yySemanticOption): Add some comments.
10035 (union yyGLRStackItem): Add comment.
10037 (yymergeOptionSets): Correct this to properly perform the union,
10038 avoiding infinite reported by Michael Rosien.
10041 * tests/glr-regression.at: Add test for GLR merging error reported
10044 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10046 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10047 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10048 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10049 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10050 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10051 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10052 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10053 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10054 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10055 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10056 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10057 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10058 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10059 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10060 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10061 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10062 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10063 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10064 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10065 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10066 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10067 src/output.h, src/parse-gram.c, src/parse-gram.h,
10068 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10069 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10070 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10071 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10072 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10073 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10074 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10075 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10076 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10077 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10078 tests/reduce.at, tests/regression.at, tests/sets.at,
10079 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10080 Update FSF postal mail address.
10082 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10084 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10085 Problem reported by Ralf Menzel.
10087 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10089 * tests/actions.at: Test that stack overflow invokes destructors.
10090 From Marcus Holland-Moritz.
10091 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10093 (yyreturn): to here. That way, destructors are called properly
10094 even if the stack overflows, or the user calls YYACCEPT or
10095 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10096 (yyoverflowlab): Destroy the lookahead.
10098 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10100 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10102 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10104 * NEWS: Bison-generated C parsers no longer quote literal strings
10105 associated with tokens.
10106 * src/output.c (prepare_symbols): Don't escape strings,
10107 since users don't want to see C escapes.
10108 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10110 * tests/input.at (Torturing the Scanner): Likewise.
10111 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10113 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10115 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10116 the data size is known to be too small and we can't increase it.
10117 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10119 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10121 * src/parse-gram.y: Include quotearg.h.
10122 (string_as_id): Quote $1 before using it as a key, since the
10123 lexer no longer quotes it for us.
10124 (string_content): Don't strip quotes, since lexer no longer
10126 * src/scan-gram.l: Include quotearg.h.
10127 ("\""): Omit quote.
10128 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10129 a key, since the rest of the lexer doesn't quote it.
10130 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10131 * tests/regression.at (Token definitions): Check for backslashes
10134 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10135 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10136 (yyparse): Revamp code to generate long syntax error message, to
10137 make it easier to translate, and to avoid problems with arithmetic
10138 overflow. Change "virtual memory" to "memory" in diagnostic, since
10139 we don't know whether the memory is virtual.
10141 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10143 * NEWS: Bison-generated C parsers now use the _ macro to
10145 * data/yacc.c (_) [!defined _]: New macro.
10146 All English strings wrapped inside this macro.
10147 * doc/bison.texinfo (Bison Parser): Document _.
10148 * po/POTFILES.in: Include src/parse-gram.c, since it now
10149 includes translateable strings that parse-gram.y doesn't.
10151 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10153 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10154 reverting the 2004-10-11 change to this function.
10155 (symbol_check_alias_consistency): Don't call symbol_type_set
10156 if the type name is already correct.
10157 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10159 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10161 * tests/regression.at (Token definitions): Don't use a token named
10162 c, as that generates a "#define c ..." that runs afoul of buggy
10163 stdlib.h that uses the identifier c as a member of struct
10164 drand48_data. Problem reported by Horst Wente.
10166 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10168 * bootstrap: Change translation URL from
10169 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10170 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10171 redirection glitches. Problem reported by twlevo@xs4all.nl.
10173 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10175 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10176 after operands; POSIX says this isn't portable for the c99 command.
10178 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10180 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10181 immediately if a data overrun has occurred; this may help us track
10182 down what may be a spurious failure on MacOS.
10184 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10186 Respond to problems reported by twlevo@xs4all.nl.
10188 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10190 * src/vcg.h: Comment fix.
10191 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10192 (G_CMAX): Change to -1 instead of INT_MAX.
10194 * data/yacc.c (yyparse): Omit spaces before #line.
10196 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10198 * src/tables.c (state_number_to_vector_number): Put it inside an
10199 "#if 0", since it's not currently used. Problem reported by
10202 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10204 * src/output.c (escaped_output): Renamed from
10205 escaped_file_name_output, since we now use it for symbol tags as
10206 well. All uses changed.
10207 (symbol_destructors_output, symbol_printers_output):
10208 Escape symbol tags too.
10209 Problem reported by Matyas Forstner in
10210 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10212 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10214 * src/output.c (user_actions_output, token_definitions_output,
10215 symbol_destructors_output, symbol_printers_output): Likewise.
10216 * src/reader.c (prologue_augment): Likewise.
10217 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10219 * src/vcg.c (output_edge): Don't quote linestyle arg.
10220 Problem reported by twlevo@xs4all.nl.
10222 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10224 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10225 example, reported by Derek M Jones. Also, make the example even
10226 more outrageous, to better illustrate how bad the problem is.
10228 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10230 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10231 putsym. Typo reported by Sebastian Piping.
10233 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10235 * doc/bison.texinfo (Language and Grammar): some -> same
10236 (Epilogue): int he -> in the
10237 Typos reported by Sebastian Piping via Justin Pence.
10239 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10241 * tests/glr-regression.at (Improper handling of embedded actions
10242 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10243 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10244 with dollar signs in test names.
10245 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10246 for a similar reason.
10248 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10250 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10251 wants to redefine G_VIEW.
10253 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10255 * src/vcg.c (get_view_str): Remove case for normal_view.
10256 Problem reported by twlevo@xs4all.nl.
10258 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10260 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10261 Problem reported by twlevo@xs4all.nl.
10263 * doc/bison.texinfo: Change @dircategory from "GNU programming
10264 tools" to "Software development". Requested by Richard Stallman
10267 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10269 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10270 Problem reported by twlevo@xs4all.nl.
10272 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10274 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10275 keyword; it's not needed with modern compilers, and it doesn't
10276 affect correctness with older compilers. Suggested by
10279 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10281 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10282 gcc -Wswitch-default.
10283 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10284 * data/yacc.c (yyparse): Likewise.
10286 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10288 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10289 already. Let config.h define any nonstandard values.
10291 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10293 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10294 for the benefit of slower hosts. Problem reported by
10295 Nelson H. F. Beebe.
10297 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10299 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10300 being defined and not used.
10301 * data/lalr1.cc (yyparse): Likewise.
10302 Use "if (false)" rather than "if (0)".
10304 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10306 * TODO: Mention that we should allow NUL bytes in tokens.
10308 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10310 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10311 Problem reported by Hans Aberg.
10313 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10315 * src/getargs.c (version): Happy new year; update overall
10316 program copyright date from 2004 to 2005.
10318 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10319 Problem reported by Hans Aberg.
10320 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10321 (Output file names.): Add a test for the case when standard output
10324 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10326 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10327 to fix an oversight in the Bison 2.0 manual.
10329 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10331 * NEWS: Version 2.0. Reformat the existing news items since
10332 1.875, so that related items are grouped together.
10333 * configure.ac (AC_INIT): Bump version to 2.0.
10334 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10336 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10337 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10338 otherwise, we're not testing alloca. Unfortunately there's no
10339 simple way to consult HAVE_ALLOCA here.
10341 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10344 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10345 hand. This avoids a warning about comparing int to size_t when
10346 GCC warnings are enabled.
10348 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10350 * NEWS: Bison-generated parsers no longer default to using the
10351 alloca function (when available) to extend the parser stack, due
10352 to widespread problems in unchecked stack-overflow detection.
10353 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10354 responsibility to set it to a positive value. This lets the user
10355 specify a value that is not a preprocessor constant.
10356 * data/yacc.c (YYMAXDEPTH): Likewise.
10357 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10358 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10359 to be a compile-time constant. However, explain the constraints on it.
10360 Also, explain the constraints on YYINITDEPTH.
10361 (Table of Symbols): Explain that alloca is no longer the default.
10362 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10365 * doc/bison.texinfo (Location Default Action): Mention that n must
10366 be zero when k is zero. Suggested by Frank Heckenbach.
10368 2004-12-22 Akim Demaille <akim@epita.fr>
10370 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10371 (parser::state_type, parser::semantic_type, parser::location_type):
10372 Private, not public.
10373 (parser::parse): Return ints, not bool.
10374 Returning a bool introduces a problem: 0 corresponds to false, and
10375 it seems weird to return false on success. Returning true changes
10376 the conventions for yyparse.
10377 Alternatively we could return void and send an exception.
10378 There is no clear consensus (yet?).
10379 (state_stack, semantic_stack, location_stack): Rename as...
10380 (state_stack_type, semantic_stack_type, location_stack_type): these.
10381 Private, not public.
10382 * tests/c++.at: New.
10383 * tests/testsuite.at, tests/Makefile.am: Adjust.
10385 2004-12-21 Akim Demaille <akim@epita.fr>
10387 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10389 2004-12-21 Akim Demaille <akim@epita.fr>
10391 Don't impose std::string for filenames.
10393 * data/lalr1.cc (b4_filename_type): New.
10394 (position::filename): Use it.
10395 (parser.hh): Move the inclusion of stack.hh and location.hh below
10396 the user code, so that needed headers for the filename type can be
10398 Forward declare them before the user code.
10399 * tests/Makefile.am (check-local, installcheck-local): Pass
10400 TESTSUITEFLAGS to the TESTSUITE.
10402 2004-12-20 Akim Demaille <akim@epita.fr>
10404 Use more STL like names: my_class instead of MyClass.
10406 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10407 (SemanticStack, SemanticType, StateStack, StateType)
10408 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10409 (Parser::value): Rename as...
10410 (location_stack, location_type, rhs_number_type, semantic_stack)
10411 (semantic_type, state_stack, state_type, token_number_type, stack)
10412 (slice, traits, parser::yylloc, parser::yylval): these.
10414 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10416 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10418 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10419 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10421 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10423 Remove uses of 'short int' and 'unsigned short int'. This raises
10424 some arbitrary limits. It uses more memory but nowadays that's
10425 not much of an issue.
10427 This change does not affect the generated parsers; that's a different
10428 task, as some users will want to conserve memory there.
10430 Ideally we should use size_t to represent all object counts, and
10431 something like ptrdiff_t to represent signed differences of object
10432 counts; but that will require more code-cleanup than I have the
10433 time to do right now.
10435 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10436 Use size_t, not int or short int, to count objects.
10437 * src/closure.c (nritemset, closure): Likewise.
10438 * src/closure.h (nritemset, closure): Likewise.
10439 * src/nullable.c (nullable_compute): Likewise.
10440 * src/print.c (print_core): Likewise.
10441 * src/print_graph.c (print_core): Likewise.
10442 * src/state.c (state_compare, state_hash): Likewise.
10443 * src/state.h (struct state): Likewise.
10444 * src/tables.c (default_goto, goto_actions): Likewise.
10446 * src/gram.h (rule_number, rule): Use int, not short int.
10447 * src/output.c (prepare_rules): Likewise.
10448 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10449 errs, reductions): Likewise.
10450 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10452 * src/tables.c (vector_number, tally, action_number,
10453 ACTION_NUMBER_MINIMUM): Likewise.
10454 * src/output.c (muscle_insert_short_int_table): Remove.
10456 2004-12-17 Akim Demaille <akim@epita.fr>
10458 * data/lalr1.cc: Extensive Doxygenation.
10459 (error_): Rename as...
10460 (error): this, since it is visible to the user.
10462 (Parser::message): Now an automatic variable from...
10463 (Parser::yyreport_syntax_error_): here.
10464 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10466 * tests/input.at: Escape $.
10468 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10470 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10471 Parenthesize rhs to avoid obscure problems with mistakes like
10472 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10473 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10474 b4_rhs_location): Likewise.
10475 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10476 b4_rhs_location): Likewise.
10478 2004-12-16 Akim Demaille <akim@epita.fr>
10480 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10481 yacc.c: be sure to stay within yycheck_.
10482 * tests/actions.at: Re-enable C++ tests.
10484 2004-12-16 Akim Demaille <akim@epita.fr>
10486 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10489 2004-12-16 Akim Demaille <akim@epita.fr>
10491 Use #define to handle the %name-prefix.
10493 * data/glr.c, data/yacc.c: Comment changes.
10494 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10495 so that one can refer to yylex in the parser file, and have it
10496 renamed, as is the case with other skeletons.
10498 2004-12-16 Akim Demaille <akim@epita.fr>
10500 Move lalr1.cc internals into yy*.
10502 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10503 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10504 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10505 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10506 (empty_, final_, terror_, errcode_, ntokens_)
10507 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10508 (looka_, ilooka_, error_range_, nerrs_):
10510 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10511 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10512 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10513 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10514 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10515 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10516 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10517 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10520 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10522 Fix some problems reported by twlevo at xs4all.
10523 * src/symtab.c (symbol_new): Report an error if the input grammar
10524 contains too many symbols. This is better than calling abort() later.
10525 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10526 (struct node, struct graph):
10527 Rename member expand to stretch. All uses changed.
10528 (struct graph): Remove member layoutalgorithm. All uses removed.
10529 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10530 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10532 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10534 2004-12-15 Akim Demaille <akim@epita.fr>
10536 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10537 Add more Doxygen comments.
10538 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10539 (report_syntax_error_, translate_): Rename as...
10540 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10541 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10543 2004-12-15 Akim Demaille <akim@epita.fr>
10545 * data/lalr1.cc (lex_): Rename as...
10547 Move the trace here.
10548 Take the %name-prefix into account.
10549 Reported by Alexandre Duret-Lutz.
10551 2004-12-15 Akim Demaille <akim@epita.fr>
10553 Simplify the C++ parser constructor.
10555 * data/lalr1.cc (debug_): Rename as...
10556 (yydebug_): so that the parser's internals are always in the yy*
10559 (b4_parse_param_decl): Remove the leading comma as it is now only
10560 called as unique argument list.
10561 (Parser::Parser): Remove the constructor accepting a location and
10562 an initial debugging level.
10563 Remove from the other ctor the argument for the debugging level.
10564 (debug_level_type, debug_level, set_debug_level): New.
10566 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10569 2004-12-15 Akim Demaille <akim@epita.fr>
10571 Remove b4_root related material: failure experiment
10572 (which goal was to allow to derive from a class).
10574 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10575 definitions and uses.
10577 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10579 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10580 not 2, since it's not portable to subtract 1 from the start of an
10581 array. The new item 0 is never set or used. All uses changed.
10583 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10584 the default definition of YYLLOC_DEFAULT. Problem reported
10585 by Frank Heckenbach.
10587 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10589 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10590 the normal case and one for the error case. Just use the
10591 first one uniformly. Problem reported by Frank Heckenbach.
10592 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10593 use exactly the same macro in both places.
10594 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10595 so that the normal-case YYRHSLOC works for the error case too.
10597 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10598 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10599 * doc/bison.texinfo (Location Default Action): Don't claim that
10600 we have an array of locations. Use the same macro for both glr
10601 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10604 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10606 * HACKING: Update email addresses to send announcements to.
10608 * configure.ac (AC_INIT): Bump version to 1.875f.
10610 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10612 * NEWS: Version 1.875e.
10613 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10615 * src/scan-skel.l: Include "complain.h", for "fatal".
10617 * src/relation.h (relation_print, relation_digraph):
10618 Relation sizes are of type relation_node, not size_t (this is
10619 merely a doc fix, since the two types are equivalent).
10620 (relation_transpose): Relation sizes are of type relation_node,
10622 * src/relation.c: Likewise.
10623 (top, infinity): Now of type relation_node, not int.
10624 (traverse, relation_transpose): Use relation_node, not int.
10626 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10627 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10628 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10630 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10631 specifying whether the test should be skipped. Use it tp
10632 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10633 fail on some hosts, and should be skipped.
10635 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10637 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10638 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10639 unless otherwise specified below.
10641 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10642 to allocate kernel_base, kernel_items, kernel_size, since
10643 they needn't be initialized to 0.
10644 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10645 * src/closure.c (new_closure): Likewise, for itemset.
10646 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10647 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10648 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10649 (build_relations): Likewise for edge, states1, includes.
10650 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10651 * src/reader.c (packgram): Likewise, for ritem, rules.
10652 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10653 * src/relation.c (relation_digraph): Likewise for VERTICES.
10654 (relation_transpose): Likewise for new_R, end_R.
10655 * src/symtab.c (symbols_token_translations_init): Likewise for
10656 token_translations.
10657 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10658 (token_actions): Likewise for yydefact, actrow, conflrow,
10660 (save_column): Likewise for froms[symno], tos[symno].
10661 (goto_actions): Likewise for state_count.
10662 (pack_table): Likewise for base, pos, check.
10663 (tables_generate): Likewise for width.
10665 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10666 for initial core. Just have a separate core, so we needn't worry
10667 about whether kernel_size and kernel_base are initialized.
10669 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10670 kernel_size, kernel_items): Remove unnecessary initialization.
10671 * src/conflicts.c (conflicts): Likewise.
10672 * src/derives.c (derives): Likewise.
10673 * src/muscle_tablc (muscle_insert): Likewise.
10674 * src/relation.c (relation_digraph): Likewise.
10675 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10676 conflrow, conflict_table, conflict_list, table, check):
10679 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10680 This is because all callers pass unsigned int.
10681 * src/closure.h (new_closure): Likewise.
10683 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10684 (build_relations): Initialize includes[i] in all cases.
10685 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10686 and rules[ruleno].precsym. Initialize members in order.
10687 * src/relation.c (relation_transpose): Always initialize new_R[i]
10689 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10691 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10692 conflict_list[0] was always 0, but now it isn't initialized.
10694 * src/table.c (table_grow): When conflict_table grew, the grown
10695 area wasn't cleared. Fix this.
10697 * lib/.cvsignore: Add strdup.c, strdup.h.
10698 * m4/.cvsignore: Add strdup.m4.
10700 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10702 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10703 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10704 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10705 ngotos + 1 without checking for overflow.
10706 (build_relations): Use END_NODE, not -1, to denote end of edges.
10707 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10708 build_relations): Use goto_number, not int, for goto numbers.
10709 * src/tables.c (save_column, default_goto): Likewise.
10711 2004-11-23 Akim Demaille <akim@epita.fr>
10713 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10714 of #defining from yystype.
10715 Don't typedef yystype, C++ does not need it.
10716 This lets it possible to forward declare it as union.
10718 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10720 * bootstrap (gnulib_modules): Add extensions.
10721 Problem reported by Jim Meyering.
10723 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10725 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10726 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10727 src/system.h, src/tables.c: XFREE -> free, to accommodate
10728 recent change to gnulib xalloc.h.
10729 Problem reported by Jim Meyering.
10731 2004-11-17 Akim Demaille <akim@epita.fr>
10733 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10735 2004-11-17 Akim Demaille <akim@epita.fr>,
10736 Alexandre Duret-Lutz <adl@gnu.org>
10738 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10740 (YYCDEBUG): Adjust.
10741 Use it instead of cdebug_.
10742 (Parser::debug_stream, Parser::set_debug_stream): New.
10743 (Parser::symprint_): Define cdebug_ for temporary backward
10745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10748 2004-11-17 Akim Demaille <akim@epita.fr>
10750 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10751 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10752 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10755 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10757 * data/glr.c (yyloc_default): Remove; not used.
10758 Problem reported by Frank Heckenbach.
10760 2004-10-25 Akim Demaille <akim@epita.fr>
10762 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10763 Introduce another definition to address simple location arrays.
10764 (yyGLRStack): New member: yyerror_range.
10765 (yyrecoverSyntaxError, yyparse): Update it.
10766 (yyrecoverSyntaxError): Use it when shifting the error token to
10767 have an accurate range, equivalent to the one computed by both
10768 yacc.c and lalr1.cc.
10769 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10770 that column numbers start at column 0, as per GNU Coding
10771 Standards, the others tests, and the doc.
10772 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10773 Adjust to the above change (first column is 0).
10774 And adjust the location of the "<error>", now covering the whole
10777 2004-10-22 Akim Demaille <akim@epita.fr>
10778 and Paul Eggert <eggert@cs.ucla.edu>
10780 Remove some arbitrary limits on goto numbers and relations.
10781 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10782 initial values, since they're never used.
10783 (set_goto_map): ngotos is now unsigned, so test for overflow
10784 by seeing whether it wraps around to zero.
10785 * src/lalr.h (goto_number): Now size_t, not short int.
10786 (GOTO_NUMBER_MAXIMUM): Remove.
10787 * src/relation.c (relation_print, traverse, relation_transpose):
10788 Check for END_NODE rather than looking at sign.
10789 * src/relation.h (END_NODE): New macro.
10790 (relation_node): Now size_t, not short int.
10792 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10794 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10795 keyword, not an identifier. Problem reported by Baron Schwartz in
10796 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10798 2004-10-11 Akim Demaille <akim@epita.fr>
10800 * src/symtab.c (symbol_check_alias_consistency): Also check
10801 type names, destructors, and printers.
10802 Reported by Alexandre Duret-Lutz.
10803 Recode the handling of associativity and precedence in terms
10804 of symbol_precedence_set.
10805 Accept no redeclaration at all, not even equal to the previous
10807 (redeclaration): New.
10808 Use it to factor redeclaration complaints.
10809 (symbol_make_alias): Don't set the type of the alias, let
10810 symbol_check_alias_consistency do it as for other features.
10811 * src/symtab.h (symbol): Add new member prec_location, and
10813 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10814 * tests/input.at (Incompatible Aliases): New.
10816 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10818 .cvsignore fixes to accommodate gnulib changes,
10819 and the practice of naming build directories "_build".
10820 * .cvsignore: Add "_*". Sort.
10821 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10822 * m4/.cvsignore: Add "*_gl.m4".
10824 2004-10-06 Akim Demaille <akim@epita.fr>
10826 * src/parse-gram.y (add_param): Fix the truncation of trailing
10829 2004-10-05 Akim Demaille <akim@epita.fr>
10831 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10832 whether the reducion was empty or not. This leaves room to
10833 improve the use of YYLLOC_DEFAULT in such a case.
10834 lalr1.cc is still experimental, so changing this is acceptable.
10835 And finally, there are probably not many users who changed the
10836 handling of locations in GLR, so changing is admissible too.
10838 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10839 empty reduction, set @$ to an empty location ending the previously
10841 Adjust uses to make sure the code is triggered on empty
10843 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10844 expected output: empty reductions have empty locations.
10846 2004-09-29 Akim Demaille <akim@epita.fr>
10848 * data/lalr1.cc: Move towards a more standard C++ coding style
10849 for templates: Class < T > -> Class<T>.
10851 2004-09-29 Akim Demaille <akim@epita.fr>
10853 * data/lalr1.cc: Reinstall the former ctor, for sake of
10854 compatibility, but warn it will be removed.
10855 Move towards a more standard C++ coding style (i.e., type *var ->
10858 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10860 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10861 since it's less likely to work if NULs are involved in the future.
10863 2004-09-27 Akim Demaille <akim@epita.fr>
10865 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10867 2004-09-27 Akim Demaille <akim@epita.fr>
10869 * data/lalr1.cc (b4_parse_param_decl_1): New.
10870 (b4_parse_param_decl): Use it to have different names between attribute
10871 and argument names.
10872 (b4_cc_constructor_call): Likewise.
10874 2004-09-24 Akim Demaille <akim@epita.fr>
10876 * src/parse-gram.y (add_param): Strip the leading and trailing
10877 blanks from a formal argument declaration.
10878 (YY_LOCATION_PRINT): New.
10880 2004-09-24 Akim Demaille <akim@epita.fr>
10882 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10883 after the location.
10885 2004-09-24 Akim Demaille <akim@epita.fr>
10887 * doc/bison.texinfo (Table of Symbols): Sort.
10889 2004-09-21 Akim Demaille <akim@epita.fr>
10891 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10892 the useless parentheses.
10893 Suggested by Paul Eggert.
10895 2004-09-20 Akim Demaille <akim@epita.fr>
10897 Let the initial-action act on the look-ahead, and use it for the
10898 "initial push" (corresponding to an hypothetical beginning-of-file).
10899 And let lalr1.cc honor %initial-action.
10901 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10903 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10904 (Parser::Parser): Remove the ctor that used to initialize it.
10905 (Parser::parse): Like in the other skeletons, issue the "starting
10906 parse" message before any action.
10907 Honor %initial-action.
10908 Initialize the stacks with the lookahead.
10909 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10911 Push them in the stacks.
10912 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10914 2004-09-20 Akim Demaille <akim@epita.fr>
10916 * doc/bison.texinfo (Initial Action Decl): New.
10918 2004-09-20 Akim Demaille <akim@epita.fr>
10920 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10921 clearer criterion to define it.
10922 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10923 When reducing on an empty RHS, use the latest stacked location as
10925 yylloc is not always available.
10926 * data/glr.c: Likewise.
10927 Also, honor initial-actions.
10929 2004-09-20 Akim Demaille <akim@epita.fr>
10931 * data/yacc.c (YY_LOCATION_PRINT): New.
10932 Define when we know YYLTYPE's structure, i.e., when the default
10933 YYLLOC_DEFAULT is used.
10934 * data/c.m4 (b4_yysymprint_generate): Use it.
10935 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10936 value of the result.
10937 (error_start_): Replace with...
10938 (error_range_): this location array.
10939 This allows to replace code relying on the implementation of
10940 locations by portable code.
10941 * data/yacc.c (yylerrsp): Replace with...
10942 (yyerror_range): this.
10943 Every time a token is popped, update yyerror_range[0], to have an
10944 accurate location for the error token.
10945 * data/glr.c (YY_LOCATION_PRINT): New.
10946 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10947 deference a pointer.
10948 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10949 report the location in %printers.
10951 * src/scan-skel.l: Instead of abort, report error messages to ease
10952 understanding skeleton scanning failures.
10954 2004-09-16 Akim Demaille <akim@epita.fr>
10956 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10957 (iterator, const_iterator): these, to be more in the C++ spirit.
10958 Also, return reverse iterators so that when displaying the stack
10959 we display its bottom first.
10960 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10962 We should probably use vector here though.
10964 2004-09-16 Akim Demaille <akim@epita.fr>
10966 Have more complete shift traces.
10968 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10969 to report Shifts instead of ad hoc YYDPRINTF invocations,
10970 including for the error token.
10971 * data/lalr1.cc (symprint_): Output the location.
10972 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10973 output the location within the %printer.
10974 Activate GLR tests, at least to make sure they compile properly.
10975 They still don't pass though.
10976 * tests/calc.at: Adjust expect verbose output, since now "Entering
10977 state..." is on a different line than the "Shifting" message.
10979 2004-09-08 Akim Demaille <akim@epita.fr>
10981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10982 Bison directive from the Bison file to the invocation of this
10983 macro, so that these directives are passed to
10984 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10985 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10986 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10987 the extra Bison directives instead of the whole series.
10988 Change the grammar so that there are recoverable errors, and
10989 unrecoverable errors. Now we can have the parser give up before
10990 consuming the whole input. As a result we now can observe that
10991 the lookahead is freed when needed.
10992 Change the parser source to parse argv[1] instead of a hard coded
10994 Simplify yylex, and give a value and location to EOF.
10995 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10996 passed directives already coded in the file.
10997 Add some tests to check the location of "error".
10998 For some tests, the C++ parser is correct, and not yacc.c.
10999 For other tests, they provide different, but unsatisfying, values,
11000 so keep the C++ value so that at least one parser is "correct"
11001 according to the test suite.
11002 (Actions after errors): Remove, this is subsumed by the
11003 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11005 2004-09-06 Akim Demaille <akim@epita.fr>
11007 * data/lalr1.cc: Adjust the indentation of the labels.
11008 (Parser::pop): New.
11011 2004-09-06 Akim Demaille <akim@epita.fr>
11013 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11014 argument, an informative message.
11015 Call YY_SYMBOL_PRINT.
11016 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11017 * data/lalr1.cc (destruct_): Likewise.
11018 In addition, no longer depend on b4_yysymprint_generate and
11019 b4_yydestruct_generate to generate these functions, do it "by
11022 2004-09-03 Akim Demaille <akim@epita.fr>
11024 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11025 invoked, yydestruct the lookahead.
11026 * tests/calc.at (Calculator $1): Update the expected lengths of
11027 traces: there is an added line for the discarded lookahead.
11028 * doc/bison.texinfo (Destructor Decl): Some rewording.
11029 Define "discarded" symbols.
11031 2004-09-02 Akim Demaille <akim@epita.fr>
11033 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11035 2004-09-02 Akim Demaille <akim@epita.fr>
11037 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11038 (YYDSYMPRINTF): Rename as...
11039 (YY_SYMBOL_PRINT): this.
11040 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11042 Use it instead of direct symprint_ calls.
11043 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11046 2004-09-02 Akim Demaille <akim@epita.fr>
11048 * data/lalr1.cc (b4_yysymprint_generate): New.
11049 (symprint_): New member function, defined when YYDEBUG.
11050 Use it consistently instead of token/nterm debugging output by
11052 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11053 %printer calls to use cdebug_ when using lalr1.cc.
11055 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11057 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11058 with #ifdef YYDEBUG.
11060 2004-08-26 Akim Demaille <akim@epita.fr>
11062 * doc/bison.texinfo (Implementing Loops): Rename as...
11063 (Implementing Gotos/Loops): this.
11065 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11067 Adjust to latest gnulib.
11068 * bootstrap (gnulib_modules): Add xalloc-die.
11069 Set LC_ALL=C so that file names sort consistently.
11070 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11071 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11072 uintmax_t.m4, ulonglong.m4.
11073 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11074 po.m4 since we are now using _gl.m4 instead.
11076 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11078 * src/scan-action.l: Remove. Scanning of semantic actions is
11079 handled in scan-gram.l.
11081 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11083 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11085 * src/location.h (struct): The file member is a uniqstr.
11086 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11088 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11090 Fix bug with non-%union parsers that have printers or destructors,
11091 which led to a Bison core dump. Reported by Peter Fales in
11092 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11094 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11095 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11096 not to our own type.
11097 * src/output.c (symbol_destructors_output, symbol_printers_output):
11098 Don't assume %union.
11099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11100 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11101 UNION-FLAG. All callers changed.
11102 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11103 Use type char, not unsigned int, when declaring an array of char;
11104 this lets us remove a cast.
11105 (Printers and Destructors): Add non-%union test cases.
11107 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11109 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11110 GLR writeups. E.g., avoid frenchspacing and the future tense,
11111 change "lookahead" to "look-ahead", and change "wrt" to "with
11114 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11116 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11117 New sections, split off from the GLR Parsers section. Put the new
11118 Simple GLR Parser near the start of the GLR section, for clarity.
11119 Rewrite connective text.
11121 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11123 * doc/bison.texinfo (Simple GLR Parsers): New section.
11125 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11127 * NEWS, TODO, doc/bison.texinfo:
11128 Use "look-ahead" instead of "lookahead", to be consistent.
11129 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11130 while we're fixing "look-ahead".
11131 * src/conflicts.c (shift_set): Renamed from shiftset.
11132 (look_ahead_set): Renamed from lookaheadset.
11133 * src/print.c: Likewise.
11134 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11135 name for "lookahead".
11136 (report_types, usage): Likewise.
11137 * src/getargs.h (report_look_ahead_tokens): Renamed from
11139 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11140 compute_lookaheads.
11141 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11142 (look_ahead_tokens_print): Renamed from lookaheads_print.
11143 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11144 state_rule_lookaheads_print.
11145 * src/state.h: Likewise.
11146 (reductions.look_ahead_tokens): Renamed from lookaheads.
11147 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11148 AT_DATA_LOOKAHEADS_GRAMMAR.
11150 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11152 * README: Update location of patched M4 distribution.
11154 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11156 Don't assume the C++ compiler takes the same arguments as the C compiler
11158 * configure.ac (O0CXXFLAGS): New var.
11159 * tests/atlocal.in (CXXFLAGS): Use it.
11161 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11163 Fix some "make check" problems with C++ reported by
11164 Albert Chin-A-Young for Tru64 C++ in this thread:
11165 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11167 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11168 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11169 Output to a .cc file for C++, not to a .c file.
11170 * tests/calc.at (AT_CHECK_CALC): Likewise.
11171 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11172 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11174 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11176 * tests/calc.at, tests/actions.at: Workaround for SGI
11177 C++ compiler. (trivial change)
11179 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11181 Spent a few hours checking out which prerequisite versions the
11182 current sources actually require. I went all the way back to
11183 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11184 a seemingly endless set of combinations of versions more recent
11185 than that. The bottom line is that the current sources require
11186 fairly recent versions of the build tools, and it'll be some work
11188 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11189 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11190 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11191 Add comments explaining why those particular versions are
11194 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11195 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11196 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11198 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11199 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11201 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11203 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11204 0.11.5. Suggested by Bruno Haible.
11205 * bootstrap: Remove gettext version checking.
11207 * doc/bison.texinfo (Decl Summary): Also mention that %union
11208 can depend on prerequisite types. Problem reported by Tim
11211 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11213 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11214 * README-alpha: Don't tell people not to package this.
11216 * bootstrap: Don't assume $(...) works; use `...` instead.
11217 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11220 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11221 put into the -d output file, and mention what to do if YYSTYPE is
11222 defined as a macro.
11224 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11226 Undo change made earlier today: it caused autopoint to not bring
11227 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11230 * bootstrap: Check that gettext version matches what's in
11231 configure.ac. Warn users to ignore robots.txt ERROR 404.
11232 * bootstrap: Undo today's earlier change (logged below).
11233 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11235 The gettext version checking is causing more trouble than it's
11236 curing; remove it. Problem reported by Paul Hilfinger.
11238 * bootstrap: Issue a warning that one can expect a message
11239 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11240 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11242 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11244 Ensure that the C++ compiler used for testing actually works on a
11245 simple test program; if not, skip the C++-related tests. Problem
11246 reported by Vin Shelton in:
11247 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11249 * m4/cxx.m4: New file.
11250 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11251 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11252 * tests/local.at (AT_COMPILE_CXX): Use it.
11254 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11256 * data/glr.c (yylloc): Output this macro even if locations are not
11257 being generated, as the GLR parser needs it even in that case.
11258 Problem reported by Troy A. Johnson
11259 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11261 * configure.ac (AC_INIT): Update to 1.875e.
11263 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11265 * NEWS: Version 1.875d.
11266 * configure.ac (AC_INIT): Likewise.
11267 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11269 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11270 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11271 lalr1.cc runs afoul of the first, and the last two are no longer
11272 supported by GCC 3.4.0.
11273 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11274 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11276 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11278 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11279 unsigned int, for compatibility with latest gnulib hash module.
11280 * src/state.c (state_hash, state_hasher): Likewise.
11281 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11282 * src/uniqstr.c (hash_uniqstr): Likewise.
11284 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11286 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11288 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11289 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11290 character and string literals.
11291 (unexpected_end): New function.
11292 (unexpected_eof): Use it.
11293 (unexpected_newline): New function.
11294 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11297 * NEWS: Document %expect-rr.
11299 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11300 Fix typo by replacing $1 with $option.
11301 Remove more 'intl'-related files.
11302 Don't DEFUN AM_INTL_SUBDIR twice.
11304 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11305 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11307 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11308 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11309 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11310 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11311 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11312 * src/.cvsignore: Add *.output.
11314 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11315 gets copied to the output file.
11317 2004-04-28 Paul Eggert <eggert@twinsun.com>
11319 Get files from the gnulib and po repositories, instead of relying
11320 on them being in our CVS. Upgrade to latest versions of gnulib
11323 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11324 * bootstrap: Bootstrap from gnulib and po repositories.
11325 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11326 * README-cvs: Document these changes. Remove version numbers from
11327 mentions of build tools, since they change so often. Mention Flex.
11329 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11330 (gl_USE_SYSTEM_EXTENSIONS): Add.
11331 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11332 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11334 (AC_ISC_POSIX): Remove; we no longer support this
11335 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11336 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11337 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11338 Do not check for C89 headers, except for locale.h which is used
11339 by the Yacc library and must port to K&R hosts.
11340 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11341 Do not check for C89 functions, except for setlocale which is
11342 used by the Yacc library.
11343 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11344 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11345 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11346 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11347 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11348 AM_GNU_GETTEXT): Remove; now done by:
11349 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11350 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11353 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11354 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11355 Define to empty, as gnulib.mk will do the rest for us.
11356 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11358 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11359 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11361 * src/files.c: Include gnulib's xstrndup.h.
11363 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11364 (REALLOC): Use xnrealloc, for likewise.
11365 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11366 (strnlen, memrchr): Remove decls; functions no longer used.
11367 Include <stpcpy.h>.
11369 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11370 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11371 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11372 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11373 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11374 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11375 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11376 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11377 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11378 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11379 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11380 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11381 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11382 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11383 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11384 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11385 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11386 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11387 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11388 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11389 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11390 Remove, as these files are now generated automatically
11391 by bootstrap or automake.
11393 * po/ChangeLog: Remove: all but one entry was a duplicate
11394 of this file, and I moved that 2000-11-02 entry here.
11396 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11397 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11398 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11399 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11400 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11401 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11402 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11403 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11404 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11405 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11406 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11408 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11409 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11410 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11411 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11412 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11413 * src/.cvsignore: Remove *_.c.
11416 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11417 support it. (The latest stable gzip doesn't.)
11419 2004-04-27 Paul Eggert <eggert@twinsun.com>
11421 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11422 case, as stos_ is now used by destructors due to the 2004-02-09
11425 Remove more K&R C support.
11426 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11427 * lib/subpipe.c (errno): Remove decl.
11428 Include <stdlib.h> unconditionally.
11429 (EXIT_FAILURE): Remove macro.
11430 * src/complain.c (vfprintf, strerror): Remove.
11431 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11433 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11434 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11435 (strchr, strspn, memchr): Remove decls.
11436 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11437 unconditionally. Do not declare perror.
11438 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11441 * src/complain.c (_): Remove useless defn, as system.h defines this.
11443 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11444 with latest obstack.h.
11445 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11446 to procedure types, as obstack.h now does that for us.
11447 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11449 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11450 so that this include file can stand alone.
11451 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11452 does this now. Include subpipe.h first after config.h, to
11453 test whether it can stand alone.
11455 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11456 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11457 unused declaration.
11459 * tests/synclines.at (%union synch line): Put a dummy member in
11460 the union, because empty unions aren't allowed in C. Caught
11463 2004-04-13 Jim Meyering <jim@meyering.net>
11465 * src/conflicts.c (conflicts_print): Correct format string typo:
11466 use `%%' to produce literal `%'. (trivial change)
11468 2004-03-30 Paul Eggert <eggert@twinsun.com>
11470 * src/getargs.c (version): Update copyright year to 2004.
11472 * data/c.m4 (b4_int_type): Use 'short int' rather than
11473 'short', and similarly for 'long', 'unsigned', etc.
11474 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11475 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11476 yy_yypstack, yydumpstack): Likewise.
11477 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11478 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11480 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11481 yy_stack_print, yyparse): Likewise.
11482 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11483 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11484 * lib/bitset.c (bitset_print): Likewise.
11485 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11486 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11487 * lib/bitsetv.c (bitsetv_dump): Likewise.
11488 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11489 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11491 * src/LR0.c (allocate_itemsets): Likewise.
11492 * src/gram.h (rule_number, rule): Likewise.
11493 * src/lalr.h (goto_number): Likewise.
11494 * src/nullable.c (nullable_compute): Likewise.
11495 * src/output.c (prepare_rules): Likewise.
11496 * src/relation.c (relation_print, relation_digraph): Likewise.
11497 * src/relation.h (relation_node): Likewise.
11498 * src/state.h (state_number, transitions, errs, reductions,
11499 struct state): Likewise.
11500 * src/symtab.h (symbol_number, struct symbol): Likewise.
11501 * src/tables.c (vector_number, tally, action_number,
11502 default_goto, goto_actions): Likewise.
11503 * tests/existing.at (GNU Cim Grammar): Likewise.
11504 * tests/regression.at (Web2c Actions): Likewise.
11506 * src/output.c (muscle_insert_short_int_table): Renamed from
11507 muscle_insert_short_table. All uses changed.
11509 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11511 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11512 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11513 Add %expect-rr rule.
11515 * src/scan-gram.l: Recognize %expect-rr.
11517 * src/conflicts.h (expected_sr_conflicts): Rename from
11518 expected_conflicts.
11519 (expected_rr_conflicts): Declare.
11521 * src/conflicts.c (expected_sr_conflicts): Rename from
11522 expected_conflicts.
11523 (expected_rr_conflicts): Define.
11524 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11526 Use expected_sr_conflicts in place of expected_conflicts.
11527 Warn if expected_rr_conflicts used in non-GLR parser.
11529 * doc/bison.texinfo: Add documentation for %expect-rr.
11531 2004-03-08 Paul Eggert <eggert@gnu.org>
11533 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11534 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11536 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11538 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11539 * src/scan-gram.l (scan_integer): New function.
11541 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11542 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11543 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11544 Say "long int", not "long", for uniformity with GNU style.
11546 2004-02-25 Paul Eggert <eggert@twinsun.com>
11548 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11549 compilers. This fixes a problem with Intel's C++ compiler being
11550 chatty, reported by Guido Trentalancia in
11551 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11553 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11555 Support %destructor and merge error locations in lalr1.cc.
11557 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11558 (Parser::stos_): Define unconditionally.
11559 (Parser::destruct_): New method. Generate its body with
11560 b4_yydestruct_generate.
11561 (Parser::error_start_): New attribute.
11562 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11563 token which are discarded.
11564 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11565 error_start_ when erroneous token are discarded.
11566 (Parser::parse) <yyerrlab1>: Compute the location of the error
11567 token so that it covers all the discarded tokens.
11568 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11569 it can be called with `%skeleton "lalr1.cc"', and do that.
11571 2004-02-02 Paul Eggert <eggert@twinsun.com>
11573 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11574 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11575 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11576 There's no need to mention top_builddir since Automake does that
11578 (INCLUDES): Remove, as Automake says it's obsolescent.
11579 Contents migrated into AM_CPPFLAGS as described above.
11580 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11582 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11584 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11585 (yyreportSyntaxError): Handle case where lookahead token is
11588 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11590 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11591 resulting parsers are compilable with C++.
11593 2003-12-23 Paul Eggert <eggert@twinsun.com>
11595 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11596 * src/output.c (output_skeleton): Rename local var.
11597 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11598 Bison tokens, as this runs afoul of the 2003-10-07 change that
11599 disallowed NUL bytes in character constants or string literals.
11601 * tests/local.at: Require Autoconf 2.59's Autotest.
11602 * tests/testsuite.at: Don't include local.at, since we now assume
11603 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11605 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11606 multiple inclusion warnings.
11608 2003-12-02 Akim Demaille <akim@epita.fr>
11610 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11614 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11616 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11618 2003-10-07 Paul Eggert <eggert@twinsun.com>
11620 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11621 if testsuite doesn't exist.
11623 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11624 literals, unfortunately.
11625 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11626 Complain about NUL bytes in character constants or string literals.
11628 2003-10-05 Paul Eggert <eggert@twinsun.com>
11630 * NEWS: Don't document %no-default-prec, as it's still
11632 * doc/bison.texinfo: Document %no-default-prec only if
11633 the defaultprec flag is set. Normally it's not.
11635 2003-10-04 Paul Eggert <eggert@twinsun.com>
11637 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11638 non-modifiable lvalue, instead of a modifiable one.
11639 * doc/bison.texinfo (Actions): Document that $$ can
11640 be assigned to. Do not claim that $$ and $N are
11641 array element references: user code should not rely on this.
11643 2003-10-01 Paul Eggert <eggert@twinsun.com>
11645 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11646 (grammar_declaration): Use it.
11647 * src/scan-gram.l: New token %no-default-prec.
11648 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11649 * NEWS, doc/bison.texinfo: Document the above.
11651 2003-10-01 Akim Demaille <akim@epita.fr>
11653 VCG no longer supports long_straight_phase.
11655 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11656 * src/print_graph.c (print_graph): Adjust.
11658 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11659 and Paul Eggert <eggert@twinsun.com>
11661 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11662 Table of Symbols): Document %default-prec.
11663 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11664 (grammar_declaration): Set default_prec on %default-prec.
11665 * src/scan-gram.l (%default-prec): New token.
11666 * src/reader.h (default_prec): New flag.
11667 * src/reader.c: Likewise.
11668 (packgram): Handle it.
11669 * tests/conflicts.at (%default-prec without %prec,
11670 %default-prec with %prec, %default-prec 1): New tests.
11672 2003-09-30 Paul Eggert <eggert@twinsun.com>
11674 * tests/testsuite.at: Include local.at, not input.at, fixing
11675 a typo in the 2003-08-25 patch.
11677 2003-08-27 Akim Demaille <akim@epita.fr>
11679 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11682 2003-08-26 Akim Demaille <akim@epita.fr>
11684 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11685 "<\#" to avoid magic from Gnus when posting parts of this script.
11687 2003-08-26 Akim Demaille <akim@epita.fr>
11689 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11690 (Parser::parse): here.
11691 Adjust: nerrs and errstatus is now replaced by...
11692 (Parser::nerrs_, Parser::errstatus_): New.
11694 2003-08-25 Akim Demaille <akim@epita.fr>
11696 * config/announce-gen, Makefile.cfg: New.
11697 * Makefile.am: Adjust.
11698 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11699 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11701 2003-08-25 Akim Demaille <akim@epita.fr>
11703 When reducing initial empty rules, Bison parser read an initial
11704 location that is not defined. This results in garbage, and that
11705 affects Bison's own parser. Therefore we need (i) to extend Bison
11706 to support a means to initialize this location, and (ii) to use
11707 this CVS Bison to fix CVS Bison's parser.
11709 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11711 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11712 * src/parse-gram.y: Adjust.
11713 (%initial-action): New.
11714 (%error-verbose): Since we require CVS Bison, there is no reason
11716 * src/scan-gram.l: Adjust.
11717 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11718 * data/yacc.c (yyparse): Use b4_initial_action.
11720 2003-08-25 Akim Demaille <akim@epita.fr>
11722 * doc/bison.texinfo: Don't promote stdout for error messages.
11724 2003-08-25 Akim Demaille <akim@epita.fr>
11726 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11727 From Alexandre Duret-Lutz.
11729 2003-08-25 Akim Demaille <akim@epita.fr>
11733 2003-08-25 Akim Demaille <akim@epita.fr>
11735 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11738 2003-08-25 Akim Demaille <akim@epita.fr>
11740 * data/lalr1.cc (Parser::reduce_print_): New.
11743 2003-08-25 Akim Demaille <akim@epita.fr>
11745 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11746 error recovery loops. This patch is based on
11747 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11748 Also, augment the similarity between lalr1.cc and yacc.c.
11749 Note: the locations of error recovery rules are not correct yet.
11751 * data/lalr1.cc: Comment changes to augment the similarity between
11752 lalr1.cc and yacc.c.
11753 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11754 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11755 yyerrlab), when hitting EOF, pop the whole stack here instead of
11756 merely falling thru the default error handling mechanism.
11757 (yyerrorlab): New label, with the old contents of YYERROR,
11758 plus the following change: pop the stack of rhs corresponding
11759 to the production that invoked YYERROR. That is how Yacc
11760 behaves (required by POSIX).
11761 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11764 2003-08-25 Akim Demaille <akim@epita.fr>
11766 Tune local.at so that people can "autom4te -l autotest calc.at -o
11767 calc" for instance, to extract a sub test suite.
11769 * tests/testsuite.at: Move the initialization, Autotest version
11770 requirement, and AT_TESTED invocation into...
11771 * tests/local.at: here.
11772 * tests/testsuite.at: Include it for compatibility with Autoconf
11774 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11777 2003-08-04 Paul Eggert <eggert@twinsun.com>
11779 Rework code slightly to avoid gcc -Wtraditional warnings.
11780 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11781 The returned value is now stored in *YY0. All callers changed.
11782 * src/output.c (merge_output): Adjust to the above change.
11784 2003-07-26 Paul Eggert <eggert@twinsun.com>
11786 * data/glr.c (YYASSERT): New macro.
11787 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11788 yyresolveStates, yyprocessOneStack):
11789 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11790 Derived from a suggestion by Frank Heckenbach.
11792 2003-07-25 Paul Eggert <eggert@twinsun.com>
11794 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11795 for portability to K&R C (after ansi2knr, presumably). See
11796 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11797 by Frank Heckenbach, though I have omitted the structure-initialization
11798 part of his glr-knr.diff patch since I recall that the Portable
11799 C Compiler didn't require that change.
11801 Let the user specify how to allocate and free memory.
11802 Derived from a suggestion by Frank Heckenbach in
11803 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11804 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11805 All uses of free, malloc, realloc changed to use these macros,
11806 and unnecessary casts removed.
11807 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11809 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11811 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11812 use s.empty() rather than s == "" to test for empty string; see
11813 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11816 2003-06-25 Akim Demaille <akim@epita.fr>
11818 * config/depcomp, config/install-sh: Update from masters.
11820 2003-06-20 Paul Eggert <eggert@twinsun.com>
11822 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11823 and return properly parenthesized result.
11824 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11825 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11826 Remove unnecessary parentheses from uses.
11827 * doc/bison.texinfo (Location Default Action): Describe the
11828 conventions for parentheses.
11830 2003-06-19 Paul Eggert <eggert@twinsun.com>
11832 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11833 yyreportTree): Do not assume that size_t is the same width as int,
11834 when printing sizes. Print sizes using an unsigned format.
11835 Problem reported by Frank Heckenbach in
11836 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11838 Port to Forte Developer 7 C compiler.
11839 * data/glr.c (struct YYLTYPE): If locations are not being used,
11840 declare a single dummy member, as empty structs do not conform
11842 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11843 the Forte Developer 7 C compiler complains that end-of-loop
11844 code is not reached.
11846 2003-06-17 Paul Eggert <eggert@twinsun.com>
11848 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11849 avoid warnings from picky compilers about redefinition of PARAMS.
11851 2003-06-17 Paul Eggert <eggert@twinsun.com>
11855 * NEWS: Document 1.875b.
11857 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11858 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11859 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11860 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11861 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11862 per recent gettext manual's suggestion.
11863 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11864 Use prototypes, not old-style definitions.
11865 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11866 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11867 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11868 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11869 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11870 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11871 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11872 vbitset_or_and_cmp, vbitset_copy): Likewise.
11874 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11875 Do not include <stdlib.h>.
11876 (PARAMS): Define unconditionally for C89.
11877 (ATTRIBUTE_NORETURN): Remove.
11878 (ATTRIBUTE_UNUSED): Define unconditionally.
11880 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11881 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11882 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11883 * lib/vbitset.c, lib/vbitset.h: New files.
11884 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11885 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11888 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11889 `How Can I Reset @code{yyparse}', since texinfo does not allow
11890 arbitrary @ in node names.
11892 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11893 shouldn't be needed according to the gettext 0.12.1 documentation
11894 but which seem to be needed anyway: codeset.m4 glibc21.m4
11895 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11896 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11897 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11899 * lib/.cvsignore: Add stdbool.h.
11900 * m4/.cvsignore: Add nls.m4, po.m4.
11902 Upgrade to CVS gnulib.
11903 * stdbool_.h: File renamed from stdbool.h.in.
11904 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11906 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11907 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11908 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11909 (MOSTLYCLEANFILES): New var.
11910 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11911 (stdbool.h): New rule.
11912 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11913 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11914 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11915 m4/quote.m4: Upgrade to today's gnulib.
11917 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11918 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11919 the tests right now.
11920 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11921 yyerror are declared before use; C99 requires this.
11923 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11925 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11927 (yyrecoverSyntaxError): Correct the logic for setting and testing
11929 Correct comment on handling EOF.
11930 Allow states with only a default reduction, rather than failing
11931 (I can't quite reconstruct why these were not allowed before).
11933 Fixes to avoid problem that $-N rules in GLR parsers can cause
11934 buffer overruns, corrupting state.
11936 * src/output.c (prepare_rules): Output max_left_semantic_context
11938 * src/reader.h (max_left_semantic_context): New variable declaration.
11939 * src/scan-gram.l (max_left_semantic_context): Define.
11940 (handle_action_dollar): Update max_left_semantic_context.
11941 * data/glr.c (YYMAXLEFT): New definition.
11942 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11943 (yyresolveAction): Ditto.
11945 Fixes to problems with location handling in GLR parsers reported by
11946 Frank Heckenbach (2003/06/05).
11948 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11949 (YYRHSLOC): Add parentheses, and define only if locations used.
11950 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11951 locations not used.
11952 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11953 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11955 * tests/cxx-type.at: Exercise location information; update tests
11956 to differentiate output with and without locations.
11957 Remove forward declarations of yylex and yyerror---caused errors
11958 because default YYLTYPE not yet defined.
11959 Change semantic actions to compute strings, rather than printing
11960 them directly (to test proper passing of semantics values). Change
11961 output to prefix notation and update test data and expected results.
11962 (yylex): Track locations.
11963 (stmtMerge): Return value rather than printing, and include arguments
11966 2003-06-03 Paul Eggert <eggert@twinsun.com>
11968 Avoid warnings generated by GCC 2.95.4 when Bison is
11969 configured with --enable-gcc-warnings.
11970 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11971 yy::]b4_parser_class_name[::translate_,
11972 yy::Stack::operator[] (unsigned),
11973 yy::Stack::operator[] (unsigned) const,
11974 yy::Slice::operator[] (unsigned),
11975 yy::Slice::operator[] (unsigned) const):
11976 Rename local vars to avoid warnings.
11977 * tests/glr-regression.at (Improper handling of embedded actions
11978 and $-N in GLR parsers): Remove unused local variable from yylex.
11979 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11980 (void) as arg when not pure, since we now assume C89 when building
11981 Bison. Pacify GCC by using parameter.
11983 2003-06-02 Paul Eggert <eggert@twinsun.com>
11985 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11986 yy::Location::lines, yy::Location::columns): Rename arguments
11987 to avoid shadowing; this removes a warning generated by GCC 3.3.
11989 2003-06-01 Paul Eggert <eggert@twinsun.com>
11991 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11992 to g++, as GCC 3.3 complains if you do it.
11993 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11994 everything that WARNING_CFLAGS has, except omit warnings
11995 not suitable for C++.
11996 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11997 * tests/atlocal.in (CXXFLAGS): New var.
11998 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12000 Fix a GLR parser bug I reported in February; see
12001 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12002 The problem was that GLR parsers did not conform to the C standard,
12003 because actions like { $1 = $2 + $3; } expanded to expressions
12004 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12005 to a local variable. The C standard says that expressions
12006 like (var = f ()) + (var = f ()) have undefined behavior.
12007 Another problem was that GCC sometimes issues warnings that
12008 yyfill and its parameters are unused.
12010 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12011 as possibly unused.
12012 (yyfill): New function.
12014 (yyuserAction): Change type of yynormal to bool, so that it matches
12015 the new yyfill signature. Mark it as possibly unused.
12018 Follow up on a bug I reported in February, where a Bison-generated
12019 parser can loop. Provide a test case and a fix for yacc.c. I
12020 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12021 The original bug report is in:
12022 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12024 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12025 macro's size was becoming unwieldy.
12026 (yyerrlab): Do not discard an empty lookahead symbol, as this
12027 might destroy garbage.
12028 (yyerrorlab): New label, with the old contents of YYERROR,
12029 plus the following change: pop the stack of rhs corresponding
12030 to the production that invoked YYERROR. That is how Yacc
12031 behaves, and POSIX requires this behavior.
12032 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12033 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12034 Define 'alarm' to do nothing if unistd.h is not available.
12035 Add a new rule "exp: '-' error;" to test the above change to
12036 data/yacc.c. Use 'alarm' to abort any test taking longer than
12037 10 seconds, as it's probably looping.
12038 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12039 Also, the new yacc.c generates two fewer diagnostics for an
12042 2003-05-24 Paul Eggert <eggert@twinsun.com>
12044 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12045 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12046 This fixes a problem reported by John Bowman when the Compaq/HP
12047 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12048 -ansi -Wall -gall).
12049 * data/yacc.c (union yyalloc): Likewise.
12050 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12052 Switch from 'int' to 'bool' where that makes sense.
12054 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12055 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12056 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12057 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12058 Return or accept bool, not int. All callers changed.
12059 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12060 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12061 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12062 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12063 bitset_or_and_cmp_): Likewise.
12064 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12065 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12066 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12067 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12068 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12069 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12070 bitset_stats_or_and_cmp): Likewise.
12071 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12072 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12073 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12074 ebitset_xor_cmp): Likewise.
12075 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12076 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12077 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12078 lbitset_xor_cmp): Likewise.
12079 * lib/bbitset.h: Include <stdbool.h>.
12080 (struct bitset_vtable): The following members now return bool, not
12081 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12082 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12084 * src/conflicts.c (count_rr_conflicts): Likewise.
12085 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12087 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12088 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12089 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12090 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12091 graph_flag): Likewise.
12092 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12093 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12094 graph_flag): Likewise.
12095 * src/output.c (error_verbose): Likewise.
12096 * src/output.h (error_verbose): Likewise.
12097 * src/reader.c (start_flag, typed): Likewise.
12098 * src/reader.h (typed): Likewise.
12099 * src/getargs.c (LOCATIONS_OPTION): New constant.
12100 (long_options, getargs): Use it.
12101 * src/lalr.c (build_relations): Use bool, not int.
12102 * src/nullable.c (nullable_compute): Likewise.
12103 * src/print.c (print_reductions): Likewise.
12104 * src/tables.c (action_row, pack_vector): Likewise.
12105 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12106 * src/output.c (prepare): Use it.
12107 * src/output.c (token_definitions_output,
12108 symbol_destructors_output, symbol_destructors_output): Use string,
12109 not boolean integer, to keep track of whether to output separator.
12110 * src/print_graph.c (print_core): Likewise.
12111 * src/state.c (state_rule_lookaheads_print): Likewise.
12113 * config/install-sh: Sync from automake 1.7.5.
12115 2003-05-14 Paul Eggert <eggert@twinsun.com>
12117 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12118 semicolon after a grammar declaration, in the interest of possible
12119 future changes to the Bison input language.
12120 Do not allow a stray semicolon at the start of the grammar.
12121 (rhses.1): Allow one or more semicolons after any rule, including
12122 just before "|" as required by POSIX.
12123 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12126 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12128 %parse-param support for lalr1.cc.
12130 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12131 b4_cc_constructor_calls, b4_cc_constructor_call,
12132 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12134 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12135 parse-param arguments.
12136 (yy::b4_parser_class_name): Declare instance variables to
12137 hold parse-param arguments.
12138 * tests/calc.at: s/value/semantic_value/ because value clashes
12139 with a member of yy::b4_parser_class_name. Adjust C++ code
12140 to handle %parse-param. Enable %parse-param test in C++.
12142 2003-05-12 Paul Eggert <eggert@twinsun.com>
12144 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12145 English a bit. Fix fclose typo. Change "const char" to "char
12146 const", and use ANSI C rather than K&R for "main". Suggest
12147 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12148 and suggest yy_switch_to_buffer.
12150 2003-05-05 Paul Eggert <eggert@twinsun.com>
12152 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12153 C89. This avoids a diagnostic on compilers that define __STDC__
12154 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12155 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12157 2003-05-03 Paul Eggert <eggert@twinsun.com>
12159 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12160 Do not overrun array bounds.
12161 This should fix a bug reported today by Olatunji Oluwabukunmi in
12162 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12164 2003-04-29 Akim Demaille <akim@epita.fr>
12166 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12167 * src/getargs.c, src/getargs.h: here, as bool, not int.
12168 (nondeterministic_parser): New.
12169 * src/parse-gram.y, src/scan-gram.l: Support
12170 %nondeterministic-parser.
12171 * src/output.c (prepare): Use nondeterministic_parser instead
12172 of glr_parser where appropriate.
12173 * src/tables.c (conflict_row, action_row, save_row)
12174 (token_actions, token_actions, pack_vector): Ditto.
12176 2003-04-29 Akim Demaille <akim@epita.fr>
12178 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12180 2003-04-29 Akim Demaille <akim@epita.fr>
12182 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12183 with %pure-parser and %locations to exercise the patch from Yakov
12186 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12188 * data/yacc.c: (b4_lex_param): Corrected for the case where
12189 %lex-param is provided and %pure-parser isn't.
12191 2003-04-27 Paul Eggert <eggert@twinsun.com>
12193 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12194 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12195 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12196 if it is not defined.
12197 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12199 2003-04-26 Paul Eggert <eggert@twinsun.com>
12201 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12202 Declare to be of type suitable for the ninf value itself, not of
12203 type suitable for the corresponding table, since the latter might
12204 be unsigned but the ninf value might be negative. This fixes a
12205 bug reported by Alexandre Duret-Lutz in
12206 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12208 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12209 invokes it. We shouldn't invoke it twice because it will attempt
12210 to put error.o in the archive twice. This fixes a glitch reported
12211 by Martin Mokrejs in
12212 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12214 2003-04-21 Paul Eggert <eggert@twinsun.com>
12216 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12219 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12221 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12222 Fix obvious typo that results in uncompilable GLR parsers
12223 when both %pure-parser and %locations are used. (trivial change)
12225 2003-04-17 Paul Eggert <eggert@twinsun.com>
12227 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12228 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12229 Do not insert the expected token via unput, as this runs afoul
12230 of a POSIX-compatibility bug in flex 2.5.31.
12231 All uses changed to BEGIN the parent state,
12232 since we no longer insert the expected token via unput.
12233 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12234 that is no longer emitted after the above change.
12236 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12237 the first one. This change is from Paul Hilfinger, and it fixes
12238 regression reported by Werner Lemberg in
12239 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12241 (resolve_sr_conflict): Don't invoke state_errs_set
12242 unless one or more tokens have been explicitly made errors.
12243 Otherwise, the above change causes Bison to abort.
12245 * tests/existing.at (GNU pic Grammar): New test case, taken from
12248 2003-03-31 Akim Demaille <akim@epita.fr>
12250 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12252 2003-03-31 Akim Demaille <akim@epita.fr>
12254 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12257 2003-03-31 Akim Demaille <akim@epita.fr>
12259 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12260 From Paul Hilfinger.
12262 2003-03-29 Akim Demaille <akim@epita.fr>
12264 * m4/error.m4: Do not put under dynamic conditions some code which
12265 expansion is under static control.
12267 2003-03-29 Akim Demaille <akim@epita.fr>
12269 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12271 2003-03-29 Akim Demaille <akim@epita.fr>
12273 * doc/bison.texinfo (Strings are Destroyed): New.
12275 2003-03-13 Paul Eggert <eggert@twinsun.com>
12277 * .cvsignore: Add configure.lineno.
12278 * src/.cvsignore: Add yacc.
12279 * tests/.cvsignore: Add testsuite.log.
12280 * doc/fdl.texi: Sync with latest FSF version.
12282 2003-03-12 Paul Eggert <eggert@twinsun.com>
12284 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12285 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12286 cursor, instead of leaving it undefined. This fixes a bug
12287 reported by Tim Van Holder in
12288 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12289 * tests/input.at (Torturing the Scanner): Test the scanner on
12290 an empty input file, which was Tim Van Holder's test case.
12292 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12293 <sys/resource.h> can be included, include sys/time.h and
12294 sys/times.h first, if available. This works around the SunOS
12295 4.1.4 porting bug reported by Bruce Becker in
12296 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12298 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12299 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12300 AC_HEADER_SYS_WAIT.
12302 Merge changes from gnulib. This was prompted because the CVS
12303 snapshot didn't build on Solaris 7 due to strnlen problems.
12305 These changes need to be merged back into gnulib:
12306 * lib/hash.c: Include <stdbool.h> unconditionally.
12307 * m4/onceonly.m4 (m4_quote): New macro.
12308 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12309 Quote AC_FOREACH variable-expansions properly.
12310 The 2003-01-03 obstack.h change also needs merging.
12311 {end of changes requiring merging}
12313 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12314 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12315 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12316 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12317 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12318 New files, imported from gnulib.
12319 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12322 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12323 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12326 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12328 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12329 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12330 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12331 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12332 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12333 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12334 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12335 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12336 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12337 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12338 (jm_PREREQ_ARGMATCH): Remove.
12339 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12340 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12342 * src/system.h: Include <stdbool.h> unconditionally.
12344 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12345 assuming at least C89 in the bitset code for some time now.
12347 2003-03-03 Akim Demaille <akim@epita.fr>
12351 2003-03-02 Akim Demaille <akim@epita.fr>
12353 * doc/bison.texinfo (Table of Symbols): Reactivate the
12354 documentation for %lex-param, and %parse-param.
12356 2003-03-02 Akim Demaille <akim@epita.fr>
12358 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12359 generate verbose error messages.
12360 Use the number of tokens as an upper bound in yytname, as it
12361 cannot be a non terminal.
12363 2003-03-02 Akim Demaille <akim@epita.fr>
12365 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12368 2003-03-02 Akim Demaille <akim@epita.fr>
12370 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12371 Use them to exercise yycheck overrun.
12372 Based on Andrew Suffield's grammar.
12374 2003-03-02 Akim Demaille <akim@epita.fr>
12376 Create tests/local.at for Bison generic testing macros.
12378 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12379 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12381 * tests/calc.at (AT_CHECK_CALC): Adjust.
12382 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12383 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12384 * tests/local.at: here.
12385 (AT_COMPILE_CXX): Tags the tests using it as c++.
12386 Ignore the test if CXX is not functional.
12388 2003-03-01 Paul Eggert <eggert@twinsun.com>
12390 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12391 not loc->end, since loc->end might contain garbage and this leads
12392 to undefined behavior on some platforms.
12393 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12394 depend on *loc, so that the reader doesn't give the the false
12395 impression that *loc is initialized.
12396 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12397 does not survive the return.
12399 2003-03-01 Akim Demaille <akim@epita.fr>
12401 * src/scan-gram.l (code_start): Always initialize it when entering
12402 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12403 yylex invocation. An alternative would be making it static, but
12404 then it starts with the second %%'s beginning, instead of its end.
12406 2003-02-28 Paul Eggert <eggert@twinsun.com>
12408 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12409 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12410 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12412 2003-02-26 Paul Eggert <eggert@twinsun.com>
12414 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12415 Remove Sequent/Pyramid discussion (nobody uses them any more).
12416 Merge VMS and MS-DOS discussion; these ports may well be dead
12417 but let's keep mentioning them for now. Put <> around email
12418 addresses. Add copyright notice.
12420 2003-02-24 Paul Eggert <eggert@twinsun.com>
12422 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12423 to avoid collision with flex use of yylineno.
12424 Problem reported by Bruce Lilly in
12425 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12426 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12427 * data/yacc.c (yy_reduce_print): Likewise.
12429 * config/depcomp: Sync with Automake 1.7.3.
12431 2003-02-21 Akim Demaille <akim@epita.fr>
12433 * data/lalr1.cc: Use temporary variables instead of casts to
12434 change integer types.
12435 Suggested by Paul Eggert.
12437 2003-02-21 Akim Demaille <akim@epita.fr>
12439 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12440 to avoid confusions with lalr1.cc's notion of Position.
12441 Suggested by Paul Eggert.
12443 2003-02-20 Akim Demaille <akim@epita.fr>
12445 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12446 before initial_columns.
12447 (location.hh): Use consistent variable names when defining the
12449 Use "last" so that we subtract from Positions, not from unsigned.
12451 2003-02-20 Akim Demaille <akim@epita.fr>
12453 * data/lalr1.cc (position.hh): New subfile, including the extended
12454 and Doxygen'ed documentation of class Position.
12455 (location.hh): Use it.
12456 Document a` la Doxygen.
12457 With the help of Benoit Perrot.
12459 2003-02-20 Akim Demaille <akim@epita.fr>
12461 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12463 Redefine AT_YYERROR_SEES_LOC_IF using it.
12464 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12466 Don't use the location in yy::Parser::error_ and
12467 yy::Parser::print_ when not %locations.
12468 Activate more lalr1.cc tests.
12470 2003-02-19 Akim Demaille <akim@epita.fr>
12472 * data/lalr1.cc: When displaying a line number, be sure to make it
12475 2003-02-19 Akim Demaille <akim@epita.fr>
12477 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12479 (YYABORT, YYACCEPT, YYERROR): New.
12480 * tests/calc.at: Renable the lalr1.cc test.
12482 2003-02-19 Akim Demaille <akim@epita.fr>
12484 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12485 error recovery, mixing with/without pops and discarding of the
12488 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12490 2003-02-17 Paul Eggert <eggert@twinsun.com>
12492 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12493 * tests/testsuite.at (AT_COMPILE): Use them.
12494 This fixes the testsuite problem reported by Robert Lentz in
12495 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12497 2003-02-12 Paul Eggert <eggert@twinsun.com>
12499 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12500 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12501 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12502 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12503 Check for malloc failure, for consistency with yacc.c.
12504 (yytname_size): Remove, for consistency with yacc.c.
12506 The bug still remains in data/lalr1.cc, as I didn't have time
12509 2003-02-06 Akim Demaille <akim@epita.fr>
12511 * configure.ac (GXX): Rename as...
12512 (CXX): this, to keep the original Autoconf semantics.
12514 * data/lalr1.cc: Fix b4_copyright invocations.
12515 If YYDEBUG is not defined, don't depend upon name_ being defined.
12516 (location.hh): Include string and iostream.
12517 (Position::filename): New member.
12518 (Position::Position ()): New.
12519 (operator<< (Position)): New.
12520 (operator- (Position, int)): New.
12521 (Location::first, Location::last): Rename as...
12522 (Location::begin, Location::end): these, to mock the conventional
12524 (operator<< (Location)): New.
12525 * tests/atlocal.in (CXX): New.
12526 * tests/testsuite.at (AT_COMPILE_CXX): New.
12527 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12528 locations in a more synthetic way.
12529 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12531 Adjust the C locations to match those from Emacs: first column is
12533 Change all the expected results.
12534 Conform to the GCS: simplify the locations when applicable.
12535 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12536 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12537 these CPP macros with the m4 macros new defined by...
12538 (AT_CHECK_PUSHDEFS): this, i.e.:
12539 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12540 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12542 (AT_CHECK_POPDEFS): Undefine them.
12543 (AT_CHECK_CALC_LALR1_CC): New.
12544 Use it for the first lalr1.cc test.
12546 2003-02-04 Akim Demaille <akim@epita.fr>
12548 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12549 Location as is defined.
12551 2003-02-04 Akim Demaille <akim@epita.fr>
12553 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12554 name_ being defined.
12556 2003-02-03 Paul Eggert <eggert@twinsun.com>
12558 * src/gram.h (start_symbol): Remove unused decl.
12560 Use more-consistent naming conventions for local vars.
12562 * src/derives.c (derives_compute): Change type of local var from
12563 int to rule_number.
12564 * src/gram.c (grammar_rules_partial_print): Likewise.
12565 * src/print.c (print_core): Likewise.
12566 * src/reduce.c (reduce_grammar_tables): Likewise.
12568 * src/gram.c (grammar_dump): Change name of item_number *
12569 local var from r to rp.
12570 * src/nullable.c (nullable_compute): Likewise.
12572 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12574 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12575 for symbol or symbol_number var.
12576 * src/reader.c (grammar_start_symbol_set): Likewise.
12577 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12579 * src/state.c (transitions_to): Likewise.
12580 * src/state.h: Likewise.
12581 * src/tables.c (symbol_number_to_vector_number): Likewise.
12583 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12586 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12589 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12592 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12593 Use str, not s, for char * var. Use ch, not c, for character var.
12594 Use size for size var.
12596 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12598 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12600 * src/uniqstr.h: Likewise.
12602 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12603 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12604 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12605 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12606 param to have same name as that of enum, so that we don't use
12607 "s" to stand for a non-state.
12609 2003-02-02 Akim Demaille <akim@epita.fr>
12611 * src/scan-skel.l: Scan more than one inert character per yylex
12614 2003-02-01 Paul Eggert <eggert@twinsun.com>
12618 * po/LINGUAS: Add ms.
12620 2003-01-30 Akim Demaille <akim@epita.fr>
12622 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12624 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12626 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12629 Changes in response to error report by S. Eken: GLR mode does not
12630 handle negative $ indices or $ indices in embedded rules correctly.
12631 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12633 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12634 (b4_rhs_location): Ditto.
12635 (yyfill): New function to copy from stack tree into array
12637 (yyuserAction): Modify to allow incremental move of semantic values
12638 to rhs array when in GLR mode.
12639 Define YYFILL to use in user-defined actions to fill semantic array
12641 Remove dummy use of yystack, as there is now a guaranteed use.
12642 (yydoAction): Modify to allow incremental move of semantic values
12643 to rhs array when in GLR mode.
12644 (yyresolveAction): Ditto.
12645 (yyglrShiftDefer): Update comment.
12646 (yyresolveStates): Use X == NULL for pointers, not !X.
12647 (yyglrReduce): Ditto.
12648 (yydoAction): Ditto
12650 * tests/glr-regr1.at: Rename to ...
12651 * tests/glr-regression.at: Add new regression test for the problems
12652 described above (adapted from S. Eken).
12653 Update copyright notice.
12654 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12655 * tests/Makefile.am: Ditto.
12657 2003-01-28 Paul Eggert <eggert@twinsun.com>
12659 * data/lalr1.cc: Do not use @output_header_name@ unless
12660 b4_defines_flag is set. This fixes two bugs reported by
12662 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12663 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12665 2003-01-21 Paul Eggert <eggert@twinsun.com>
12667 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12668 we don't need to worry about yyerrlab1 being reported as an
12669 "unused label" by non-GCC C compilers. The downside is that if
12670 locations are used then a couple of statements are duplicated each
12671 time YYERROR is invoked, but the upside is that the warnings
12673 (yyerrlab1): Move code to YERROR.
12674 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12675 This reverts some of the 2002-12-27 change.
12677 2003-01-17 Paul Eggert <eggert@twinsun.com>
12679 * src/output.c (symbol_printers_output): Fix typo that led
12680 to core dump. Problem reported by Antonio Rus in
12681 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12683 2003-01-13 Akim Demaille <akim@epita.fr>,
12684 Quoc Peyrot <chojin@lrde.epita.fr>,
12685 Robert Anisko <anisko_r@lrde.epita.fr>
12687 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12688 when the stacks contain one element, as the loop would otherwise
12689 free the last state, and then use the top state (the one we just
12690 popped). This means that the initial elements will not be freed
12691 explicitly, as is the case in yacc.c; it is not a problem, as
12692 these elements have fake values.
12694 2003-01-11 Paul Eggert <eggert@twinsun.com>
12696 * NEWS: %expect-violations are now just warnings, reverting
12697 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12698 bootstrapping problem reported by Matthias Klose; see
12699 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12700 * src/conflicts.c (conflicts_print): Likewise.
12701 * tests/conflicts.at (%expect not enough, %expect too much,
12702 %expect with reduce conflicts): Likewise.
12703 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12704 that the warning is enabled if the number of conflicts changes
12705 (not necessarily increases).
12707 * src/getargs.c (version): Update copyright year.
12709 2003-01-09 Akim Demaille <akim@epita.fr>
12711 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12713 2003-01-08 Paul Eggert <eggert@twinsun.com>
12715 * Makefile.maint (WGETFLAGS):
12716 New macro, containing "-C off" to disable proxy caches.
12717 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12718 (rel-check): Use $(WGET) instead of wget.
12720 2003-01-06 Paul Eggert <eggert@twinsun.com>
12722 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12723 the GLR paper of Scott, Johnstone and Hussain.
12725 2003-01-04 Paul Eggert <eggert@twinsun.com>
12727 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12728 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12729 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12730 (EXTRA_LIBRARIES): New var, for liby.a.
12731 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12732 (EXTRA_SCRIPTS): New var, for yacc.
12734 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12735 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12736 Problem reported by Nelson H. F. Beebe.
12738 2003-01-03 Paul Eggert <eggert@twinsun.com>
12740 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12741 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12742 when compiling Bison 1.875's `bitset bset = obstack_alloc
12743 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12745 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12746 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12747 grow to a huge size with typical invocation.
12749 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12750 Use the pattern recommended by Autoconf 2.57, except also protect
12751 against double-definition.
12752 * src/system.h: Likewise.
12753 Portability issues reported by Nelson H. F. Beebe.
12755 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12756 All uses changed. Provide a definition in both C and C++.
12757 (yytrue, yyfalse): Define even if defined (__cplusplus).
12759 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12760 Reported by Nelson H. F. Beebe.
12762 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12764 2003-01-02 Paul Eggert <eggert@twinsun.com>
12766 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12767 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12768 Bug reported by Nelson H. F. Beebe.
12770 2003-01-01 Paul Eggert <eggert@twinsun.com>
12774 2002-12-30 Paul Eggert <eggert@twinsun.com>
12776 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12778 (<INITIAL>","): Here. This causes stray "," to be treated
12781 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12782 last brace in braced code when not in Yacc mode, for compatibility
12783 with Bison 1.35. This resurrects the 2001-12-15 patch to
12786 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12787 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12789 2002-12-28 Paul Eggert <eggert@twinsun.com>
12791 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12792 that of SYM's type. This fixes Debian bug 168069, reported by
12795 2002-12-28 Paul Eggert <eggert@twinsun.com>
12799 Switch back to the Yacc style of conflict reports, undoing some
12800 of the 2002-07-30 change.
12801 * doc/bison.texinfo (Understanding): Use Yacc style for
12802 conflict reports. Also, use new way of locating rules.
12803 * src/conflicts.c (conflict_report):
12804 Renamed from conflict_report_yacc, removing the old
12805 'conflict_report'. Translate the entire conflict report at once,
12806 so that we don't assume that "," has the same interpretation in
12808 (conflicts_output): Use Yacc-style conflict report for each state,
12809 instead of our more-complicated style.
12810 (conflicts_print): Use Yacc-style conflict report, except print
12811 the input file name when not emulating Yacc.
12812 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12813 Conflicted Reduction, %expect not enough, %expect too much,
12814 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12815 * tests/existing.at (GNU Cim Grammar): Likewise.
12816 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12818 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12819 fatal): Don't invoke fflush; it's not needed and it might even be
12820 harmful for stdout, as stdout might not be open.
12821 * src/reduce.c (reduce_print): Likewise.
12823 2002-12-27 Paul Eggert <eggert@twinsun.com>
12825 Fix a bug where error locations were not being recorded correctly.
12826 This problem was originally reported by Paul Hilfinger in
12827 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12829 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12830 top of the location stack's error locations.
12831 (yyerrlab): Set it. When discarding a token, push its location
12832 onto yylerrsp so that we don't lose track of the error's end.
12833 (yyerrlab1): Now is only the target of YYERROR, so that we can
12834 properly record the location of the action that failed. For GCC
12835 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12836 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12837 (yyerrlab2): New label, which yyerrlab now falls through to.
12838 Compute the error's location by applying YYLLOC_DEFAULT to
12839 the locations of all the symbols that went into the error.
12840 * doc/bison.texinfo (Location Default Action): Mention that
12841 YYLLOC_DEFAULT is also invoked for syntax errors.
12842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12843 Error locations include the locations of all the tokens that were
12844 discarded, not just the last token.
12846 2002-12-26 Paul Eggert <eggert@twinsun.com>
12848 * src/files.c: Include quote.h.
12849 (compute_output_file_names): Warn if we detect conflicting
12850 outputs to the same file. This should catch the misunderstanding
12851 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12853 * src/conflicts.c (conflicts_print): If the user specifies
12854 "%expect N", report an error if there are any reduce/reduce
12855 conflicts. This is what the manual says should happen.
12856 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12857 * tests/conflicts.at (%expect with reduce conflicts): New test.
12859 Don't use m4_include on relative file names, as it doesn't work as
12860 desired if there happens to be a file with that name under ".".
12862 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12863 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12864 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12865 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12866 * src/output.c (output_skeleton): Use full path names when
12867 specifying a file to include; don't rely on include path, as
12868 it's unreliable when the working file contains a file with
12871 2002-12-25 Paul Eggert <eggert@twinsun.com>
12873 Remove obsolete references to bison.simple and bison.hairy.
12874 Problem mentioned by Aubin Mahe in
12875 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12876 * data/glr.c: Comment fix.
12877 * doc/bison.1: Remove references. Also, mention "yacc".
12879 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12882 * src/parse-gram.y (declaration): Use enum "report_states" rather
12883 than its numeric value 1.
12885 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12886 opening a new one. This fixes Debian bug 165349, reported by
12889 2002-12-24 Paul Eggert <eggert@twinsun.com>
12893 * Makefile.maint (cvs-update): Don't assume that the shell
12894 supports $(...), as Solaris sh doesn't.
12896 * src/parse-gram.y (lloc_default): Remove test for empty
12897 nonterminals at the end, since it didn't change the result.
12899 2002-12-24 Paul Eggert <eggert@twinsun.com>
12901 If the user does not define YYSTYPE as a macro, Bison now declares it
12902 using typedef instead of defining it as a macro. POSIX requires this.
12903 For consistency, YYLTYPE is also declared instead of defined.
12905 %union directives can now have a tag before the `{', e.g., the
12906 directive `%union foo {...}' now generates the C code
12907 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12908 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12909 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12910 instead of `yyltype'.
12912 `yystype' and `yyltype' are now obsolescent macros instead of being
12913 typedefs or tags; they are no longer documented and will be
12914 withdrawn in a future release.
12916 * data/glr.c (b4_location_type): Remove.
12917 (YYSTYPE): Renamed from yystype.
12918 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12919 (struct YYLTYPE): Renamed from struct yyltype.
12920 (YYLTYPE): Renamed from yyltype.
12921 (yyltype, yystype): New (and obsolescent) macros,
12922 for backward compatibility.
12923 * data/yacc.c: Likewise.
12925 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12926 does not specify a union tag. This is for compatibility with
12929 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12930 const *, since it is now modified by stripping surrounding { }.
12931 (current_braced_code): Remove.
12932 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12933 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12934 trailing " {...}". Now of type <chars>.
12935 (grammar_declaration): Adjust to bundled tokens.
12936 (code_content): Remove; stripping is now done by add_param.
12937 (print_token_value): Print contents of bundled tokens.
12938 (token_name): New function.
12940 * src/reader.h (braced_code, current_braced_code): Remove.
12941 (token_name): New decl.
12943 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12944 token_type, not braced_code code_kind. All uses changed.
12945 (SC_PRE_CODE): New state, for scanning after a keyword that
12946 has (or usually has) an immediately-following braced code.
12947 (token_type): New local var, to keep track of which token type
12948 to return when scanning braced code.
12949 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12950 <INITIAL>"%parse-param", <INITIAL>"%printer",
12951 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12952 instead of returning a token type immediately.
12953 (<INITIAL>"{"): Set token type.
12954 (<SC_BRACED_CODE>"}"): Use it.
12955 (handle_action_dollar, handle_action_at): Now returns bool
12956 indicating success. Fail if ! current_rule; this prevents a core dump.
12957 (handle_symbol_code_dollar, handle_symbol_code_at):
12958 Remove; merge body into caller.
12959 (handle_dollar, handle_at): Complain in invalid contexts.
12961 * NEWS, doc/bison.texinfo: Document the above.
12962 * NEWS: Fix years and program names in copyright notice.
12964 2002-12-17 Paul Eggert <eggert@twinsun.com>
12966 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12967 Reporting, Table of Symbols): Omit mentions of %lex-param and
12968 %parse-param from the documentation for now.
12970 2002-12-15 Paul Eggert <eggert@twinsun.com>
12972 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12973 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12974 lookahead symbol, and which sets yychar in parser actions) and it
12975 disagreed with the Bison documentation. Bug
12976 reported by Andrew Walrond.
12978 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12979 as the caller now does that.
12980 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12981 (YYEMPTY): Parenthesize right hand side, since others use it.
12982 (yyparse): Don't assume that our generated code is the only code
12985 2002-12-13 Paul Eggert <eggert@twinsun.com>
12989 POSIX requires a "yacc" command.
12990 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12991 (MOSTLYCLEANFILES): Add yacc.
12993 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12994 as an alias for bison y.
12996 * po/LINGUAS: Add da.
12998 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12999 problem with latest <getopt.h>.
13000 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13002 * doc/fdl.texi: Upgrade to 1.2.
13003 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13004 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13005 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13007 * config/install-sh: Sync with autotools.
13009 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13010 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13011 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13012 locations are requested.
13013 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13014 locations are requested.
13016 2002-12-12 Paul Eggert <eggert@twinsun.com>
13018 Remove unportable casts and storage allocation tricks.
13019 While we're at it, remove almost all casts, since they
13020 usually aren't needed and are a sign of trouble.
13022 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13024 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13025 the pointer DSET returned by malloc; this isn't portable.
13026 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13027 Similarly for DERIVES.
13028 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13029 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13030 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13032 * src/derives.c (derives_compute): Do not bother invoking
13033 int_of_rule_number, since rule numbers are integers.
13035 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13036 rather than XMALLOC (char, N).
13038 * src/files.c (filename_split): Rewrite to avoid cast.
13040 * src/gram.h (symbol_number_as_item_number,
13041 item_number_as_symbol_number, rule_number_as_item_number,
13042 item_number_as_rule_number):
13043 Now inline functions rather than macros, to avoid casts.
13044 * src/state.h (state_number_as_int): Likewise.
13045 * src/tables.c (state_number_to_vector_number,
13046 symbol_number_to_vector_number): Likewise.
13048 * src/gram.h (int_of_rule_number): Remove; no longer used.
13050 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13051 since the resulting storage is always stored into.
13053 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13056 * src/muscle_tab.c (muscle_m4_output):
13057 Now inline. Return bool, not int.
13058 * src/state.c (state_compare): Likewise.
13059 * src/symtab.c (symbol_check_defined,
13060 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13061 hash_compare_symbol, hash_symbol):
13063 * src/uniqstr.c (uniqstr_print): Likewise.
13064 * src/muscle_tab.c (muscle_m4_output_processor):
13065 New function, to avoid casts.
13066 * src/state.c (state_comparator, stage_hasher): Likewise.
13067 * src/symtab.c (symbol_check_defined_processor,
13068 symbol_check_alias_consistency_processor, symbol_pack_processor,
13069 symbol_translation_processor, hash_symbol_comparator,
13070 hash_symbol_hasher): Likewise.
13071 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13072 * src/muscle_tab.c (muscles_m4_output):
13073 Use new functions instead of casting old functions unportably.
13074 * src/state.c (state_hash_new): Likewise.
13075 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13076 symbols_token_translations_init):
13078 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13080 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13081 var instead of casting to long, to avoid casts.
13082 (prepare_states): Use MALLOC rather than alloca, so that we don't
13083 have to worry about alloca.
13084 * src/state.c (state_hash_lookup): Likewise.
13086 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13087 local var instead of casting to unsigned char, to avoid casts.
13089 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13090 STATE_ALLOC): Remove.
13091 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13092 rather than calloc, and use offsetof to avoid allocating slightly
13094 (state_new): Initialize all members.
13096 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13098 * src/symtab.c (symbol_free): Remove; unused.
13099 (symbol_get): Remove cast in lhs of assignment.
13100 (symbols_do): Now static. Accept generic arguments, not
13101 hashing-related ones.
13103 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13104 (symbol_processor): Remove.
13105 (symbols_do): Remove decl; now static.
13107 * src/system.h (alloca): Remove; decl no longer needed.
13108 (<stddef.h>): Include, for offsetof.
13109 (<inttypes.>, <stdint.h>): Include if available.
13110 (uintptr_t): New type, if system lacks it.
13111 (CALLOC, MALLOC, REALLOC): New macros.
13112 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13115 * src/tables.c (table_size): Now int, to pacify GCC.
13116 (table_grow, table_ninf_remap): Use signed table size.
13117 (save_row): Don't bother initializing locals when not needed.
13118 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13119 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13121 * src/vcg.h: Correct misspellings.
13123 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13126 * src/getargs.c (getargs): Don't assume EOF == -1.
13128 2002-12-09 Paul Eggert <eggert@twinsun.com>
13130 Change identifier spellings to avoid collisions with names
13131 that are reserved by POSIX.
13133 Don't use names ending in _t, since POSIX reserves them.
13134 For consistency, remove _e and _s endings -- they're weren't
13135 needed to remove ambiguity. All uses changed.
13136 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13137 turn was just renamed from struniq_t.
13138 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13139 which in turn was just renamed from struniq_processor_t.
13140 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13141 in turn was renamed from hash_compare_struniq_t.
13142 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13143 (state_list): Renamed from state_list_t.
13144 * src/assoc.h (assoc): Renamed from assoc_t.
13145 * src/conflicts.c (enum conflict_resolution): Renamed from
13146 enum conflict_resolution_e.
13147 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13148 (rule_list): Renamed from rule_list_t.
13149 * src/getargs.h (enum trace): Renamed from enum trace_e.
13150 (enum report): Renamed from enum report_e.
13151 * src/gram.h (item_number): Renamed from item_number_t.
13152 (rule_number): Renamed from rule_number_t.
13153 (struct rule_s): Remove the "rule_s" part; not used.
13154 (rule): Renamed from rule_t.
13155 (rule_filter): Renamed from rule_filter_t.
13156 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13157 (goto_list): Renamed from goto_list_t.
13158 * src/lalr.h (goto_number): Renamed from goto_number_t.
13159 * src/location.h (location): Renamed from location_t.
13160 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13161 and moved here from:
13162 * src/muscle_tab.h (muscle_entry_t): here.
13163 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13164 (rule_list): Renamed from rule_list_t.
13165 * src/print_graph.c (static_graph): Renamed from graph.
13166 * src/reader.h (braced_code): Renamed from braced_code_t.
13167 Remove brace_code_e tag.
13168 * src/relation.h (relation_node): Renamed from relation_node_t.
13169 (relation_nodes): Renamed from relation_nodes_t.
13170 (relation): Renamed from relation_t.
13171 * src/state.h (state_number): Renamed from state_number_t.
13172 (struct state): Renamed from struct state_s.
13173 (state): Renamed from state_t.
13174 (transitions): Renamed from transitions_t. Unused (and
13175 misspelled) transtion_s tag removed.
13176 (errs): Renamed from errs_t. Unused errs_s tag removed.
13177 (reductions): Renamed from reductions_t. Unused tag
13178 reductions_s removed.
13179 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13180 (struct symbol_list): Renamed from struct symbol_list_s.
13181 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13182 (struct symbol): Renamed from struct symbol_s.
13183 (symbol): Renamed from symbol_t.
13184 * src/tables.c (vector_number): Renamed from vector_number_t.
13185 (action_number): Renamed from action_t.
13186 * src/tables.h (base_number): Renamed from base_t.
13187 * src/vcg.h (enum color): Renamed from enum color_e.
13188 (enum textmode): Renamed from enum textmode_e.
13189 (enum shape): Renamed from enum shape_e.
13190 (struct colorentry): Renamed from struct colorentry_s.
13191 (struct classname): Renamed from struct classname_s.
13192 (struct infoname): Renamed from struct infoname_s.
13193 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13194 (enum decision): Renamed from enum decision_e.
13195 (enum orientation): Renamed from enum orientation_e.
13196 (enum alignment): Renamed from enum alignment_e.
13197 (enum arrow_mode): Renamed from enum arrow_mode_e.
13198 (enum crossing_type): Renamed from enum crossing_type_e.
13199 (enum view): Renamed from enum view_e.
13200 (struct node): Renamed from struct node_s.
13201 (node): Renamed from node_t.
13202 (enum linestyle): Renamed from enum linestyle_e.
13203 (enum arrowstyle): Renamed from enum arrowstyle_e.
13204 (struct edge): Renamed from struct edge.
13205 (edge): Renamed from edge_t.
13206 (struct graph): Renamed from struct graph_s.
13207 (graph): Renamed from graph_t.
13208 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13209 Rename value_t -> value.
13210 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13211 value_t_as_yystype -> value_as_yystype.
13213 Don't include <errno.h> in the mainstream code, since it
13214 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13215 * lib/get-errno.c, lib/get-errno.h: New files.
13216 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13218 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13219 * src/output.c (output_skeleton): Likewise.
13220 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13222 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13224 (handle_action_dollar, handle_action_at): Likewise.
13225 * src/system.h: Do not include <errno.h>.
13226 (TAB_EXT): Renamed from EXT_TAB.
13227 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13229 Avoid str[a-z]*, since <string.h> reserves that name space.
13230 Change all instances of "struniq" in names to "uniqstr", and
13231 likewise for "STRUNIQ" and "UNIQSTR".
13232 * src/uniqstr.c: Renamed from src/struniq.c.
13233 * src/uniqstr.h: Renamed from src/struniq.h.
13234 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13235 * src/files.c (strsuffix): Remove; unused.
13236 (concat2): Renamed from stringappend. Now static.
13237 * src/files.h (strsuffix, stringappend): Remove; unused.
13238 * src/parse-gram.y (<chars>): Renamed from <string>.
13239 (<uniqstr>): Renamed from <struniq>.
13240 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13241 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13242 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13243 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13244 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13245 (N_EXPAND): Renamed from N_STRETCH.
13247 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13248 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13249 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13251 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13252 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13253 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13254 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13255 (BASE_MAXIMUM): Renamed from BASE_MAX.
13256 (BASE_MINIMUM): Renamed from BASE_MIN.
13257 (ACTION_MAX): Remove; unused.
13258 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13259 Unnecessary casts removed from above defines.
13262 Fix misspelling in names.
13263 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13264 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13268 * lib/timevar.c (timevar_report): Renamed from time_report,
13269 for consistency with other names.
13270 * lib/timevar.h (timevar_report): New decl.
13271 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13274 Sort include-file uses.
13276 Reorder all include files under src to be in the order "system.h".
13277 then the ../lib include files in angle brackets (alphabetized),
13278 then the . include files in double-quotes (alphabetized). Fix
13279 dependency breakages encountered in this process, as follows:
13280 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13281 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13282 * src/state.h: Include "symtab.h".
13284 2002-12-08 Paul Eggert <eggert@twinsun.com>
13286 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13287 since this causes problems when __file__ contains character
13288 sequences like "@" that are treated specially by src/scan-skel.l.
13289 Instead, just use the file's basename. This fixes the bug
13290 reported by Martin Mokrejs in
13291 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13293 2002-12-06 Paul Eggert <eggert@twinsun.com>
13295 Add support for rules that do not have trailing semicolons, as
13296 POSIX requires. Improve the quality of locations in Bison
13299 * src/location.c: Include <quotearg.h>.
13300 (empty_location): Now const.
13301 (location_print): New function. Follow the recommendation of the
13302 GNU Coding Standards for locations that span file boundaries.
13303 * src/location.h: Do not include <quotearg.h>; no longer needed.
13304 (boundary): New type.
13305 (location_t): Use it. This allows locations to span file boundaries.
13306 All member uses changed: file -> start.file or end.file (as needed),
13307 first_line -> start.line, first_column -> start.column,
13308 last_line -> end.line, last_column -> end.column.
13309 (equal_boundaries): New function.
13310 (LOCATION_RESET, LOCATION_STEP): Remove.
13311 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13312 (empty_location): Now const.
13313 (location_print): New decl.
13314 * src/parse-gram.y (lloc_default): New function, which handles
13315 empty locations more accurately.
13316 (YYLLOC_DEFAULT): Use it.
13317 (%token COLON): Remove.
13318 (%token ID_COLON): New token.
13320 (declarations, rules): Remove trailing semicolon.
13321 (declaration, rules_or_grammar_declaration):
13322 Allow empty (";") declaration.
13323 (symbol_def): Remove empty actions; no longer needed.
13324 (rules_or_grammar_declaration): Remove trailing semicolon.
13325 (semi_colon.opt): Remove.
13326 * src/reader.h: Include location.h.
13327 (scanner_cursor): New decl.
13328 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13330 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13332 (STEP): Remove. No longer needed, now that adjust_location does
13333 the work. All uses removed.
13334 (scanner_cursor): New var.
13335 (adjust_location): Renamed from extend_location. It now sets
13336 *loc and adjusts the scanner cursor. All uses changed.
13337 Don't bother testing for CR.
13338 (handle_syncline): Remove location arg; now updates scanner cursor.
13339 All callers changed.
13340 (unexpected_end_of_file): Now accepts start boundary of token or
13341 comment, not location. All callers changed. Update scanner cursor,
13343 (SC_AFTER_IDENTIFIER): New state.
13344 (context_state): Renamed from c_context. All uses changed.
13345 (id_loc, code_start, token_start): New local vars.
13346 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13347 processing of Yacc white space and equivalents here.
13348 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13349 instead of returning ID immediately, since we need to search for
13350 a subsequent colon.
13351 (<INITIAL>"'", "\""): Save token_start.
13352 (<INITIAL>"%{", "{", "%%"): Save code_start.
13353 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13354 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13355 BEGIN context_state at end, not INITIAL.
13356 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13357 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13358 Return correct token start.
13359 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13360 the start of a character, string or multiline comment is found.
13361 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13362 Reduction): Adjust reported locations to match the more-precise
13363 results now expected.
13364 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13365 * tests/reduce.at (Useless Rules, Reduced Automaton,
13366 Underivable Rules): Likewise.
13367 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13368 or "|"' now that so many other tokens are allowed by the new grammar.
13370 * src/complain.h (current_file): Remove duplicate decl;
13371 current_file is now owned by files.h.
13372 * src/complain.c, src/scan-gram.l: Include files.h.
13374 2002-12-06 Paul Eggert <eggert@twinsun.com>
13376 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13377 promotes to int; it might be unsigned int.
13378 * data/yacc.c (yy_reduce_print): Likewise.
13380 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13381 be #defined in the prologue, not in the Bison declarations.
13382 This fixes Debian Bug 102878, reported by Shaul Karl.
13384 2002-12-02 Paul Eggert <eggert@twinsun.com>
13386 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13387 * lib/strtoul.c: New file, from gnulib.
13388 This fixes a porting bug reported by Peter Klein in
13389 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13391 2002-11-30 Paul Eggert <eggert@twinsun.com>
13393 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13394 and put only a forward declaration in the prologue. This is for
13395 consistency with the other scanner helper functions.
13397 Type clashes now generate warnings, not errors, since it
13398 appears that POSIX may allow some grammars with type clashes.
13399 * src/reader.c (grammar_current_rule_check): Warn about
13400 type clashes instead of complaining.
13401 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13403 Add Yacc library, since POSIX requires it.
13404 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13405 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13406 * lib/main.c, lib/yyerror.c: New files.
13408 gram_error can be static; it need not be extern.
13409 * src/reader.h (gram_error): Remove decl.
13410 * src/parse-gram.y (gram_error): Now static. Add static decl.
13411 (print_token_value): Omit parameter names from forward decl,
13414 2002-11-29 Paul Eggert <eggert@twinsun.com>
13416 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13417 be declared before being used. E.g., one should typically
13418 declare them in the prologue. Use GNU coding style in examples.
13419 Put "const" consistently after the type it modifies. Mention
13420 that C99 supports "inline". Mention that yyerror traditionally
13423 %parse-param and %lex-param now take just one argument, the
13424 declaration; the argument name is deduced from the declaration.
13426 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13427 Reporting, Table of Symbols): Document this.
13428 * src/parse-gram.y (add_param): New function.
13430 (declaration): Implement new rule for %parse-param and %lex-param.
13431 * src/scan-gram.l: "," now elicits a warning, rather than being
13432 a token; this is more compatible with byacc.
13433 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13435 2002-11-27 Paul Eggert <eggert@twinsun.com>
13437 Rename identifiers to avoid real and potential collisions.
13439 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13440 to avoid collision with lex macro described by Bruce Lilly in
13441 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13442 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13443 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13444 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13446 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13447 The name "yycontrol" violates the name space rules, and this stuff
13448 wasn't being used anyway.
13449 (input): Remove action; this stuff wasn't being used.
13450 (gram_error): Rename local variable yylloc -> loc.
13451 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13452 (YY_DECL): Don't use "yy" at start of local variables.
13453 All uses changed, e.g., yylloc -> loc.
13454 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13455 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13456 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13457 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13459 * src/parse-gram.y (gram_error): loc is now const *.
13460 * src/reader.h (gram_error): Likewise.
13462 2002-11-24 Paul Eggert <eggert@twinsun.com>
13466 * tests/actions.at (Actions after errors): Use an output format
13467 more similar to that of the Printers and Destructors test.
13468 Test the position of the ';' token too.
13469 (Printers and Destructors): Likewise.
13470 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13471 unnecessarily alarming people when the test fails.
13473 * data/yacc.c (yyerrlab1): Move this label down, so that the
13474 parser does not discard the lookahead token if the user code
13475 invokes YYERROR. This change is required for POSIX conformance.
13477 * lib/error.c: Sync with gnulib.
13479 2002-11-22 Paul Eggert <eggert@twinsun.com>
13481 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13482 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13483 * lib/xmalloc.c: Likewise.
13485 2002-11-20 Paul Eggert <eggert@twinsun.com>
13487 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13489 2002-11-20 Paul Eggert <eggert@twinsun.com>
13491 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13492 should use `if (! x) abort ();' rather than `assert (x);', and
13493 anyway it's one less thing to worry about configuring.
13495 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13497 and replace all instances of assert with abort.
13498 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13499 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13501 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13502 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13503 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13504 hash_find_entry, hash_rehash, hash_insert): Likewise.
13505 * src/conflicts.c (resolve_sr_conflict): Likewise.
13506 * src/lalr.c (set_goto_map, map_goto): Likewise.
13507 * src/nullable.c (nullable_compute): Likewise.
13508 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13509 * src/reader.c (packgram, reader): Likewise.
13510 * src/state.c (state_new, state_free, state_transitions_set,
13511 state_reduction_find): Likewise.
13512 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13513 symbol_pack): Likewise.
13514 * src/tables.c (conflict_row, pack_vector): Likewise.
13515 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13516 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13517 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13518 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13520 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13521 (ARGMATCH_CONSTRAINT): New macro.
13522 (ARGMATCH_ASSERT): Use it.
13524 * src/system.h (verify): New macro.
13525 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13526 rather than assert.
13527 * src/tables.c (tables_generate): Likewise.
13529 * src/struniq.c (struniq_assert): Now returns void, and aborts
13530 if the assertion is false.
13531 (struniq_assert_p): Remove.
13532 * src/struniq.h: Likewise.
13534 2002-11-18 Paul Eggert <eggert@twinsun.com>
13536 * data/glr.c (yygetLRActions): Replace `yyindex' with
13537 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13538 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13539 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13541 2002-11-18 Akim Demaille <akim@epita.fr>
13543 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13545 From Tim Van Holder.
13547 2002-11-17 Paul Eggert <eggert@twinsun.com>
13549 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13550 to "SyntaxError" for consistency with my 2002-11-15 change.
13552 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13553 not define to {}, since this breaks the common use of `YYDPRINTF
13554 ((...));' if a single statement is desired (e.g. before `else').
13555 Work around GCC warnings by surrounding corresponding calls with
13557 (yyhasResolvedValue): Remove unused function.
13558 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13560 (yyreportSyntaxError): Renamed from yyreportParseError.
13561 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13563 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13564 extern when possible. Remove unused initializations.
13566 2002-11-16 Akim Demaille <akim@epita.fr>
13568 Augment the similarity between GLR and LALR traces.
13570 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13571 (YY_REDUCE_PRINT): New.
13572 (yyparse): Use them.
13573 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13575 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13576 state reached after the reduction/recovery, since...
13577 (yyparse, yyprocessOneStack): Report the state we are entering in.
13579 2002-11-16 Akim Demaille <akim@epita.fr>
13581 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13582 Add support for --trace=skeleton.
13583 * src/scan-skel.l: %option debug.
13584 Scan strings of non-@ or \n instead of character by character.
13585 (scan_skel): Handle trace_skeleton.
13587 (@output_parser_name@, @output_header_name@): ``Restore'' their
13588 support (used to be M4 macros).
13589 * data/yacc.c: Quote larger chunks, a la glr.c.
13590 * data/lalr1.cc: Likewise.
13591 The header guards are no longer available, so use some other
13592 string than `YYLSP_NEEDED'.
13594 2002-11-16 Akim Demaille <akim@epita.fr>
13596 Make the ``Printers and Destructors'' test more verbose, taking
13597 `yacc.c''s behavior as (possibly wrong) reference.
13599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13600 instead of fprint on stdout.
13601 Set and report the last_line of the symbols.
13602 Consistently display values and locations.
13604 2002-11-16 Paul Eggert <eggert@twinsun.com>
13606 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13608 2002-11-15 Paul Eggert <eggert@twinsun.com>
13610 * tests/actions.at (Actions after errors): New test case.
13612 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13613 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13614 tests/action.at, tests/calc.at, tests/conflicts.at,
13615 tests/cxx-type.at, tests/regression.at:
13616 "parse error" -> "syntax error" for POSIX compatibility.
13617 "parsing stack overflow..." -> "parser stack overflow" so
13618 that code matches Bison documentation.
13620 2002-11-15 Akim Demaille <akim@epita.fr>
13622 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13623 take two BRACED_CODE, not two string_content.
13624 Free the scanner's obstack when we are done.
13625 (code_content): New.
13626 * tests/calc.at: Adjust.
13627 * doc/bison.texinfo: Adjust.
13628 Also, make sure to include the `,' for these declarations.
13630 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13632 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13633 definition; avoids potential autoreconf problems.
13635 2002-11-15 Akim Demaille <akim@epita.fr>
13637 Always check the value returned by yyparse.
13639 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13640 returned by yyparse.
13641 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13643 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13644 returned by yyparse.
13646 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13648 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13651 2002-11-14 Paul Eggert <eggert@twinsun.com>
13653 * src/output.c (output_skeleton): Call xfopen instead of
13654 duplicating xfopen's body.
13656 Fix bugs reported by Nelson H. F. Beebe in
13657 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13659 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13660 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13661 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13662 file twice in the grammar, as an extra check.
13664 * tests/input.at (Torturing the Scanner): Surround the
13665 backslash-newline tests with "#if 0", to make it less likely that
13666 we'll run into compiler bugs. Bring back solitary \ inside
13667 comment, but add a closing comment to work around HP C bug. Don't
13668 test backslash-newline in C character constant.
13670 2002-11-14 Akim Demaille <akim@epita.fr>
13672 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13673 status of the compiler.
13674 Calling `exit 1' is no longer needed.
13675 Reported by Nelson H. F. Beebe.
13677 2002-11-14 Akim Demaille <akim@epita.fr>
13679 * tests/atlocal.in (CPPFLAGS): We have config.h.
13680 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13682 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13683 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13684 * tests/regression.at, tests/torture.at: Use them for all the
13685 grammars that are to be compiled.
13686 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13687 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13688 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13690 2002-11-14 Akim Demaille <akim@epita.fr>
13692 * doc/bison.texinfo: Various formatting changes (alignments in
13693 samples, additional @group/@end group, GCS in samples.
13694 Use @deffn instead of simple @table to define the directives,
13695 macros, variables etc.
13697 2002-11-13 Paul Eggert <eggert@twinsun.com>
13699 Fix some bugs reported by Albert Chin-A-Young in
13700 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13702 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13703 -o c"; the HP C compiler chatters during compilation.
13704 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13705 * tests/headers.at (export YYLTYPE): Likewise.
13707 * tests/input.at (Torturing the Scanner): Remove lines containing
13708 solitary backslashes, as they tickle a bug in the HP C compiler.
13710 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13711 comments, since they're not portable. Use GNU coding style.
13713 2002-11-13 Akim Demaille <akim@epita.fr>
13715 * data/yacc.c: Leave bigger chunks of quoted text.
13716 (YYDSYMPRINTF): New.
13717 Use it to report symbol activities.
13718 * data/glr.c (YYDSYMPRINTF): New.
13721 2002-11-12 Paul Eggert <eggert@twinsun.com>
13725 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13726 (yyglrReduce): Return yyok, not 0.
13727 This should avoid the enumerated-type warnings reported
13728 by Nelson H. F. Beebe in
13729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13731 * lib/bbitset.h (BITSET_INLINE): Remove.
13732 * lib/bitset.h [! BITSET_INLINE]: Remove.
13733 (bitset_set, bitset_reset, bitset_test): Rename local vars
13734 to avoid shadowing warnings by GCC.
13736 * data/glr.c (inline): Remove #define. It's the user's
13737 responsibility to #define it away, just like 'const'.
13738 This fixes one of the bugs reported by Nelson H. F. Beebe in
13739 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13741 * Makefile.maint (po-check): Scan .l and .y files instead of the
13742 .c and the .h files that they generate. This fixes the bug
13743 reported by Tim Van Holder in:
13744 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13745 Look for N_ as well as for _. Try to avoid matching #define for
13747 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13748 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13749 * src/scan-gram.l: Revamp regular expressions so that " and '
13750 do not confuse xgettext.
13752 * src/struniq.h (struniq_new): Do not declare the return type
13753 to be 'const'; this violates the C standard.
13754 * src/struniq.c (struniq_new): Likewise.
13756 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13758 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13759 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13762 2002-11-12 Akim Demaille <akim@epita.fr>
13764 * Makefile.maint: Sync with Autoconf:
13765 (local_updates): New.
13767 2002-11-12 Akim Demaille <akim@epita.fr>
13769 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13771 2002-11-12 Akim Demaille <akim@epita.fr>
13773 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13776 2002-11-12 Akim Demaille <akim@epita.fr>
13778 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13781 2002-11-12 Akim Demaille <akim@epita.fr>
13783 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13784 Use it to test the GLR parser.
13786 2002-11-12 Akim Demaille <akim@epita.fr>
13788 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13790 * data/glr.c (yystos): New.
13791 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13792 (YYDSYMPRINT): New.
13793 (yyval): Don't define it, it is handled via M4.
13794 (yyrecoverParseError): Free verbosely the discarded symbols.
13795 * data/yacc.c (yysymprint): Remove, rather...
13796 (b4_yysymprint_generate): invoke.
13797 * data/c.m4 (b4_yysymprint_generate): New.
13798 Accept pointers as arguments, as opposed to the version from
13800 (b4_yydestruct_generate): Likewise.
13801 * tests/cations.at (Printers and Destructors): Use Bison directives
13802 instead of CPP macros.
13803 Don't rely on internal details.
13805 2002-11-12 Akim Demaille <akim@epita.fr>
13807 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13808 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13809 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13810 it against YYEMPTY and so forth), work on yytoken (i.e., set
13811 it to YYEMPTY etc.).
13812 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13813 (b4_symbol_actions): Remove.
13814 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13815 for 0, end-of-input.
13817 2002-11-12 Akim Demaille <akim@epita.fr>
13819 * doc/bison.texinfo (Destructor Decl): New.
13821 2002-11-12 Akim Demaille <akim@epita.fr>
13823 * src/tables.c (tables_generate): Use free for pointers that
13824 cannot be NULL, not XFREE.
13825 (pack_vector): Use assert, not fatal, for bound violations.
13826 * src/state.c (state_new): Likewise.
13827 * src/reader.c (reader): Likewise.
13828 * src/lalr.c (set_goto_map): Likewise.
13829 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13832 2002-11-12 Akim Demaille <akim@epita.fr>
13834 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13836 * src/scan-gram.l (last_string): Is global to the file, not to
13838 * src/parse-gram.y (input): Don't append the epilogue here,
13839 (epilogue.opt): do it here, and free the scanner's obstack.
13840 * src/reader.c (epilogue_set): Rename as...
13841 (epilogue_augment): this.
13842 * data/c.m4 (b4_epilogue): Defaults to empty.
13844 2002-11-12 Akim Demaille <akim@epita.fr>
13846 * src/getargs.c (long_options): Remove duplicates.
13847 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13849 * doc/bison.rnh: Remove.
13850 * doc/bison.texinfo (VMS Invocation): Remove.
13852 2002-11-12 Akim Demaille <akim@epita.fr>
13854 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13855 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13857 Use struniq for symbols.
13859 * src/symtab.h (symbol_t): The tag member is a struniq.
13860 (symbol_type_set): Adjust.
13861 * src/symtab.c (symbol_new): Takes a struniq.
13862 (symbol_free): Don't free the tag member.
13863 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13864 (hash_compare_symbol, hash_symbol): these.
13865 Use the fact that tags as struniqs.
13866 (symbol_get): Use struniq_new.
13867 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13869 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13870 and type members are struniqs.
13871 * src/reader.c (get_merge_function)
13872 (grammar_current_rule_merge_set): Adjust.
13873 (TYPE, current_type): Are struniq.
13875 Use struniq for file names.
13877 * src/files.h, src/files.c (infile): Split into...
13878 (grammar_file, current_file): these.
13879 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13880 * src/reduce.c (reduce_print): Likewise.
13881 * src/getargs.c (getargs): Likewise.
13882 * src/complain.h, src/complain.c: Likewise.
13883 * src/main.c (main): Call struniqs_new early enough to use it for
13885 Don't free the input file name.
13887 2002-11-12 Akim Demaille <akim@epita.fr>
13889 * src/symtab.c (symbol_free): Remove dead deactivated code:
13890 type_name are properly removed.
13891 Don't use XFREE to free items that cannot be NULL.
13892 * src/struniq.h, src/struniq.c: New.
13893 * src/main.c (main): Initialize/free struniqs.
13894 * src/parse-gram.y (%union): Add astruniq member.
13896 * src/scan-gram.l (<{tag}>): Return a struniq.
13897 Free the obstack bit that used to store it.
13898 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13900 2002-11-11 Paul Eggert <eggert@twinsun.com>
13902 Revamp to fix many (but not all) of the C- and M4-related quoting
13903 problems. Among other things, this fixes the Bison bug reported
13904 by Jan Hubicka when processing the Bash grammar; see:
13905 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13907 Use new @ escapes consistently. Represent brackets with @{ and @}
13908 rather than @<:@ and @:>@, since this works a bit better with dumb
13909 editors like vi. Represent @ with @@, since @ is now consistently
13910 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13911 __ofile__, to avoid unexpected expansions. Similarly, use @output
13912 rather than #output.
13914 * data/c.m4 (b4_copyright): Omit file name from comment, since
13915 the file name could contain "*/".
13916 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13917 be quoted. All uses changed.
13919 * data/glr.c: Use new @ escapes consistently.
13920 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13921 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13922 Remove, since they couldn't handle arbitrary characters in file
13924 * data/lalr1.cc: Likewise.
13925 * data/yacc.c: Likewise.
13927 * src/files.c (output_infix): Remove; all uses removed.
13928 * src/files.h: Likewise.
13930 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13931 mishandled funny characters in file names, and anyway it isn't
13933 * data/yacc.c: Likewise.
13934 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13936 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13937 * data/yacc.c: Likewise.
13939 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13941 (muscle_init): Quote filename as a C string.
13942 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13943 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13944 * src/output.c (escaped_file_name_output): New function.
13945 (prepare_symbols): Quote tokens for M4.
13946 (prepare): Don't insert output_infix, output_prefix,
13947 output_parser_name, output_header_name; this is now down by scan-skel.
13948 Insert skeleton as a C string.
13950 * src/output.c (user_actions_output, symbol_destructors_output,
13951 symbol_printers_output): Quote filenames for C and M4.
13952 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13954 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13955 escapes other than \\ and \'; this simplifies the code.
13956 (<SC_STRING>): Likewise, for \\ and \".
13957 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13958 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13959 Use new escapes @{ and @} for [ and ].
13961 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13962 them with auto vars.
13963 Switch to new escape scheme, where @ is the escape character uniformly.
13964 Abort if a stray escape character is found. Avoid unbounded input
13965 buffer when parsing non-escaped text.
13967 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13968 __oline__, #output, $@, and @{ do not have unintended meanings.
13970 2002-11-09 Paul Eggert <eggert@twinsun.com>
13972 Fix the test failure due to GCC warnings described in
13973 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13974 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13975 evaluate to 0 if it's impossible for NINF to be in the respective
13977 (yygetLRActions, yyrecoverParseError): Use them.
13979 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13980 counted in the token inserted at end of file. Now takes
13981 location_t *, not location_t, so that the location can be
13982 adjusted. All uses changed.
13984 * tests/regression.at (Invalid inputs): Adjust wording in
13985 diagnostic to match the new behavior.
13987 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13988 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13989 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13990 abort ();'. This reduces the runtime of the "Many lookaheads"
13991 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13994 2002-11-07 Paul Eggert <eggert@twinsun.com>
13996 * src/parse-gram.y (CHARACTER): Remove unused token.
13999 * src/scan-gram.l: Remove stack option. We no longer use the
14000 stack, since the stack was never deeper than 1; instead, use the
14001 new auto var c_context to record the stacked value.
14003 Remove nounput option. At an unexpected end of file, we now unput
14004 the minimal input necessary to end cleanly; this simplifies the
14007 Avoid unbounded token sizes where this is easy.
14009 (unexpected_end_of_file): New function.
14010 Use it to systematize the error message on unexpected EOF.
14011 (last-string): Now auto, not static.
14012 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14013 (scanner_last_string_free): Remove; not used.
14014 (percent_percent_count): Move decl to just before use.
14015 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14016 not the (never otherwised-used) CHARACTER.
14018 2002-11-07 Akim Demaille <akim@epita.fr>
14020 Let yyerror always receive the msg as last argument, so that
14021 yyerror can be variadic.
14023 * data/yacc.c (b4_yyerror_args): New.
14024 Use it when calling yyerror.
14025 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14026 Use it when calling yyerror.
14027 * doc/bison.texinfo (Error Reporting): Adjust.
14028 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14029 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14031 2002-11-06 Akim Demaille <akim@epita.fr>
14033 #line should have quoted strings.
14034 Ideally, this should be done by m4_quotearg.
14036 * src/scan-skel.l: Include quotearg.h.
14038 * src/output.c (symbol_printers_output)
14039 (symbol_destructors_output): Quote the file name.
14041 2002-11-06 Akim Demaille <akim@epita.fr>
14043 * tests/regression.at (Invalid inputs): Adjust to the recent
14046 2002-11-06 Akim Demaille <akim@epita.fr>
14048 Restore --no-lines.
14049 Reported by Jim Kent.
14051 * data/c.m4 (b4_syncline): New.
14052 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14053 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14054 * src/output.c (user_actions_output): Likewise.
14055 (prepare): Define 'b4_synclines_flag'.
14056 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14058 2002-11-06 Akim Demaille <akim@epita.fr>
14060 * src/main.c (main): Free `infile'.
14061 * src/scan-gram.l (handle_syncline): New.
14063 * src/output.c (user_actions_output, symbol_destructors_output)
14064 (symbol_printers_output): Use the location's file name, not
14066 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14068 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14070 * src/tables.c (matching_state): Don't allow states to match if
14071 either has GLR conflict entries.
14073 2002-11-05 Paul Eggert <eggert@twinsun.com>
14075 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14076 "integer out of range" rather than "invalid value".
14077 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14080 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14081 Also, remove one static variable in the scanner.
14083 * src/scan-gram.l (braces_level): Now auto, not static.
14084 Initialize to zero if the compiler is being picky.
14085 (INITIAL): Clear braces_level instead of incrementing it.
14086 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14087 as POSIX 1003.1-2001 requires.
14088 * src/system.h (IF_LINT): New macro, taken from coreutils.
14089 * configure.ac: Define "lint" if --enable-gcc-warnings.
14091 2002-11-05 Akim Demaille <akim@epita.fr>
14093 * src/scan-gram.l: When it starts with `%', complain about the
14094 whole directive, not just that `invalid character: %'.
14096 2002-11-04 Akim Demaille <akim@epita.fr>
14098 * Makefile.maint: Update from Autoconf.
14099 (update, cvs-update, po-update, do-po-update): New.
14101 2002-11-04 Akim Demaille <akim@epita.fr>
14103 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14105 Have yyerror `use' its arguments.
14106 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14107 returns true when location & yacc & pure & parse-param.
14108 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14110 2002-11-04 Akim Demaille <akim@epita.fr>
14112 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14114 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14117 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14120 2002-11-03 Paul Eggert <eggert@twinsun.com>
14122 * src/reader.c (get_merge_function, grammar_current_rule_check):
14123 Use consistent diagnostics for reporting type name clashes.
14124 Quote the types with <>, for consistency with Yacc.
14125 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14127 2002-11-03 Akim Demaille <akim@epita.fr>
14129 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14131 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14132 (b4_parse_param): Remove.
14133 Use b4_identification.
14134 Propagate b4_pure_args where needed to pass them to yyerror.
14135 * data/glr.m4 (b4_parse_param): Remove.
14136 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14137 (b4_lpure_formals): New.
14138 Use b4_identification.
14139 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14140 b4_user_formals and b4_user_args.
14141 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14142 (yyreportAmbiguity): When using a pure parser, also need
14143 the location, and the parse-params.
14145 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14146 When using a pure parser, also need the parse-params.
14148 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14149 (%pure-parser + %parse-param) LALR and GLR parsers.
14150 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14151 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14152 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14153 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14154 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14155 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14156 * doc/bison.texinfo: Untabify the whole file.
14157 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14158 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14159 (Error Reporting): Adjust to these new directives.
14160 Document %error-verbose, deprecate YYERROR_VERBOSE.
14162 2002-11-03 Akim Demaille <akim@epita.fr>
14164 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14165 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14166 command line options.
14167 * tests/cxx-type.at: Formatting changes.
14169 2002-11-03 Paul Eggert <eggert@twinsun.com>
14171 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14172 to count columns correctly, and to check for invalid inputs.
14174 Use mbsnwidth to count columns correctly. Account for tabs, too.
14175 Include mbswidth.h.
14176 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14177 (extend_location): New function.
14178 (YY_LINES): Remove.
14180 Handle CRLF in C code rather than in Lex code.
14181 (YY_INPUT): New macro.
14182 (no_cr_read): New function.
14184 Scan UCNs, even though we don't fully handle them yet.
14185 (convert_ucn_to_byte): New function.
14187 Handle backslash-newline correctly in C code.
14188 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14189 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14191 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14192 Use {splice} wherever C allows backslash-newline.
14193 YY_STEP after space, newline, vertical-tab.
14194 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14196 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14198 ({int}, handle_action_dollar, handle_action_at): Check for integer
14201 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14203 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14204 as well as \000. Check for UCHAR_MAX, not 255.
14205 Allow \x with an arbitrary positive number of digits, as in C.
14206 Check for overflow here.
14207 Allow \? and UCNs, for compatibility with C.
14209 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14210 with quote slot used by complain_at.
14212 * tests/input.at: Add tests for backslash-newline, m4 quotes
14213 in symbols, long literals, and funny escapes in strings.
14215 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14216 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14217 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14218 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14219 * m4/mbswidth.m4: New file, from GNU coreutils.
14221 * doc/bison.texinfo (Grammar Outline): Document // comments.
14222 (Symbols): Document that trigraphs have no special meaning in Bison,
14223 nor is backslash-newline allowed.
14224 (Actions): Document that trigraphs have no special meaning.
14226 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14229 2002-11-02 Paul Eggert <eggert@twinsun.com>
14231 * src/reader.c: Don't include quote.h; not needed.
14232 (get_merge_function): Reword warning to be consistent with
14233 type clash diagnostic in grammar_current_rule_check.
14235 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14236 bug in trigraph handling.
14238 * src/output.c (prepare_symbols): When printing token names,
14239 escape "[" as "@<:@" and likewise for "]".
14241 * src/system.h (errno): Remove declaration, as we are now
14242 assuming C89 or better, and C89 guarantees errno.
14244 2002-10-30 Paul Eggert <eggert@twinsun.com>
14246 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14247 Check for close failures.
14248 * src/files.h (xfclose): Return void, not int, since it always
14250 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14252 * src/output.c (output_skeleton): Use xfclose rather than fclose
14253 and ferror. xfclose now checks ferror.
14255 * data/glr.c (YYLEFTMOST_STATE): Remove.
14256 (yyreportTree): Use a stack-based leftmost state. This avoids
14257 our continuing battles with bogus warnings about initializers.
14259 2002-10-30 Akim Demaille <akim@epita.fr>
14261 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14264 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14266 * tests/glr-regr1.at: New test for reported regressions.
14267 * tests/testsuite.at: Add glr-regr1.at test.
14268 * tests/Makefile.am: Add glr-regr1.at test.
14270 2002-10-24 Paul Eggert <eggert@twinsun.com>
14274 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14275 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14276 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14277 Don't assume strdup exists; POSIX says its an XSI extension.
14278 Check for buffer overflow on input.
14280 2002-10-24 Akim Demaille <akim@epita.fr>
14282 * src/output.c (output_skeleton): Don't disable M4sugar comments
14283 too soon: it results in comments being expanded.
14284 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14287 2002-10-24 Akim Demaille <akim@epita.fr>
14289 * data/yacc.c (m4_int_type): New.
14290 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14291 char' as only yacc.c wants K&R portability.
14292 * data/glr.c (yysigned_char): Remove.
14293 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14294 Reported by Quoc Peyrot.
14296 2002-10-23 Paul Eggert <eggert@twinsun.com>
14298 * src/main.c (main): With --trace=time, report times even if a
14299 non-fatal error occurs. Formerly, the times were reported in some
14300 such cases but not in others.
14301 * src/reader.c (reader): Just return if a complaint has been issued,
14302 instead of exiting, so that 'main' can report times.
14304 2002-10-22 Akim Demaille <akim@epita.fr>
14306 * src/system.h: Include sys/types.
14307 Reported by Bert Deknuydt.
14309 2002-10-23 Paul Eggert <eggert@twinsun.com>
14311 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14312 Suggested by Art Haas.
14314 2002-10-22 Paul Eggert <eggert@twinsun.com>
14316 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14317 decl; not needed any more.
14318 * src/main.c (main): Use return to exit, undoing yesterday's change.
14319 The last OS that we could find where this wouldn't work is
14320 SunOS 3.5, and that's too old to worry about now.
14322 * data/glr.c (struct yyltype): Define members even when not
14323 doing locations. This is more consistent with yacc.c, and it
14324 works around the following bug reports:
14325 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14326 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14328 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14329 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14330 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14332 2002-10-22 Akim Demaille <akim@epita.fr>
14334 * data/README: New.
14336 2002-10-21 Paul Eggert <eggert@twinsun.com>
14338 Be consistent about 'bool'; the old code used an enum in one
14339 module and an int in another, and this violates the C standard.
14340 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14341 * configure.ac (AC_HEADER_STDBOOL): Add.
14342 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14343 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14344 * src/symtab.c (hash_compare_symbol_t): Likewise.
14345 * src/system.h (bool, false, true): Use a definition consistent
14346 with ../lib/hash.c. All uses changed.
14348 * src/complain.c (warning_issued): Renamed from warn_message_count,
14349 so that we needn't worry about integer overflow (!).
14350 Now of type bool. All uses changed.
14351 (complaint_issued): Renamed from complain_message_count; likewise.
14353 * src/main.c (main): Use exit to exit with failure.
14355 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14356 rather than 1 and 0.
14357 * src/main.c (main): Likewise.
14358 * src/getargs.c (getargs): Likewise.
14359 * src/reader.c (reader): Likewise.
14361 * src/getarg.c (getargs): Remove duplicate code for
14362 "Try `bison --help'".
14364 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14365 What was that "2" for?
14367 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14368 * src/getargs.c (usage): Likewise.
14370 * src/getargs.c (getargs): When there are too few operands, report
14371 the last one. When there are too many, report the first extra
14372 one. This is how diffutils does it.
14374 2002-10-20 Paul Eggert <eggert@twinsun.com>
14376 Remove K&R vestiges.
14377 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14378 * src/complain.c (VA_START): Remove. Assume prototypes.
14379 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14380 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14381 fatal): Assume prototypes.
14382 * src/complain.h: Assume prototypes.
14383 * src/system.h (PARAMS): Remove.
14384 Include <limits.h> unconditionally, since it's guaranteeed even
14385 for a freestanding C89 compiler.
14386 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14387 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14389 2002-10-20 Akim Demaille <akim@epita.fr>
14391 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14392 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14393 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14394 (yyresolveStates, yyresolveAction, yyresolveStack)
14395 (yyprocessOneStack): Use them.
14396 (yy_reduce_print): New.
14397 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14399 2002-10-20 Akim Demaille <akim@epita.fr>
14401 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14402 arguments and output `void'.
14403 (b4_c_function): Rename as...
14404 (b4_c_function_def): this.
14405 (b4_c_function_decl, b4_c_ansi_function_def)
14406 (b4_c_ansi_function_decl): New.
14407 Change the interpretation of the arguments: before `int, foo', now
14409 * data/yacc.c (yyparse): Prototype and define thanks to these.
14410 Adjust b4_c_function_def uses.
14411 * data/glr.c (yyparse): Likewise, but ANSI only.
14413 2002-10-20 Akim Demaille <akim@epita.fr>
14415 * src/output.c (prepare): Move the definition of `tokens_number',
14416 `nterms_number', `undef_token_number', `user_token_number_max'
14418 (prepare_tokens): Here.
14419 (prepare_tokens): Rename as...
14420 (prepare_symbols): this.
14421 (prepare): Move the definition of `rules_number' to...
14422 (prepare_rules): here.
14423 (prepare): Move the definition of `last', `final_state_number',
14424 `states_number' to...
14425 (prepare_states): here.
14426 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14428 2002-10-20 Akim Demaille <akim@epita.fr>
14430 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14432 2002-10-20 Akim Demaille <akim@epita.fr>
14434 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14437 2002-10-20 Akim Demaille <akim@epita.fr>
14439 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14440 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14442 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14444 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14445 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14448 2002-10-19 Paul Eggert <eggert@twinsun.com>
14450 Do not create a temporary file, as that involves security and
14451 cleanup headaches. Instead, use a pair of pipes.
14452 Derived from a suggestion by Florian Krohm.
14453 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14454 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14455 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14456 (BISON_PREREQ_SUBPIPE): Add.
14457 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14458 Add subpipe.h, subpipe.c.
14459 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14460 * po/POTFILES.in: Add lib/subpipe.c.
14461 * src/output.c: Include "subpipe.h".
14462 (m4_invoke): Remove decl.
14463 (scan_skel): New decl.
14464 (output_skeleton): Use pipe rather than temporary file for m4 input.
14465 Check that m4sugar.m4 is readable, to avoid deadlock.
14466 Check for pipe I/O error.
14467 * src/scan-skel.l (readpipe): Remove decl.
14468 (scan_skel): New function, to be used in place of m4_invoke.
14469 Read from stream rather than file.
14471 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14472 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14473 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14474 this generates a more-accurate value anyway.
14476 * lib/timevar.c (timervar_accumulate): Rename locals to
14477 avoid confusion with similarly-named more-global.
14478 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14480 * src/output.c (prepare): Use xstrdup to convert char const *
14481 to char *, to avoid GCC warning.
14483 2002-10-19 Akim Demaille <akim@epita.fr>
14485 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14486 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14487 Use them to have `calc.y' ready for %pure-parser.
14488 * data/yacc.c (YYLEX): Pass a yylex return type to
14489 b4_c_function_call.
14491 2002-10-19 Akim Demaille <akim@epita.fr>
14493 Prototype support of %lex-param and %parse-param.
14495 * src/parse-gram.y: Add the definition of the %lex-param and
14496 %parse-param tokens, plus their rules.
14497 Drop the `_' version of %glr-parser.
14499 * src/scan-gram.l (INITIAL): Scan them.
14500 * src/muscle_tab.c: Comment changes.
14501 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14502 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14503 (muscle_entry_s): The `value' member is no longer const.
14504 Adjust all dependencies.
14505 * src/muscle_tab.c (muscle_init): Adjust: use
14506 MUSCLE_INSERT_STRING.
14507 Initialize the obstack earlier.
14508 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14509 (muscle_pair_list_grow): New.
14510 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14511 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14512 * tests/calc.at: Use %locations, not --locations.
14513 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14515 2002-10-19 Akim Demaille <akim@epita.fr>
14517 * src/getargs.c (usage): Take status as argument and exit
14519 Report the traditional `Try ... --help' message when status != 0.
14520 (usage, version): Don't take a FILE * as arg, it is pointless.
14521 (getargs): When there is an incorrect number of arguments, make it
14522 an error, and report it GNUlically thanks to `usage ()'.
14524 2002-10-18 Paul Eggert <eggert@twinsun.com>
14526 * data/glr.c (yyreportParseError): Don't assume that sprintf
14527 yields the length of the printed string, as this is not true
14528 on SunOS 4.1.4. Reported by Peter Klein.
14530 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14531 * tests/conflicts.at (%nonassoc and eof): Likewise.
14532 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14534 2002-10-17 Akim Demaille <akim@epita.fr>
14536 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14537 * src/getargs.c (trace_types, trace_args): Adjust.
14538 * src/reader.c (grammar_current_rule_prec_set)
14539 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14540 Standardize error messages.
14541 And s/@prec/%prec/!
14542 (reader): Use trace_flag to enable scanner/parser debugging,
14543 instead of an adhoc scheme.
14544 * src/scan-gram.l: Remove trailing debugging code.
14546 2002-10-16 Paul Eggert <eggert@twinsun.com>
14548 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14551 * NEWS: Officially drop support for building Bison with K&R C,
14552 since it didn't work anyway and it's not worth worrying about.
14553 * Makefile.maint (wget_files): Remove ansi2knr.c.
14554 (ansi2knr.c-url_prefix): Remove.
14555 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14556 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14557 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14559 2002-10-15 Paul Eggert <eggert@twinsun.com>
14561 Stop using the "enum_" trick for K&R-style function definitions;
14562 it confused me, and I was the author! Instead, assume that people
14563 who want to use K&R C compilers (when using these modules in GCC,
14564 perhaps?) will run ansi2knr.
14566 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14567 All uses of "enum_" changed to "enum ".
14568 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14569 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14571 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14572 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14573 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14574 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14575 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14576 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14577 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14578 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14579 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14580 Use function prototypes; this removes the need for declaring
14581 static functions simply to provide their prototypes.
14582 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14583 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14584 bitset_count_, bitset_create, bitset_dump, bitset_first,
14585 bitset_free, bitset_init, bitset_last, bitset_next,
14586 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14587 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14588 bitset_print, bitset_release_memory, bitset_toggle_,
14589 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14590 debug_bitset): Likewise.
14591 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14592 * lib/bitset_stats.c (bitset_log_histogram_print,
14593 bitset_percent_histogram_print, bitset_stats_and,
14594 bitset_stats_and_cmp, bitset_stats_and_or,
14595 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14596 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14597 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14598 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14599 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14600 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14601 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14602 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14603 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14604 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14605 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14606 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14607 bitset_stats_zero): Likewise.
14608 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14609 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14610 bitsetv_dump, debug_bitsetv): Likewise.
14611 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14612 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14613 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14614 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14615 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14616 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14617 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14618 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14619 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14620 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14621 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14623 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14624 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14625 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14626 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14627 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14628 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14629 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14630 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14631 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14632 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14633 lbitset_xor_cmp, lbitset_zero): Likewise.
14635 2002-10-14 Akim Demaille <akim@epita.fr>
14639 2002-10-14 Akim Demaille <akim@epita.fr>
14641 * tests/Makefile.am (maintainer-check-posix): New.
14643 2002-10-14 Akim Demaille <akim@epita.fr>
14645 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14648 2002-10-14 Akim Demaille <akim@epita.fr>
14650 * src/tables.c (table_ninf_remap): base -> tab.
14651 Reported by Matt Rosing.
14653 2002-10-14 Paul Eggert <eggert@twinsun.com>
14655 * tests/action.at, tests/calc.at, tests/conflicts.at,
14656 tests/cxx-type.at, tests/headers.at, tests/input.at,
14657 tests/regression.at, tests/synclines.at, tests/torture.at:
14658 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14659 so that the tests still work even if POSIXLY_CORRECT is set.
14660 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14662 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14663 for portability to K&R hosts. Fix typo: signed char is guaranteed
14664 only to 127, not to 128.
14665 * data/glr.c (yysigned_char): New type.
14666 * data/yacc.c (yysigned_char): Likewise.
14667 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14669 2002-10-13 Paul Eggert <eggert@twinsun.com>
14671 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14672 true due to limited range of data type" warning from GCC.
14674 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14675 by wrapping enum yytokentype's definition inside #ifndef
14676 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14678 2002-10-13 Akim Demaille <akim@epita.fr>
14680 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14681 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14683 2002-10-13 Akim Demaille <akim@epita.fr>
14685 * Makefile.maint: Update from Autoconf 2.54.
14686 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14688 2002-10-13 Akim Demaille <akim@epita.fr>
14690 * src/print.c (print_state): Separate the list of solved conflicts
14691 from the other items.
14692 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14694 2002-10-13 Akim Demaille <akim@epita.fr>
14696 Let nondeterministic skeletons be usable with deterministic
14699 With the patch, GAWK compiled by GCC without -O2 passes its test
14700 suite using a GLR parser driven by LALR tables. It fails with -O2
14701 because `struct stat' gives two different answers on my machine:
14702 88 (definition of an auto var) and later 96 (memset on this var).
14703 Hence the stack is badly corrumpted. The headers inclusion is to
14704 blame: if I move the awk.h inclusion before GLR's system header
14705 inclusion, the two struct stat have the same size.
14707 * src/tables.c (pack_table): Always create conflict_table.
14708 (token_actions): Always create conflict_list.
14709 * data/glr.c (YYFLAG): Remove, unused.
14711 2002-10-13 Akim Demaille <akim@epita.fr>
14713 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14715 (VALGRIND, GXX): New.
14716 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14717 * tests/bison.in: Run $PREBISON a pre-command.
14718 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14719 (maintainer-check-g++): New.
14720 * Makefile.am (maintainer-check): New.
14722 2002-10-13 Akim Demaille <akim@epita.fr>
14724 * data/glr.c: Formatting changes.
14725 Tweak some trace messages to match yacc.c's.
14727 2002-10-13 Akim Demaille <akim@epita.fr>
14729 GLR parsers sometimes raise parse errors instead of performing the
14731 Reported by Charles-Henry de Boysson.
14733 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14734 check the length of the traces when %glr.
14735 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14737 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14739 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14740 (yyltype): Remove the yy prefix from the member names.
14741 (yytable): Complete its comment.
14742 (yygetLRActions): Map error action number from YYTABLE from
14744 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14745 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14746 not satisfying as we could compare an YYACTION computed from
14747 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14748 only value for error actions.
14749 (yyreportParseError): In verbose parse error messages, don't issue
14750 `error' in the list of expected tokens.
14751 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14752 next action to perform to match glr.c's decoding.
14753 (yytable): Complete its comment.
14755 2002-10-13 Paul Eggert <eggert@twinsun.com>
14757 Fix problem reported by Henrik Grubbstroem in
14758 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14759 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14760 because the Bison parser reads the second action before reducing
14762 * src/scan-gram.l (rule_length): New static var.
14763 Use it to keep track of the rule length in the scanner, since
14764 we can't expect the parser to be in lock-step sync with the scanner.
14765 (handle_action_dollar, handle_action_at): Use this var.
14766 * tests/actions.at (Exotic Dollars): Test for the problem.
14768 2002-10-12 Paul Eggert <eggert@twinsun.com>
14770 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14771 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14772 Include <sys/time.h> when checking for clock_t and struct tms.
14773 Use same include order as source.
14774 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14775 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14777 * lib/timevar.c: Update copyright date and clarify comments.
14778 (get_time) [IN_GCC]: Keep the GCC version for reference.
14780 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14781 GCC version as of today, then merge Bison's changes.
14782 Change "GCC" to "Bison" in copyright notice. timevar.def's
14783 author is Akim, so change that too.
14785 * src/reader.c (grammar_current_rule_check):
14786 Don't worry about the default action if $$ is untyped.
14787 Prevents bogus warnings reported by Jim Gifford in
14788 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14790 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14791 * data/glr.c, data/lalr1.cc, data/yacc.c:
14792 Output token definitions before the first part of user declarations.
14793 Fixes compatibility problem reported by Jim Gifford for kbd in
14794 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14796 2002-10-11 Paul Eggert <eggert@twinsun.com>
14798 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14799 (yyparse): here. This undoes some of the 2002-07-25 change.
14800 Compatibility problem reported by Ralf S. Engelschall with
14801 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14803 2002-10-11 Akim Demaille <akim@epita.fr>
14805 * tests/regression.at Characters Escapes): New.
14806 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14808 Reported by Jan Nieuwenhuizen.
14810 2002-10-11 Akim Demaille <akim@epita.fr>
14814 2002-10-10 Paul Eggert <eggert@twinsun.com>
14816 Portability fixes for bitsets; this also avoids several GCC
14819 * lib/abitset.c: Include <stddef.h>, for offsetof.
14820 * lib/lbitset.c: Likewise.
14822 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14823 properly for vectors of objects. Do not assume that adding a
14824 header size to a multiple of a word size yields a value that is
14825 properly aligned for the whole union.
14826 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14828 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14829 unique names for structures.
14830 * lib/ebitset.c (ebitset_bytes): Likewise.
14831 * lib/lbitset.c (lbitset_bytes): Likewise.
14833 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14834 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14835 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14836 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14837 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14838 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14839 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14840 to improve the type-checking that GCC can do.
14841 * lib/bitset.c (bitset_op4_cmp): Likewise.
14842 * lib/bitset_stats.c (bitset_stats_count,
14843 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14844 bitset_stats_copy, bitset_stats_disjoint_p,
14845 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14846 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14847 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14848 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14849 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14850 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14851 bitset_stats_or_and_cmp): Likewise.
14852 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14853 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14854 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14855 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14857 * lib/abitset.h: Include bitset.h, not bbitset.h.
14858 * lib/ebitset.h: Likewise.
14859 * lib/lbitset.h: Likewise.
14861 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14862 All instances of parameters of type enum bitset_opts are now of
14863 type enum_bitset_opts, to conform to the C Standard, and similarly
14864 for enum_bitset_type.
14865 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14866 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14868 Do not use "struct bitset_struct" to mean different things in
14869 different modules. Not only is this confusing, it violates
14870 the C Standard, which requires that structure types in different
14871 modules must be compatible if one is to be passed to the other.
14872 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14873 All instances of "struct bitset_struct *" replaced with "bitset".
14874 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14875 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14876 struct lbitset_struct, struct bitset_stats_struct): New types.
14877 All uses of struct bitset_struct changed to union bitset_union,
14879 * lib/abitset.c (struct abitset_struct, abitset,
14880 struct bitset_struct): Remove.
14881 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14882 struct bitset_struct): Remove.
14883 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14884 bitset_struct): Remove.
14885 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14888 Do not call a function of type T using a call that assumes the
14889 function is of a different type U. Standard C requires that a
14890 function must be called with a type that is compatible with its
14892 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14894 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14896 * lib/ebitset.c (PFV): Remove.
14897 * lib/lbitset.c (PFV): Likewise.
14898 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14899 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14901 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14902 (ebitset_vtable): Use them.
14903 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14904 lbitset_xor): New functions.
14905 (lbitset_vtable): Use them.
14907 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14910 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14912 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14913 Use offsetof, for simplicity.
14915 2002-10-06 Paul Eggert <eggert@twinsun.com>
14917 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14918 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14919 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14920 which was inadvertently undone by the 2002-09-30 patch.
14921 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14922 the same width as int.
14924 2002-10-04 Paul Eggert <eggert@twinsun.com>
14928 * configure.ac (AC_INIT), NEWS: Increment version number.
14930 * doc/bison.texinfo: Minor spelling, grammar, and white space
14932 (Symbols): Mention that any negative value returned from yylex
14933 signifies end-of-input. Warn about negative chars. Mention
14934 the portable Standard C character set.
14936 The GNU coding standard says CFLAGS and YFLAGS are reserved
14937 for the installer to set.
14938 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14939 * src/Makefile.am (AM_CFLAGS): Likewise.
14940 (AM_YFLAGS): Renamed from YFLAGS.
14942 Fix some MAX and MIN problems.
14943 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14944 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14945 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14946 * src/reader.c (reader): Use it.
14948 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14949 POSIX 1003.1-2001 has removed fgrep.
14951 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14953 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14954 interpreted as signed.
14955 * lib/ebitset.c (ebitset_list): Fix bug.
14957 2002-10-01 Paul Eggert <eggert@twinsun.com>
14959 More fixes for 64-bit hosts and large bitsets.
14961 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14962 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14963 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14964 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14965 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14966 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14967 bitset_count_): Likewise.
14968 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14969 bitset_first, bitset_last): Likewise.
14970 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14971 bitset_stats_list_reverse, bitset_stats_size,
14972 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14974 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14975 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14976 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14977 bitsetv_reflexive_transitive_closure): Likewise.
14978 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14979 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14981 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14984 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14985 Use size_t, not unsigned int, to count bytes.
14986 * lib/abitset.h (abitset_bytes): Likewise.
14987 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14989 * lib/bitset.h (bitset_bytes): Likewise.
14990 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14991 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14992 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14993 * lib/ebitset.c (ebitset_bytes): Likewise.
14994 * lib/ebitset.h (ebitset_bytes): Likewise.
14995 * lib/lbitset.c (lbitset_bytes): Likewise.
14996 * lib/lbitset.h (lbitset_bytes): Likewise.
14998 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14999 abitset_subset_p, abitset_disjoint_p, abitset_and,
15000 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15001 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15002 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15003 abitset_or_and, abitset_or_and_cmp):
15004 Use bitset_windex instead of unsigned int.
15005 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15006 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15007 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15008 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15010 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15012 * lib/bitset.c (bitset_print):
15013 Use proper printf formats for widths of integer types.
15014 * lib/bitset_stats.c (bitset_percent_histogram_print,
15015 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15016 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15017 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15018 * lib/lbitset.c (lbitset_bytes): Likewise.
15020 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15021 BITSET_SIZE_MAX): New macros.
15022 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15023 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15024 to BITSET_WINDEX_MAX.
15026 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15027 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15028 since we now return the bitset_bindex type (not int).
15030 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15031 when computing sizes.
15032 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15034 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15035 and avoid cast to unsigned.
15037 2002-09-30 Akim Demaille <akim@epita.fr>
15039 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15040 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15041 Updates from Michael Hayes.
15043 2002-09-30 Art Haas <ahaas@neosoft.com>
15045 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15047 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15050 2002-09-27 Akim Demaille <akim@epita.fr>
15054 2002-09-27 Akim Demaille <akim@epita.fr>
15056 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15057 (Because of AC_LIBSOURCE).
15059 2002-09-27 Akim Demaille <akim@epita.fr>
15061 Playing with Autoscan.
15063 * configure.ac: Remove the old LIBOBJ tweaks.
15064 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15065 * lib/strrchr.c: New.
15066 * lib/strtol.c: New, from the Coreutils 4.5.1.
15068 2002-09-27 Akim Demaille <akim@epita.fr>
15070 Playing with Autoscan.
15072 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15073 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15074 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15075 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15078 2002-09-24 Akim Demaille <akim@epita.fr>
15080 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15081 (Frequently Asked Questions, Parser Stack Overflow): New.
15083 2002-09-13 Akim Demaille <akim@epita.fr>
15085 Playing with autoscan.
15087 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15088 * src/files.c (skeleton_find): Remove, unused.
15089 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15090 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15092 2002-09-13 Akim Demaille <akim@epita.fr>
15094 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15095 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15097 2002-09-13 Akim Demaille <akim@epita.fr>
15099 * configure.ac: Require 2.54.
15100 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15101 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15102 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15103 Remove, provided by Autoconf macros.
15105 2002-09-12 Akim Demaille <akim@epita.fr>
15107 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15109 2002-09-12 Akim Demaille <akim@epita.fr>
15111 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15112 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15113 Reported by Martin Mokrejs.
15115 2002-09-10 Akim Demaille <akim@epita.fr>
15117 * src/parse-gram.y: Associate a human readable string to each
15119 * tests/regression.at (Invalid inputs): Adjust.
15121 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15123 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15124 with an Autoconf-2.5x style configure.ac.
15126 2002-09-06 Paul Eggert <eggert@twinsun.com>
15128 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15129 exception applies only to yacc.c. This is a modification of a
15130 patch originally suggested by Akim Demaille.
15132 2002-09-06 Akim Demaille <akim@epita.fr>
15134 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15136 * data/yacc.c: here.
15138 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15140 (b4_ltype): Default to yy::Location from location.hh.
15142 2002-09-04 Jim Meyering <jim@meyering.net>
15144 * data/yacc.c: Guard the declaration of yytoknum also with
15145 `#ifdef YYPRINT', so it is declared only when used.
15147 2002-09-04 Akim Demaille <akim@epita.fr>
15149 * configure.in: Rename as...
15150 * configure.ac: this.
15153 2002-09-04 Akim Demaille <akim@epita.fr>
15155 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15156 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15157 translate maintainer only messages.
15159 2002-08-12 Paul Eggert <eggert@twinsun.com>
15163 * Makefile.am (SUBDIRS): Remove intl.
15164 (DISTCLEANFILES): Remove.
15165 * NEWS: Mention that GNU M4 is now required. Clarify what is
15166 meant by "larger grammars". Mention the pt_BR translation.
15167 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15168 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15169 Bump version from 0.11.2 to 0.11.5.
15170 (BISON_PREREQ_STAGE): Remove.
15171 (AM_GNU_GETTEXT): Use external gettext.
15172 (AC_OUTPUT): Remove intl/Makefile.
15174 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15176 * data/glr.c: Include string.h, for strlen.
15177 (yyreportParseError): Use size_t for yysize.
15178 (yy_yypstack): No longer nested inside yypstates, as nested
15179 functions are not portable. Do not assume size_t is the
15181 (yypstates): Do not assume that ptrdiff_t is the same width
15182 as int, and similarly for yyposn and YYINDEX.
15184 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15186 * lib/Makefile.am (INCLUDES): Do not include from the intl
15187 directory, which has been removed.
15188 * src/Makefile.am (INCLUDES): Likewise.
15190 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15191 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15194 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15195 * tests/Makefile.am (EXTRA_DIST): Likewise.
15197 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15198 Do not assume that bitset_windex is the same width as unsigned.
15200 * lib/abitset.c (abitset_unused_clear): Do not assume that
15201 bitset_word is the same width as int.
15202 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15203 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15204 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15205 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15206 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15208 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15209 portability to one's complement hosts!).
15210 * lib/ebitset.c (ebitset_op1): Likewise.
15211 * lib/lbitset.c (lbitset_op1): Likewise.
15213 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15214 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15215 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15216 Sync with fileutils.
15217 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15218 lib/gettext.h: Sync with diffutils.
15220 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15221 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15223 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15224 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15227 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15228 size_t; the old version tried to do this but casted improperly.
15229 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15230 (bitset_test): Now returns int, not unsigned long.
15232 * lib/bitset_stats.c: Include "gettext.h".
15234 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15235 name locals "index", as it generates unnecessary warnings on some
15236 hosts that have an "index" function.
15238 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15239 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15240 they need translation.
15241 * src/LR0.c (state_list_append, new_itemsets, get_state,
15242 append_states, generate_states): Likewise.
15243 * src/assoc.c (assoc_to_string): Likewise.
15244 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15245 * src/gram.c (grammar_dump): Likewise.
15246 * src/injections.c (injections_compute): Likewise.
15247 * src/lalr.c (lookaheads_print): Likewise.
15248 * src/relation.c (relation_transpose): Likewise.
15249 * src/scan-gram.l: Likewise.
15250 * src/tables.c (table_grow, pack_vector): Likewise.
15252 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15253 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15254 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15255 * m4/mbstate_t.m4: Sync with fileutils.
15256 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15258 * po/LINGUAS: Add pt_BR.
15259 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15260 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15262 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15264 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15266 * src/complain.c (strerror_r): Remove decl; not needed.
15267 (strerror): Use same pattern as ../lib/error.c.
15269 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15271 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15273 * src/main.c (main): Cast result of bindtextdomain and textdomain
15274 to void, to avoid a GCC warning when --disable-nls is in effect.
15276 * src/scan-gram.l: Use strings rather than escapes when possible,
15277 to minimize the number of warnings from xgettext.
15278 (handle_action_dollar, handle_action_at): Don't use isdigit,
15279 as it mishandles negative chars and it may not work as expected
15280 outside the C locale.
15282 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15283 this is a GCC extension and is not portable to other compilers.
15285 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15286 Do not include <ctype.h>; no longer needed.
15287 Do not include <malloc.h>; no longer needed (and generates
15288 warnings on OpenBSD 3.0).
15290 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15293 * tests/regression.at: Do not use 'cc -c input.c -o input';
15294 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15296 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15297 exit status as failure, not just exit status 1. Sun C exits
15298 with status 2 sometimes.
15300 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15301 Use it for the two large tests.
15303 2002-08-02 Akim Demaille <akim@epita.fr>
15305 * src/conflicts.c (conflicts_output): Don't output rules never
15306 reduced here, since anyway that computation doesn't work.
15307 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15308 (rule_useless_p, rule_never_reduced_p): New.
15309 (grammar_rules_partial_print): Use a filter instead of a range.
15310 Display the title only if needed.
15311 (grammar_rules_print): Adjust.
15312 (grammar_rules_never_reduced_report): New.
15313 * src/tables.c (action_row): Move the computation of rules never
15315 (token_actions): here.
15316 * src/main.c (main): Make the parser before making the report, so
15317 that rules never reduced are computed.
15318 Call grammar_rules_never_reduced_report.
15319 * src/print.c (print_results): Report rules never reduced.
15320 * tests/conflicts.at, tests/reduce.at: Adjust.
15322 2002-08-01 Akim Demaille <akim@epita.fr>
15324 Instead of attaching lookaheads and duplicating the rules being
15325 reduced by a state, attach the lookaheads to the reductions.
15327 * src/state.h (state_t): Remove the `lookaheads',
15328 `lookaheads_rule' member.
15329 (reductions_t): Add a `lookaheads' member.
15330 Use a regular array for the `rules'.
15331 * src/state.c (reductions_new): Initialize the lookaheads member
15333 (state_rule_lookaheads_print): Adjust.
15334 * src/state.h, src/state.c (state_reductions_find): New.
15335 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15336 (count_rr_conflicts): Adjust.
15337 * src/lalr.c (LArule): Remove.
15338 (add_lookback_edge): Adjust.
15339 (state_lookaheads_count): New.
15340 (states_lookaheads_initialize): Merge into...
15341 (initialize_LA): this.
15342 (lalr_free): Adjust.
15343 * src/main.c (main): Don't free nullable and derives too early: it
15344 is used by --verbose.
15345 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15347 2002-08-01 Akim Demaille <akim@epita.fr>
15349 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15351 (set_derives, free_derives): Rename as...
15352 (derives_compute, derives_free): this.
15353 Adjust all dependencies.
15354 * src/nullable.c (set_nullable, free_nullable): Rename as...
15355 (nullable_compute, nullable_free): these.
15356 (rule_list_t): Store rule_t *, not rule_number_t.
15357 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15358 pointers, instead of their numbers.
15359 * src/main.c (main): Call nullable_free, and derives_free earlier,
15360 as they were lo longer used.
15362 2002-08-01 Akim Demaille <akim@epita.fr>
15364 * lib/timevar.c (get_time): Include children time.
15365 * src/lalr.h (LA, LArule): Don't export them: used with the
15367 * src/lalr.c (LA, LArule): Static.
15368 * src/lalr.h, src/lalr.c (lalr_free): New.
15369 * src/main.c (main): Call it.
15370 * src/tables.c (pack_vector): Check whether loc is >= to the
15372 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15373 (tables_generate): do it, since that's also it which allocates
15375 Don't free LA and LArule, main does.
15377 2002-07-31 Akim Demaille <akim@epita.fr>
15379 Separate parser tables computation and output.
15381 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15382 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15383 (yydefgoto, yydefact, high): Move to...
15384 * src/tables.h, src/tables.c: here.
15385 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15386 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15387 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15388 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15389 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15390 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15391 (action_row, save_row, token_actions, save_column, default_goto)
15392 (goto_actions, sort_actions, matching_state, pack_vector)
15393 (table_ninf_remap, pack_table, prepare_actions): Move to...
15394 * src/tables.c: here.
15395 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15396 * src/output.c (token_actions, output_base, output_conflicts)
15397 (output_check): Merge into...
15398 (prepare_actions): this.
15399 (actions_output): Rename as...
15400 (user_actions_output): this.
15401 * src/main.c (main): Call tables_generate and tables_free.
15403 2002-07-31 Akim Demaille <akim@epita.fr>
15405 Steal GCC's --time-report support.
15407 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15408 stolen/adjusted from GCC.
15409 * m4/stage.m4: Remove time related checks.
15410 * m4/timevar.m4: New.
15411 * configure.in: Adjust.
15412 * src/system.h: Adjust to using timevar.h.
15413 * src/getargs.h, src/getargs.c: Support trace_time for
15415 * src/main.c (stage): Remove.
15416 (main): Replace `stage' invocations with timevar calls.
15417 * src/output.c: Insert pertinent timevar calls.
15419 2002-07-31 Akim Demaille <akim@epita.fr>
15421 Let --trace have arguments.
15423 * src/getargs.h (enum trace_e): New.
15424 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15425 (long_options, short_options): --trace/-T takes an optional
15427 Change all the uses of trace_flag to reflect the new flags.
15428 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15430 Strengthen `stage' portability.
15432 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15433 * configure.in: Use it.
15434 Don't check for malloc.h and sys/times.h.
15435 * src/system.h: Include them when appropriate.
15436 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15437 times and struct tms are available.
15439 2002-07-30 Akim Demaille <akim@epita.fr>
15441 In verbose parse error message, don't report `error' as an
15443 * tests/actions.at (Printers and Destructors): Adjust.
15444 * tests/calc.at (Calculator $1): Adjust.
15445 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15446 error message, do not report the parser accepts the error token in
15449 2002-07-30 Akim Demaille <akim@epita.fr>
15451 Normalize conflict related messages.
15453 * src/complain.h, src/complain.c (warn, complain): New.
15454 * src/conflicts.c (conflicts_print): Use them.
15455 (conflict_report_yacc): New, extracted from...
15456 (conflicts_print): here.
15457 * tests/conflicts.at, tests/existing.at: Adjust.
15459 2002-07-30 Akim Demaille <akim@epita.fr>
15461 Report rules which are never reduced by the parser: those hidden
15464 * src/LR0.c (save_reductions): Don't make the final state too
15465 different: save its reduction (accept) instead of having a state
15466 without any action (no shift or goto, no reduce).
15467 Note: the final state is now a ``regular'' state, i.e., the
15468 parsers now contain `reduce 0' as default reduction.
15469 Nevertheless, since they decide to `accept' when yystate =
15470 final_state, they still will not reduce rule 0.
15471 * src/print.c (print_actions, print_reduction): Adjust.
15472 * src/output.c (action_row): Track reduced rules.
15473 (token_actions): Report rules never reduced.
15474 * tests/conflicts.at, tests/regression.at: Adjust.
15476 2002-07-30 Akim Demaille <akim@epita.fr>
15478 `stage' was accidently included in a previous patch.
15479 Initiate its autoconfiscation.
15481 * configure.in: Look for malloc.h and sys/times.h.
15482 * src/main.c (stage): Adjust.
15483 Report only when trace_flag.
15485 2002-07-29 Akim Demaille <akim@epita.fr>
15487 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15489 (errs_t): symbol_t*, not symbol_number_t.
15490 (reductions_t): rule_t*, not rule_number_t.
15491 (FOR_EACH_SHIFT): New.
15492 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15493 * src/print.c, src/print_graph.c: Adjust.
15495 2002-07-29 Akim Demaille <akim@epita.fr>
15497 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15499 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15500 (endtoken, accept): these.
15501 * src/reader.c (reader): Set endtoken's default tag to "$end".
15502 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15503 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15506 2002-07-29 Akim Demaille <akim@epita.fr>
15508 * src/reduce.c (reduce_grammar): When the language is empty,
15509 complain about the start symbol, not the axiom.
15511 * tests/reduce.at (Empty Language): New.
15513 2002-07-26 Akim Demaille <akim@epita.fr>
15515 * src/reader.h, src/reader.c (gram_error): ... can't get
15516 yycontrol without making too strong assumptions on the parser
15518 * src/output.c (prepare_tokens): Use the real 0th value of
15519 token_translations instead of `0'.
15520 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15522 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15523 for the time being: %locations ought to provide it to yyerror.
15525 2002-07-25 Akim Demaille <akim@epita.fr>
15527 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15528 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15529 * tests/regression.at (Web2c Actions): Adjust.
15531 2002-07-25 Akim Demaille <akim@epita.fr>
15533 Stop storing rules from 1 to nrules + 1.
15535 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15536 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15537 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15538 Iterate from 0 to nrules.
15539 Use rule_number_as_item_number and item_number_as_rule_number.
15540 Adjust to `derive' now containing possibly 0.
15541 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15542 Handle the `- 1' part in rule numbers from/to item numbers.
15543 * src/conflicts.c (log_resolution): Fix the message which reversed
15545 * src/output.c (action_row): Initialize default_rule to -1.
15546 (token_actions): Adjust.
15547 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15549 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15551 2002-07-25 Akim Demaille <akim@epita.fr>
15553 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15554 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15555 (b4_c_knr_arg_decl): New.
15556 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15557 yyreport_parse_error.
15559 2002-07-25 Akim Demaille <akim@epita.fr>
15561 * data/yacc.c (yyreport_parse_error): New, extracted from...
15563 (yydestruct, yysymprint): Move above yyparse.
15566 2002-07-25 Akim Demaille <akim@epita.fr>
15568 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15570 (b4_sint_type, b4_uint_type): these.
15571 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15572 * tests/regression.at (Web2c Actions): Adjust.
15574 2002-07-25 Akim Demaille <akim@epita.fr>
15576 * src/gram.h (TIEM_NUMBER_MAX): New.
15577 (item_number_of_rule_number, rule_number_of_item_number): Rename
15579 (rule_number_as_item_number, item_number_as_rule_number): these.
15580 Adjust dependencies.
15581 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15582 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15583 (symbol_number_to_vector_number): New.
15584 (order): Of vector_number_t* type.
15585 (base_t, BASE_MAX, BASE_MIN): New.
15586 (froms, tos, width, pos, check): Of base_t type.
15587 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15588 (actrow): Of action_number_t type.
15589 (conflrow): Of unsigned int type.
15590 (table_ninf, base_ninf): New.
15591 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15592 (muscle_insert_int_table, muscle_insert_base_table)
15593 (muscle_insert_rule_number_table): New.
15594 (prepare_tokens): Output `toknum' as int_table.
15595 (action_row): Returns a rule_number_t.
15596 Use ACTION_MIN, not SHRT_MIN.
15597 (token_actions): yydefact is rule_number_t*.
15598 (table_ninf_remap): New.
15599 (pack_table): Use it for `base' and `table'.
15600 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15602 (YYPACT_NINF, YYTABLE_NINF): these.
15603 (yypact, yytable): Compute their types instead of hard-coded
15605 * tests/regression.at (Web2c Actions): Adjust.
15607 2002-07-19 Akim Demaille <akim@epita.fr>
15609 * src/scan-gram.l (id): Can start with an underscore.
15611 2002-07-16 Akim Demaille <akim@epita.fr>
15613 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15614 Adjust all former `associativity' dependencies.
15615 * src/symtab.c (symbol_new): Default associativity is `undef', not
15617 (symbol_check_alias_consistence): Adjust.
15619 2002-07-09 Akim Demaille <akim@epita.fr>
15621 * doc/bison.texinfo: Properly set the ``header'' part.
15622 Use @dircategory ``GNU programming tools'' as per Texinfo's
15626 2002-07-09 Akim Demaille <akim@epita.fr>
15628 * lib/quotearg.h: Protect against multiple inclusions.
15629 * src/location.h (location_t): Add a `file' member.
15630 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15631 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15632 `error_one_per_line' support.
15634 2002-07-09 Akim Demaille <akim@epita.fr>
15636 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15637 * src/reader.c (lineno): Remove.
15638 Adjust all dependencies.
15639 (get_merge_function): Take a location and use complain_at.
15640 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15641 * tests/regression.at (Invalid inputs, Mixing %token styles):
15644 2002-07-09 Akim Demaille <akim@epita.fr>
15646 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15647 recovery rule, and forbid extensions when --yacc.
15648 (gram_error): Use complain_at.
15649 * src/reader.c (reader): Exit if there were parse errors.
15651 2002-07-09 Akim Demaille <akim@epita.fr>
15653 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15654 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15655 Reported by R Blake <blakers@mac.com>.
15657 2002-07-09 Akim Demaille <akim@epita.fr>
15659 * data/yacc.c: Output the copyright notive in the header.
15661 2002-07-03 Akim Demaille <akim@epita.fr>
15663 * src/output.c (froms, tos): Are state_number_t.
15664 (save_column): sp, sp1, and sp2 are state_number_t.
15665 (prepare): Rename `final' as `final_state_number', `nnts' as
15666 `nterms_number', `nrules' as `rules_number', `nstates' as
15667 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15669 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15670 * data/lalr1.cc (nsym_): Remove, unused.
15672 2002-07-03 Akim Demaille <akim@epita.fr>
15674 * src/lalr.h, src/lalr.c (goto_number_t): New.
15675 * src/lalr.c (goto_list_t): New.
15677 * src/nullable.c (rule_list_t): New.
15679 * src/types.h: Remove.
15681 2002-07-03 Akim Demaille <akim@epita.fr>
15683 * src/closure.c (print_fderives): Use rule_rhs_print.
15684 * src/derives.c (print_derives): Use rule_rhs_print.
15685 (rule_list_t): New, replaces `shorts'.
15686 (set_derives): Add comments.
15687 * tests/sets.at (Nullable, Firsts): Adjust.
15689 2002-07-03 Akim Demaille <akim@epita.fr>
15691 * src/output.c (prepare_actions): Free `tally' and `width'.
15692 (prepare_actions): Allocate and free `order'.
15693 * src/symtab.c (symbols_free): Free `symbols'.
15694 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15695 * src/output.c (m4_invoke): Move to...
15696 * src/scan-skel.l: here.
15697 (<<EOF>>): Close yyout, and free its name.
15699 2002-07-03 Akim Demaille <akim@epita.fr>
15701 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15703 * src/LR0.c (new_state): Merge into...
15704 (state_list_append): this.
15705 (new_states): Merge into...
15706 (generate_states): here.
15707 (set_states): Don't ensure a proper `errs' state member here, do it...
15708 * src/conflicts.c (conflicts_solve): here.
15709 * src/state.h, src/state.c: Comment changes.
15710 (state_t): Rename member `shifts' as `transitions'.
15711 Adjust all dependencies.
15712 (errs_new): For consistency, also take the values as argument.
15713 (errs_dup): Remove.
15714 (state_errs_set): New.
15715 (state_reductions_set, state_transitions_set): Assert that no
15716 previous value was assigned.
15718 (states_free): Use it.
15719 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15720 temporary storage: use `errs' and `nerrs' as elsewhere.
15721 (set_conflicts): Allocate and free this `errs'.
15723 2002-07-02 Akim Demaille <akim@epita.fr>
15725 * lib/libiberty.h: New.
15726 * lib: Update the bitset implementation from upstream.
15727 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15728 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15729 * src/main.c: Adjust bitset stats calls.
15731 2002-07-01 Paul Eggert <eggert@twinsun.com>
15733 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15734 char, so that negative chars don't collide with $.
15736 2002-06-30 Akim Demaille <akim@epita.fr>
15738 Have the GLR tests be `warning' checked, and fix the warnings.
15740 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15741 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15742 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15743 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15744 (yyaddDeferredAction): static.
15745 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15746 (yyreportParseError): yyprefix is const.
15747 yytokenp is used only when verbose.
15748 (yy__GNUC__): Replace with __GNUC__.
15749 (yypdumpstack): yyi is size_t.
15750 (yypreference): Un-yy local variables and arguments, to avoid
15751 clashes with `yyr1'. Anyway, we are not in the user name space.
15752 (yytname_size): be an int, as is compared with ints.
15753 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15755 * tests/cxx-gram.at: Use quotation to protect $1.
15756 Use AT_COMPILE to enable warnings hunts.
15757 Prototype yylex and yyerror.
15759 Include `string.h', not `strings.h'.
15760 Produce and prototype stmtMerge only when used.
15761 yylex takes a location.
15763 2002-06-30 Akim Demaille <akim@epita.fr>
15765 We spend a lot of time in quotearg, in particular when --verbose.
15767 * src/symtab.c (symbol_get): Store a quoted version of the key.
15768 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15769 Adjust all callers.
15771 2002-06-30 Akim Demaille <akim@epita.fr>
15773 * src/state.h (reductions_t): Rename member `nreds' as num.
15774 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15775 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15777 2002-06-30 Akim Demaille <akim@epita.fr>
15779 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15780 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15781 (shifts_to): Rename as...
15782 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15783 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15784 (TRANSITION_IS_DISABLED, transitions_to): these.
15786 2002-06-30 Akim Demaille <akim@epita.fr>
15788 * src/print.c (print_shifts, print_gotos): Merge into...
15789 (print_transitions): this.
15790 (print_transitions, print_errs, print_reductions): Align the
15791 lookaheads columns.
15792 (print_core, print_transitions, print_errs, print_state,
15793 print_grammar): Output empty lines separator before, not after.
15794 (state_default_rule_compute): Rename as...
15795 (state_default_rule): this.
15796 * tests/conflicts.at (Defaulted Conflicted Reduction),
15797 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15798 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15800 2002-06-30 Akim Demaille <akim@epita.fr>
15802 Display items as we display rules.
15804 * src/gram.h, src/gram.c (rule_lhs_print): New.
15805 * src/gram.c (grammar_rules_partial_print): Use it.
15806 * src/print.c (print_core): Likewise.
15807 * tests/conflicts.at (Defaulted Conflicted Reduction),
15808 (Unresolved SR Conflicts): Adjust.
15809 (Unresolved SR Conflicts): Adjust and rename as...
15810 (Resolved SR Conflicts): this, as was meant.
15811 * tests/regression.at (Web2c Report): Adjust.
15813 2002-06-30 Akim Demaille <akim@epita.fr>
15815 * src/print.c (state_default_rule_compute): New, extracted from...
15816 (print_reductions): here.
15817 Pessimize, but clarify the code.
15818 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15820 2002-06-30 Akim Demaille <akim@epita.fr>
15822 * src/output.c (action_row): Let default_rule be always a rule
15825 2002-06-30 Akim Demaille <akim@epita.fr>
15827 * src/closure.c (print_firsts, print_fderives, closure):
15828 Use BITSET_EXECUTE.
15829 * src/lalr.c (lookaheads_print): Likewise.
15830 * src/state.c (state_rule_lookaheads_print): Likewise.
15831 * src/print_graph.c (print_core): Likewise.
15832 * src/print.c (print_reductions): Likewise.
15833 * src/output.c (action_row): Likewise.
15834 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15836 2002-06-30 Akim Demaille <akim@epita.fr>
15838 * src/print_graph.c: Use report_flag.
15840 2002-06-30 Akim Demaille <akim@epita.fr>
15842 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15844 * src/relation.h, src/relation.c (traverse, relation_digraph)
15845 (relation_print, relation_transpose): New.
15847 2002-06-30 Akim Demaille <akim@epita.fr>
15849 * src/state.h, src/state.c (shifts_to): New.
15850 * src/lalr.c (build_relations): Use it.
15852 2002-06-30 Akim Demaille <akim@epita.fr>
15854 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15855 (item_number_of_rule_number, rule_number_of_item_number): New.
15856 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15857 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15858 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15859 Propagate their use.
15860 Much remains to be done, in particular wrt `shorts' from types.h.
15862 2002-06-30 Akim Demaille <akim@epita.fr>
15864 * src/symtab.c (symbol_new): Initialize the `printer' member.
15866 2002-06-30 Akim Demaille <akim@epita.fr>
15868 * src/LR0.c (save_reductions): Remove, replaced by...
15869 * src/state.h, src/state.c (state_reductions_set): New.
15870 (reductions, errs): Rename as...
15871 (reductions_t, errs_t): these.
15872 Adjust all dependencies.
15874 2002-06-30 Akim Demaille <akim@epita.fr>
15876 * src/LR0.c (state_list_t, state_list_append): New.
15877 (first_state, last_state): Now symbol_list_t.
15878 (this_state): Remove.
15879 (new_itemsets, append_states, save_reductions): Take a state_t as
15881 (set_states, generate_states): Adjust.
15882 (save_shifts): Remove, replaced by...
15883 * src/state.h, src/state.c (state_shifts_set): New.
15884 (shifts): Rename as...
15886 Adjust all dependencies.
15887 * src/state.h (state_t): Remove the `next' member.
15889 2002-06-30 Akim Demaille <akim@epita.fr>
15891 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15894 2002-06-30 Akim Demaille <akim@epita.fr>
15896 Use hash.h for the state hash table.
15898 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15899 (allocate_storage): Use state_hash_new.
15900 (free_storage): Use state_hash_free.
15901 (new_state, get_state): Adjust.
15902 * src/lalr.h, src/lalr.c (states): Move to...
15903 * src/states.h (state_t): Remove the `link' member, no longer
15905 * src/states.h, src/states.c: here.
15906 (state_hash_new, state_hash_free, state_hash_lookup)
15907 (state_hash_insert, states_free): New.
15908 * src/states.c (state_table, state_compare, state_hash): New.
15909 * src/output.c (output_actions): Do not free states now, since we
15910 still need to know the final_state number in `prepare', called
15911 afterwards. Do it...
15912 * src/main.c (main): here: call states_free after `output'.
15914 2002-06-30 Akim Demaille <akim@epita.fr>
15916 * src/state.h, src/state.c (state_new): New, extracted from...
15917 * src/LR0.c (new_state): here.
15918 * src/state.h (STATE_ALLOC): Move to...
15919 * src/state.c: here.
15920 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15921 * src/state.h, src/state.c: here.
15923 2002-06-30 Akim Demaille <akim@epita.fr>
15925 * src/reader.c (gensym): Rename as...
15926 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15927 (getsym): Rename as...
15928 (symbol_get): this.
15930 2002-06-30 Akim Demaille <akim@epita.fr>
15932 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15933 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15934 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15935 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15937 2002-06-30 Akim Demaille <akim@epita.fr>
15939 Make the test suite pass with warnings checked.
15941 * tests/actions.at (Printers and Destructors): Improve.
15942 Avoid unsigned vs. signed issues.
15943 * tests/calc.at: Don't exercise the scanner here, do it...
15944 * tests/input.at (Torturing the Scanner): here.
15946 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15948 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15949 reorganize first lines parallel to yacc.c.
15951 2002-06-28 Akim Demaille <akim@epita.fr>
15953 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15954 (b4_token_enum, b4_token_defines): New, factored from...
15955 * data/lalr1.cc, data/yacc.c, glr.c: here.
15957 2002-06-28 Akim Demaille <akim@epita.fr>
15959 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15961 * src/output.c (merger_output): static.
15963 2002-06-28 Akim Demaille <akim@epita.fr>
15965 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15966 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15968 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15970 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15972 Accumulated changelog for new GLR parsing features.
15974 * src/conflicts.c (count_total_conflicts): Change name to
15975 conflicts_total_count.
15976 * src/conflicts.h: Ditto.
15977 * src/output.c (token_actions): Use the new name.
15978 (output_conflicts): Change conflp => conflict_list_heads, and
15979 confl => conflict_list for better readability.
15980 * data/glr.c: Use the new names.
15981 * NEWS: Add self to GLR announcement.
15983 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15985 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15988 * data/bison.glr: Change name to glr.c
15989 * data/glr.c: Renamed from bison.glr.
15990 * data/Makefile.am: Add glr.c
15994 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15995 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15997 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15999 * data/bison.glr: Be sure to restore the
16000 current #line when returning to the skeleton contents after having
16001 exposed the input file's #line.
16003 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16005 * data/bison.glr: Bring up to date with changes to bison.simple.
16007 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16009 * data/bison.glr: Correct definitions that use b4_prefix.
16010 Various reformatting.
16011 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16012 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16013 yytokenp argument; now part of stack.
16014 (yychar): Define to behave as documented.
16015 (yyclearin): Ditto.
16017 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16019 * src/reader.h: Add declaration for free_merger_functions.
16021 * src/reader.c (merge_functions): New variable.
16022 (get_merge_function): New function.
16023 (free_merger_functions): New function.
16024 (readgram): Check for %prec that is not followed by a symbol.
16025 Handle %dprec and %merge declarations.
16026 (packgram): Initialize dprec and merger fields in rules array.
16028 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16029 conflict_list_cnt, conflict_list_free): New variables.
16030 (table_grow): Also grow conflict_table.
16031 (prepare_rules): Output dprec and merger tables.
16032 (conflict_row): New function.
16033 (action_row): Output conflict lists for GLR parser. Don't use
16034 default reduction in conflicted states for GLR parser so that there
16035 are spaces for the conflict lists.
16036 (save_row): Also save conflict information.
16037 (token_actions): Allocate conflict list.
16038 (merger_output): New function.
16039 (pack_vector): Pack conflict table, too.
16040 (output_conflicts): New function to output yyconflp and yyconfl.
16041 (output_check): Allocate conflict_tos.
16042 (output_actions): Output conflict tables, also.
16043 (output_skeleton): Output b4_mergers definition.
16044 (prepare): Output b4_max_rhs_length definition.
16045 Use 'bison.glr' as default skeleton for GLR parsers.
16047 * src/gram.c (glr_parser): New flag.
16048 (grammar_free): Call free_merger_functions.
16050 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16051 all pairs of conflicting reductions, rather than just all tokens
16052 causing conflicts. Needed to size conflict tables.
16053 (conflicts_output): Modify call to count_rr_conflicts for new
16055 (conflicts_print): Ditto.
16056 (count_total_conflicts): New function.
16058 * src/reader.h (merger_list): New type.
16059 (merge_functions): New variable.
16061 * src/lex.h (tok_dprec, tok_merge): New token types.
16063 * src/gram.h (rule_s): Add dprec and merger fields.
16064 (glr_parser): New flag.
16066 * src/conflicts.h (count_total_conflicts): New function.
16068 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16070 * doc/bison.texinfo (Generalized LR Parsing): New section.
16071 (GLR Parsers): New section.
16072 (Language and Grammar): Mention GLR parsing.
16073 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16074 Correct typo ("tge" -> "the").
16076 * data/bison.glr: New skeleton for GLR parsing.
16078 * tests/cxx-gram.at: New tests for GLR parsing.
16080 * tests/testsuite.at: Include cxx-gram.at.
16082 * tests/Makefile.am: Add cxx-gram.at.
16084 * src/parse-gram.y:
16086 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16088 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16090 2002-06-27 Akim Demaille <akim@epita.fr>
16092 * src/options.h, src/options.c: Remove.
16093 * src/getargs.c (short_options, long_options): New.
16095 2002-06-27 Akim Demaille <akim@epita.fr>
16097 * data/bison.simple, data/bison.c++: Rename as...
16098 * data/yacc.c, data/lalr1.cc: these.
16099 * doc/bison.texinfo (Environment Variables): Remove.
16101 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16103 * src/getargs.c (report_argmatch): Initialize strtok().
16105 2002-06-20 Akim Demaille <akim@epita.fr>
16107 * data/bison.simple (b4_symbol_actions): New, replaces...
16108 (b4_symbol_destructor, b4_symbol_printer): these.
16109 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16110 user token numbers.
16112 2002-06-20 Akim Demaille <akim@epita.fr>
16114 * data/bison.simple (yydestructor): Rename as...
16115 (yydestruct): this.
16117 2002-06-20 Akim Demaille <akim@epita.fr>
16119 * src/symtab.h, src/symtab.c (symbol_type_set)
16120 (symbol_destructor_set, symbol_precedence_set): The location is
16122 Adjust all callers.
16124 2002-06-20 Akim Demaille <akim@epita.fr>
16126 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16128 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16130 * src/symtab.h, src/symtab.c (symbol_class_set)
16131 (symbol_user_token_number_set): Likewise.
16132 Adjust all callers.
16133 Promote complain_at.
16134 * tests/input.at (Type Clashes): Adjust.
16136 2002-06-20 Akim Demaille <akim@epita.fr>
16138 * data/bison.simple (YYLEX): Fix the declaration when
16141 2002-06-20 Akim Demaille <akim@epita.fr>
16143 * data/bison.simple (yysymprint): Don't print the token number,
16145 * tests/actions.at (Destructors): Rename as...
16146 (Printers and Destructors): this.
16147 Also exercise %printer.
16149 2002-06-20 Akim Demaille <akim@epita.fr>
16151 * data/bison.simple (YYDSYMPRINT): New.
16152 Use it to remove many of the #if YYDEBUG/if (yydebug).
16154 2002-06-20 Akim Demaille <akim@epita.fr>
16156 * src/symtab.h, src/symtab.c (symbol_t): printer and
16157 printer_location are new members.
16158 (symbol_printer_set): New.
16159 * src/parse-gram.y (PERCENT_PRINTER): New token.
16160 Handle its associated rule.
16161 * src/scan-gram.l: Adjust.
16162 (handle_destructor_at, handle_destructor_dollar): Rename as...
16163 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16164 * src/output.c (symbol_printers_output): New.
16165 (output_skeleton): Call it.
16166 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16167 since there are already many grammar files with a user `yyprint'.
16168 Replace the calls to YYPRINT to calls to yysymprint.
16169 * tests/calc.at: Adjust.
16170 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16171 taking advantage of parser very internal details (stack size!).
16173 2002-06-20 Akim Demaille <akim@epita.fr>
16175 * src/scan-gram.l: Complete the scanner with the missing patterns
16177 Use `quote' and `symbol_tag_get' where appropriate.
16179 2002-06-19 Akim Demaille <akim@epita.fr>
16181 * tests/actions.at (Destructors): Augment to test locations.
16182 * data/bison.simple (yydestructor): Pass it the current location
16183 if locations are enabled.
16184 Prototype only when __STDC__ or C++.
16185 Change the argument names to move into the yy name space: there is
16188 2002-06-19 Akim Demaille <akim@epita.fr>
16190 * data/bison.simple (b4_pure_if): New.
16191 Use it instead of #ifdef YYPURE.
16193 2002-06-19 Akim Demaille <akim@epita.fr>
16195 * data/bison.simple (b4_location_if): New.
16196 Use it instead of #ifdef YYLSP_NEEDED.
16198 2002-06-19 Akim Demaille <akim@epita.fr>
16200 Prepare @$ in %destructor, but currently don't bind it in the
16201 skeleton, as %location use is not cleaned up yet.
16203 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16204 (handle_action_at): New.
16205 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16206 a braced_code_t and a location as additional arguments.
16207 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16208 unquote one when outputting `b4_dollar_dollar'.
16210 * data/bison.simple (b4_eval): Remove.
16211 (b4_symbol_destructor): Adjust.
16212 * tests/input.at (Invalid @n): Adjust.
16214 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16216 * doc/bison.texinfo: Document ability to have multiple
16219 2002-06-18 Akim Demaille <akim@epita.fr>
16221 * src/files.c (compute_base_names): When computing the output file
16222 names from the input file name, strip the directory part.
16224 2002-06-18 Akim Demaille <akim@epita.fr>
16226 * data/bison.simple.new: Comment changes.
16227 Reported by Andreas Schwab.
16229 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16231 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16232 there are no `label `yyoverflowlab' defined but not used' warnings
16233 when yyoverflow is defined.
16235 2002-06-18 Akim Demaille <akim@epita.fr>
16237 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16239 (symbol_destructor_set): Adjust.
16240 * src/output.c (symbol_destructors_output): Output the destructor
16242 Output the symbol name.
16243 * data/bison.simple (b4_symbol_destructor): Adjust.
16245 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16246 and Akim Demaille <akim@epita.fr>
16248 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16249 what's left on the stack when the error recovery hits EOF.
16250 * tests/actions.at (Destructors): Complete to exercise this case.
16252 2002-06-17 Akim Demaille <akim@epita.fr>
16254 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16255 arguments is really empty, not only equal to `[]'.
16256 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16258 (symbol_destructor_set): New.
16259 * src/output.c (symbol_destructors_output): New.
16260 * src/reader.h (brace_code_t, current_braced_code): New.
16261 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16262 (handle_dollar): Rename as...
16263 (handle_action_dollar): this.
16264 (handle_destructor_dollar): New.
16265 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16266 (grammar_declaration): Use it.
16267 * data/bison.simple (yystos): Is always defined.
16268 (yydestructor): New.
16269 * tests/actions.at (Destructors): New.
16270 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16272 2002-06-17 Akim Demaille <akim@epita.fr>
16274 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16275 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16276 rule_length only when needed.
16277 * src/output.c (actions_output, token_definitions_output): Output
16279 * src/symtab.c: Don't access directly to the symbol tag, use
16281 * src/parse-gram.y: Use symbol_list_free.
16283 2002-06-17 Akim Demaille <akim@epita.fr>
16285 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16286 (symbol_list_prepend, get_type_name): Move to...
16287 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16288 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16289 Adjust all callers.
16290 (symbol_list_free): New.
16291 * src/scan-gram.l (handle_dollar): Takes a location.
16292 * tests/input.at (Invalid $n): Adjust.
16294 2002-06-17 Akim Demaille <akim@epita.fr>
16296 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16297 (symbol_list_prepend): New.
16298 * src/parse-gram.y (%union): `list' is a new member.
16299 (symbols.1): New, replaces...
16300 (terms_to_prec.1, nterms_to_type.1): these.
16301 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16302 Take a location as additional argument.
16303 Adjust all callers.
16305 2002-06-15 Akim Demaille <akim@epita.fr>
16307 * src/parse-gram.y: Move %token in the declaration section so that
16308 we don't depend upon CVS Bison.
16310 2002-06-15 Akim Demaille <akim@epita.fr>
16312 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16313 * src/print.c (print_core): Use it.
16315 2002-06-15 Akim Demaille <akim@epita.fr>
16317 * src/conflicts.c (log_resolution): Accept the rule involved in
16318 the sr conflicts instead of the lookahead number that points to
16320 (flush_reduce): Accept the current lookahead vector as argument,
16321 instead of the index in LA.
16322 (resolve_sr_conflict): Accept the current number of lookahead
16323 bitset to consider for the STATE, instead of the index in LA.
16324 (set_conflicts): Adjust.
16325 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16327 2002-06-15 Akim Demaille <akim@epita.fr>
16329 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16330 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16331 Adjust all dependencies.
16332 * src/lalr.c (initialize_lookaheads): Split into...
16333 (states_lookaheads_count, states_lookaheads_initialize): these.
16336 2002-06-15 Akim Demaille <akim@epita.fr>
16338 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16340 (grammar_rules_print): here.
16341 * src/reduce.c (reduce_output): Use it.
16342 * tests/reduce.at (Useless Rules, Reduced Automaton)
16343 (Underivable Rules): Adjust.
16345 2002-06-15 Akim Demaille <akim@epita.fr>
16347 Copy BYacc's nice way to report the grammar.
16349 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16351 Don't print the rules' location, it is confusing and useless.
16352 (rule_print): Use grammar_rhs_print.
16353 * src/print.c (print_grammar): Use grammar_rules_print.
16355 2002-06-15 Akim Demaille <akim@epita.fr>
16357 Complete and rationalize `useless thing' warnings.
16359 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16360 (symbol_tag_print): New.
16361 Use them everywhere in place of accessing directly the tag member.
16362 * src/gram.h, src/gram.c (rule_print): New.
16363 Use it where a rule used to be printed `by hand'.
16364 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16365 (reduce_grammar_tables): Report the useless rules.
16366 (reduce_print): Useless things are a warning, not an error.
16368 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16369 (Reduced Automaton, Underivable Rules): Adjust.
16370 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16371 * tests/conflicts.at (Unresolved SR Conflicts)
16372 (Solved SR Conflicts): Adjust.
16374 2002-06-15 Akim Demaille <akim@epita.fr>
16376 Let symbols have a location.
16378 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16380 Adjust all callers.
16381 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16382 Use location_t, not int.
16383 * src/symtab.c (symbol_check_defined): Take advantage of the
16385 * tests/regression.at (Invalid inputs): Adjust.
16387 2002-06-15 Akim Demaille <akim@epita.fr>
16389 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16390 (input): Don't try to initialize yylloc here, do it in the
16392 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16393 * src/gram.h (rule_t): Change line and action_line into location
16394 and action_location, of location_t type.
16395 Adjust all dependencies.
16396 * src/location.h, src/location.c (empty_location): New.
16397 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16398 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16399 (grammar_current_rule_symbol_append)
16400 (grammar_current_rule_action_append): Expect a location as argument.
16401 * src/reader.c (grammar_midrule_action): Adjust to attach an
16402 action's location as dummy symbol location.
16403 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16404 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16407 2002-06-14 Akim Demaille <akim@epita.fr>
16409 Grammar declarations may be found in the grammar section.
16411 * src/parse-gram.y (rules_or_grammar_declaration): New.
16412 (declarations): Each declaration may end with a semicolon, not
16414 (grammar_declaration): `"%union"'.
16415 (grammar): Branch to rules_or_grammar_declaration.
16417 2002-06-14 Akim Demaille <akim@epita.fr>
16419 * src/main.c (main): Invoke scanner_free.
16421 2002-06-14 Akim Demaille <akim@epita.fr>
16423 * src/output.c (m4_invoke): Extracted from...
16424 (output_skeleton): here.
16427 2002-06-14 Akim Demaille <akim@epita.fr>
16429 * src/parse-gram.y (directives, directive, gram)
16430 (grammar_directives, precedence_directives, precedence_directive):
16432 (declarations, declaration, grammar, grammar_declaration)
16433 (precedence_declaration, precedence_declarator): these.
16434 (symbol_declaration): New.
16436 2002-06-14 Akim Demaille <akim@epita.fr>
16438 * src/files.c (action_obstack): Remove, unused.
16439 (output_obstack): Remove it, and all its dependencies, as it is no
16441 * src/reader.c (epilogue_set): Build the epilogue in the
16443 * src/output.h, src/output.c (muscle_obstack): Move to...
16444 * src/muscle_tab.h, src/muscle_tab.h: here.
16445 (muscle_init): Initialize muscle_obstack.
16446 (muscle_free): New.
16447 * src/main.c (main): Call it.
16449 2002-06-14 Akim Demaille <akim@epita.fr>
16451 * src/location.h: New, extracted from...
16452 * src/reader.h: here.
16453 * src/Makefile.am (noinst_HEADERS): Merge into
16454 (bison_SOURCES): this.
16456 * src/parse-gram.y: Use location_t instead of Bison's.
16457 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16458 Use location_t instead of ints.
16460 2002-06-14 Akim Demaille <akim@epita.fr>
16462 * data/bison.simple, data/bison.c++: Be sure to restore the
16463 current #line when returning to the skeleton contents after having
16464 exposed the input file's #line.
16466 2002-06-12 Akim Demaille <akim@epita.fr>
16468 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16470 * tests/actions.at (Exotic Dollars): New.
16472 2002-06-12 Akim Demaille <akim@epita.fr>
16474 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16476 * tests/input.at (Torturing the Scanner): New.
16478 2002-06-11 Akim Demaille <akim@epita.fr>
16480 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16481 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16482 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16483 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16484 * src/reader.c (reader): Use it.
16486 2002-06-11 Akim Demaille <akim@epita.fr>
16488 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16489 Adjust all callers.
16490 (scanner_last_string_free): New.
16492 2002-06-11 Akim Demaille <akim@epita.fr>
16494 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16495 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16496 (last_string, YY_OBS_FREE): New.
16497 Use them when returning an ID.
16499 2002-06-11 Akim Demaille <akim@epita.fr>
16501 Have Bison grammars parsed by a Bison grammar.
16503 * src/reader.c, src/reader.h (prologue_augment): New.
16504 * src/reader.c (copy_definition): Remove.
16506 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16507 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16508 (grammar_current_rule_prec_set, grammar_current_rule_check)
16509 (grammar_current_rule_symbol_append)
16510 (grammar_current_rule_action_append): Export.
16511 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16512 (symbol_list_action_append): Remove.
16513 Hook the routines from reader.
16514 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16515 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16517 * src/reader.c (read_declarations): Remove, unused.
16519 * src/parse-gram.y: Handle the epilogue.
16520 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16521 (grammar_start_symbol_set): this.
16522 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16523 * src/reader.c (readgram): Remove, unused.
16524 (reader): Adjust to insert eoftoken and axiom where appropriate.
16526 * src/reader.c (copy_dollar): Replace with...
16527 * src/scan-gram.h (handle_dollar): this.
16528 * src/parse-gram.y: Remove `%thong'.
16530 * src/reader.c (copy_at): Replace with...
16531 * src/scan-gram.h (handle_at): this.
16533 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16536 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16539 * src/reader.h, src/reader.c (grammar_rule_end): New.
16541 * src/parse.y (current_type, current_class): New.
16542 Implement `%nterm', `%token' support.
16543 Merge `%term' into `%token'.
16544 (string_as_id): New.
16545 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16548 * src/parse-gram.y: Be sure to handle properly the beginning of
16551 * src/parse-gram.y: Handle %type.
16552 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16554 * src/parse-gram.y: More directives support.
16555 * src/options.c: No longer handle source directives.
16557 * src/parse-gram.y: Fix %output.
16559 * src/parse-gram.y: Handle %union.
16560 Use the prologue locations.
16561 * src/reader.c (parse_union_decl): Remove.
16563 * src/reader.h, src/reader.c (epilogue_set): New.
16564 * src/parse-gram.y: Use it.
16566 * data/bison.simple, data/bison.c++: b4_stype is now either not
16567 defined, then default to int, or to the contents of %union,
16568 without `union' itself.
16570 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16572 * src/output.c (actions_output): Don't output braces, as they are
16573 already handled by the scanner.
16575 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16576 characters to themselves.
16578 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16579 that the epilogue has a proper #line.
16581 * src/parse-gram.y: Handle precedence/associativity.
16583 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16585 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16586 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16587 at all to define terminals that cannot be emitted.
16589 * src/scan-gram.l: Escape M4 characters.
16591 * src/scan-gram.l: Working properly with escapes in user
16592 strings/characters.
16594 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16595 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16597 Use more modest sizes, as for the time being the parser does not
16598 release memory, and therefore the process swallows a huge amount
16601 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16602 stricter %token grammar.
16604 * src/symtab.h (associativity): Add `undef_assoc'.
16605 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16606 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16608 * tests/regression.at (Invalid %directive): Remove, as it is now
16610 (Invalid inputs): Adjust to the new error messages.
16611 (Token definitions): The new grammar doesn't allow too many
16614 * src/lex.h, src/lex.c: Remove.
16615 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16616 (copy_character, copy_string2, copy_string, copy_identifier)
16617 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16618 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16619 (parse_action): Remove.
16620 * po/POTFILES.in: Adjust.
16622 2002-06-11 Akim Demaille <akim@epita.fr>
16624 * src/reader.c (parse_action): Don't store directly into the
16625 rule's action member: return the action as a string.
16626 Don't require `rule_length' as an argument: compute it.
16627 (grammar_current_rule_symbol_append)
16628 (grammar_current_rule_action_append): New, eved out from
16630 Remove `action_flag', `rulelength', unused now.
16632 2002-06-11 Akim Demaille <akim@epita.fr>
16634 * src/reader.c (grammar_current_rule_prec_set).
16635 (grammar_current_rule_check): New, eved out from...
16637 Remove `xaction', `first_rhs': useless.
16638 * tests/input.at (Type clashes): New.
16639 * tests/existing.at (GNU Cim Grammar): Adjust.
16641 2002-06-11 Akim Demaille <akim@epita.fr>
16643 * src/reader.c (grammar_midrule_action): New, Eved out from
16646 2002-06-11 Akim Demaille <akim@epita.fr>
16648 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16650 (readgram): Use them as replacement of inlined code, crule and
16653 2002-06-11 Akim Demaille <akim@epita.fr>
16655 * src/reader.c (grammar_end, grammar_symbol_append): New.
16656 (readgram): Use them.
16657 Make the use of `p' as local as possible.
16659 2002-06-10 Akim Demaille <akim@epita.fr>
16661 GCJ's parser requires the tokens to be defined before the prologue.
16663 * data/bison.simple: Output the token definition before the user's
16665 * tests/regression.at (Braces parsing, Duplicate string)
16666 (Mixing %token styles): Check the output from bison.
16667 (Early token definitions): New.
16669 2002-06-10 Akim Demaille <akim@epita.fr>
16671 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16672 assigning twice the same user number to a token, so that we can
16674 * src/lex.c (lex): here.
16675 Also use `symbol_class_set' instead of hand written code.
16676 * src/reader.c (parse_assoc_decl): Likewise.
16678 2002-06-10 Akim Demaille <akim@epita.fr>
16680 * src/symtab.c, src/symtab.c (symbol_class_set)
16681 (symbol_user_token_number_set): New.
16682 * src/reader.c (parse_token_decl): Use them.
16683 Use a switch instead of ifs.
16684 Use a single argument.
16686 2002-06-10 Akim Demaille <akim@epita.fr>
16688 Remove `%thong' support as it is undocumented, unused, duplicates
16689 `%token's job, and creates useless e-mail traffic with people who
16690 want to know what it is, why it is undocumented, unused, and
16691 duplicates `%token's job.
16693 * src/reader.c (parse_thong_decl): Remove.
16694 * src/options.c (option_table): Remove "thong".
16695 * src/lex.h (tok_thong): Remove.
16697 2002-06-10 Akim Demaille <akim@epita.fr>
16699 * src/symtab.c, src/symtab.c (symbol_type_set)
16700 (symbol_precedence_set): New.
16701 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16702 (value_components_used): Remove, unused.
16704 2002-06-09 Akim Demaille <akim@epita.fr>
16706 Move symbols handling code out of the reader.
16708 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16709 (axiom): Move to...
16710 * src/symtab.h, src/symtab.c: here.
16712 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16713 * src/reader.c (startval): Rename as...
16714 * src/symtab.h, src/symtab.c (startsymbol): this.
16715 * src/reader.c: Adjust.
16717 * src/reader.c (symbol_check_defined, symbol_make_alias)
16718 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16719 (token_translations_init)
16721 * src/symtab.c: here.
16722 * src/reader.c (packsymbols): Move to...
16723 * src/symtab.h, src/symtab.c (symbols_pack): here.
16724 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16727 2002-06-03 Akim Demaille <akim@epita.fr>
16729 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16732 2002-06-03 Akim Demaille <akim@epita.fr>
16734 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16735 structs with non literals.
16736 * src/scan-skel.l: never-interactive.
16737 * src/conflicts.c (enum conflict_resolution_e): No trailing
16739 * src/getargs.c (usage): Split long literal strings.
16740 Reported by Hans Aberg.
16742 2002-05-28 Akim Demaille <akim@epita.fr>
16744 * data/bison.c++: Use C++ ostreams.
16745 (cdebug_): New member.
16747 2002-05-28 Akim Demaille <akim@epita.fr>
16749 * src/output.c (output_skeleton): Be sure to allocate enough room
16750 for `/' _and_ for `\0' in full_skeleton.
16752 2002-05-28 Akim Demaille <akim@epita.fr>
16754 * data/bison.c++: Catch up with bison.simple:
16755 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16756 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16757 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16758 and popping traces.
16760 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16762 * src/output.c (output_skeleton): Put an explicit path in front of
16763 the skeleton file name, rather than relying on the -I directory,
16764 to partially alleviate effects of having a skeleton file lying around
16765 in the current directory.
16767 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16769 * src/conflicts.c (log_resolution): Correct typo:
16770 obstack_printf should be obstack_fgrow1.
16772 2002-05-26 Akim Demaille <akim@epita.fr>
16774 * src/state.h (state_t): `solved_conflicts' is a new member.
16775 * src/LR0.c (new_state): Set it to 0.
16776 * src/conflicts.h, src/conflicts.c (print_conflicts)
16777 (free_conflicts, solve_conflicts): Rename as...
16778 (conflicts_print, conflicts_free, conflicts_solve): these.
16780 * src/conflicts.c (enum conflict_resolution_e)
16781 (solved_conflicts_obstack): New, used by...
16782 (log_resolution): this.
16783 Adjust to attach the conflict resolution to each state.
16784 Complete the description with the precedence/associativity
16786 (resolve_sr_conflict): Adjust.
16787 * src/print.c (print_state): Output its solved_conflicts.
16788 * tests/conflicts.at (Unresolved SR Conflicts)
16789 (Solved SR Conflicts): Exercise --report=all.
16791 2002-05-26 Akim Demaille <akim@epita.fr>
16793 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16794 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16795 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16796 (token_number_t, item_number_as_token_number)
16797 (token_number_as_item_number, muscle_insert_token_number_table):
16799 (symbol_number_t, item_number_as_symbol_number)
16800 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16801 these, since it is more appropriate.
16803 2002-05-26 Akim Demaille <akim@epita.fr>
16805 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16807 * data/bison.simple (yystos) [YYDEBUG]: New.
16808 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16810 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16812 2002-05-25 Akim Demaille <akim@epita.fr>
16814 * doc/bison.texinfo (Debugging): Split into...
16815 (Tracing): this new section, its former contents, and...
16816 (Understanding): this new section.
16817 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16819 (report_flag): this.
16820 Adjust all dependencies.
16821 (report_args, report_types, report_argmatch): New.
16822 (usage, getargs): Report/support -r, --report.
16824 (struct option_table_struct): Rename as..,
16825 (struct option_table_s): this.
16826 Rename the `set_flag' member to `flag' to match with getopt_long's
16828 * src/options.c (option_table): Split verbose into an entry for
16829 %verbose, and another for --verbose.
16830 Support --report/-r, so remove -r from the obsolete --raw.
16831 * src/print.c: Attach full item sets and lookaheads reports to
16832 report_flag instead of trace_flag.
16833 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16835 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16836 and Paul Eggert <eggert@twinsun.com>
16838 * data/bison.simple (yyparse): Correct error handling to conform to
16839 POSIX and yacc. Specifically, after syntax error is discovered,
16840 do not reduce further before shifting the error token.
16841 Clean up the code a bit by removing the labels yyerrdefault,
16842 yyerrhandle, yyerrpop.
16843 * NEWS: Document the above.
16845 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16847 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16848 type; it isn't always big enough, since it doesn't necessarily
16849 include non-terminals.
16850 (yytranslate): Expand definition of yy_token_number_type, so that
16851 the latter can be removed.
16852 (yy_token_number_type): Remove, only one use.
16853 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16854 don't use TokenNumberType as element type.
16856 * tests/regression.at: Modify expected output to agree with change
16857 to yyr1 and yytranslate.
16859 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16861 * src/reader.c (parse_action): Use copy_character instead of
16864 2002-05-13 Akim Demaille <akim@epita.fr>
16866 * tests/regression.at (Token definitions): Prototype yylex and
16869 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16871 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16872 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16874 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16876 2002-05-07 Akim Demaille <akim@epita.fr>
16878 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16879 avoid GCC warnings.
16881 2002-05-07 Akim Demaille <akim@epita.fr>
16885 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16886 over the RHS of each rule.
16887 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16888 * src/state.h (state_t): Member `nitems' is unsigned short.
16889 * src/LR0.c (get_state): Adjust.
16890 * src/reader.c (packgram): Likewise.
16891 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16893 (muscle_insert_int_table): Remove, unused.
16894 (prepare_rules): Remove `max'.
16896 2002-05-06 Akim Demaille <akim@epita.fr>
16898 * src/closure.c (print_firsts): Display of the symbol tags.
16899 (bitmatrix_print): Move to...
16900 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16902 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16904 2002-05-06 Akim Demaille <akim@epita.fr>
16906 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16909 2002-05-06 Akim Demaille <akim@epita.fr>
16911 * src/LR0.c (new_state, get_state): Instead of using the global
16912 `kernel_size' and `kernel_base', have two new arguments:
16913 `core_size' and `core'.
16916 2002-05-06 Akim Demaille <akim@epita.fr>
16918 * src/reader.c (packgram): No longer end `ritem' with a 0
16919 sentinel: it is not used.
16921 2002-05-05 Akim Demaille <akim@epita.fr>
16923 New experimental feature: display the lookaheads in the report and
16926 * src/print (print_core): When --trace-flag, display the rules
16928 * src/print_graph.c (print_core): Likewise.
16929 Swap the arguments.
16932 2002-05-05 Akim Demaille <akim@epita.fr>
16934 * tests/torture.at (Many lookaheads): New test.
16936 2002-05-05 Akim Demaille <akim@epita.fr>
16938 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16939 (GENERATE_MUSCLE_INSERT_TABLE): this.
16940 (output_int_table, output_unsigned_int_table, output_short_table)
16941 (output_token_number_table, output_item_number_table): Replace with...
16942 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16943 (muscle_insert_short_table, muscle_insert_token_number_table)
16944 (muscle_insert_item_number_table): these.
16945 Adjust all callers.
16946 (prepare_tokens): Don't free `translations', since...
16947 * src/reader.h, src/reader.c (grammar_free): do it.
16949 * src/gram.h, src/gram.c (grammar_free): here.
16950 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16953 2002-05-05 Akim Demaille <akim@epita.fr>
16955 * src/output.c (output_unsigned_int_table): New.
16956 (prepare_rules): `i' is unsigned.
16957 `prhs', `rline', `r2' are unsigned int.
16958 Rename muscle `rhs_number_max' as `rhs_max'.
16959 Output muscles `prhs_max', `rline_max', and `r2_max'.
16961 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16962 to compute types instead of constant types.
16963 * tests/regression.at (Web2c Actions): Adjust.
16965 2002-05-04 Akim Demaille <akim@epita.fr>
16967 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16968 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16969 Adjust dependencies.
16970 * src/output.c (token_definitions_output): Be sure not to output a
16971 `#define 'a'' when fed with `%token 'a' "a"'.
16972 * tests/regression.at (Token definitions): New.
16974 2002-05-03 Paul Eggert <eggert@twinsun.com>
16976 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16979 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16981 * Makefile.am (SUBDIRS): Remove intl.
16982 (EXTRA_DIST): Add config/config.rpath.
16984 2002-05-03 Akim Demaille <akim@epita.fr>
16986 * data/bison.simple (m4_if): Don't output empty enums.
16987 And actually, output valid enum definitions :(.
16989 2002-05-03 Akim Demaille <akim@epita.fr>
16991 * configure.bat: Remove, completely obsolete.
16992 * Makefile.am (EXTRA_DIST): Adjust.
16993 Don't distribute config.rpath...
16994 * config/Makefile.am (EXTRA_DIST): Do it.
16996 2002-05-03 Akim Demaille <akim@epita.fr>
16998 * configure.in (GETTEXT_VERSION): New.
16999 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17001 2002-05-03 Akim Demaille <akim@epita.fr>
17003 * data/bison.simple (b4_token_enum): New.
17004 (b4_token_defines): Use it to output tokens both as #define and
17006 Suggested by Paul Eggert.
17007 * src/output.c (token_definitions_output): Don't output spurious
17010 2002-05-03 Akim Demaille <akim@epita.fr>
17012 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17014 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17016 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17017 Update the stack class, give a try to deque as the default container.
17019 2002-05-02 Akim Demaille <akim@epita.fr>
17021 * data/bison.simple (yyparse): Do not implement @$ = @1.
17022 (YYLLOC_DEFAULT): Adjust to do it.
17023 * doc/bison.texinfo (Location Default Action): Fix.
17025 2002-05-02 Akim Demaille <akim@epita.fr>
17027 * src/reader.c (parse_braces): Merge into...
17028 (parse_action): this.
17030 2002-05-02 Akim Demaille <akim@epita.fr>
17032 * configure.in (ALL_LINGUAS): Remove.
17033 * po/LINGUAS, hr.po: New.
17035 2002-05-02 Akim Demaille <akim@epita.fr>
17037 Remove the so called hairy (semantic) parsers.
17039 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17040 * src/gram.h, src/gram.c (semantic_parser): Remove.
17041 (rule_t): Remove the guard and guard_line members.
17042 * src/lex.h (token_t): remove tok_guard.
17043 * src/options.c (option_table): Remove %guard and %semantic_parser
17045 * src/output.c, src/output.h (guards_output): Remove.
17047 (token_definitions_output): Don't output the `T'
17049 (output_skeleton): Don't output the guards.
17050 * src/files.c, src/files.c (attrsfile): Remove.
17051 * src/reader.c (symbol_list): Remove the guard and guard_line
17053 Adjust dependencies.
17054 (parse_guard): Remove.
17055 * data/bison.hairy: Remove.
17056 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17059 2002-05-02 Akim Demaille <akim@epita.fr>
17061 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17062 (parse_guard): Rename the formal argument `stack_offset' as
17063 `rule_length', which is more readable.
17065 (copy_at, copy_dollar): Instead of outputting the hard coded
17066 values of $$, $n and so forth, output invocation to b4_lhs_value,
17067 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17068 Note: this patch partially drops `semantic-parser' support: it
17069 always does `rule_length - n', where semantic parsers ought to
17071 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17072 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17074 2002-05-02 Akim Demaille <akim@epita.fr>
17076 * configure.in (AC_INIT): Bump to 1.49b.
17077 (AM_INIT_AUTOMAKE): Short invocation.
17079 2002-05-02 Akim Demaille <akim@epita.fr>
17083 2002-05-01 Akim Demaille <akim@epita.fr>
17085 * src/skeleton.h: Remove.
17087 2002-05-01 Akim Demaille <akim@epita.fr>
17089 * src/skeleton.h: Fix the #endif.
17090 Reported by Magnus Fromreide.
17092 2002-04-26 Paul Eggert <eggert@twinsun.com>
17094 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17095 Define if we define YYSTYPE and YYLTYPE, respectively.
17096 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17098 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17100 * src/scan-skel.l: Postprocess quadrigraphs.
17102 * src/reader.c (copy_character): New function, used to output
17103 single characters while replacing `[' and `]' with quadrigraphs, to
17104 avoid troubles with M4 quotes.
17105 (copy_comment): Output characters with copy_character.
17106 (read_additionnal_code): Likewise.
17107 (copy_string2): Likewise.
17108 (copy_definition): Likewise.
17110 * tests/calc.at: Exercise M4 quoting.
17112 2002-04-25 Akim Demaille <akim@epita.fr>
17114 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17115 between `!' and the command.
17116 Reported by Paul Eggert.
17118 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17120 * tests/calc.at: Exercise prologue splitting.
17122 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17123 `b4_post_prologue' instead of `b4_prologue'.
17125 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17127 (output): Free pre_prologue_obstack and post_prologue_obstack.
17128 * src/files.h, src/files.c (attrs_obstack): Remove.
17129 (pre_prologue_obstack, post_prologue_obstack): New.
17130 * src/reader.c (copy_definition): Add a parameter to specify the
17131 obstack to fill, instead of using attrs_obstack unconditionally.
17132 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17133 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17135 2002-04-23 Paul Eggert <eggert@twinsun.com>
17137 * data/bison.simple: Remove unnecessary commentary and white
17138 space differences from 1_29-branch.
17139 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17141 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17142 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17143 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17144 constructors or destructors.
17146 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17148 2002-04-23 Akim Demaille <akim@epita.fr>
17150 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17151 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17152 location with columns.
17153 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17154 All reported by Paul Eggert.
17156 2002-04-22 Akim Demaille <akim@epita.fr>
17158 * src/reduce.c (dump_grammar): Move to...
17159 * src/gram.h, src/gram.c (grammar_dump): here.
17160 Be sure to separate long item numbers.
17161 Don't read the members of a rule's prec if its nil.
17163 2002-04-22 Akim Demaille <akim@epita.fr>
17165 * src/output.c (table_size, table_grow): New.
17166 (MAXTABLE): Remove, replace uses with table_size.
17167 (pack_vector): Instead of dying when the table is too big, grow it.
17169 2002-04-22 Akim Demaille <akim@epita.fr>
17171 * data/bison.simple (yyr1): Its type is that of a token number.
17172 * data/bison.c++ (r1_): Likewise.
17173 * tests/regression.at (Web2c Actions): Adjust.
17175 2002-04-22 Akim Demaille <akim@epita.fr>
17177 * src/reader.c (token_translations_init): 256 is now the default
17178 value for the error token, i.e., it will be assigned another
17179 number if the user assigned 256 to one of her tokens.
17180 (reader): Don't force 256 to error.
17181 * doc/bison.texinfo (Symbols): Adjust.
17182 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17183 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17184 etc. instead of 10, 20, 30 (which was used to `jump' over error
17185 (256) and undefined (2)).
17187 2002-04-22 Akim Demaille <akim@epita.fr>
17189 Propagate more token_number_t.
17191 * src/gram.h (token_number_as_item_number)
17192 (item_number_as_token_number): New.
17193 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17194 Use it to create output_item_number_table and
17195 output_token_number_table.
17196 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17197 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17198 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17199 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17201 2002-04-22 Akim Demaille <akim@epita.fr>
17203 * src/output.h, src/output.c (get_lines_number): Remove.
17205 2002-04-19 Akim Demaille <akim@epita.fr>
17207 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17209 (Debugging): More details about enabling the debugging features.
17210 (Table of Symbols): Describe $$, $n, @$, and @n.
17211 Suggested by Tim Josling.
17213 2002-04-19 Akim Demaille <akim@epita.fr>
17215 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17217 2002-04-10 Akim Demaille <akim@epita.fr>
17219 * src/system.h: Rely on HAVE_LIMITS_H.
17220 Suggested by Paul Eggert.
17222 2002-04-09 Akim Demaille <akim@epita.fr>
17224 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17225 full stderr, and strip it according to the bison options, instead
17226 of composing the error message from different bits.
17227 This makes it easier to check for several error messages.
17228 Adjust all the invocations.
17229 Add an invocation exercising the error token.
17230 Add an invocation demonstrating a stupid error message.
17231 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17233 Error message are for stderr, not stdout.
17235 2002-04-09 Akim Demaille <akim@epita.fr>
17237 * src/gram.h, src/gram.c (error_token_number): Remove, use
17239 * src/reader.c (reader): Don't specify the user token number (2)
17240 for $undefined, as it uselessly prevents using it.
17241 * src/gram.h (token_number_t): Move to...
17242 * src/symtab.h: here.
17243 (state_t.number): Is a token_number_t.
17244 * src/print.c, src/reader.c: Use undeftoken->number instead of
17246 (Even though this 2 is not the same as above: the number of the
17247 undeftoken remains being 2, it is its user token number which
17249 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17250 `user_token_number_max'.
17251 Output `undef_token_number'.
17252 * data/bison.simple, data/bison.c++: Use them.
17253 Be sure to map invalid yylex return values to
17254 `undef_token_number'. This saves us from gratuitous SEGV.
17256 * tests/conflicts.at (Solved SR Conflicts)
17257 (Unresolved SR Conflicts): Adjust.
17258 * tests/regression.at (Web2c Actions): Adjust.
17260 2002-04-08 Akim Demaille <akim@epita.fr>
17262 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17264 Remove the duplicate `typedefs'.
17265 (RhsNumberType): Fix the declaration and various other typos.
17267 * data/bison.simple: Use __ofile__.
17268 * src/scan-skel.l: Handle __ofile__.
17270 2002-04-08 Akim Demaille <akim@epita.fr>
17272 * src/gram.h (item_number_t): New, the type of item numbers in
17273 RITEM. Note that it must be able to code symbol numbers as
17274 positive number, and the negation of rule numbers as negative
17276 Adjust all dependencies (pretty many).
17277 * src/reduce.c (rule): Remove this `short *' pointer: use
17279 * src/system.h (MINSHORT, MAXSHORT): Remove.
17280 Include `limits.h'.
17281 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17282 (shortcpy): Remove.
17283 (MAXTABLE): Move to...
17284 * src/output.c (MAXTABLE): here.
17285 (prepare_rules): Use output_int_table to output rhs.
17286 * data/bison.simple, data/bison.c++: Adjust.
17287 * tests/torture.at (Big triangle): Move the limit from 254 to
17289 * tests/regression.at (Web2c Actions): Ajust.
17291 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17292 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17293 passes, but produces negative #line number, once fixed, GCC is
17294 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17296 * src/state.h (state_h): Code input lines on ints, not shorts.
17298 2002-04-08 Akim Demaille <akim@epita.fr>
17300 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17301 and then the grammar.
17303 2002-04-08 Akim Demaille <akim@epita.fr>
17305 * src/system.h: No longer using strndup.
17307 2002-04-07 Akim Demaille <akim@epita.fr>
17309 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17310 * src/output.c (output_table_data): Return the longest number.
17311 (prepare_tokens): Output `token_number_max').
17312 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17314 Use them to define yy_token_number_type/TokenNumberType.
17315 Use this type for yytranslate.
17316 * tests/torture.at (Big triangle): Push the limit from 124 to
17318 * tests/regression.at (Web2c Actions): Adjust.
17320 2002-04-07 Akim Demaille <akim@epita.fr>
17322 * tests/torture.at (Big triangle): New.
17323 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17324 * tests/existing.at: here.
17326 2002-04-07 Akim Demaille <akim@epita.fr>
17328 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17330 Adjust dependencies.
17332 2002-04-07 Akim Demaille <akim@epita.fr>
17334 * src/reader.c: Normalize increments to prefix form.
17336 2002-04-07 Akim Demaille <akim@epita.fr>
17338 * src/reader.c, symtab.c: Remove debugging code.
17340 2002-04-07 Akim Demaille <akim@epita.fr>
17342 Rename all the `bucket's as `symbol_t'.
17344 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17345 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17346 * src/symtab.c, src/symtab.h (bucket): Rename as...
17348 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17349 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17350 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17351 (buckets_new, buckets_free, buckets_do): Rename as...
17352 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17353 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17354 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17355 (symbols_new, symbols_free, symbols_do): these.
17357 2002-04-07 Akim Demaille <akim@epita.fr>
17359 Use lib/hash for the symbol table.
17361 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17363 * src/lex.c (lex): Set the `number' member of new terminals.
17364 * src/reader.c (bucket_check_defined, bucket_make_alias)
17365 (bucket_check_alias_consistence, bucket_translation): New.
17366 (reader, grammar_free, readgram, token_translations_init)
17367 (packsymbols): Adjust.
17368 (reader): Number the predefined tokens.
17369 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17370 for predefined tokens.
17371 * src/symtab.h (bucket): Remove all the hash table related
17373 * src/symtab.c (symtab): Replace by...
17374 (bucket_table): this.
17375 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17376 (buckets_new, buckets_do): New.
17378 2002-04-07 Akim Demaille <akim@epita.fr>
17380 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17381 (start_symbol, max_user_token_number, semantic_parser)
17382 (error_token_number): Initialize.
17383 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17386 (errtoken, eoftoken, undeftoken, axiom): Extern.
17388 2002-04-07 Akim Demaille <akim@epita.fr>
17390 * src/gram.h (rule_s): prec and precsym are now pointers
17391 to the bucket giving the priority/associativity.
17392 Member `associativity' removed: useless.
17393 * src/reduce.c, src/conflicts.c: Adjust.
17395 2002-04-07 Akim Demaille <akim@epita.fr>
17397 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17398 Properly escape the symbols' TAG when outputting them.
17400 2002-04-07 Akim Demaille <akim@epita.fr>
17402 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17404 2002-04-07 Akim Demaille <akim@epita.fr>
17406 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17407 (LArule): this, which is an array to rule_t*.
17408 * src/print.c, src/conflicts.c: Adjust.
17410 2002-04-07 Akim Demaille <akim@epita.fr>
17412 * src/gram.h (rule_t): Rename `number' as `user_number'.
17413 `number' is a new member.
17414 Adjust dependencies.
17415 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17417 2002-04-07 Akim Demaille <akim@epita.fr>
17419 As a result of the previous patch, it is no longer needed
17420 to reorder ritem itself.
17422 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17424 2002-04-07 Akim Demaille <akim@epita.fr>
17426 Be sure never to walk through RITEMS, but use only data related to
17427 the rules themselves. RITEMS should be banished.
17429 * src/output.c (output_token_translations): Rename as...
17430 (prepare_tokens): this.
17431 In addition to `translate', prepare the muscles `tname' and
17432 `toknum', which were handled by...
17433 (output_rule_data): this.
17434 Remove, and move the remainder of its outputs into...
17435 (prepare_rules): this new routines, which also merges content from
17436 (output_gram): this.
17437 (prepare_rules): Be sure never to walk through RITEMS.
17438 (output_stos): Rename as...
17439 (prepare_stos): this.
17440 (output): Always invoke prepare_states, after all, just don't use it
17441 in the output if you don't need it.
17443 2002-04-07 Akim Demaille <akim@epita.fr>
17445 * src/LR0.c (new_state): Display `nstates' as the name of the
17446 newly created state.
17447 Adjust to initialize first_state and last_state if needed.
17448 Be sure to distinguish the initial from the final state.
17449 (new_states): Create the itemset of the initial state, and use
17451 * src/closure.c (closure): Now that the initial state has its
17452 items properly set, there is no need for a special case when
17453 creating `ruleset'.
17455 As a result, now the rule 0, reducing to $axiom, is visible in the
17456 outputs. Adjust the test suite.
17458 * tests/conflicts.at (Solved SR Conflicts)
17459 (Unresolved SR Conflicts): Adjust.
17460 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17461 * tests/conflicts.at (S/R in initial): New.
17463 2002-04-07 Akim Demaille <akim@epita.fr>
17465 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17466 the RHS of the rules.
17467 * src/output.c (output_gram): Likewise.
17469 2002-04-07 Akim Demaille <akim@epita.fr>
17471 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17473 Adjust all dependencies.
17474 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17475 `number' of the buckets too.
17476 * src/gram.h: Include `symtab.h'.
17477 (associativity): Move to...
17478 * src/symtab.h: here.
17479 No longer include `gram.h'.
17481 2002-04-07 Akim Demaille <akim@epita.fr>
17483 * src/gram.h, src/gram.c (rules_rhs_length): New.
17484 (ritem_longest_rhs): Use it.
17485 * src/gram.h (rule_t): `number' is a new member.
17486 * src/reader.c (packgram): Set it.
17487 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17488 the end of `rules', and count them out of `nrules'.
17489 (reduce_output, dump_grammar): Adjust.
17490 * src/print.c (print_grammar): It is no longer needed to check for
17491 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17492 * tests/reduce.at (Reduced Automaton): New test.
17494 2002-04-07 Akim Demaille <akim@epita.fr>
17496 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17497 lacking `+ 1' to nrules, Bison reported as useless a token if it
17498 was used solely to set the precedence of the last rule...
17500 2002-04-07 Akim Demaille <akim@epita.fr>
17502 * data/bison.c++, data/bison.simple: Don't output the current file
17503 name in #line, to avoid useless diffs between two identical
17504 outputs under different names.
17506 2002-04-07 Akim Demaille <akim@epita.fr>
17508 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17509 Normalize loops to using `< nrules + 1', not `<= nrules'.
17511 2002-04-07 Akim Demaille <akim@epita.fr>
17515 2002-04-07 Akim Demaille <akim@epita.fr>
17517 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17518 bucket.value as bucket.number.
17520 2002-04-07 Akim Demaille <akim@epita.fr>
17522 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17523 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17524 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17525 RHS, instead of being an index in RITEMS.
17527 2002-04-04 Paul Eggert <eggert@twinsun.com>
17529 * doc/bison.texinfo: Update copyright date.
17530 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17531 (Symbols): Warn about running Bison in one character set,
17532 but compiling and/or running in an incompatible one.
17533 Warn about character code 256, too.
17535 2002-04-03 Paul Eggert <eggert@twinsun.com>
17537 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17538 YYERROR_VERBOSE is nonzero, not whether it is defined.
17540 Merge changes from bison-1_29-branch.
17542 2002-03-20 Paul Eggert <eggert@twinsun.com>
17544 Merge fixes from Debian bison_1.34-1.diff.
17546 * configure.in (AC_PREREQ): 2.53.
17548 2002-03-20 Akim Demaille <akim@epita.fr>
17550 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17552 2002-03-19 Paul Eggert <eggert@twinsun.com>
17554 * src/bison.simple (YYCOPY): New macro.
17555 (YYSTACK_RELOCATE): Use it.
17556 Remove Type arg; no longer needed. All callers changed.
17557 (yymemcpy): Remove; no longer needed.
17559 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17560 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17562 2002-03-19 Akim Demaille <akim@epita.fr>
17564 Test and fix the #line outputs.
17566 * tests/atlocal.at (GCC): New.
17567 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17568 (Prologue synch line, %union synch line, Postprologue synch line)
17569 (Action synch line, Epilogue synch line): New tests.
17570 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17571 * data/bison.simple, data/bison.c++: Use it.
17573 2002-03-19 Akim Demaille <akim@epita.fr>
17575 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17576 (Solved SR Conflicts, %expect not enough, %expect right)
17577 (%expect too much): Move to...
17578 * tests/conflicts.at: this new file.
17580 2002-03-19 Akim Demaille <akim@epita.fr>
17582 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17583 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17584 that we can move to enums for instance.
17585 * src/output.c (token_definitions_output): Output a list of
17586 `token-name, token-number' instead of the #define.
17587 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17589 2002-03-14 Akim Demaille <akim@epita.fr>
17591 Use Gettext 0.11.1.
17593 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17595 * data/bison.c++: Make the user able to add members to the generated
17596 parser by subclassing.
17598 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17600 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17602 Reported by Nicolas Tisserand and Nicolas Burrus.
17604 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17606 * src/reader.c: Warn about lacking semi-colons, do not complain.
17608 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17610 * data/bison.c++: Remove a debug line.
17612 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17614 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17615 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17616 provide a default implementation.
17618 2002-03-04 Akim Demaille <akim@epita.fr>
17620 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17621 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17622 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17623 * tests/semantic.at (Parsing Guards): Similarly.
17624 * src/reader.at (readgram): Complain if the last rule is not ended
17627 2002-03-04 Akim Demaille <akim@epita.fr>
17629 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17630 * src/closure.c: here.
17631 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17633 * src/warshall.h, src/warshall.c: Remove.
17634 * tests/sets.at (Broken Closure): Adjust.
17636 2002-03-04 Akim Demaille <akim@epita.fr>
17638 * src/output.c (output_skeleton): tempdir is const.
17639 bytes_read is unused.
17641 2002-03-04 Akim Demaille <akim@epita.fr>
17643 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17644 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17646 From Michael Hayes.
17648 2002-03-04 Akim Demaille <akim@epita.fr>
17650 * src/closure.c (closure): `r' is unused.
17652 2002-03-04 Akim Demaille <akim@epita.fr>
17654 * tests/sets.at (Broken Closure): Add the ending `;'.
17655 * src/reader.at (readgram): Complain if a rule is not ended with a
17658 2002-03-04 Akim Demaille <akim@epita.fr>
17660 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17661 (count_sr_conflicts): Use bitset_count.
17662 * src/reduce.c (inaccessable_symbols): Ditto.
17663 (bits_size): Remove.
17664 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17666 2002-03-04 Akim Demaille <akim@epita.fr>
17668 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17669 * src/reduce.c: Remove the `bitset_zero's following the
17670 `bitset_create's, as now it is performed by the latter.
17672 2002-03-04 Akim Demaille <akim@epita.fr>
17674 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17675 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17676 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17677 latest sources from Michael.
17679 2002-03-04 Akim Demaille <akim@epita.fr>
17681 * src/output.c (output): Don't free the grammar.
17682 * src/reader.c (grammar_free): New.
17683 * src/main.c (main): Call it and don't free symtab here.
17685 2002-03-04 Akim Demaille <akim@epita.fr>
17687 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17689 Reported by Benoit Perrot.
17691 2002-03-04 Akim Demaille <akim@epita.fr>
17693 Use bitset operations when possible, not loops over bits.
17695 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17697 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17698 * src/reduce.c (useless_nonterminals): Formatting changes.
17699 * src/warshall.c (TC): Use bitset_or.
17701 2002-03-04 Akim Demaille <akim@epita.fr>
17703 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17704 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17707 2002-03-04 Akim Demaille <akim@epita.fr>
17709 * src/lalr.c (F): Now a bitset*.
17710 Adjust all dependencies.
17712 2002-03-04 Akim Demaille <akim@epita.fr>
17714 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17715 Adjust all dependencies.
17717 2002-03-04 Akim Demaille <akim@epita.fr>
17719 * src/L0.c, src/LR0.h (nstates): Be size_t.
17720 Adjust comparisons (signed vs unsigned).
17721 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17723 Adjust all dependencies.
17725 2002-03-04 Akim Demaille <akim@epita.fr>
17727 * src/closure.c (firsts): Now, also a bitset.
17728 Adjust all dependencies.
17729 (varsetsize): Remove, now unused.
17730 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17732 2002-03-04 Akim Demaille <akim@epita.fr>
17734 * src/print.c: Convert to use bitset.h, not hand coded iterations
17737 2002-03-04 Akim Demaille <akim@epita.fr>
17739 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17741 2002-03-04 Akim Demaille <akim@epita.fr>
17743 * src/closure.c (ruleset): Be a bitset.
17744 (rulesetsize): Remove.
17746 2002-03-04 Akim Demaille <akim@epita.fr>
17748 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17749 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17750 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17751 * src/closure.c (fderives): Be an array of bitsets.
17753 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17755 * data/bison.c++: Merge the two generated headers. Insert a copyright
17756 notice in each output file.
17758 2002-02-28 Akim Demaille <akim@epita.fr>
17760 * data/bison.c++: Copy the prologue of bison.simple to fetch
17761 useful M4 definitions, such as b4_header_guard.
17763 2002-02-25 Akim Demaille <akim@epita.fr>
17765 * src/getargs.c (version): Give the name of the authors, and use a
17766 translator friendly scheme for the bgr
17769 2002-02-25 Akim Demaille <akim@epita.fr>
17771 * src/output.c (header_output): Remove, now handled completely via
17774 2002-02-25 Akim Demaille <akim@epita.fr>
17776 * m4/m4.m4: New, from CVS Autoconf.
17777 * configure.in: Invoke it.
17778 * src/output.c (output_skeleton): Use its result instead of the
17781 2002-02-25 Akim Demaille <akim@epita.fr>
17783 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17785 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17786 * src/output.c (output_skeleton): Use mkstemp to create a real
17788 Move the filling of `skeleton' and its muscle to...
17790 (output): Move the definition of the prologue muscle to...
17792 * src/system.h (DEFAULT_TMPDIR): New.
17794 2002-02-14 Paul Eggert <eggert@twinsun.com>
17796 Remove the support for C++ namespace cleanliness; it was
17797 causing more problems than it was curing, since it didn't work
17798 properly on some nonstandard C++ compilers. This can wait
17799 for a proper C++ parser.
17801 * NEWS: Document this.
17802 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17803 of C++, as it's treated like C now.
17804 * src/bison.simple (YYSTD): Remove.
17805 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17806 Treat C++ just like Standard C instead of trying to support
17807 namespace cleanliness.
17809 2002-02-14 Akim Demaille <akim@epita.fr>
17811 * tests/regression.at (else): Adjust to Andreas' change.
17813 2002-02-14 Akim Demaille <akim@epita.fr>
17815 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17817 2002-02-13 Andreas Schwab <schwab@suse.de>
17819 * src/output.c (output_rule_data): Don't output NULL, it might
17820 not be defined yet.
17822 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17824 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17825 (Copyright notice): Update.
17827 2002-02-11 Akim Demaille <akim@epita.fr>
17829 * tests/regression.at (%nonassoc and eof): Don't include
17830 nonportable headers.
17832 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17834 * data/bison.c++: Correct error recovery. Make the user able to
17835 initialize the starting location.
17837 2002-02-07 Akim Demaille <akim@epita.fr>
17839 * tests/input.at: New.
17841 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17843 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17844 more consistent when naming methods and variables. Put preprocessor
17845 directives around tables only needed for debugging.
17847 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17849 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17851 (yy::b4_name::parse): Use print_.
17853 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17855 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17857 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17859 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17861 (yy::b4_name::parse): Build verbose error messages, and use error_.
17863 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17865 * data/bison.c++: Fix m4 quoting in comments.
17867 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17869 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17870 not expanded by m4.
17872 2002-02-05 Akim Demaille <akim@epita.fr>
17874 * data/bison.c++: Adjust to the M4 back end.
17875 More is certainly needed.
17877 2002-02-05 Akim Demaille <akim@epita.fr>
17879 Give a try to M4 as a back end.
17881 * lib/readpipe.c: New, from wdiff.
17882 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17884 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17885 specific values. Now it is m4 that performs the lookup.
17886 * src/parse-skel.y: Remove.
17887 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17888 * src/output.c (actions_output, guards_output)
17889 (token_definitions_output): No longer keeps track of the output
17890 line number, hence remove the second argument.
17891 (guards_output): Check against the guard member of a rule, not the
17894 (output_skeleton): Don't look for the skeleton location, let m4 do
17896 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17898 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17899 (prepare): Given that for the time being changesyntax is not
17900 usable in M4, rename the muscles using `-' to `_'.
17901 Define `defines_flag', `output_parser_name' and `output_header_name'.
17902 * src/output.h (actions_output, guards_output)
17903 (token_definitions_output): Adjust prototypes.
17904 * src/scan-skel.l: Instead of scanning the skeletons, it now
17905 processes the output of m4: `__oline__' and `#output'.
17906 * data/bison.simple: Adjust to be used by M4(sugar).
17907 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17909 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17910 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17911 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17912 shamelessly stolen from CVS Autoconf.
17914 2002-02-05 Akim Demaille <akim@epita.fr>
17916 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17917 * configure.in: Check for the declarations of free and malloc.
17918 * src/muscle_tab.c: Adjust.
17920 2002-02-05 Akim Demaille <akim@epita.fr>
17922 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17923 which have no values.
17925 2002-02-05 Akim Demaille <akim@epita.fr>
17927 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17930 2002-01-29 Paul Eggert <eggert@twinsun.com>
17932 * src/bison.simple (YYSIZE_T): Do not define merely because
17933 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17934 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17936 2002-01-27 Akim Demaille <akim@epita.fr>
17938 Fix `%nonassoc and eof'.
17940 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17941 which were not properly copied! Replace
17942 memcpy (res->errs, src->errs, src->nerrs);
17944 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17946 * tests/regression.at (%nonassoc and eof): Adjust to newest
17947 Autotest: `.' is not in the PATH.
17949 2002-01-27 Akim Demaille <akim@epita.fr>
17951 * tests/sets.at (AT_EXTRACT_SETS): New.
17952 (Nullable): Use it.
17955 2002-01-26 Akim Demaille <akim@epita.fr>
17957 * tests/actions.at, tests/calc.at, tests/headers.at,
17958 * tests/torture.at: Adjust to the newest Autotest which no longer
17959 forces `.' in the PATH.
17961 2002-01-25 Akim Demaille <akim@epita.fr>
17963 * tests/regression.at (%nonassoc and eof): New.
17964 Suggested by Robert Anisko.
17966 2002-01-24 Akim Demaille <akim@epita.fr>
17968 Bison dumps core when trying to complain about broken input files.
17969 Reported by Cris van Pelt.
17971 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17972 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17974 (Invalid inputs): Strengthen: exercise parse_percent_token.
17976 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17978 * src/Makefile.am: Add bison.c++.
17979 * src/bison.c++: New skeleton.
17981 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17985 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17987 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17989 2002-01-20 Marc Autret <marc@gnu.org>
17991 * src/files.c (compute_output_file_names): Fix
17993 2002-01-20 Marc Autret <marc@gnu.org>
17995 * tests/output.at: New test.
17996 * src/files.c (compute_base_names): Don't map extensions when
17997 the YACC flag is set, use defaults.
17998 Reported by Evgeny Stambulchik.
18000 2002-01-20 Marc Autret <marc@gnu.org>
18002 * src/system.h: Need to define __attribute__ away for non-GCC
18003 compilers as well (i.e., the vendor C compiler).
18004 Suggested by Albert Chin-A-Young.
18006 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18008 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18009 canonical definition.
18010 * src/system.h: Use the canonical definition for PARAMS (avoids
18011 a conflict with the macro from lib/hash.h).
18013 2002-01-11 Akim Demaille <akim@epita.fr>
18015 * configure.in: Use AC_FUNC_STRNLEN.
18016 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18018 2002-01-09 Akim Demaille <akim@epita.fr>
18020 * src/files.c, src/files.h (output_infix): New.
18021 (tab_extension): Remove.
18022 (compute_base_names): Compute the former, drop the latter.
18023 * src/output.c (prepare): Insert the muscles `output-infix', and
18025 * src/parse-skel.y (string, string.1): New.
18026 (section.header): Use it.
18027 (section.yacc): Remove.
18028 (prefix): Remove too.
18029 * src/scan-skel.l: Adjust.
18030 * src/bison.simple, src/bison.hairy: Adjust.
18032 2002-01-09 Akim Demaille <akim@epita.fr>
18034 * configure.in (WERROR_CFLAGS): Compute it.
18035 * src/Makefile.am (CFLAGS): Pass it.
18036 * tests/atlocal.in (CFLAGS): Idem.
18037 * src/files.c: Fix a few warnings.
18038 (get_extension_index): Remove, unused.
18040 2002-01-08 Akim Demaille <akim@epita.fr>
18042 * src/getargs.c (AS_FILE_NAME): New.
18043 (getargs): Use it to convert DOSish file names.
18044 * src/files.c (base_name): Rename as full_base_name to avoid
18045 clashes with `base_name ()'.
18046 (filename_split): New.
18047 (compute_base_names): N-th rewrite, using filename_split.
18049 2002-01-08 Akim Demaille <akim@epita.fr>
18051 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18052 New, stolen from the Fileutils 4.1.
18053 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18054 * configure.in: Check for the presence of memrchr, and of its
18057 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18059 * lib/hash.h (__P): Added definition for this macro.
18060 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18061 BUILT_SOURCES, to ensure they are generated first.
18062 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18063 %error-verbose to allow bootstrapping with bison 1.30x.
18065 2002-01-06 Akim Demaille <akim@epita.fr>
18067 * src/reader.c (parse_braces): Don't fetch the next char, the
18068 convention is to fetch on entry.
18069 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18070 'switch' without a following semicolon.
18071 * tests/regression.at (braces parsing): New.
18073 2002-01-06 Akim Demaille <akim@epita.fr>
18075 Bison is dead wrong in its RR conflict reports.
18077 * tests/torture.at (GNU Cim Grammar): New.
18078 * src/conflicts.c (count_rr_conflicts): Fix.
18080 2002-01-06 Akim Demaille <akim@epita.fr>
18082 Creating package.m4 from configure.ac causes too many problems.
18084 * tests/Makefile.am (package.m4): Create it by hand,
18085 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18087 2002-01-06 Akim Demaille <akim@epita.fr>
18089 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18092 2002-01-04 Paul Eggert <eggert@twinsun.com>
18094 * doc/bison.texinfo (Debugging):
18095 Remove YYSTDERR; it's no longer defined or used.
18096 Also, s/cstdio.h/cstdio/.
18098 2002-01-03 Akim Demaille <akim@epita.fr>
18100 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18102 2002-01-03 Akim Demaille <akim@epita.fr>
18104 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18105 tracing code to --trace, wait for a better --trace option, with
18108 2002-01-03 Akim Demaille <akim@epita.fr>
18110 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18111 The ISO C++ standard is extremely clear about it: stderr is
18112 considered a macro, not a regular symbol (see table 94 `Header
18113 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18114 Therefore std:: does not apply to it. It still does with fprintf.
18115 Also, s/cstdio.h/cstdio/.
18117 2002-01-03 Akim Demaille <akim@epita.fr>
18119 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18120 for non system headers.
18122 2002-01-02 Akim Demaille <akim@epita.fr>
18124 Equip the skeleton chain with location tracking, runtime trace,
18125 pure parser and scanner.
18127 * src/parse-skel.y: Request a pure parser, locations, and prefix
18129 (%union): Having several members with the same type does not help
18130 type mismatches, simplify.
18131 (YYPRINT, yyprint): New.
18132 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18133 (skel_error): this.
18135 * src/scan-skel.l: Adjust to these changes.
18136 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18137 (LOCATION_PRINT, skel_control_t): New.
18139 2001-12-30 Akim Demaille <akim@epita.fr>
18141 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18142 replace `gb' with BLANKS.
18143 * src/scan-skel.l: Adjust.
18145 2001-12-30 Akim Demaille <akim@epita.fr>
18147 * src/system.h: We don't need nor want bcopy.
18148 Throw away MS-DOS crap: we don't need getpid.
18149 * configure.in: We don't need strndup. It was even causing
18150 problems: because Flex includes the headers *before* us,
18151 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18153 * lib/xstrndup.c: New.
18154 * src/scan-skel.l: Use it.
18155 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18156 * src/parse-skel.y: Use %directives instead of #defines.
18158 2001-12-30 Akim Demaille <akim@epita.fr>
18160 * src/skeleton.h: New.
18161 * src/output.c (output_parser, output_master_parser): Remove, dead
18163 * src/output.h (get_lines_number, actions_output, guards_output)
18164 (token_definitions_output): Prototype them.
18165 * src/parse-skel.y: Add the license notice.
18166 Include output.h and skeleton.h.
18167 (process_skeleton): Returns void, and takes a single parameter.
18168 * src/scan-skel.l: Add the license notice.
18169 Include skeleton.h.
18170 Don't use %option yylineno: it seems that then Flex imagines
18171 REJECT has been used, and therefore it won't reallocate its
18172 buffers (which makes no other sense to me than a bug). It results
18173 in warnings for `unused: yy_flex_realloc'.
18175 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18177 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18178 (MUSCLE_INSERT_PREFIX): ...to there.
18179 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18180 (MUSCLE_INSERT_PREFIX): Move from here...
18182 * src/bison.hairy: Add a section directive. Put braces around muscle
18183 names. This parser skeleton is still broken, but Bison should not
18184 choke on a bad muscle 'syntax'.
18185 * src/bison.simple: Add a section directive. Put braces around muscle
18188 * src/files.h (strsuffix, stringappend): Add declarations.
18189 (tab_extension): Add declaration.
18190 (short_base_name): Add declaration.
18192 * src/files.c (strsuffix, stringappend): No longer static. These
18193 functions are used in the skeleton parser.
18194 (tab_extension): New.
18195 (compute_base_names): Use the computations done in this function
18196 to guess if the generated parsers should have '.tab' in their
18198 (short_base_name): No longer static.
18200 * src/output.c (output_skeleton): New.
18201 (output): Disable call to output_master_parser, and give a try to
18202 a new skeleton handling system.
18203 (guards_output, actions_output): No longer static.
18204 (token_definitions_output, get_lines_number): No longer static.
18206 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18208 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18211 * src/parse-skel.y: New file.
18212 * src/scan-skel.l: New file.
18214 2001-12-29 Akim Demaille <akim@epita.fr>
18216 %name-prefix is broken.
18218 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18219 Adjust all dependencies.
18220 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18223 Renaming yylval but not yylloc is not consistent. Now we do.
18225 * src/bison.simple: Prefix yylloc if used.
18226 * doc/bison.texinfo (Decl Summary): Document that.
18228 2001-12-29 Akim Demaille <akim@epita.fr>
18230 * doc/bison.texinfo: Promote `%long-directive' over
18232 Remove all references to fixed-output-files, yacc is enough.
18234 2001-12-29 Akim Demaille <akim@epita.fr>
18236 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18237 user prologue. These are defaults.
18238 * tests/actions.at (Mid-rule actions): Make sure the user can
18239 define YYDEBUG and YYERROR_VERBOSE.
18241 2001-12-29 Akim Demaille <akim@epita.fr>
18243 * src/output.c (header_output): Don't forget to export YYLTYPE and
18245 * tests/headers.at (export YYLTYPE): New, make sure it does.
18246 * tests/regression.at (%union and --defines, Invalid CPP headers):
18248 * tests/headers.at: here.
18250 2001-12-29 Akim Demaille <akim@epita.fr>
18252 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18254 2001-12-29 Akim Demaille <akim@epita.fr>
18256 * tests/actions.at (Mid-rule actions): Output on a single line
18257 instead of several.
18259 2001-12-29 Akim Demaille <akim@epita.fr>
18261 * doc/bison.texinfo: Formatting changes.
18263 2001-12-29 Akim Demaille <akim@epita.fr>
18265 Don't store the token defs in a muscle, just be ready to output it
18266 on command. Now possible via `symbols'. Fixes a memory leak.
18268 * src/output.c (token_definitions_output): New.
18269 (output_parser, header_output): Use it.
18270 * src/reader.c (symbols_save): Remove.
18272 2001-12-29 Akim Demaille <akim@epita.fr>
18274 * src/bison.simple: Do not provide a default for YYSTYPE and
18275 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18278 2001-12-29 Akim Demaille <akim@epita.fr>
18280 Mid-rule actions are simply... ignored!
18282 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18283 the empty-rule associated to the dummy symbol, not to the host
18285 * tests/actions.at (Mid-rule actions): New.
18287 2001-12-29 Akim Demaille <akim@epita.fr>
18291 * src/reader.c (reader): Free grammar.
18293 2001-12-29 Akim Demaille <akim@epita.fr>
18297 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18298 since it allocates it for each state, although only one is needed.
18299 (allocate_storage): Do it here.
18301 2001-12-29 Akim Demaille <akim@epita.fr>
18303 * src/options.h, src/options.c (create_long_option_table): Rename
18305 (long_option_table_new): this, with a clearer prototype.
18306 (percent_table): Remove, unused,
18307 * src/getargs.c (getargs): Adjust.
18309 2001-12-29 Akim Demaille <akim@epita.fr>
18311 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18312 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18315 2001-12-29 Akim Demaille <akim@epita.fr>
18317 * src/lalr.c (build_relations): Rename `states' as `states1'.
18318 Sorry, I don't understand exactly what it is, no better name...
18320 2001-12-29 Akim Demaille <akim@epita.fr>
18322 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18323 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18324 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18327 2001-12-29 Akim Demaille <akim@epita.fr>
18329 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18332 2001-12-29 Akim Demaille <akim@epita.fr>
18334 * src/reader.c, src/reader.h (user_toknums): Remove.
18335 Adjust all users to use symbols[i]->user_token_number.
18337 2001-12-29 Akim Demaille <akim@epita.fr>
18339 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18340 Adjust all users to use symbols[i]->prec or ->assoc.
18342 2001-12-29 Akim Demaille <akim@epita.fr>
18344 * src/reader.c, src/reader.h (tags): Remove.
18345 Adjust all users to use symbols[i]->tag.
18347 2001-12-29 Akim Demaille <akim@epita.fr>
18349 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18351 * src/reader.c (packsymbols): Fill this table.
18353 * src/conflicts.c (resolve_sr_conflict): Adjust.
18354 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18356 Use symbols[i]->tag instead of tags[i].
18358 2001-12-29 Akim Demaille <akim@epita.fr>
18360 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18361 In addition, put a comment in there, to replace...
18362 * tests/regression.at (%union and C comments): Remove.
18364 2001-12-29 Akim Demaille <akim@epita.fr>
18366 * tests/regression.at (Web2c Actions): Blindly move the actual
18367 output as expected output. The contents *seem* right to me, but I
18368 can't pretend reading perfectly parser tables... Nonetheless, all
18369 the other tests pass correctly, the table look OK, even though the
18370 presence of `$axiom' is to be noted: AFAICS it is useless (but
18373 2001-12-29 Akim Demaille <akim@epita.fr>
18375 * src/reader.c (readgram): Don't add the rule 0 if there were no
18376 rules read. In other words, add it _after_ having performed
18377 grammar sanity checks.
18378 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18380 2001-12-29 Akim Demaille <akim@epita.fr>
18382 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18383 visible, and some states have now a different number.
18385 2001-12-29 Akim Demaille <akim@epita.fr>
18387 * src/reader.c (readgram): Bind the initial rule's lineno to that
18389 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18390 (Solved SR Conflicts): Adjust rule 0's line number.
18392 2001-12-29 Akim Demaille <akim@epita.fr>
18394 Fix the `GAWK Grammar' failure.
18396 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18397 the reductions of the first state which was mistakenly confused
18398 with the final state because precisely final_state was initialized
18400 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18401 now noticed by Bison.
18402 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18403 have a reduction on $default.
18405 2001-12-29 Akim Demaille <akim@epita.fr>
18407 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18409 * src/closure.c (print_closure): Likewise.
18410 * src/derives.c (print_derives): Likewise.
18411 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18414 2001-12-29 Akim Demaille <akim@epita.fr>
18416 * src/lalr.c (lookaheads_print): New.
18417 (lalr): Call it when --trace-flag.
18418 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18421 2001-12-29 Akim Demaille <akim@epita.fr>
18423 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18424 when walking through ritem, even via rule->rhs.
18425 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18426 (useful_production, useless_nonterminals): Likewise.
18427 (reduce_grammar_tables): Likewise, plus update nritems.
18428 * src/nullable.c (set_nullable): Likewise.
18429 * src/lalr.c (build_relations): Likewise.
18430 * tests/sets.at (Nullable): Adjust.
18431 Fortunately, now, the $axiom is no longer nullable.
18433 2001-12-29 Akim Demaille <akim@epita.fr>
18435 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18437 * src/gram.c (ritem_longest_rhs): Likewise.
18438 * src/reduce.c (nonterminals_reduce): Likewise.
18439 * src/print_graph.c (print_graph): Likewise.
18440 * src/output.c (output_rule_data): Likewise.
18441 * src/nullable.c (set_nullable): Likewise.
18443 2001-12-29 Akim Demaille <akim@epita.fr>
18445 * src/output.c: Comment changes.
18447 2001-12-27 Paul Eggert <eggert@twinsun.com>
18449 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18450 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18451 Sparc, as they were causing more porting problems than the
18452 (minor) performance improvement was worth.
18454 Also, catch up with 1.31's YYSTD.
18456 2001-12-27 Akim Demaille <akim@epita.fr>
18458 * src/output.c (output_gram): Rely on nritems, not the
18459 0-sentinel. See below.
18460 Use -1 as separator, not 0.
18461 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18462 Rely on -1 as separator in yyrhs, instead of 0.
18463 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18464 twice `Now at end of input', therefore there are two lines less to
18467 2001-12-27 Akim Demaille <akim@epita.fr>
18469 * tests/regression.at (Unresolved SR Conflicts):
18470 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18473 2001-12-27 Akim Demaille <akim@epita.fr>
18475 * src/LR0.c (new_state): Recognize the final state by the fact it
18476 is reached by eoftoken.
18477 (insert_start_shifting_state, insert_eof_shifting_state)
18478 (insert_accepting_state, augment_automaton): Remove, since now
18479 these states are automatically computed from the initial state.
18480 (generate_states): Adjust.
18481 * src/print.c: When reporting a rule number to the user, substract
18482 1, so that the axiom rule is rule 0, and the first user rule is 1.
18483 * src/reduce.c: Likewise.
18484 * src/print_graph.c (print_core): For the time being, just as for
18485 the report, depend upon --trace-flags to dump the full set of
18487 * src/reader.c (readgram): Once the grammar read, insert the rule
18488 0: `$axiom: START-SYMBOL $'.
18489 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18490 number of the states has changed (the final state is no longer
18491 necessarily the last), catch up.
18493 2001-12-27 Akim Demaille <akim@epita.fr>
18495 Try to make the use of the eoftoken valid. Given that its value
18496 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18497 is used instead of > 0 where appropriate, (ii), depend upon nritems
18498 instead of the 0-sentinel.
18500 * src/gram.h, src/gram.c (nritems): New.
18501 Expected to be duplication of nitems, but for the time being...
18502 * src/reader.c (packgram): Assert nritems and nitems are equal.
18503 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18504 * src/closure.c (print_closure, print_fderives): Likewise.
18505 * src/gram.c (ritem_print): Likewise.
18506 * src/print.c (print_core, print_grammar): Likewise.
18507 * src/print_graph.c: Likewise.
18509 2001-12-27 Akim Demaille <akim@epita.fr>
18511 * src/main.c (main): If there are complains after grammar
18512 reductions, then output the report anyway if requested, then die.
18513 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18514 * src/reader.c (eoftoken): New.
18515 (parse_token_decl): If the token being defined has value `0', it
18517 (packsymbols): No longer hack `tags' to insert `$' by hand.
18518 Be sure to preserve the value of the eoftoken.
18519 (reader): Make sure eoftoken is defined.
18520 Initialize nsyms to 0: now eoftoken is created just like the others.
18521 * src/print.c (print_grammar): Don't special case the eof token.
18522 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18523 lie anyway, albeit pleasant.
18524 * tests/calc.at: Exercise error messages with eoftoken.
18525 Change the grammar so that empty input is invalid.
18526 Adjust expectations.
18527 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18529 2001-12-27 Akim Demaille <akim@epita.fr>
18531 * configure.in: Check the protos of strchr ans strspn.
18532 Replace strchr if needed.
18533 * src/system.h: Provide the protos of strchr, strspn and memchr if
18535 * lib/strchr.c: New.
18536 * src/reader.c (symbols_save): Use strchr.
18538 2001-12-27 Akim Demaille <akim@epita.fr>
18540 * src/print.c, src/print_graph.c (escape): New.
18541 Use it to quote the TAGS outputs.
18542 * src/print_graph.c (print_state): Now errors are in red, and
18543 reductions in green.
18544 Prefer high to wide: output the state number on a line of its own.
18546 2001-12-27 Akim Demaille <akim@epita.fr>
18548 * src/state.h, src/state.c (reductions_new): New.
18549 * src/LR0.c (set_state_table): Let all the states have a
18550 `reductions', even if reduced to 0.
18551 (save_reductions): Adjust.
18552 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18553 * src/print.c (print_reductions, print_actions): Adjust.
18554 * src/output.c (action_row): Adjust.
18556 2001-12-27 Akim Demaille <akim@epita.fr>
18558 * src/state.h, src/state.c (errs_new, errs_dup): New.
18559 * src/LR0.c (set_state_table): Let all the states have an errs,
18560 even if reduced to 0.
18561 * src/print.c (print_errs, print_reductions): Adjust.
18562 * src/output.c (output_actions, action_row): Adjust.
18563 * src/conflicts.c (resolve_sr_conflict): Adjust.
18565 2001-12-27 Akim Demaille <akim@epita.fr>
18567 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18569 2001-12-27 Akim Demaille <akim@epita.fr>
18571 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18572 * src/print.c: here.
18573 (lookaheadset, shiftset): New, used as additional storage by
18575 (print_results): Adjust.
18576 (print_shifts, print_gotos, print_errs): New, extracted from...
18577 (print_actions): here.
18578 * src/print_graph.c (print_actions): Remove dead code.
18580 2001-12-27 Akim Demaille <akim@epita.fr>
18582 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18585 2001-12-27 Akim Demaille <akim@epita.fr>
18587 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18588 (build_relations): Adjust.
18590 2001-12-27 Akim Demaille <akim@epita.fr>
18592 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18595 2001-12-27 Akim Demaille <akim@epita.fr>
18597 * src/reader.c (packgram): Catch nitems overflows.
18599 2001-12-27 Akim Demaille <akim@epita.fr>
18601 * src/files.c, src/files.h (guard_obstack): Remove.
18602 * src/output.c (output): Adjust.
18603 * src/reader.c (parse_braces): New, factoring...
18604 (copy_action, copy_guard): these two which are renamed as...
18605 (parse_action, parse_guard): these.
18606 As a voluntary consequence, using braces around guards is now
18609 2001-12-27 Akim Demaille <akim@epita.fr>
18611 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18612 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18614 (symbol_list_new): Adjust.
18615 (copy_action): action_line is the first line, not the last.
18616 (copy_guard): Just as for actions, store the `action' only, not
18617 the switch/case/break flesh.
18618 Don't parse the user action that might follow the guard, let...
18619 (readgram): do it, i.e., now, there can be an action after a
18621 In other words the guard is just explicitly optional.
18622 (packgram): Adjust.
18623 * src/output.c (guards_output): New.
18624 (output_parser): Call it when needed.
18625 (output): Also free the guard and attrs obstacks.
18626 * src/files.c, src/files.h (obstack_save): Remove.
18627 (output_files): Remove.
18628 As a result, if one needs the former `.act' file, using an
18629 appropriate skeleton which requires actions and guards is now
18631 * src/main.c (main): Adjust.
18632 * tests/semantic.at: New.
18633 * tests/regression.at: Use `input.y' as input file name.
18634 Avoid 8+3 problems by requiring input.c when the test needs the
18637 2001-12-27 Akim Demaille <akim@epita.fr>
18639 * src/reader.c (symbol_list_new): Be sure to initialize all the
18642 2001-12-27 Akim Demaille <akim@epita.fr>
18644 All the hacks using a final pseudo state are now useless.
18646 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18647 * src/lalr.c (nLA): New.
18648 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18649 instead of lookaheadsp from the pseudo state (nstate + 1).
18651 2001-12-27 Akim Demaille <akim@epita.fr>
18653 * src/output.c (action_row, token_actions): Use a state_t instead
18654 of a integer, and nlookaheads instead of the following state's
18657 2001-12-27 Akim Demaille <akim@epita.fr>
18659 * src/conflicts.c (log_resolution, flush_shift)
18660 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18661 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18662 (conflicts_print, print_reductions): Use a state_t instead of an
18663 integer when referring to a state.
18664 As much as possible, depend upon nlookaheads, instead of the
18665 `lookaheadsp' member of the following state (since lookaheads of
18666 successive states are successive, the difference between state n + 1
18667 and n served as the number of lookaheads for state n).
18668 * src/lalr.c (add_lookback_edge): Likewise.
18669 * src/print.c (print_core, print_actions, print_state)
18670 (print_results): Likewise.
18671 * src/print_graph.c (print_core, print_actions, print_state)
18672 (print_graph): Likewise.
18673 * src/conflicts.h: Adjust.
18675 2001-12-27 Akim Demaille <akim@epita.fr>
18677 * src/bison.hairy: Formatting/comment changes.
18679 Remove `register' indications.
18680 Add plenty of `static'.
18682 2001-12-27 Akim Demaille <akim@epita.fr>
18684 * src/output.c (prepare): Drop the muscle `ntbase' which
18685 duplicates ntokens.
18686 * src/bison.simple: Formatting/comment changes.
18687 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18688 is an undocumented synonym.
18690 2001-12-22 Akim Demaille <akim@epita.fr>
18692 * src/output.c (output_table_data): Change the prototype to use
18693 `int' for array ranges: some invocations do pass an int, not a
18695 Reported by Wayne Green.
18697 2001-12-22 Akim Demaille <akim@epita.fr>
18699 Some actions of web2c.y are improperly triggered.
18700 Reported by Mike Castle.
18702 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18703 * tests/regression.at (Web2c): Rename as...
18704 (Web2c Report): this.
18705 (Web2c Actions): New.
18707 2001-12-22 Akim Demaille <akim@epita.fr>
18709 Reductions in web2c.y are improperly reported.
18710 Reported by Mike Castle.
18712 * src/conflicts.c (print_reductions): Fix.
18713 * tests/regression.at (Web2c): New.
18715 2001-12-18 Akim Demaille <akim@epita.fr>
18717 Some host fail on `assert (!"foo")', which expands to
18718 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18719 Reported by Nelson Beebee.
18721 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18722 `#define it_succeeded 0' and `assert (it_succeeded)'.
18724 2001-12-17 Marc Autret <autret_m@epita.fr>
18726 * src/bison.simple: Don't hard code the skeleton line and filename.
18727 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18728 New line counter 'skeleton_line' (skeleton-line muscle).
18730 2001-12-17 Paul Eggert <eggert@twinsun.com>
18732 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18733 YYDEBUG must be defined to a nonzero value.
18735 * src/bison.simple (yytname): Do not assume that the user defines
18736 YYDEBUG to a properly parenthesized expression.
18738 2001-12-17 Akim Demaille <akim@epita.fr>
18740 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18741 nlookaheads is a new member.
18743 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18744 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18747 2001-12-17 Akim Demaille <akim@epita.fr>
18749 * src/files.h, src/files.c (open_files, close_files): Remove.
18750 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18752 * src/reader.c (reader): Do it.
18754 2001-12-17 Akim Demaille <akim@epita.fr>
18756 * src/conflicts.c (print_reductions): Formatting changes.
18758 2001-12-17 Akim Demaille <akim@epita.fr>
18760 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18761 (flush_reduce): New.
18762 (resolve_sr_conflict): Adjust.
18764 2001-12-17 Akim Demaille <akim@epita.fr>
18766 * src/output.c (output_obstack): Be static and rename as...
18767 (format_obstack): this, to avoid any confusion with files.c's
18769 * src/reader.h (muscle_obstack): Move to...
18770 * src/output.h: here, since it's defined in output.c.
18772 2001-12-17 Akim Demaille <akim@epita.fr>
18774 * src/output.c (action_row, save_column, default_goto)
18775 (sort_actions, matching_state, pack_vector): Better variable
18778 2001-12-17 Akim Demaille <akim@epita.fr>
18780 * src/output.c: Various formatting changes.
18782 2001-12-17 Akim Demaille <akim@epita.fr>
18784 * src/files.c (output_files): Free the output_obstack.
18785 * src/main.c (main): Call print and print_graph conditionally.
18786 * src/print.c (print): Work unconditionally.
18787 * src/print_graph.c (print_graph): Work unconditionally.
18788 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18790 2001-12-16 Marc Autret <autret_m@epita.fr>
18792 * src/output.c (actions_output): Fix. When we use %no-lines,
18793 there is one less line per action.
18795 2001-12-16 Marc Autret <autret_m@epita.fr>
18797 * src/bison.simple: Remove a useless #line directive.
18798 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18799 * src/output.c (get_lines_number): New.
18800 (output_parser): Adjust, now takes care about the lines of a
18802 Fix line numbering.
18803 (actions_output): Computes the number of lines taken by actions.
18804 (output_master_parser): Insert new skeleton which is the name of
18805 the output parser file name.
18807 2001-12-15 Marc Autret <autret_m@epita.fr>
18809 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18811 2001-12-15 Marc Autret <autret_m@epita.fr>
18813 * src/output.c (output_gram): Keep track of the hairy one.
18815 2001-12-15 Akim Demaille <akim@epita.fr>
18817 Make `make distcheck' work.
18819 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18820 system.h which uses libgettext.h.
18822 2001-12-15 Akim Demaille <akim@epita.fr>
18824 * src/nullable.c (set_nullable): Useless rules must be skipped,
18825 otherwise, since we range over their symbols, we might look at a
18826 nonterminal which no longer ``exists'', i.e., it is not counted in
18827 `nvars', hence we overflow our arrays.
18829 2001-12-15 Akim Demaille <akim@epita.fr>
18831 The header can also be produced directly, without any obstack!
18834 * src/files.c, src/files.h (defines_obstack): Remove.
18835 (compute_header_macro): Global.
18836 (defines_obstack_save): Remove.
18837 * src/reader.c (parse_union_decl): No longer output to
18838 defines_obstack: its content can be found in the `stype' muscle
18840 (output_token_translations): Merge into...
18841 (symbols_output): this.
18843 (symbols_save): this.
18845 * src/output.c (header_output): New.
18848 2001-12-15 Akim Demaille <akim@epita.fr>
18850 * src/reader.c (parse_union_decl): Instead of handling two obstack
18851 simultaneously, use one to define the `stype' muscle, and use the
18852 value of the latter to fill defines_obstack.
18853 (copy_comment): Remove.
18854 (copy_comment2): Work for a single obstack.
18856 (copy_comment): this.
18858 2001-12-15 Akim Demaille <akim@epita.fr>
18860 * src/lex.c, src/lex.h (xgetc): No longer static.
18861 * src/reader.c (parse_union_decl): Revamp.
18863 2001-12-15 Akim Demaille <akim@epita.fr>
18865 Still making progress in separating Bison into (i) input, (ii)
18866 process, (iii) output: now we can directly output the parser file
18867 without using table_obstack at all.
18869 * src/files.c, src/files.h (table_obstack): Bye bye.
18870 (parser_file_name): New.
18871 * src/files.c (compute_output_file_names): Compute it.
18872 * src/output.c (actions_output, output_parser)
18873 (output_master_parser): To a file instead of an obstack.
18875 2001-12-15 Akim Demaille <akim@epita.fr>
18877 Attach actions to rules, instead of pre-outputting them to
18880 * src/gram.h (rule_t): action and action_line are new members.
18881 * src/reader.c (symbol_list): Likewise.
18882 (copy_action): Save the actions within the rule.
18883 (packgram): Save them in rule_table.
18884 * src/output.c (actions_output): New.
18885 (output_parser): Use it on `%%actions'.
18886 (output_rule_data): Don't free rule_table.
18888 (prepare): Don't save the `action' muscle.
18889 * src/bison.simple: s/%%action/%%actions/.
18891 2001-12-15 Akim Demaille <akim@epita.fr>
18893 * src/reader.c (copy_action): When --yacc, don't append a `;'
18894 to the user action: let it fail if lacking.
18895 Suggested by Arnold Robbins and Tom Tromey.
18897 2001-12-14 Akim Demaille <akim@epita.fr>
18899 * src/lex.c (literalchar): Simply return the char you decoded, non
18900 longer mess around with obstacks and int pointers.
18901 Adjust all callers.
18903 2001-12-14 Akim Demaille <akim@epita.fr>
18905 * src/lex.c (literalchar): Don't escape the special characters,
18906 just decode them, and keep them as char (before, eol was output as
18907 the 2 char string `\n' etc.).
18908 * src/output.c (output_rule_data): Use quotearg to output the
18911 2001-12-13 Paul Eggert <eggert@twinsun.com>
18913 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18914 Do not infringe on the global user namespace when using C++.
18915 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18916 All uses of `fprintf' and `stderr' changed.
18918 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18920 2001-12-13 Akim Demaille <akim@epita.fr>
18922 The computation of nullable is broken: it doesn't handle empty
18925 * tests/torture.at (GNU AWK Grammar): New.
18926 * tests/sets.at (Nullable): New.
18927 * src/nullable.c (set_nullable): Instead of blindly looping over
18928 `ritems', loop over the rules, and then over their rhs's.
18930 Work around Autotest bugs.
18932 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18933 frame, because Autotest understand lines starting with a `+' as
18934 traces from the shell. Then, they are not processed properly.
18935 Admittedly an Autotest bug, but we don't have time to wait for
18936 Autotest to catch up.
18937 * tests/regression.at (Broken Closure): Adjust to the new table
18940 * tests/sets.at: here.
18942 2001-12-13 Akim Demaille <akim@epita.fr>
18944 * src/closure.c (closure): Use nrules instead of playing tricks
18945 with BITS_PER_WORD.
18947 2001-12-13 Akim Demaille <akim@epita.fr>
18949 * src/print.c (print_actions): Output the handling of `$' as the
18950 traces do: shifting the token EOF. Before EOF was treated as a
18952 * tests/regression.at: Adjust some tests.
18953 * src/print_graph.c (print_core): Complete the set of items via
18954 closure. The next-to-final and final states are still unsatisfying,
18955 but that's to be addressed elsewhere.
18956 No longer output the rule numbers, but do output the state number.
18957 A single loop for the shifts + gotos is enough, but picked a
18958 distinct color for each.
18959 (print_graph): Initialize and finalize closure.
18961 2001-12-13 Akim Demaille <akim@epita.fr>
18963 * src/reader.c (readgram): Remove dead code, an strip useless
18965 (get_type): Remove, unused.
18967 2001-12-12 Akim Demaille <akim@epita.fr>
18969 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18970 on that of lib/error.c.
18972 2001-12-12 Akim Demaille <akim@epita.fr>
18974 Some hosts don't like `/' in includes.
18976 * src/system.h: Include libgettext.h without qualifying the path.
18977 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18980 2001-12-11 Marc Autret <autret_m@epita.fr>
18982 * src/output.c (output_parser): Remove useless muscle.
18984 2001-12-11 Marc Autret <autret_m@epita.fr>
18986 * src/bison.simple: Remove #line just before %%epilogue. It
18987 is now handled in ...
18988 * src/reader.c (read_additionnal_code): Add the output of a
18989 #line for the epilogue.
18991 2001-12-10 Marc Autret <autret_m@epita.fr>
18993 * src/reader.c (copy_definition): Re-use CPP-outed code which
18994 replace precedent remove.
18995 * src/bison.simple: Remove #line before %%prologue because
18996 %%input-line is wrong at this time.
18998 2001-12-10 Marc Autret <autret_m@epita.fr>
19000 * src/reader.c (symbols_output): Clean up.
19001 * src/output.c (output_gram, output): Clean up.
19003 2001-12-10 Akim Demaille <akim@epita.fr>
19005 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19006 * src/LR0.c (set_state_table): here.
19007 * src/lalr.c (lalr): Call it.
19009 2001-12-10 Akim Demaille <akim@epita.fr>
19011 * src/state.h (shifts): Remove the `number' member: shifts are
19012 attached to state, hence no longer need to be labelled with a
19015 2001-12-10 Akim Demaille <akim@epita.fr>
19017 Now that states have a complete set of members, the linked list of
19018 shifts is useless: just fill directly the state's shifts member.
19020 * src/state.h (shifts): Remove the `next' member.
19021 * src/LR0.c (first_state, last_state): Remove.
19022 Adjust the callers.
19023 (augment_automaton): Don't look for the shifts that must be added
19024 a shift on EOF: it is those of the state we looked for! But now,
19025 since shifts are attached, it is no longer needed to looking
19026 merely by its id: its number.
19028 2001-12-10 Akim Demaille <akim@epita.fr>
19030 * src/LR0.c (augment_automaton): Better variable locality.
19031 Remove an impossible branch: if there is a state corresponding to
19032 the start symbol being shifted, then there is shift for the start
19033 symbol from the initial state.
19035 2001-12-10 Akim Demaille <akim@epita.fr>
19037 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19038 only when appropriate: when insert_start_shifting_state' is not
19040 * tests/regression.at (Rule Line Numbers): Adjust.
19042 2001-12-10 Akim Demaille <akim@epita.fr>
19044 * src/LR0.c (augment_automaton): Now that all states have shifts,
19045 merge the two cases addition shifts to the initial state.
19047 2001-12-10 Akim Demaille <akim@epita.fr>
19049 * src/lalr.c (set_state_table): Move to...
19051 * src/lalr.c (lalr): Don't call it...
19052 * src/LR0.c (generate_states): do it.
19053 * src/LR0.h (first_state): Remove, only the table is used.
19055 2001-12-10 Akim Demaille <akim@epita.fr>
19057 * src/LR0.h (first_shift, first_reduction): Remove.
19058 * src/lalr.c: Don't use first_shift: find shifts through the
19061 2001-12-10 Akim Demaille <akim@epita.fr>
19063 * src/LR0.c: Attach shifts to states as soon as they are
19065 * src/lalr.c (set_state_table): Instead of assigning shifts to
19066 state, just assert that the mapping was properly done.
19068 2001-12-10 Akim Demaille <akim@epita.fr>
19070 * src/LR0.c (insert_start_shift): Rename as...
19071 (insert_start_shifting_state): this.
19072 (insert_eof_shifting_state, insert_accepting_state): New.
19073 (augment_automaton): Adjust.
19074 Better locality of the variables.
19075 When looking if the start_symbol is shifted from the initial
19076 state, using `while (... symbol != start_symbol ...)' sounds
19077 better than `while (... symbol < start_symbol ...)': If fail
19078 to see how the order between symbols could be relevant!
19080 2001-12-10 Akim Demaille <akim@epita.fr>
19082 * src/getargs.h: Don't declare `spec_name_prefix' and
19083 `spec_file_prefix', declared by src/files.h.
19084 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19085 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19086 * src/output.c (prepare): Adjust.
19087 * src/reader.c (symbols_output): Likewise.
19088 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19090 2001-12-10 Akim Demaille <akim@epita.fr>
19092 * src/muscle_tab.c (muscle_init): NULL is a better default than
19095 2001-12-10 Akim Demaille <akim@epita.fr>
19097 * src/reader.c (reader): Calling symbols_output once is enough.
19099 2001-12-10 Akim Demaille <akim@epita.fr>
19101 Now that states have a complete set of members, the linked list of
19102 reductions is useless: just fill directly the state's reductions
19105 * src/state.h (struct reductions): Remove member `number' and
19107 * src/LR0.c (first_reduction, last_reduction): Remove.
19108 (save_reductions): Don't link the new reductions, store them in
19110 * src/lalr.c (set_state_table): No need to attach reductions to
19111 states, it's already done.
19112 * src/output.c (output_actions): No longer free the shifts, then
19113 the reductions, then the states: free all the states and their
19116 2001-12-10 Akim Demaille <akim@epita.fr>
19118 * src/options.c (OPTN, DRTV, BOTH): New.
19119 (option_table): Use them.
19121 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19122 the job of system.h.
19123 * src/options.c: Don't include stdio.h and xalloc.h for the same
19126 2001-12-10 Akim Demaille <akim@epita.fr>
19128 * src/output.c (output, prepare): Make sure the values of the
19129 muscles `action' and `prologue' are 0-terminated.
19131 2001-12-10 Akim Demaille <akim@epita.fr>
19133 Clean up GCC warnings.
19135 * src/reader.c (copy_action): `buf' is not used.
19136 (parse_skel_decl): Be static.
19137 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19138 * src/options.h (create_long_option_table): Have a real prototype.
19139 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19140 (hash_delete_at): Return const void *.
19141 Adjust casts to preserve the const.
19143 2001-12-10 Akim Demaille <akim@epita.fr>
19145 * configure.in: Require 2.52g.
19146 M4 is not needed, but AUTOM4TE is.
19147 * m4/m4.m4: Remove.
19148 * tests/Makefile.am: Adjust.
19150 2001-12-10 Akim Demaille <akim@epita.fr>
19152 One structure for states is enough, even though theoretically
19153 there are LR(0) states and LALR(1) states.
19155 * src/lalr.h (state_t): Remove.
19156 (state_table): Be state_t **, not state_t *.
19157 * src/state.h (core, CORE_ALLOC): Rename as...
19158 (state_t, STATE_ALLOC): this.
19159 Add the LALR(1) members: shifts, reductions, errs.
19160 * src/LR0.c (state_table): Rename as...
19161 (state_hash): this, to avoid name clashes with the global
19163 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19164 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19166 2001-12-10 Akim Demaille <akim@epita.fr>
19168 Bison dumps core on bash.y.
19169 Reported by Pascal Bart.
19171 * src/warshall.c (bitmatrix_print): New.
19173 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19174 j must be the outer loop.
19175 * tests/regression.at (Broken Closure): New.
19177 2001-12-05 Akim Demaille <akim@epita.fr>
19179 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19181 Reported by Peter Hamorsky.
19183 2001-12-05 Akim Demaille <akim@epita.fr>
19185 * src/conflicts.c (err_table): Remove.
19186 (resolve_sr_conflict): Adjust.
19187 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19189 (state_t.reductions, state_t.shifts): this.
19191 2001-12-05 Akim Demaille <akim@epita.fr>
19193 * src/reduce.c (reduce_grammar_tables): No longer disable the
19194 removal of useless rules via CPP but via `if (0)', so that the
19195 compiler still check the code is valid.
19196 For instance, it should have noticed `rline' no longer exists: use
19197 the `line' member of rule_t.
19198 * src/gram.c (dummy, rline): Remove, unused.
19200 2001-12-05 Akim Demaille <akim@epita.fr>
19202 * src/output.c (pack_vector): Use assert, not berror.
19203 * src/main.c (berror): Remove, unused.
19205 2001-12-05 Akim Demaille <akim@epita.fr>
19207 New experimental feature: if --verbose --trace output all the
19208 items of a state, not only its kernel.
19210 * src/print.c (print_core): If `trace_flag', then invoke closure
19211 before outputting the items of the state (print_core is no longer
19212 a correct name them).
19213 (print_results): Invoke new_closure/free_closure if needed.
19215 2001-12-05 Akim Demaille <akim@epita.fr>
19217 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19218 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19219 (nitemset): for consistency with the rest of the project.
19221 2001-12-05 Akim Demaille <akim@epita.fr>
19223 * src/closure.c (print_closure): Improve.
19224 (closure): Use it for printing input and output.
19226 2001-12-05 Akim Demaille <akim@epita.fr>
19228 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19229 indexed by nonterminals.
19231 2001-12-05 Akim Demaille <akim@epita.fr>
19233 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19235 * src/warshall.h: Remove accidental duplication of the content.
19237 2001-12-05 Akim Demaille <akim@epita.fr>
19239 * src/closure.c (set_fderives): De-obfuscate.
19241 2001-12-05 Akim Demaille <akim@epita.fr>
19243 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19245 2001-12-05 Akim Demaille <akim@epita.fr>
19247 * src/closure.c (set_firsts): De-obfuscate.
19249 2001-12-05 Akim Demaille <akim@epita.fr>
19251 * src/output.c (action_row): De-obfuscate
19252 using the good o' techniques: arrays not pointers, variable
19253 locality, BITISSET, RESETBIT etc.
19255 2001-12-05 Akim Demaille <akim@epita.fr>
19257 Pessimize the code to simplify it: from now on, all the states
19258 have a valid SHIFTS, which NSHIFTS is possibly 0.
19260 * src/LR0.c (shifts_new): Be global and move to..
19261 * src/state.c, src/state.h: here.
19262 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19263 * src/print_graph: Adjust.
19265 2001-12-05 Akim Demaille <akim@epita.fr>
19267 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19268 * src/conflicts.c: Use it.
19269 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19270 incorrectly ``simplified''.
19272 2001-12-05 Akim Demaille <akim@epita.fr>
19274 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19275 using the good o' techniques: arrays not pointers, variable
19276 locality, BITISSET, RESETBIT etc.
19278 2001-12-05 Akim Demaille <akim@epita.fr>
19280 * src/state.h (SHIFT_SYMBOL): New.
19281 * src/conflicts.c: Use it to deobfuscate.
19283 2001-12-05 Akim Demaille <akim@epita.fr>
19285 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19286 (print_reductions): De-obfuscate using the good o' techniques:
19287 arrays not pointers, variable locality, BITISSET.
19289 2001-12-05 Akim Demaille <akim@epita.fr>
19291 * src/conflicts.c (print_reductions): Arrays, not pointers.
19294 2001-12-05 Akim Demaille <akim@epita.fr>
19296 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19298 2001-12-05 Akim Demaille <akim@epita.fr>
19300 * src/conflicts.c (print_reductions): Improve variable locality.
19302 2001-12-05 Akim Demaille <akim@epita.fr>
19304 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19306 2001-12-05 Akim Demaille <akim@epita.fr>
19308 * src/conflicts.c (print_reductions): Improve variable locality.
19310 2001-12-05 Akim Demaille <akim@epita.fr>
19312 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19313 * src/lalr.c: Use them.
19315 2001-12-05 Akim Demaille <akim@epita.fr>
19317 * src/LR0.c (augment_automaton): Formatting changes.
19318 Better variable locality.
19320 2001-12-05 Akim Demaille <akim@epita.fr>
19322 * src/lalr.c (matrix_print): New.
19323 (transpose): Use it.
19324 Use arrays instead of pointers.
19326 2001-12-05 Akim Demaille <akim@epita.fr>
19328 * src/lalr.c (maxrhs): Move to...
19329 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19330 * src/lalr.c (build_relations): Adjust.
19332 2001-12-05 Akim Demaille <akim@epita.fr>
19334 * src/lalr.c (transpose): Free the memory allocated to the
19335 argument, as it is replaced by the results by the unique caller.
19336 (build_relations): Merely invoke transpose: it handles the memory
19338 Improve variable locality.
19339 Avoid variables used as mere abbreviations.
19340 (compute_lookaheads): Use arrays instead of pointers.
19342 2001-12-05 Akim Demaille <akim@epita.fr>
19344 * src/lalr.c (initialize_F): Improve variable locality.
19345 Avoid variables used as mere abbreviations.
19347 2001-12-05 Akim Demaille <akim@epita.fr>
19349 * src/derives.c (print_derives): Display the ruleno.
19350 * src/lalr.c (initialize_F, transpose): Better variable locality
19351 to improve readability.
19352 Avoid variables used as mere abbreviations.
19354 2001-12-05 Akim Demaille <akim@epita.fr>
19356 * src/lalr.c (traverse): Use arrays instead of pointers.
19358 2001-12-05 Akim Demaille <akim@epita.fr>
19360 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19361 the handling of squeue.
19362 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19364 2001-12-05 Akim Demaille <akim@epita.fr>
19366 Because useless nonterminals are now kept alive (instead of being
19367 `destroyed'), we now sometimes examine them, and store information
19368 related to them. Hence we need to know their number, and adjust
19369 memory allocations.
19371 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19373 * src/LR0.c (allocate_itemsets): The memory allocated to
19374 `symbol_count' was used for two different purpose: once to count
19375 the number of occurrences of each symbol, and later reassigned to
19376 `shift_symbol', containing the symbol that can be shifted from a
19378 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19380 (new_itemsets): Allocate `shift_symbol' here.
19381 (allocate_itemsets): symbol_count includes useless nonterminals.
19382 Make room for them.
19383 (free_storage): Use `free', not `XFREE', for pointers that cannot
19386 2001-12-05 Akim Demaille <akim@epita.fr>
19388 * src/nullable.c (set_nullable): Deobfuscate the handling of
19390 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19392 2001-12-05 Akim Demaille <akim@epita.fr>
19394 * src/gram.c, src/gram.h (ritem_print): New.
19395 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19396 (This useless function was defined only to work around VMS linkers
19397 that can't handle compilation units with variables only).
19398 * src/reduce.c (dump_grammar): Use it to trace the construction of
19401 2001-12-04 Paul Eggert <eggert@twinsun.com>
19403 * src/bison.simple (union yyalloc): Change member names
19404 to be the same as the stack names.
19405 (yyparse): yyptr is now union yyalloc *, not char *.
19406 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19407 and may generate better code on some machines.
19408 (yystpcpy): Use prototype if __STDC__ is defined, not just
19409 if __cplusplus is defined.
19411 2001-11-30 Akim Demaille <akim@epita.fr>
19413 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19414 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19415 Gettext doesn't compile cleanly, and dies with -Werror.
19416 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19417 Include WARNING_CFLAGS here.
19418 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19419 before being defined.
19421 2001-11-27 Paul Eggert <eggert@twinsun.com>
19423 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19424 First arg is int, not unsigned.
19425 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19426 (SIZE_MAX, UINT_MAX): New macros.
19427 (quotearg_n_options): Abort if N is negative.
19428 Avoid overflow check on hosts where size_t is 64 bits and int
19429 is 32 bits, as overflow is impossible there.
19430 Fix off-by-one typo that caused unnecessary reallocation.
19432 2001-11-29 Paul Eggert <eggert@twinsun.com>
19434 Name space cleanup in generated parser.
19436 * doc/bison.texinfo (Bison Parser): Discuss system headers
19437 and their effect on the user name space.
19439 * src/bison.simple:
19440 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19441 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19442 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19444 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19445 on user names when possible.
19447 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19448 Simplify test for whather <alloca.h> exists.
19450 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19452 (<stdio.h>): Include if YYDEBUG.
19454 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19455 ! defined (yyoverflow) && ! defined (yymemcpy).
19457 (yymemcpy, yyparse): Rename local variables as needed so that
19458 they all begin with 'yy'.
19460 (yystrlen, yystpcpy): New functions.
19462 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19465 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19466 instead of relying on string.h functions. Use YYSTACK_ALLOC
19467 and YYSTACK_FREE instead of malloc and free.
19469 2001-11-30 Akim Demaille <akim@epita.fr>
19471 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19472 before their first uses.
19473 (YYBISON, YYPURE): Move to the top of the output.
19475 2001-11-30 Akim Demaille <akim@epita.fr>
19477 * tests/reduce.at (Useless Nonterminals): Fix.
19479 2001-11-30 Akim Demaille <akim@epita.fr>
19481 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19482 if body instead of `;' to pacify GCC's warnings.
19484 2001-11-30 Akim Demaille <akim@epita.fr>
19486 Instead of mapping the LHS of unused rules to -1, keep the LHS
19487 valid, but flag the rules as invalid.
19489 * src/gram.h (rule_t): `useful' is a new member.
19490 * src/print.c (print_grammar): Adjust.
19491 * src/derives.c (set_derives): Likewise.
19492 * src/reader.c (packgram, reduce_output): Likewise.
19493 * src/reduce.c (reduce_grammar_tables): Likewise.
19494 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19496 2001-11-30 Akim Demaille <akim@epita.fr>
19498 * src/reduce.c (reduce_output): Formatting changes.
19499 * src/print.c (print_results, print_grammar): Likewise.
19500 * tests/regression.at (Rule Line Numbers)
19501 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19503 2001-11-30 Akim Demaille <akim@epita.fr>
19505 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19506 useless nonterminals, move them at the end of the symbol arrays.
19507 (reduce_output): Adjust.
19508 * tests/reduce.at (Useless Nonterminals): Adjust.
19510 2001-11-30 Akim Demaille <akim@epita.fr>
19512 * src/reduce.c: Various comment/formatting changes.
19513 (nonterminals_reduce): New, extracted from...
19514 (reduce_grammar_tables): here.
19515 (reduce_grammar): Call nonterminals_reduce.
19517 2001-11-29 Paul Eggert <eggert@twinsun.com>
19519 * src/bison.simple (YYSTACK_REALLOC): Remove.
19520 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19521 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19523 (union yyalloc): New type.
19524 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19525 an arbitrary restriction on hosts where size_t is wider than int.
19527 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19528 a parser stack overflow. Allocate just one block of memory for all
19529 three stacks, instead of allocating three blocks; this typically is
19530 faster and reduces fragmentation.
19532 Do not limit the number of items in the stack to a value that fits
19533 in 'int', as this is an arbitrary limit on hosts with 64-bit
19534 size_t and 32-bit int.
19536 2001-11-29 Marc Autret <autret_m@epita.fr>
19538 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19539 of defining YYERROR_VERBOSE.
19540 [AT_DATA]: $4 is now out of C declarations in the prologue.
19542 2001-11-28 Marc Autret <autret_m@epita.fr>
19544 * src/reader.c (parse_dquoted_param): New.
19545 (parse_skel_decl): Use it.
19546 * src/lex.h: Add its prototype.
19547 * src/lex.c (literalchar): Become not static.
19549 2001-11-28 Marc Autret <autret_m@epita.fr>
19551 * src/output.h: And put its extern declaration here.
19552 * src/output.c (error_verbose): Define here.
19553 (prepare): Echo name modification.
19554 * src/getargs.h: Clean its extern declaration.
19555 * src/getargs.c (error_verbose_flag): Remove.
19556 (getargs): Remove case 'e'.
19557 * src/options.c (option_table): 'error-verbose' is now seen as simple
19561 * src/reader.c (read_declarations): Remove case tok_include.
19562 (parse_include_decl): Remove.
19563 * src/lex.h (token_t): Remove tok_include.
19564 * src/options.c (option_table): 'include' is now a simple command line
19567 2001-11-28 Marc Autret <autret_m@epita.fr>
19569 * src/bison.simple: Adjust muscle names.
19570 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19571 * src/output.c (prepare): s/_/-/ for the muscles names.
19572 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19574 2001-11-28 Marc Autret <autret_m@epita.fr>
19576 * src/bison.simple: Fix debug.
19577 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19579 2001-11-28 Akim Demaille <akim@epita.fr>
19581 * src/LR0.c (shifts_new): New.
19582 (save_shifts, insert_start_shift, augment_automaton): Use it.
19584 2001-11-28 Akim Demaille <akim@epita.fr>
19586 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19589 2001-11-28 Akim Demaille <akim@epita.fr>
19591 * src/closure.c (closure): Instead of looping over word in array
19592 then bits in words, loop over bits in array.
19594 2001-11-28 Akim Demaille <akim@epita.fr>
19596 * src/closure.c (closure): No longer optimize the special case
19597 where all the bits of `ruleset[r]' are set to 0, to make the code
19600 2001-11-28 Akim Demaille <akim@epita.fr>
19602 * src/closure.c (closure): `r' and `c' are new variables, used to
19603 de-obfuscate accesses to RULESET and CORE.
19605 2001-11-28 Akim Demaille <akim@epita.fr>
19607 * src/reduce.c (reduce_print): Use ngettext.
19608 (dump_grammar): Improve the trace accuracy.
19610 2001-11-28 Akim Demaille <akim@epita.fr>
19612 * src/reduce.c (dump_grammar): Don't translate trace messages.
19614 2001-11-28 Akim Demaille <akim@epita.fr>
19616 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19617 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19618 as all tags are free'ed afterwards.
19619 From Enrico Scholz.
19621 2001-11-27 Paul Eggert <eggert@twinsun.com>
19623 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19624 use alloca when we didn't want to, and vice versa.
19626 2001-11-27 Marc Autret <autret_m@epita.fr>
19628 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19630 * src/output.c (prepare): Remove its update.
19632 2001-11-27 Marc Autret <autret_m@epita.fr>
19634 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19635 Use %error-verbose.
19637 2001-11-27 Marc Autret <autret_m@epita.fr>
19639 * src/bison.simple: Remove YYERROR_VERBOSE using.
19640 Use %%error_verbose.
19641 (yyparse): Likewise.
19642 * src/output.c (prepare): Give its final value.
19643 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19644 * src/getargs.h: Add its extern declaration.
19645 * src/getargs.c (error_verbose_flag): New int.
19646 (getargs): Update to catch new case.
19647 * src/options.c (option_table): 'error-verbose' is a new option.
19648 (shortopts): Update.
19650 2001-11-27 Akim Demaille <akim@epita.fr>
19652 * src/system.h: Use intl/libgettext.h.
19653 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19655 2001-11-27 Akim Demaille <akim@epita.fr>
19657 * tests/torture.at (Exploding the Stack Size with Malloc):
19658 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19660 2001-11-27 Akim Demaille <akim@epita.fr>
19662 * src/files.c: Include error.h.
19663 Reported by Hans Aberg.
19665 2001-11-26 Marc Autret <autret_m@epita.fr>
19667 * src/reader.c (parse_include_decl): New, not yet implemented.
19668 (read_declarations): Add case tok_include.
19669 * src/getargs.h (include): Add its extern definition.
19670 * src/getargs.c (include): New const char *.
19671 (getargs): Add case '-I'.
19672 * src/options.c (option_table): Add include as command line and
19674 * src/lex.h (token_t): Add tok_include.
19676 2001-11-26 Akim Demaille <akim@epita.fr>
19678 * src/reader.c (readgram): Make sure rules for mid-rule actions
19679 have a lineno equal to that of their host rule.
19680 Reported by Hans Aberg.
19681 * tests/regression.at (Rule Line Numbers): New.
19683 2001-11-26 Akim Demaille <akim@epita.fr>
19685 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19688 2001-11-26 Akim Demaille <akim@epita.fr>
19690 * src/complain.c, src/complain.h (error): Remove, provided by
19693 2001-11-26 Akim Demaille <akim@epita.fr>
19695 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19696 issue an error message.
19697 * tests/regression.at (Invalid %directive): New.
19698 Reported by Hans Aberg.
19700 2001-11-26 Akim Demaille <akim@epita.fr>
19702 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19703 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19705 2001-11-26 Akim Demaille <akim@epita.fr>
19707 * src/conflicts.c (conflicts_print): Don't complain at all when
19708 there are no reduce/reduce conflicts, and as many shift/reduce
19709 conflicts as expected.
19710 * tests/regression.at (%expect right): Adjust.
19712 2001-11-23 Akim Demaille <akim@epita.fr>
19714 * lib/alloca.c: Update, from fileutils.
19716 2001-11-23 Akim Demaille <akim@epita.fr>
19718 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19720 2001-11-23 Akim Demaille <akim@epita.fr>
19722 * src/system.h: Include alloca.h.
19723 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19725 2001-11-23 Akim Demaille <akim@epita.fr>
19727 * src/print_graph.c (print_actions): Remove `rule', unused.
19728 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19729 pacify GCC's signed < unsigned warnings.
19730 * src/closure.c (itemsetsize): Likewise.
19731 * src/reader.c (symbol_list_new): Static.
19733 2001-11-23 Akim Demaille <akim@epita.fr>
19735 Attaching lineno to buckets is stupid, since only one copy of each
19736 symbol is kept, only the line of the first occurrence is kept too.
19738 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19739 * src/reader.c (rline_allocated): Remove, unused.
19740 (symbol_list): Have a `line' member.
19741 (symbol_list_new): New.
19742 (readgram): Use it.
19743 * src/print.c (print_grammar): Output the rule line numbers.
19744 * tests/regression.at (Solved SR Conflicts)
19745 (Unresolved SR Conflicts): Adjust.
19746 Reported by Hans Aberg.
19748 2001-11-22 Marc Autret <autret_m@epita.fr>
19750 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19752 2001-11-22 Marc Autret <autret_m@epita.fr>
19754 * src/muscle_tab.c (muscle_init): Remove initialization of
19756 * src/output.c (output_master_parser): Do it here.
19758 2001-11-20 Akim Demaille <akim@epita.fr>
19761 * configure.in (ALL_LINGUAS): Adjust.
19762 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19763 longer contains strings to translate.
19765 2001-11-19 Akim Demaille <akim@epita.fr>
19767 * src/conflicts.c (conflicts_print): Add a missing \n.
19769 2001-11-19 Akim Demaille <akim@epita.fr>
19771 * src/nullable.c (nullable_print): New.
19772 (set_nullable): Call it when tracing.
19773 Better locality of variables.
19775 2001-11-19 Akim Demaille <akim@epita.fr>
19777 * src/print.c (print_actions): Better locality of variables.
19779 2001-11-19 Akim Demaille <akim@epita.fr>
19781 * src/derives.c (print_derives): Fix and enrich.
19782 * src/closure.c (print_fderives): Likewise.
19784 2001-11-19 Akim Demaille <akim@epita.fr>
19786 * src/closure.c (itemsetend): Remove, replaced with...
19787 (itemsetsize): new.
19789 2001-11-19 Akim Demaille <akim@epita.fr>
19791 * src/LR0.c (kernel_end): Remove, replaced with...
19792 (kernel_size): new.
19794 2001-11-19 Akim Demaille <akim@epita.fr>
19796 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19799 2001-11-19 Akim Demaille <akim@epita.fr>
19801 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19803 2001-11-19 Akim Demaille <akim@epita.fr>
19805 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19807 * src/LR0.c: Likewise.
19808 (allocate_itemsets): Use arrays instead of pointers to clarify.
19810 2001-11-19 Akim Demaille <akim@epita.fr>
19812 * src/getargs.c (statistics_flag): Replace with...
19814 (longopts): Accept --trace instead of --statistics.
19815 * src/getargs.h, src/options.c: Adjust.
19816 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19817 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19819 2001-11-19 Akim Demaille <akim@epita.fr>
19821 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19822 pointers to clarify the code.
19823 (save_reductions, save_shifts): Factor common parts of alternatives.
19825 2001-11-19 Akim Demaille <akim@epita.fr>
19827 * src/LR0.c (new_state, get_state): Complete TRACE code.
19828 * src/closure.c: Include `reader.h' to get `tags', needed by the
19830 Rename the conditional DEBUG as TRACE.
19831 Output consistently TRACEs to stderr, not stdout.
19832 * src/derives.c: Likewise.
19833 * src/reduce.c: (inaccessable_symbols): Using if is better style
19835 Use `#if TRACE' instead of `#if 0' for tracing code.
19837 2001-11-19 Akim Demaille <akim@epita.fr>
19839 * src/system.h (LIST_FREE, shortcpy): New.
19840 * src/LR0.c: Use them.
19841 * src/output.c (free_itemsets, free_reductions, free_shifts):
19842 Remove, replaced by LIST_FREE.
19844 2001-11-19 Akim Demaille <akim@epita.fr>
19846 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19847 (REDUCTIONS_ALLOC): New.
19848 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19851 2001-11-19 Akim Demaille <akim@epita.fr>
19853 * src/LR0.c (new_state): Complete trace code.
19854 * src/nullable.c (set_nullable): Don't translate traces.
19856 2001-11-19 Akim Demaille <akim@epita.fr>
19858 * src/print_graph.c (print_core): Better locality of variables.
19859 * src/print.c (print_core): Likewise.
19861 2001-11-19 Akim Demaille <akim@epita.fr>
19863 * src/vcg.c: You do the output, so you are responsible of the
19864 handling of VCG syntax, in particular: use quotearg.
19865 * src/print_graph.c: Don't.
19866 (print_actions): Don't output the actions as part of the nodes,
19867 since that's the job of the edges.
19868 (print_state): Don't output by hand: fill the node description,
19869 and ask for its output.
19871 2001-11-19 Akim Demaille <akim@epita.fr>
19873 * src/bison.simple (yyparse): When verbosely reporting an error,
19874 no longer put additional quotes around token names.
19875 * tests/calc.at: Adjust.
19877 2001-11-19 Akim Demaille <akim@epita.fr>
19879 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19880 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19881 * src/output.c: Adjust.
19883 2001-11-19 Akim Demaille <akim@epita.fr>
19885 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19887 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19889 2001-11-19 Akim Demaille <akim@epita.fr>
19891 * src/gram.h (rule_t): New.
19893 (rrhs, rlhs): Remove, part of state_t.
19894 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19895 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19896 * src/reader.c, src/reduce.c: Adjust.
19898 2001-11-19 Akim Demaille <akim@epita.fr>
19900 * src/reader.c (symbols_output): New, extracted from...
19901 (packsymbols): Here.
19904 2001-11-19 Akim Demaille <akim@epita.fr>
19906 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19907 (maxrhs): this new function.
19909 2001-11-19 Akim Demaille <akim@epita.fr>
19911 * src/lalr.c (F): New macro to access the variable F.
19914 2001-11-19 Akim Demaille <akim@epita.fr>
19916 * src/lalr.h (LA): New macro to access the variable LA.
19917 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19918 * src/lalr.c: Adjust.
19920 2001-11-19 Akim Demaille <akim@epita.fr>
19922 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19923 (set_state_table): handle the `lookaheads' members.
19925 2001-11-19 Akim Demaille <akim@epita.fr>
19927 * src/lalr.h (lookaheads): Removed array, whose contents is now
19929 (state_t): this structure.
19930 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19933 2001-11-19 Akim Demaille <akim@epita.fr>
19935 * src/lalr.h (consistent): Removed array, whose contents is now
19937 (state_t): this structure.
19938 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19941 2001-11-19 Akim Demaille <akim@epita.fr>
19943 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19944 contents are now members of...
19945 (state_t): this structure.
19946 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19949 2001-11-19 Akim Demaille <akim@epita.fr>
19951 * src/lalr.h (state_t): New.
19952 (state_table): Be a state_t * instead of a core **.
19953 (accessing_symbol): Remove, part of state_t.
19954 * src/lalr.c: Adjust.
19955 (set_accessing_symbol): Merge into...
19956 (set_state_table): this.
19957 * src/print_graph.c, src/conflicts.c: Adjust.
19959 2001-11-14 Akim Demaille <akim@epita.fr>
19961 * tests/calc.at, tests/output.at, tests/regression.at,
19962 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19963 now the tests are run in private dirs, therefore AC_CLEANUP and
19964 family can be simplified to 0-ary.
19965 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19966 use abs. path to find config.h.
19967 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19968 stderr, there can be way too much random noise.
19969 Instead pass -Werror to GCC and rely on the exit status.
19970 Reported by Wolfram Wagner.
19972 2001-11-14 Akim Demaille <akim@epita.fr>
19974 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19975 defined only if yyoverflow is defined, to avoid `warning: unused
19977 Reported by The Test Suite.
19979 2001-11-14 Akim Demaille <akim@epita.fr>
19981 * src/print.c: Include reduce.h.
19982 Reported by Hans Aberg.
19984 2001-11-14 Akim Demaille <akim@epita.fr>
19986 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19987 Revert a previous patch: these are really const.
19988 * src/conflicts.c (conflict_report): Additional useless pair of
19989 braces to pacify GCC's warnings for `if () if () {} else {}'.
19990 * src/lex.c (parse_percent_token): Replace equal_offset with
19993 Be sure to strdup `arg' when used, since there is no reason for
19994 token_buffer not to change.
19996 2001-11-14 Akim Demaille <akim@epita.fr>
19998 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20000 * src/main.c (main): Use them.
20001 Suggested by Hans Aberg.
20003 2001-11-12 Akim Demaille <akim@epita.fr>
20005 * src/system.h (ngettext): Now that we use ngettext, be sure to
20006 provide a default definition when NLS are not used.
20008 2001-11-12 Akim Demaille <akim@epita.fr>
20010 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20011 Use @kbd to denote user input.
20012 (Language and Grammar): ANSIfy the example.
20013 Adjust its layout for info/notinfo.
20014 (Location Tracking Calc): Output error messages to stderr.
20015 Output locations in a more GNUtically correct way.
20016 Fix a couple of Englishos.
20017 Adjust @group/@end group pairs.
20019 2001-11-12 Akim Demaille <akim@epita.fr>
20021 %expect was not functioning at all.
20023 * src/conflicts.c (expected_conflicts): Set to -1.
20024 (conflict_report): Use ngettext.
20025 (conflicts_print): Check %expect and make its violation an error.
20026 * doc/bison.texinfo (Expect Decl): Adjust.
20027 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20028 * tests/regression.at (%expect not enough, %expect right)
20029 (%expect too much): New.
20031 2001-11-12 Akim Demaille <akim@epita.fr>
20033 * tests/regression.at (Conflicts): Rename as...
20034 (Unresolved SR Conflicts): this.
20035 (Solved SR Conflicts): New.
20037 2001-11-12 Akim Demaille <akim@epita.fr>
20039 * src/reduce.c (print_results): Rename as...
20040 (reduce_output): This.
20041 Output to OUT, passed as argument, instead of output_obstack.
20042 (dump_grammar): Likewise.
20043 (reduce_free): New.
20045 (reduce_grammar): No longer call reduce_output, since...
20046 * src/print.c (print_results): do it.
20047 * src/main.c (main): Call reduce_free;
20049 2001-11-12 Akim Demaille <akim@epita.fr>
20051 * src/conflicts.c (print_reductions): Accept OUT as argument.
20052 Output to it, not to output_obstack.
20053 * src/print.c (print_actions): Adjust.
20055 2001-11-12 Akim Demaille <akim@epita.fr>
20057 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20058 the result instead of using...
20059 (src_total, rrc_total, src_count, rrc_count): Remove.
20060 (any_conflicts): Remove.
20061 (print_conflicts): Split into...
20062 (conflicts_print, conflicts_output): New.
20063 * src/conflicts.h: Adjust.
20064 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20065 * src/print.c (print_grammar): Issue `\n' between two rules.
20066 * tests/regression.at (Conflicts): New.
20067 Reported by Tom Lane.
20069 2001-11-12 Akim Demaille <akim@epita.fr>
20071 * tests/regression.at (Invalid input): Remove, duplicate with
20072 ``Invalid input: 1''.
20074 2001-11-12 Akim Demaille <akim@epita.fr>
20076 * tests/torture.at (AT_DATA_STACK_TORTURE)
20077 (Exploding the Stack Size with Alloca)
20078 (Exploding the Stack Size with Malloc): New.
20080 2001-11-12 Akim Demaille <akim@epita.fr>
20082 * src/bison.simple (YYSTACK_REALLOC): New.
20083 (yyparse) [!yyoverflow]: Use it and free the old stack.
20084 Reported by Per Allansson.
20086 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20088 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20089 define CPP macro, which substitute YYSTYPE by yystype.
20090 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20091 with yyltype/YYLTYPE. This allows inclusion of the generated
20092 header within the parser if the compiler, such as GGC, accepts
20093 multiple equivalent #defines.
20096 2001-11-05 Akim Demaille <akim@epita.fr>
20098 * src/reader.c (symbols_output): New, extracted from...
20099 (packsymbols): here.
20102 2001-11-05 Akim Demaille <akim@epita.fr>
20104 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20106 2001-11-05 Akim Demaille <akim@epita.fr>
20108 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20111 2001-11-05 Akim Demaille <akim@epita.fr>
20113 * src/options.h (struct option_table_struct): set_flags is void*.
20114 * src/options.c (longopts): Support `--output' and `%output'.
20116 * src/lex.h (tok_setopt): Remove, replaced with...
20117 (tok_intopt, tok_stropt): these new guys.
20118 * src/lex.c (getopt.h): Not needed.
20119 (token_buffer, unlexed_token_buffer): Not const.
20120 (percent_table): Promote `-' over `_' in directive names.
20121 Active `%name-prefix', `file-prefix', and `output'.
20122 (parse_percent_token): Accept possible arguments to directives.
20123 Promote `-' over `_' in directive names.
20125 2001-11-04 Akim Demaille <akim@epita.fr>
20127 * doc/bison.texinfo (Decl Summary): Split the list into
20128 `directives for grammars' and `directives for bison'.
20130 Add description of `%name-prefix', `file-prefix', and `output'.
20131 Promote `-' over `_' in directive names.
20132 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20133 Simplify the description of `--name-prefix'.
20134 Promote `-' over `_' in directive names.
20135 Promote `--output' over `--output-file'.
20136 Fix the description of `--defines'.
20137 * tests/output.at: Exercise %file-prefix and %output.
20139 2001-11-02 Akim Demaille <akim@epita.fr>
20141 * doc/refcard.tex: Update.
20143 2001-11-02 Akim Demaille <akim@epita.fr>
20145 * src/symtab.h (SUNDEF): New.
20146 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20147 stand for `uninitialized', instead of 0.
20148 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20149 * src/lex.c (lex): Adjust.
20151 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20153 Let yylex return it instead of a plain 0.
20154 Reported by Dick Streefland.
20156 2001-11-02 Akim Demaille <akim@epita.fr>
20158 * tests/regression.at (Mixing %token styles): New test.
20160 2001-11-02 Akim Demaille <akim@epita.fr>
20162 * src/reader.c (parse_thong_decl): Formatting changes.
20163 (token_translations_init): New, extracted from...
20164 (packsymbols): Here.
20167 2001-11-01 Akim Demaille <akim@epita.fr>
20169 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20170 Check that `9foo.y' produces correct cpp guards.
20171 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20175 2001-11-01 Akim Demaille <akim@epita.fr>
20177 * tests/regression.at (Invalid input: 2): New.
20178 * src/lex.c (unlexed_token_buffer): New.
20179 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20183 2001-11-01 Akim Demaille <akim@epita.fr>
20185 * tests/calc.at: Catch up with 1.30.
20186 * configure.in: Bump to 1.49a.
20187 Adjust to newer Autotest.
20189 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20191 * src/conflicts.c: Move global variables rrc_total and src_total ...
20192 (print_conflicts): here.
20193 * src/output.c (output): Free global variable user_toknums.
20194 * src/lex.c (token_obstack): Become static.
20196 2001-10-18 Akim Demaille <akim@epita.fr>
20198 * tests/atlocal.in (GCC): Add.
20199 * tests/calc.at: s/m4_match/m4_bmatch/.
20200 s/m4_patsubst/m4_bpatsubst/.
20201 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20202 * configure.in: AC_SUBST(GCC).
20204 2001-10-14 Marc Autret <autret_m@epita.fr>
20206 * src/options.c (create_long_option_table): Fix.
20208 2001-10-10 Akim Demaille <akim@epita.fr>
20210 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20212 2001-10-04 Akim Demaille <akim@epita.fr>
20214 * src/reader.c (parse_union_decl): Push the caracters in
20215 union_obstack, not attrs_obstack.
20217 2001-10-04 Akim Demaille <akim@epita.fr>
20219 Merge in the branch 1.29.
20221 * src/reader.c (packsymbols): Use a temporary obstack for
20222 `%%tokendef', since output_stack is already used elsewhere.
20224 2001-10-02 Akim Demaille <akim@epita.fr>
20228 2001-10-02 Akim Demaille <akim@epita.fr>
20232 2001-10-02 Akim Demaille <akim@epita.fr>
20234 * tests/regression.at (Invalid CPP headers): New.
20235 From Alexander Belopolsky.
20236 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20238 2001-10-02 Akim Demaille <akim@epita.fr>
20240 * tests/regression.at (Invalid input): New.
20241 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20244 2001-10-02 Akim Demaille <akim@epita.fr>
20246 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20248 2001-10-02 Akim Demaille <akim@epita.fr>
20250 * src/output.c (output_parser): Assert `skeleton'.
20251 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20255 2001-10-01 Marc Autret <autret_m@epita.fr>
20257 * src/lex.h: Echo modifications.
20258 * src/lex.c (unlex): Parameter is now token_t.
20261 2001-10-01 Marc Autret <autret_m@epita.fr>
20263 * src/main.c: Include lex.h.
20266 2001-09-29 Akim Demaille <akim@epita.fr>
20268 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20270 2001-09-28 Akim Demaille <akim@epita.fr>
20272 * tests/testsuite.at: Update to newer Autotest.
20273 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20275 2001-09-27 Akim Demaille <akim@epita.fr>
20277 Position independent wrapper.
20279 * tests/bison: Remove.
20280 * tests/bison.in: New.
20281 * configure.in: Adjust.
20283 2001-09-27 Paul Eggert <eggert@twinsun.com>
20285 Port quotearg fixes from tar 1.13.24.
20287 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20289 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20290 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20292 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20293 * m4/mbrtowc.m4: New file.
20294 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20295 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20297 2001-09-27 Akim Demaille <akim@epita.fr>
20301 2001-09-27 Akim Demaille <akim@epita.fr>
20305 2001-09-25 Akim Demaille <akim@epita.fr>
20307 * src/system.h: Include `xalloc.h'.
20308 Remove it from the C files.
20309 * src/files.c (output_files): Free the obstacks.
20310 * src/lex.c (init_lex): Rename as...
20313 * src/main.c (main): Use it.
20315 2001-09-24 Marc Autret <autret_m@epita.fr>
20317 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20318 to output informations in fout (FILE*).
20319 (open_graph, close_graph): Likewise.
20320 (output_graph, output_edge, output_node): Likewise.
20321 * src/vcg.h: Update function prototypes.
20322 * src/print_graph.c (print_graph): Open output graph file.
20323 (print_actions): Adjust.
20324 * src/files.h: Remove extern declaration.
20325 * src/files.c: Remove graph_obstack declaration.
20326 (open_files): Remove graph_obstack initialization.
20327 (output_files): Remove graph_obstack saving.
20329 2001-09-24 Marc Autret <autret_m@epita.fr>
20331 * src/files.c (compute_output_file_names): Fix.
20333 2001-09-24 Marc Autret <autret_m@epita.fr>,
20334 Akim Demaille <akim@epita.fr>
20336 * src/reader.c (reader): Remove call to free_symtab ().
20337 * src/main.c (main): Call it here.
20339 * src/conflicts.c (initialize_conflicts): Rename as...
20340 (solve_conflicts): this.
20341 * src/print.c (print_core, print_actions, print_state)
20342 (print_grammar): Dump to a file instead a `output_obstack'.
20343 (print_results): Dump `output_obstack', and then proceed with the
20345 * src/files.c (compute_output_file_names, close_files): New.
20346 (output_files): Adjust.
20347 * src/main.c (main): Adjust.
20349 2001-09-23 Marc Autret <autret_m@epita.fr>
20351 * src/files.c (compute_header_macro): Computes header macro name
20352 from spec_defines_file when given.
20354 2001-09-23 Marc Autret <autret_m@epita.fr>
20356 * src/files.c (output_files): Add default extensions.
20358 2001-09-22 Akim Demaille <akim@epita.fr>
20360 * src/conflicts.c (finalize_conflicts): Rename as...
20361 (free_conflicts): this.
20363 2001-09-22 Akim Demaille <akim@epita.fr>
20365 * src/gram.c (gram_free): Rename back as...
20367 (output_token_translations): Free `token_translations'.
20368 * src/symtab.c (free_symtab): Free the tag field.
20370 2001-09-22 Akim Demaille <akim@epita.fr>
20372 Remove `translations' as it is always set to true.
20374 * src/gram.h: Adjust.
20375 * src/reader.c (packsymbols, parse_token_decl): Adjust
20376 * src/print.c (print_grammar): Adjust.
20377 * src/output.c (output_token_translations): Adjust.
20378 * src/lex.c (lex): Adjust.
20379 * src/gram.c: Be sure the set pointers to NULL.
20380 (dummy): Rename as...
20383 2001-09-22 Akim Demaille <akim@epita.fr>
20385 * configure.in: Invoke AM_LIB_DMALLOC.
20386 * src/system.h: Use dmalloc.
20387 * src/LR0.c: Be sure to have pointers initialized to NULL.
20388 (allocate_itemsets): Allocate kernel_items only if needed.
20390 2001-09-22 Akim Demaille <akim@epita.fr>
20392 * configure.in: Bump to 1.29b.
20393 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20394 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20395 need xmalloc.c in calc.y.
20398 2001-09-21 Akim Demaille <akim@epita.fr>
20401 * Makefile.maint, config/config.guess, config/config.sub,
20402 * config/missing: Update from masters.
20403 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20405 * configure.in (ALL_LINGUAS): Add `tr'.
20407 2001-09-21 Akim Demaille <akim@epita.fr>
20409 * tests/Makefile.am (package.m4): Move to...
20410 ($(srcdir)/$(TESTSUITE)): here.
20412 2001-09-20 Akim Demaille <akim@epita.fr>
20414 * src/complain.c: No longer try to be standalone: use system.h.
20415 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20416 * src/complain.h: Likewise.
20417 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20418 Remove the unused variable `n'.
20419 From Albert Chin-A-Young.
20421 2001-09-18 Marc Autret <autret_m@epita.fr>
20423 * doc/bison.1: Update.
20424 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20426 (Option Cross Key): Update.
20429 2001-09-18 Marc Autret <autret_m@epita.fr>
20431 * tests/regression.at: New test (comment in %union).
20433 2001-09-18 Marc Autret <autret_m@epita.fr>
20435 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20437 Reported by Keith Browne.
20439 2001-09-18 Marc Autret <autret_m@epita.fr>
20441 * tests/output.at: Add tests for --defines and --graph.
20443 2001-09-18 Marc Autret <autret_m@epita.fr>
20445 * tests/output.at: Removes tests of %{header,src}_extension features.
20447 2001-09-18 Akim Demaille <akim@epita.fr>
20449 * tests/Makefile.am (package.m4): New.
20450 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20451 (_AT_CHECK_CALC_ERROR): Likewise.
20452 Factor the `, ' part of verbose error messages.
20454 2001-09-18 Marc Autret <autret_m@epita.fr>
20456 * src/getargs.c (longopts): Declare --defines and --graph as options
20457 with optional arguments.
20458 * src/files.h: Add extern declarations.
20459 * src/files.c (spec_graph_file, spec_defines_file): New.
20460 (output_files): Update.
20461 Remove CPP-outed code.
20463 2001-09-18 Marc Autret <autret_m@epita.fr>
20465 Turn off %{source,header}_extension feature.
20467 * src/files.c (compute_exts_from_gf): Update.
20468 (compute_exts_from_src): Update.
20469 (output_files): CPP-out useless code.
20470 * src/files.h: Remove {header,source}_extension extern declarations.
20471 * src/reader.c (parse_dquoted_param): CPP-out.
20472 (parse_header_extension_decl): Remove.
20473 (parse_source_extension_decl): Remove.
20474 (read_declarations): Remove cases tok_{hdrext,srcext}.
20475 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20476 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20478 2001-09-10 Akim Demaille <akim@epita.fr>
20480 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20481 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20482 (AT_CHECK_OUTPUT): this.
20483 Merely check ls' exit status, its output is useless.
20485 2001-09-10 Akim Demaille <akim@epita.fr>
20487 * tests/calc.at: Use m4_match.
20488 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20490 2001-09-10 Marc Autret <autret_m@epita.fr>,
20491 Akim Demaille <akim@epita.fr>
20493 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20495 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20497 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20498 * src/lex.h: Adjust prototype.
20499 (token_t): Add `tok_undef'.
20500 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20501 (parse_percent_token): Now returns token_t.
20502 Add default statement in switch.
20503 (lex): Separate `c' as an input variable, from the token_t result
20505 (unlexed): Is a token_t.
20507 2001-09-10 Akim Demaille <akim@epita.fr>
20509 * configure.in: Bump to 1.29a.
20511 2001-09-07 Akim Demaille <akim@epita.fr>
20515 2001-08-30 Akim Demaille <akim@epita.fr>
20517 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20518 * m4/atconfig.m4: Remove.
20519 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20520 * tests/bison: New.
20521 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20522 m4_if, m4_patsubst, and m4_regexp.
20523 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20524 `input' file instead of echo.
20526 2001-08-29 Akim Demaille <akim@epita.fr>
20530 2001-08-29 Akim Demaille <akim@epita.fr>
20534 2001-08-29 Paul Eggert <eggert@twinsun.com>
20536 * src/bison.simple (yyparse): Don't take the address of an
20537 item before the start of an array, as that doesn't conform to
20540 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20542 * doc/bison.texinfo (Location Tracking Calc): New node.
20544 2001-08-29 Paul Eggert <eggert@twinsun.com>
20546 * src/output.c (output): Do not define const, as this now
20547 causes more problems than it cures.
20549 2001-08-29 Akim Demaille <akim@epita.fr>
20551 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20553 Be sure to tag the `detailmenu'.
20555 2001-08-29 Akim Demaille <akim@epita.fr>
20557 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20558 download in a tmp dir.
20560 2001-08-28 Marc Autret <autret_m@epita.fr>
20562 * config/depcomp: New file.
20564 2001-08-28 Marc Autret <autret_m@epita.fr>
20566 * doc/bison.1 (mandoc): Adjust.
20567 From Juan Manuel Guerrero.
20569 2001-08-28 Marc Autret <autret_m@epita.fr>
20571 * src/print_graph.c (print_state): Fix.
20573 2001-08-27 Marc Autret <autret_m@epita.fr>
20575 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20577 Echo modifications to the functions prototypes.
20578 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20580 2001-08-27 Marc Autret <autret_m@epita.fr>
20582 * src/vcg.c: Include `xalloc.h'.
20583 (add_colorentry): New.
20584 (add_classname): New.
20585 (add_infoname): New.
20586 * src/vcg.h: Add new prototypes.
20588 2001-08-27 Akim Demaille <akim@epita.fr>
20590 * Makefile.maint: Sync. again with CVS Autoconf.
20592 2001-08-27 Akim Demaille <akim@epita.fr>
20594 * Makefile.maint: Formatting changes.
20595 (po-update, cvs-update, update): New targets.
20598 2001-08-27 Akim Demaille <akim@epita.fr>
20600 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20601 * Makefile.maint: Sync. with CVS Autoconf.
20603 2001-08-27 Marc Autret <autret_m@epita.fr>
20605 * src/vcg.h (struct infoname_s): New.
20606 (struct colorentry_s): New.
20607 (graph_s): New fields {vertical,horizontal}_order in structure.
20608 Add `infoname' field.
20609 Add `colorentry' field;
20610 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20611 (G_HORIZONTAL_ORDER): New.
20613 (G_COLORENTRY): New.
20614 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20615 Add output of `infoname'.
20616 Add output of `colorentry'.
20618 2001-08-27 Marc Autret <autret_m@epita.fr>
20620 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20621 This one shadowed a global parameter.
20623 2001-08-24 Marc Autret <autret_m@epita.fr>
20625 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20626 instead of `unsigned'.
20627 (print_state): Do not call obstack_object_size () in obstack_grow ()
20628 to avoid macro variables shadowing.
20630 2001-08-23 Marc Autret <autret_m@epita.fr>
20632 * src/lex.c (percent_table): Typo: s/naem/name/.
20634 Normalize new options declarations.
20636 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20638 * tests/suite.at: Exercise %header_extension and %source_extension.
20640 2001-08-16 Marc Autret <autret_m@epita.fr>
20642 * src/reader.c (parse_dquoted_param): New.
20643 (parse_header_extension_decl): Use it.
20644 (parse_source_extension_decl): Likewise.
20646 2001-08-16 Marc Autret <autret_m@epita.fr>
20648 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20649 (get_xxxx_str): Use assert () instead of complain ().
20650 Remove return invokations in default cases.
20651 (get_decision_str): Modify default behaviour. Remove second argument.
20652 Echo modifications on calls.
20653 (output_graph): Fix.
20655 2001-08-16 Marc Autret <autret_m@epita.fr>
20657 * src/getargs.c (usage): Update with ``-g, --graph''.
20659 2001-08-16 Marc Autret <autret_m@epita.fr>
20661 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20662 (Option Cross Key): Likewise.
20663 * doc/bison.1: Update.
20665 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20667 * src/output.c (output_master_parser): Don't finish action_obstack.
20668 (output_parser): Don't care about the muscle action, here.
20669 (prepare): Copy the action_obstack in the action muscle.
20670 (output): Free action_obstack.
20672 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20674 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20675 will contain `%union' declaration.
20676 (parse_union_decl): Delete #line directive output.
20677 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20678 informations about %union.
20679 (parse_union_decl): Copy the union_obstack in the muscle stype.
20680 * src/bison.simple: Add new #line directive.
20681 Add typdef %%stype YYSTYPE.
20683 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20685 * src/bison.simple: Add new `#line' directive.
20687 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20689 * src/bison.simple: New `#line' directive.
20690 * src/output.c (output_parser): Support new dynamic muscle input_line.
20692 2001-09-22 Marc Autret <autret_m@epita.fr>
20694 * src/output.c (output_master_parser): New.
20695 (output_parser): Be more re-entrant.
20697 2001-09-21 Marc Autret <autret_m@epita.fr>
20699 * src/reader.c (copy_definition, parse_union_decl): Update and use
20701 (copy_action): Likewise.
20702 Use obstack_1grow ().
20703 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20705 2001-09-21 Marc Autret <autret_m@epita.fr>
20707 * src/options.c (option_table): Adjust.
20708 * src/lex.c (parse_percent_token): Fix.
20710 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20712 * src/options.c (symtab.h): Include it, need by lex.h.
20714 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20716 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20717 is now an option_table_struct*.
20718 (option_strcmp): New function option_strcmp.
20719 (parse_percent_token): Call option_strcmp.
20720 * src/getargs.c (xalloc.h, options.h): Include it.
20721 (getargs): Call create_long_option_table.
20722 (getargs): Free longopts at the end of the function.
20723 (shortopts): Move in options.c.
20724 * src/options.c (create_long_option_table): New function. Convert
20725 information from option_table to option structure.
20726 * src/reader.c (options.h): Include it.
20728 * src/Makefile.am: Adjust.
20729 * src/options.c (option_table): Create from longopts and percent_table.
20730 * src/getargs.c (longopts): Delete.
20731 * src/lex.c (struct percent_table_struct): Delete.
20732 (percent_table): Delete.
20733 (options.h): Include it.
20734 * src/options.c: Create.
20735 * src/options.h: Create.
20736 Declare enum opt_access_e.
20737 Define struct option_table_struct.
20739 2001-09-20 Marc Autret <autret_m@epita.fr>
20741 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20744 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20746 * src/bison.simple: s/%%filename/%%skeleton.
20747 * src/muscle_tab.c (getargs.h): Include it.
20748 (muscle_init): Insert new muscle skeleton.
20750 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20752 * src/output.c (output_parser): Delete unused variable actions_dumped.
20754 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20756 * src/output.c (output): Delete call to reader_output_yylsp.
20757 * src/reader.c (reader): Likewise.
20758 * src/reader.h: Delete declaration of reader_output_yylsp.
20760 2001-09-02 Marc Autret <autret_m@epita.fr>
20762 * src/reader.c: Include muscle_tab.h.
20763 (parse_union_decl): Update.
20764 (parse_macro_decl): Rename parse_muscle_decl.
20765 Update to use renamed functions and variable.
20766 (read_declarations, copy_action, read_additionnal_code, : Updated
20767 with correct variables and functions names.
20768 (packsymbols, reader): Likewise.
20770 * src/reader.h (muscle_obstack): Extern declaration update.
20772 * src/output.c: Include muscle_tab.h
20773 In all functions using macro_insert, change by using muscle_insert ().
20774 (macro_obstack): Rename muscle_obstack.
20775 Echo modifications in the whole file.
20776 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20777 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20778 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20780 * src/muscle_tab.h: Update double inclusion macros.
20781 (macro_entry_s): Rename muscle_entry_s.
20784 * src/muscle_tab.c: Include muscle_tab.h.
20785 Rename macro_tabble to muscle_table.
20786 (mhash1, mhash2, mcmp): Use muscle_entry.
20787 (macro_init): Rename muscle_init. Update.
20788 (macro_insert): Rename muscle_insert. Update.
20789 (macro_find): Rename muscle_find. Update.
20791 * src/main.c: Include muscle_tab.h.
20792 (main): Call muscle_init ().
20793 * src/Makefile.am (bison_SOURCES): Echo modifications.
20795 2001-09-02 Marc Autret <autret_m@epita.fr>
20797 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20799 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20801 2001-09-02 Marc Autret <autret_m@epita.fr>
20803 * src/macrotab.c, src/macrotab.h: Remove.
20805 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20807 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20810 2001-09-01 Marc Autret <autret_m@epita.fr>
20812 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20813 to an explicit value to activate the feature. We do it here.
20815 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20817 * src/output.c (prepare): Delete the `filename' muscule insertion.
20818 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20819 (parse_union_decl): Likewise.
20820 * src/macrotab.c (macro_init): Initialize filename by infile.
20822 2001-08-31 Marc Autret <autret_m@epita.fr>
20824 * src/bison.simple (YYLSP_NEEDED): New definition.
20825 * src/output.c (prepare): Add macro insertion of `locations_flag'
20827 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20829 * src/output.c (prepare): Delete insertion of previous muscles,
20830 and insert the `prefix' muscles.
20831 * src/macrotab.c (macro_init): Likewise.
20832 (macro_init): Initialization prefix directive by `yy'.
20833 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20834 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20835 yylval, yydebug, yyerror, yynerrs and yyparse.
20836 New directive `#define' to substitute yydebug, ... with option
20839 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20841 * src/main.c (main): Standardize.
20842 * src/output.c (output_table_data, output_parser): Likewise.
20843 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20845 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20847 * src/reader.c (read_additionnal_code): Rename %%user_code to
20849 * src/output.c (output): Rename %%declarations to %%prologue.
20850 * src/bison.simple: Echo modifications.
20852 2001-08-31 Marc Autret <autret_m@epita.fr>
20854 * src/reader.c (readgram): CleanUp.
20855 (output_token_defines): Likewise.
20856 (packsymbols): Likewise.
20857 (reader): Likewise.
20858 * src/output.c (output): CPP-out useless code.
20860 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20862 * src/reader.c (reader): Delete obsolete call to function
20863 output_trailers and output_headers.
20864 * src/output.h: Remove obsolete functions prototypes of output_headers
20865 and output_trailers.
20867 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20869 * src/main.c: Include macrotab.h.
20870 * src/macrotab.h (macro_entry_s): Constify fields.
20871 Adjust functions prototypes.
20872 * src/macrotab.c (macro_insert): Constify key and value.
20873 (macro_find): Constify key.
20874 (macro_insert): Include 'xalloc.h'
20875 (macro_insert): Use XMALLOC.
20876 (macro_find): Constify return value.
20877 * src/output.c (output_table_data): Rename table to table_data.
20878 (output_parser): Constify macro_key, macro_value.
20880 2001-08-30 Marc Autret <autret_m@epita.fr>
20882 * src/reader.c (parse_skel_decl): New.
20883 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20884 * src/lex.h (token_t): New token `tok_skel'.
20885 * src/lex.c (percent_table): Add skeleton option entry.
20888 2001-08-29 Marc Autret <autret_m@epita.fr>
20890 * src/bison.simple: Add %%user_code directive at the end.
20891 * src/reader.c (read_additionnal_code): New.
20893 * src/output.c (output_program): Remove.
20896 2001-08-28 Marc Autret <autret_m@epita.fr>
20898 * src/output.c (output_actions): Clean up.
20899 (output_gram): CPP-out useless code.
20900 * src/reader.c (reader): Clean up, CPP-out useless code.
20902 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20904 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20906 * src/bison.simple: Add `%%definitions'.
20908 2001-08-28 Marc Autret <autret_m@epita.fr>
20910 * config/depcomp: New file.
20912 2001-08-27 Paul Eggert <eggert@twinsun.com>
20914 * src/bison.simple (yyparse): Don't take the address of an
20915 item before the start of an array, as that doesn't conform to
20918 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20920 * src/output.c (output): Remove the initialization of the macro
20921 obstack. It was done too late here.
20923 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20925 (reader): Initialize the macro obstack here, since we need it to grow
20926 '%define' directives.
20928 * src/reader.h: Declare the macro obstack as extern.
20930 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20932 * src/output.c (output_parser): Fix. Store single '%' characters in
20933 the output obstack instead of throwing them away.
20935 2001-08-27 Akim Demaille <akim@epita.fr>
20937 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20939 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20941 * lib/Makefile.am: Adjust.
20943 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20945 * src/bison.simple: Update and add '%%' directives.
20947 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20949 * src/reader.c (reader): Remove calls to 'output_headers' and
20950 'output_trailers'. Remove some C output.
20951 (readgram): Disable a piece of code that was writing a default
20952 definition for 'YYSTYPE'.
20953 (reader_output_yylsp): Remove.
20954 (packsymbols): Output token defintions to a macro.
20955 (copy_definition): Disable C output.
20957 * src/reader.c (parse_macro_decl): New function used to parse macro
20959 (copy_string2): Put the body of copy_string into this new function.
20960 Add a parameter to let the caller choose whether he wants to copy the
20961 string delimiters or not.
20962 (copy_string): Be a simple call to copy_string2 with the last argument
20964 (read_declarations): Add case for macro definition.
20965 (copy_identifier): New.
20966 (parse_macro_decl): Read macro identifiers using copy_identifier
20969 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20971 * src/output.c (prepare): Add prefixed names.
20972 (output_parser): Output semantic actions.
20973 (output_parser): Fix bug on '%%line' directives.
20975 * src/output.c (output_headers): Remove. The C code printed by this
20976 function should now be in the skeletons.
20977 (output_trailers): Remove.
20978 (output): Disable call to 'reader_output_yylsp'.
20979 (output_rule_data): Do not output tables to the table obstack.
20981 * src/output.c: Remove some C dedicated output.
20982 Improve the use of macro and output obstacks.
20983 (output_defines): Remove.
20985 * src/output.c (output_token_translations): Associate 'translate'
20986 table with a macro. No output to the table obstack.
20987 (output_gram): Same for 'rhs' and 'prhs'.
20988 (output_stos): Same for 'stos'.
20989 (output_rule_data): Same for 'r1' and 'r2'.
20990 (token_actions): Same for 'defact'.
20991 (goto_actions): Same for 'defgoto'.
20992 (output_base): Same for 'pact' and 'pgoto'.
20993 (output_table): Same for 'table'.
20994 (output_check): Same for 'check'.
20996 * src/output.c (output_table_data): New function.
20997 (output_short_table): Remove.
20998 (output_short_or_char_table): Remove.
21000 * src/output.c (output_parser): Replace most of the skeleton copy code
21001 with something new. Skeletons are now processed character by character
21002 rather than line by line, and Bison looks for '%%' macros. This is the
21003 first step in making Bison's output process (a lot) more flexible.
21004 (output_parser): Use the macro table.
21006 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21008 * src/main.c (main): Initialize the macro table.
21010 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21012 * src/lex.c (percent_table): Add tok_define.
21013 * src/lex.h: Add tok_define.
21015 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21017 * src/macrotab.c: New file.
21018 * src/macrotab.h: New file.
21019 * src/Makefile.am: Update.
21021 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21023 * lib/hash.c: New file.
21024 * lib/hash.h: New file.
21025 * lib/Makefile.am: Update.
21027 2001-08-15 Akim Demaille <akim@epita.fr>
21031 2001-08-15 Marc Autret <autret_m@epita.fr>
21033 * src/reader.c (readgram): Indent output macro YYSTYPE.
21034 (packsymbols): Likewise.
21035 (output_token_defines): Likewise.
21036 * src/files.c: Standardize.
21037 (compute_header_macro): New.
21038 (defines_obstack_save): New. Use compute_header_macro.
21039 (output_files): Update. Use defines_obstack_save.
21041 2001-08-15 Akim Demaille <akim@epita.fr>
21043 * doc/bison.texinfo (Table of Symbols): Document
21044 YYSTACK_USE_ALLOCA.
21046 2001-08-15 Akim Demaille <akim@epita.fr>
21048 * missing: Update from CVS Automake.
21049 * config/config.guess, config/config.sub, config/texinfo.tex:
21050 Update from gnu.org.
21052 2001-08-15 Akim Demaille <akim@epita.fr>
21054 * Makefile.maint: Sync with CVS Autoconf.
21056 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21058 * doc/bison.texinfo: Include GNU Free Documentation License from
21060 * doc/fdl.texi: Add to package.
21062 2001-08-14 Marc Autret <autret_m@epita.fr>
21064 Turn on %{source,header}_extension features.
21066 * src/lex.c (percent_table): Un-CPP out header_extension and
21068 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21069 (compute_exts_from_src): Remove conditions. It restores priorities
21072 2001-08-14 Marc Autret <autret_m@epita.fr>
21074 * src/files.c (compute_base_names): Add extensions computing when
21075 `--file-prefix' used.
21076 Standardize function calls.
21078 2001-08-13 Marc Autret <autret_m@epita.fr>
21080 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21081 defining it (defined but null disables alloca).
21083 2001-08-13 Marc Autret <autret_m@epita.fr>
21085 * src/bison.simple (_yy_memcpy): CPP reformat.
21087 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21089 * tests/atconfig.in (CPPFLAGS): Fix.
21091 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21093 * doc/bison.texinfo: Include GNU General Public License from
21095 * doc/gpl.texi: Add to package.
21097 2001-08-10 Marc Autret <autret_m@epita.fr>
21099 * src/print_graph.h: Fix.
21100 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21102 2001-08-10 Akim Demaille <akim@epita.fr>
21104 * src/system.h: Provide default declarations for stpcpy, strndup,
21107 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21109 * doc/bison.texinfo (Locations): Update @$ stuff.
21111 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21113 * src/bison.simple (YYLLOC_DEFAULT): Update.
21116 2001-08-08 Marc Autret <autret_m@epita.fr>
21118 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21119 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21120 Reported by Fabrice Bauzac.
21122 2001-08-08 Marc Autret <autret_m@epita.fr>
21124 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21125 * src/vcg.c (output_node): Fix.
21126 * src/vcg.h: Cleanup.
21127 * src/print_graph.c: Add comments.
21128 (node_output_size): New global variable. Simplify the formatting of
21129 the VCG graph output.
21130 (print_actions): Unused code is now used. It notifies the final state
21131 and no action states in the VCG graph. It also give the reduce actions.
21132 The `shift and goto' edges are red and the `go to state' edges are
21134 Get the current node name and node_obstack by argument.
21135 (node_obstack): New variable.
21136 (print_state): Manage node_obstack.
21137 (print_core): Use node_obstack given by argument.
21138 A node is not only computed here but in print_actions also.
21139 (print_graph): CPP out useless code instead of commenting it.
21141 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21143 * tests/atconfig.in (CPPFLAGS): Fix.
21145 2001-08-07 Akim Demaille <akim@epita.fr>
21147 * src/print_graph.c (quote): New.
21148 (print_core): Use it.
21150 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21152 * src/vcg.c (complain.h): Include it.
21153 Unepitaize `return' invocations.
21154 [NDEBUG] (main): Remove.
21155 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21156 * src/files.c (open_files): Initialize graph_obstack.
21157 * src/print_graph.c (print_actions): CPP out useless code.
21158 (print_core): Don't output the last `\n' in labels.
21160 * src/files.c (output_files): Output the VCG file.
21161 * src/main.c (main): Invoke print_graph ();
21163 2001-08-06 Marc Autret <autret_m@epita.fr>
21165 Automaton VCG graph output.
21166 Using option ``-g'' or long option ``--graph'', you can generate
21167 a gram_filename.vcg file containing a VCG description of the LALR (1)
21168 automaton of your grammar.
21170 * src/main.c: Call to print_graph() function.
21171 * src/getargs.h: Update.
21172 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21173 (graph_flag): New flag.
21174 (longopts): Update.
21175 (getargs): Add case `g'.
21176 * src/files.c (graph_obstack): New obstack struct.
21177 (open_files): Initialize new obstack.
21178 (output_files): Saves graph_obstack if required.
21179 * src/files.h (graph_obstack): New extern declaration.
21180 * src/Makefile.am: Add new source files.
21182 2001-08-06 Marc Autret <autret_m@epita.fr>
21184 * src/print_graph.c, src/print_graph.h (graph): New.
21185 * src/vcg.h: New file.
21186 * src/vcg.c: New file, VCG graph handling.
21188 2001-08-06 Marc Autret <autret_m@epita.fr>
21190 Add of %source_extension and %header_extension which specify
21191 the source or/and the header output file extension.
21193 * src/files.c (compute_base_names): Remove initialisation of
21194 src_extension and header_extension.
21195 (compute_exts_from_gf): Update.
21196 (compute_exts_from_src): Update.
21197 (output_files): Update.
21198 * src/reader.c (parse_header_extension_decl): New.
21199 (parse_source_extension_decl): New.
21200 (read_declarations): New case statements for the new tokens.
21201 * src/lex.c (percent_table): Add entries for %source_extension
21202 and %header_extension.
21203 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21205 2001-08-06 Marc Autret <autret_m@epita.fr>
21207 * configure.in: Bump to 1.28c.
21208 * doc/bison.texinfo: Texinfo thingies.
21210 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21212 * tests/atconfig.in (CPPFLAGS): Add.
21213 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21215 2001-08-03 Akim Demaille <akim@epita.fr>
21219 2001-08-03 Akim Demaille <akim@epita.fr>
21221 * tests/Makefile.am (check-local): Ship testsuite.
21222 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21223 Include `string.h'.
21225 2001-08-03 Akim Demaille <akim@epita.fr>
21227 * configure.in: Try using -Wformat when compiling.
21229 2001-08-03 Akim Demaille <akim@epita.fr>
21231 * configure.in: Bump to 1.28b.
21233 2001-08-03 Akim Demaille <akim@epita.fr>
21235 * src/complain.c: Adjust strerror_r portability issues.
21237 2001-08-03 Akim Demaille <akim@epita.fr>
21241 2001-08-03 Akim Demaille <akim@epita.fr>
21243 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21244 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21245 * src/getargs.c: Include complain.h.
21246 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21247 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21249 2001-08-03 Akim Demaille <akim@epita.fr>
21251 * src/reader.c (readgram): Display hidden chars in error messages.
21253 2001-08-03 Akim Demaille <akim@epita.fr>
21255 Update to gettext 0.10.39.
21257 2001-08-03 Akim Demaille <akim@epita.fr>
21259 * lib/strspn.c: New.
21261 2001-08-01 Marc Autret <autret_m@epita.fr>
21263 * doc/bison.texinfo: Update.
21264 * doc/bison.1 (mandoc): Update.
21265 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21266 * src/files.c: Support output files extensions computing.
21267 (src_extension): New static variable.
21268 (header_extension): New static variable.
21269 (tr): New function.
21270 (get_extension_index): New function, gets the index of an extension
21271 filename in a string.
21272 (compute_exts_from_gf): New function, computes extensions from the
21273 grammar file extension.
21274 (compute_exts_from_src): New functions, computes extensions from the
21275 C source file extension, file given by ``-o'' option.
21276 (compute_base_names): Update.
21277 (output_files): Update.
21279 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21281 * doc/bison.texi: Document @$.
21282 (Locations): New section.
21284 2001-07-18 Akim Demaille <akim@epita.fr>
21286 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21287 * config/prev-version.txt, config/move-if-change: New.
21288 * Makefile.am: Adjust.
21290 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21292 * src/bison.simple (yyparse): Suppress warning `comparaison
21293 between signed and unsigned'.
21295 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21297 * src/getargs.h (raw_flag): Remove.
21298 * src/getargs.c: Die on `-r'/`--raw'.
21299 * src/lex.c (parse_percent_token): Die on `%raw'.
21300 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21301 * tests/calc.at: Suppress test with option `--raw'.
21303 2001-07-14 Akim Demaille <akim@epita.fr>
21306 * configure.in: Require Autoconf 2.50.
21307 Update to gettext 0.10.38.
21309 2001-03-16 Akim Demaille <akim@epita.fr>
21311 * doc/bison.texinfo: ANSIfy the examples.
21313 2001-03-16 Akim Demaille <akim@epita.fr>
21315 * getargs.c (skeleton): New variable.
21316 (longopts): --skeleton is a new option.
21317 (shortopts, getargs): -S is a new option.
21318 * getargs.h: Declare skeleton.
21319 * output.c (output_parser): Use it.
21321 2001-03-16 Akim Demaille <akim@epita.fr>
21323 * m4/strerror_r.m4: New.
21324 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21325 * lib/error.h, lib/error.c: Update.
21327 2001-03-16 Akim Demaille <akim@epita.fr>
21329 * src/getargs.c (longopts): Clean up.
21331 2001-02-21 Akim Demaille <akim@epita.fr>
21333 * src/reader.c (gensym): `gensym_count' is your own.
21334 Use a static buf to create the symbol name, as token_buffer is no
21337 2001-02-08 Akim Demaille <akim@epita.fr>
21339 * src/conflicts.c (conflict_report): Be sure not to append to res
21340 between two calls, which could happen if both first sprintf were
21341 skipped, but not the first cp += strlen.
21343 2001-02-08 Akim Demaille <akim@epita.fr>
21345 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21346 New, from fileutils 4.0.37.
21347 * configure.in: Require Autoconf 2.49c. I took some time before
21348 making this decision. This is the only way out for portability
21349 issues in Bison, it would mean way too much duplicate effort to
21350 import in Bison features implemented in 2.49c since 2.13.
21351 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21353 2001-02-02 Akim Demaille <akim@epita.fr>
21355 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21356 * lib/xalloc.h, lib/xmalloc.c: Update.
21358 2001-01-19 Akim Demaille <akim@epita.fr>
21360 Get rid of the ad hoc handling of token_buffer in the scanner: use
21363 * src/lex.c (token_obstack): New.
21364 (init_lex): Initialize it. No longer call...
21365 (grow_token_buffer): this. Remove it.
21366 Adjust all the places which used it to use the obstack.
21368 2001-01-19 Akim Demaille <akim@epita.fr>
21370 * src/lex.h: Rename all the tokens:
21371 s/\bENDFILE\b/tok_eof/g;
21372 s/\bIDENTIFIER\b/tok_identifier/g;
21374 Let them be enums, not #define, to ease debugging.
21375 Adjust all the code.
21377 2001-01-18 Akim Demaille <akim@epita.fr>
21379 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21380 * src/lex.c (maxtoken, grow_token_buffer): Static.
21382 2001-01-18 Akim Demaille <akim@epita.fr>
21384 Since we now use obstacks, more % directives can be enabled.
21386 * src/lex.c (percent_table): Also accept `%yacc',
21387 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21389 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21390 instead of returning a token.
21391 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21392 * src/reader.c (read_declarations): Adjust.
21393 * src/files.c (open_files): Don't call `compute_base_names', don't
21394 compute `attrsfile' since they depend upon data which might be
21395 *in* the input file now.
21396 (output_files): Do it here.
21397 * src/output.c (output_headers): Document the fact that this patch
21398 introduces a guaranteed SEGV for semantic parsers.
21399 * doc/bison.texinfo: Document them.
21400 * tests/suite.at: Exercise these %options.
21402 2000-12-20 Akim Demaille <akim@epita.fr>
21404 Also handle the output file (--verbose) with obstacks.
21406 * files.c (foutput): Remove.
21407 (output_obstack): New.
21408 Adjust all dependencies.
21409 * src/conflicts.c: Return a string.
21410 * src/system.h (obstack_grow_string): Rename as...
21411 (obstack_sgrow): this. Be ready to work with non literals.
21412 (obstack_fgrow4): New.
21414 2000-12-20 Akim Demaille <akim@epita.fr>
21416 * src/files.c (open_files): Fix the computation of short_base_name
21417 in the case of `-o foo.tab.c'.
21419 2000-12-20 Akim Demaille <akim@epita.fr>
21421 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21422 (copy_dollar): Now that everything uses obstacks, get rid of the
21425 2000-12-20 Akim Demaille <akim@epita.fr>
21427 * src/files.c (open_files): Actually the `.output' file is based
21428 on the short_base_name, not base_name.
21429 * tests/suite.at (Checking output file names): Adjust.
21431 2000-12-20 Akim Demaille <akim@epita.fr>
21433 * src/bison.s1: Remove, we now use directly...
21434 * src/bison.simple: this.
21435 * src/Makefile.am: Use pkgdata instead of data.
21437 2000-12-20 Akim Demaille <akim@epita.fr>
21439 * src/files.c (guard_obstack): New.
21440 (open_files): Initialize it.
21441 (output_files): Dump it...
21442 * src/files.h: Export it.
21443 * src/reader.c (copy_guard): Use it.
21445 2000-12-19 Akim Demaille <akim@epita.fr>
21447 * src/files.c (outfile, defsfile, actfile): Removed as global
21449 (open_files): Don't compute them.
21450 (output_files): Adjust.
21451 (base_name, short_base_name): Be global.
21452 Adjust dependencies.
21454 2000-12-19 Akim Demaille <akim@epita.fr>
21456 * src/files.c (strsuffix): New.
21457 (stringappend): Be just like strcat but allocate.
21458 (base_names): Eve out from open_files.
21459 Try to simplify the rather hairy computation of base_name and
21461 (open_files): Use it.
21462 * tests/suite.at (Checking output file names): New test.
21464 2000-12-19 Akim Demaille <akim@epita.fr>
21466 * src/system.h (obstack_grow_literal_string): Rename as...
21467 (obstack_grow_string): this.
21468 * src/output.c (output_parser): Recognize `%% actions' instead of
21470 * src/bison.s1: s/$/%% actions/.
21471 * src/bison.hairy: Likewise.
21473 2000-12-19 Akim Demaille <akim@epita.fr>
21475 * src/output.c (output_parser): Compute the `#line' lines when
21477 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21478 Suggested by Hans Aberg.
21480 2000-12-19 Akim Demaille <akim@epita.fr>
21482 Let the handling of the skeleton files be local to the procedures
21485 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21487 (fparser, open_extra_files): Remove.
21488 (open_files, output_files): Don't take care of fparser.
21489 * src/files.h: Adjust.
21490 * src/output.c (output_parser): Open and close the file to the
21492 * src/reader.c (read_declarations): When %semantic_parser, open
21495 2000-12-19 Akim Demaille <akim@epita.fr>
21497 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21498 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21500 2000-12-19 Akim Demaille <akim@epita.fr>
21502 * src/files.c (open_files): Yipee! We no longer need all the code
21503 looking for `/tmp' since we have no tmp file.
21505 2000-12-19 Akim Demaille <akim@epita.fr>
21507 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21509 * src/files.c (open_files): Less dependency on MSDOS etc.
21511 2000-12-14 Akim Demaille <akim@epita.fr>
21513 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21514 Provide a default definition.
21515 Use it when executing the default @ action.
21516 * src/reader.c (reader_output_yylsp): No longer include
21517 `timestamp' and `text' in the default YYLTYPE.
21519 2000-12-12 Akim Demaille <akim@epita.fr>
21521 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21522 (copy_guard): Quote the file names.
21523 Reported by Laurent Mascherpa.
21525 2000-12-12 Akim Demaille <akim@epita.fr>
21527 * src/output.c (output_headers, output_program, output): Be sure
21528 to escape special characters when outputting filenames.
21529 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21530 (output_headers): Don't depend on them, Use ACTSTR.
21532 2000-11-17 Akim Demaille <akim@epita.fr>
21534 * lib/obstack.h: Formatting changes.
21535 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21536 prevents type checking.
21537 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21538 cast the value to (void *): assigning a `foo *' to a `void *'
21540 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21541 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21544 2000-11-17 Akim Demaille <akim@epita.fr>
21546 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21548 (suite.m4, regression.m4, calc.m4): these.
21549 * tests/atgeneral.m4: Update from CVS Autoconf.
21551 2000-11-17 Akim Demaille <akim@epita.fr>
21553 * tests/regression.m4 (%union and --defines): New test,
21554 demonstrating a current bug in the obstack implementation.
21556 2000-11-17 Akim Demaille <akim@epita.fr>
21558 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21560 Use them to declare the variables which are global or local to
21563 2000-11-17 Akim Demaille <akim@epita.fr>
21565 * acconfig.h: Remove, no longer used.
21567 2000-11-07 Akim Demaille <akim@epita.fr>
21569 * src: s/Copyright (C)/Copyright/g.
21571 2000-11-07 Akim Demaille <akim@epita.fr>
21573 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21575 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21577 2000-11-07 Akim Demaille <akim@epita.fr>
21579 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21580 Merge in a single CPP if/else.
21582 2000-11-07 Akim Demaille <akim@epita.fr>
21584 * src/output.c (output): Remove useless variables.
21585 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21586 argument `data' for consistency with the prototypes.
21587 Qualify it `const'.
21588 (obstack_copy, obstack_copy0): Rename the second argument as
21589 `address' for consistency. Qualify it `const'.
21590 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21591 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21592 `const' their input argument (`data' or `address').
21593 Adjust the corresponding macros to include `const' in casts.
21595 2000-11-03 Akim Demaille <akim@epita.fr>
21597 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21598 s/PFILE1/BISON_HAIRY/.
21599 Adjust dependencies.
21601 2000-11-03 Akim Demaille <akim@epita.fr>
21603 For some reason, this was not applied.
21605 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21606 `unlink': it's no longer used.
21608 2000-11-03 Akim Demaille <akim@epita.fr>
21610 * src/files.c (skeleton_find): New function, eved out of...
21611 (open_files, open_extra_files): here.
21613 2000-11-03 Akim Demaille <akim@epita.fr>
21615 Don't use `atexit'.
21617 * src/files.c (obstack_save): New function.
21618 (done): Rename as...
21619 (output_files): this.
21620 Use `obstack_save'.
21621 * src/main.c (main): Don't use `atexit' to register `done', since
21622 it no longer has to remove tmp files, just call `output_files'
21623 when there are no errors.
21625 2000-11-02 Akim Demaille <akim@epita.fr>
21627 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21628 `unlink': it's no longer used.
21629 * src/files.h: Formatting changes.
21631 2000-11-02 Akim Demaille <akim@epita.fr>
21633 Remove the last uses of mktemp and unlink/delete.
21635 * src/files.c (fdefines, ftable): Removed.
21636 (defines_ostack, table_obstack): New.
21637 Adjust dependencies of the former into uses of the latter.
21638 * src/output.c (output_short_or_char_table, output_short_table):
21639 Convert to using obstacks.
21640 * src/reader.c (copy_comment2): Accept one FILE * and two
21642 (output_token_defines, reader_output_yylsp): Use obstacks.
21643 * src/system.h (obstack_fgrow3): New.
21644 * po/POTFILES.in: Adjust.
21646 2000-11-01 Akim Demaille <akim@epita.fr>
21648 Change each use of `fattrs' into a use of `attrs_obstack'.
21650 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21651 * src/files.c (fattrs): Remove.
21652 (attrs_obstack): New.
21653 Adjust all dependencies.
21654 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21656 2000-11-01 Akim Demaille <akim@epita.fr>
21658 Introduce obstacks.
21659 Change each use of `faction' into a use of `action_obstack'.
21661 * lib/obstack.h, lib/obstack.c: New files.
21662 * src/files.c (faction): Remove.
21663 (action_obstack): New.
21664 Adjust all dependencies.
21666 2000-10-20 Akim Demaille <akim@epita.fr>
21668 * lib/quote.h (PARAMS): New macro. Use it.
21670 2000-10-16 Akim Demaille <akim@epita.fr>
21672 * src/output.c (output_short_or_char_table): New function.
21673 (output_short_table, output_token_translations): Use it.
21674 (goto_actions): Use output_short_table.
21676 2000-10-16 Akim Demaille <akim@epita.fr>
21678 * src/symtab.c (bucket_new): New function.
21681 * src/output.c (output_short_table): New argument to display the
21682 comment associated with the table.
21683 Adjust dependencies.
21684 (output_gram): Use it.
21685 (output_rule_data): Nicer output layout for YYTNAME.
21687 2000-10-16 Akim Demaille <akim@epita.fr>
21689 * src/lex.c (read_typename): New function.
21691 * src/reader.c (copy_dollar): Likewise.
21693 2000-10-16 Akim Demaille <akim@epita.fr>
21695 * src/reader.c (copy_comment2): Expect the input stream to be on
21696 the `/' which is suspected to open a comment, instead of being
21697 called after `//' or `/*' was read.
21698 (copy_comment, copy_definition, parse_union_decl, copy_action)
21699 (copy_guard): Adjust.
21701 2000-10-16 Akim Demaille <akim@epita.fr>
21703 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21704 `read_signed_integer'.
21706 2000-10-16 Akim Demaille <akim@epita.fr>
21708 * src/reader.c (copy_dollar): New function.
21709 (copy_guard, copy_action): Use it.
21711 2000-10-16 Akim Demaille <akim@epita.fr>
21713 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21714 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21715 New files, from Fileutils 4.0.27.
21716 * src/main.c (printable_version): Remove.
21717 * src/lex.c, src/reader.c: Use `quote'.
21719 2000-10-04 Akim Demaille <akim@epita.fr>
21721 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21723 2000-10-04 Akim Demaille <akim@epita.fr>
21725 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21727 2000-10-04 Akim Demaille <akim@epita.fr>
21729 When a literal string is used to define two different tokens,
21730 `bison -v' segfaults.
21731 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21733 * tests/regression.m4: New file.
21734 Include the core of the sample provided by Piotr Gackiewicz.
21735 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21738 2000-10-04 Akim Demaille <akim@epita.fr>
21740 * src/reader.c (parse_expect_decl): Keep `count' within the size
21744 2000-10-02 Paul Eggert <eggert@twinsun.com>
21746 * bison.s1 (yyparse): Assign the default value
21747 unconditionally, to avoid a GCC warning and make the parser a
21750 2000-10-02 Akim Demaille <akim@epita.fr>
21752 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21755 2000-10-02 Akim Demaille <akim@epita.fr>
21757 * src/derives.c, src/print.c, src/reduce.c: To ease the
21758 translation, move some `\n' out of the translated strings.
21760 2000-10-02 Akim Demaille <akim@epita.fr>
21762 The location tracking mechanism is precious for parse error
21763 messages. Nevertheless, it is enabled only when `@n' is used in
21764 the grammar, which is a different issue (you can use it in error
21765 message, but not in the grammar per se). Therefore, there should
21766 be another means to enable it.
21768 * src/getargs.c (getargs): Support `--locations'.
21769 (usage): Report it.
21770 * src/getargs.h (locationsflag): Export it.
21771 * src/lex.c (percent_table): Support `%locations'.
21772 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21773 with `locationsflag'.
21774 * doc/bison.texinfo: Document `--locations' and `%locations'.
21776 * tests/calc.m4: Test it.
21778 For regularity of the names, replace each
21779 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21780 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21781 In addition replace each `flag' with `_flag'.
21783 2000-10-02 Akim Demaille <akim@epita.fr>
21785 Also test parse error messages, including with YYERROR_VERBOSE.
21787 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21789 Use it to check the computations.
21790 Use it to check `nonassoc' is honored.
21791 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21792 `--yyerror-verbose'.
21793 (_AT_CHECK_CALC): Adjust to this option.
21794 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21796 2000-10-02 Akim Demaille <akim@epita.fr>
21798 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21799 the latter demonstrates a flaw in the handling of non debugging
21800 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21801 was used in order to simplify:
21817 unfortunately this leads to a CPP conflict when
21818 `--name-prefix=foo' is used since it produces `#define yydebug
21821 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21822 (YYDPRINTF): New macro.
21824 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21826 Also test `--verbose', `--defines' and `--name-prefix'.
21828 2000-10-02 Akim Demaille <akim@epita.fr>
21830 Improve the readability of the produced parsers.
21832 * src/bison.s1: Formatting changes.
21833 Improve the comment related to the `$' mark.
21834 (yydefault): Don't fall through to `yyresume': `goto' there.
21835 * src/output.c (output_parser): When the `$' is met, skip the end
21837 New variable, `number_of_dollar_signs', to check there's exactly
21838 one `$' in the parser skeleton.
21840 2000-10-02 Akim Demaille <akim@epita.fr>
21842 * lib/xstrdup.c: New file, from the fileutils.
21843 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21844 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21845 instead of strlen + xmalloc + strcpy.
21846 * src/symtab.c (copys): Remove, use xstrdup instead.
21848 2000-10-02 Akim Demaille <akim@epita.fr>
21850 * src/gram.h (associativity): New enum type which replaces the
21851 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21852 `right_assoc', `left_assoc' and `non_assoc'.
21853 Adjust all dependencies.
21854 * src/reader.c: Formatting changes.
21855 (LTYPESTR): Don't define it, use it as a literal in
21856 `reader_output_yylsp'.
21857 * src/symtab.h (symbol_class): New enum type which replaces the
21858 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21859 `sunknown', `stoken and `snterm'.
21861 2000-10-02 Akim Demaille <akim@epita.fr>
21863 * src/getargs.c (fixed_outfiles): Rename as...
21864 (yaccflag): for consistency and accuracy.
21865 Adjust dependencies.
21867 2000-10-02 Akim Demaille <akim@epita.fr>
21869 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21870 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21871 difficult and introduced a lot of core dump. It turns out that
21872 Bison used an implementation of `xmalloc' based on `calloc', and
21873 at various places it does depend upon the initialization to 0. I
21874 have not tried to isolate the pertinent places, and all the former
21875 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21876 someone should address this issue.
21878 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21879 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21881 Adjust dependencies.
21882 * src/warshall.h: New file.
21885 2000-10-02 Akim Demaille <akim@epita.fr>
21887 Various anti-`extern in *.c' changes.
21889 * src/system.h: Include `assert.h'.
21891 2000-10-02 Akim Demaille <akim@epita.fr>
21893 * src/state.h (nstates, final_state, first_state, first_shift)
21894 (first_reduction): Move their exportation from here...
21895 * src/LR0.h: to here.
21896 Adjust dependencies.
21897 * src/getargs.c (statisticsflag): New variable.
21898 Add support for `--statistics'.
21899 Adjust dependencies.
21901 Remove a lot of now useless `extern' statements in most files.
21903 2000-10-02 Akim Demaille <akim@epita.fr>
21905 * src/LR0.h: New file.
21908 2000-10-02 Akim Demaille <akim@epita.fr>
21910 * src/print.h: New file.
21912 * src/print.c: Formatting and ordering changes.
21913 (verbose, terse): Replace with...
21914 (print_results): this new function.
21915 Adjust dependencies.
21917 2000-10-02 Akim Demaille <akim@epita.fr>
21919 * src/conflicts.c (conflict_report): New function.
21920 (conflict_log, verbose_conflict_log): Replace with...
21921 (print_conflicts): this function.
21922 Adjust dependencies.
21923 * src/conflicts.h: New file.
21924 Propagate its inclusion.
21926 2000-10-02 Akim Demaille <akim@epita.fr>
21928 * src/nullable.h: New file.
21929 Propagate its inclusion.
21930 * src/nullable.c: Formatting changes.
21932 2000-10-02 Akim Demaille <akim@epita.fr>
21934 * src/reduce.h: New file.
21935 Propagate its inclusion.
21936 * src/reduce.c: Topological sort and other formatting changes.
21937 (bool, TRUE, FALSE): Move their definition to...
21938 * src/system.h: here.
21940 2000-10-02 Akim Demaille <akim@epita.fr>
21942 * src/files.c: Formatting changes.
21943 (tryopen, tryclose, openfiles): Rename as...
21944 (xfopen, xfclose, open_files): this.
21945 (stringappend): static.
21946 * src/files.h: Complete the list of exported symbols.
21949 2000-10-02 Akim Demaille <akim@epita.fr>
21951 * src/reader.h: New file.
21952 Propagate its use instead of tedious list of `extern' and
21954 * src/reader.c: Formatting changes, topological sort,
21957 2000-10-02 Akim Demaille <akim@epita.fr>
21959 * src/lex.h: Prototype `lex.c' exported functions.
21960 * src/reader.c: Adjust.
21961 * src/lex.c: Formatting changes.
21962 (safegetc): Rename as...
21965 2000-10-02 Akim Demaille <akim@epita.fr>
21967 * src/lalr.h: New file.
21968 Propagate its inclusion instead of prototypes and `extern'.
21969 * src/lalr.c: Formatting changes, topological sorting etc.
21971 2000-10-02 Akim Demaille <akim@epita.fr>
21973 * src/output.c (token_actions): Introduce a temporary array,
21974 YYDEFACT, that makes it possible for this function to use
21975 output_short_table.
21977 2000-10-02 Akim Demaille <akim@epita.fr>
21979 `user_toknums' is output as a `short[]' in `output.c', while it is
21980 defined as a `int[]' in `reader.c'. For consistency with the
21981 other output tables, `user_toknums' is now defined as a table of
21984 * src/reader.c (user_toknums): Be a short table instead of an int
21986 Adjust dependencies.
21988 Factor the short table outputs.
21990 * src/output.c (output_short_table): New function.
21991 * src/output.c (output_gram, output_stos, output_rule_data)
21992 (output_base, output_table, output_check): Use it.
21994 2000-10-02 Akim Demaille <akim@epita.fr>
21996 * src/output.c (output): Topological sort of the functions, in
21997 order to get rid of the `static' prototypes.
21998 No longer use `register'.
21999 * src/output.h: New file.
22000 Propagate its inclusion in files explicitly prototyping functions
22003 2000-09-21 Akim Demaille <akim@epita.fr>
22005 * src/atgeneral.m4: Update from Autoconf.
22007 2000-09-21 Akim Demaille <akim@epita.fr>
22009 * src/closure.h: New file.
22010 * src/closure.c: Formatting changes, topological sort over the
22011 functions, use of closure.h.
22012 (initialize_closure, finalize_closure): Rename as...
22013 (new_closure, free_closure): these. Adjust dependencies.
22014 * src/LR0.c: Formatting changes, topological sort, use of
22016 (initialize_states): Rename as...
22017 (new_states): this.
22018 * src/Makefile.am (noinst_HEADERS): Adjust.
22020 2000-09-20 Akim Demaille <akim@epita.fr>
22022 * src/acconfig.h: Don't protect config.h against multiple
22024 Don't define PARAMS.
22025 * src/system.h: Define PARAMS.
22026 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22027 purpose of config.h. system.h must not try to fix wrong
22028 definitions in config.h.
22030 2000-09-20 Akim Demaille <akim@epita.fr>
22032 * src/derives.h: New file.
22033 * src/main.c, src/derives.h: Use it.
22034 Formatting changes.
22035 * src/Makefile.am (noinst_HEADERS): Adjust.
22037 2000-09-20 Akim Demaille <akim@epita.fr>
22039 * tests/atgeneral.m4: Update from Autoconf.
22040 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22041 (AT_CHECK_CALC): New macros.
22042 Use these macros to test bison with options `', `--raw',
22043 `--debug', `--yacc', `--yacc --debug'.
22045 2000-09-19 Akim Demaille <akim@epita.fr>
22047 * src/output.c: Formatting changes.
22048 * src/machine.h: Remove, leaving its contents in...
22049 * src/system.h: here.
22051 Adjust all dependencies on stdio.h and machine.h.
22052 * src/getargs.h: New file.
22053 Let all `extern' declarations about getargs.c be replaced with
22054 inclusion of `getargs.h'.
22055 * src/Makefile.am (noinst_HEADERS): Adjust.
22057 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22059 (yyerror): Returns void, not int.
22060 * doc/bison.texinfo: Formatting changes.
22062 2000-09-19 Akim Demaille <akim@epita.fr>
22064 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22067 2000-09-18 Akim Demaille <akim@epita.fr>
22069 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22070 * src/Makefile.am (INCLUDES): Don't.
22071 Be ready to fetch headers in lib/.
22073 2000-09-18 Akim Demaille <akim@epita.fr>
22075 * doc/bison.texinfo: Update the copyright.
22076 ANSIfy and GNUify the examples.
22077 Remove the old menu.
22079 2000-09-18 Akim Demaille <akim@epita.fr>
22081 First set of tests: use the `calc' example from the documentation.
22083 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22084 is defined only when YYDEBUG is.
22085 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22086 * src/files.c (tryopen, tryclose): Formatting changes.
22087 Move to the top and be static.
22088 * src/reader.c (read_signed_integer): Likewise.
22089 * tests/calc.m4: New file.
22090 * Makefile.am, suite.m4: Adjust.
22091 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22093 2000-09-18 Akim Demaille <akim@epita.fr>
22095 Add support for an Autotest test suite for Bison.
22097 * m4/m4.m4, m4/atconfig.m4: New files.
22098 * m4/Makefile.am (EXTRA_DIST): Adjust.
22099 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22101 * src/getargs.c: Display a more standard --version message.
22102 * src/reader.c (reader): Formatting changes.
22103 No longer depend upon VERSION_STRING.
22104 * configure.in: No longer use `dnl'.
22105 Set up the test suite and the new directory `tests/.
22106 (VERSION_STRING): Remove.
22108 2000-04-14 Akim Demaille <akim@epita.fr>
22110 * src/reader.c (copy_comment2): New function, same as former
22111 `copy_comment', but outputs into two FILE *.
22112 (copy_comment): Use it.
22113 (parse_union_decl): Use it.
22114 (get_type, parse_start_decl): Use the same `invalid' message.
22115 (parse_start_decl, parse_union_decl): Use the same `multiple'
22117 (parse_union_decl, copy_guard, copy_action): Use the same
22118 `unmatched' message.
22119 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22121 2000-03-31 Akim Demaille <akim@epita.fr>
22123 * src/files.c (tryopen, tryclose): Move to the top.
22126 2000-03-31 Akim Demaille <akim@epita.fr>
22128 * src/main.c (main): Don't call `done', exit does it.
22130 2000-03-31 Akim Demaille <akim@epita.fr>
22132 * allocate.c: s/return (foo)/return foo/.
22133 * lalr.c: Likewise.
22135 * output.c: Likewise.
22136 * reader.c: Likewise.
22137 * symtab.c: Likewise.
22138 * vmsgetargs.c: Likewise.
22140 2000-03-31 Akim Demaille <akim@epita.fr>
22142 Clean up the error reporting functions.
22144 * src/report.c: New file.
22145 * src/report.h: Likewise.
22146 * src/Makefile.am: Adjust.
22147 * m4/error.m4: New file.
22148 * m4/Makefile.am: Adjust.
22149 * configure.in (jm_PREREQ_ERROR): Call it.
22150 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22152 (fatal, fatals): Remove. All callers use complain.c::fatal.
22153 (warn, warni, warns, warnss, warnss): Remove. All callers use
22154 complain.c::complain.
22155 (toomany): Remove, use fatal instead.
22156 * src/files.c (done): No argument, use complain_message_count.
22157 * src/main.c (main): Register `done' to `atexit'.
22159 * src/getargs.c (usage): More `fputs', less `fprintf'.
22161 2000-03-28 Akim Demaille <akim@epita.fr>
22163 * lib/: New directory.
22164 * Makefile.am (SUBDIRS): Adjust.
22165 * configure.in: Adjust.
22166 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22168 * src/alloca.c: Moved to lib/.
22169 * src/getopt.c: Likewise.
22170 * src/getopt1.c: Likewise.
22171 * src/getopt.h: Likewise.
22172 * src/ansi2knr.c: Likewise.
22173 * src/ansi2knr.1: Likewise.
22174 * src/Makefile.am: Adjust.
22175 * lib/Makefile.am: New file.
22177 2000-03-28 Akim Demaille <akim@epita.fr>
22179 * src/getargs.c (usage): Refresh the help message.
22181 2000-03-17 Akim Demaille <akim@epita.fr>
22183 * src/getopt1.c: Updated from textutils 2.0e
22184 * src/getopt.c: Likewise.
22185 * src/getopt.h: Likewise.
22187 2000-03-17 Akim Demaille <akim@epita.fr>
22189 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22190 the file name, not the whole `#line LINE FILE'.
22192 2000-03-17 Akim Demaille <akim@epita.fr>
22194 On syntax errors, report the token on which we choked.
22196 * src/bison.s1 (yyparse): In the label yyerrlab, when
22197 YYERROR_VERBOSE, add yychar in msg.
22199 2000-03-17 Akim Demaille <akim@epita.fr>
22201 * src/reader.c (copy_at): New function.
22202 (copy_guard): Use it.
22203 (copy_action): Use it.
22205 2000-03-17 Akim Demaille <akim@epita.fr>
22207 Be kind to translators, save some useless translations.
22209 * src/main.c (banner): New function.
22210 (fatal_banner): Use it.
22211 (warn_banner): Use it.
22213 2000-03-17 Akim Demaille <akim@epita.fr>
22215 * src/reader.c (copy_definition): Use copy_string and
22216 copy_comment. Removed now unused `match', `ended',
22218 (copy_comment, copy_string): Moved, to be visible from
22221 2000-03-17 Akim Demaille <akim@epita.fr>
22223 * src/reader.c (copy_string): Declare `static inline'. No
22224 problems with inline, since it is checked by configure.
22225 (copy_comment): Likewise.
22227 2000-03-17 Akim Demaille <akim@epita.fr>
22229 * src/reader.c (packsymbols): Formatting changes.
22231 2000-03-17 Akim Demaille <akim@epita.fr>
22233 * src/reader.c (copy_comment): New function, factored out from:
22234 (copy_action): Use it. Removed now unused `match', `ended',
22236 (copy_guard): Likewise.
22238 2000-03-17 Akim Demaille <akim@epita.fr>
22240 * src/reader.c (copy_string): New function, factored out from:
22241 (copy_action): Use it.
22242 (copy_guard): Likewise.
22244 2000-03-17 Akim Demaille <akim@epita.fr>
22246 Change the handling of @s so that they behave exactly like $s.
22247 There is now a pseudo variable @$ (readble and writable), location
22248 of the lhs of the rule (by default ranging from the location of
22249 the first symbol of the rhs, to the location of the last symbol,
22250 or, if the rhs is empty, YYLLOC).
22252 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22254 (yyparse): When providing a default semantic action, provide a
22255 default location action.
22256 (after the $): No longer change `*YYLSP', just stack YYLOC the
22257 same way you stack YYVAL.
22258 * src/reader.c (read_declarations): Use warns.
22259 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22260 (copy_action, case '@'): Likewise.
22261 Use a standard error message, to save useless work from
22264 2000-03-17 Akim Demaille <akim@epita.fr>
22266 * src/bison.s1: Formatting and cosmetics changes.
22267 * src/reader.c: Likewise.
22268 Update the Copyright notice.
22270 2000-03-17 Akim Demaille <akim@epita.fr>
22272 * src/bison.s1 (#line): All set to `#line' only, since the
22273 Makefile now handles them.
22275 2000-03-16 Akim Demaille <akim@epita.fr>
22277 * src/output.c (output_rule_data): Output the documentation of
22278 some of the tables.
22279 (Copyright notice): Update.
22280 Formatting changes.
22282 2000-03-16 Akim Demaille <akim@epita.fr>
22284 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22285 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22286 One `#if YYDEBUG' remains, since it uses variables which are
22287 defined only if `YYDEBUG != 0'.
22289 2000-03-16 Akim Demaille <akim@epita.fr>
22291 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22292 and related variables so that the similarities are highlighted.
22294 2000-03-16 Akim Demaille <akim@epita.fr>
22296 * src/bison.s1: Properly indent CPP directives.
22298 2000-03-16 Akim Demaille <akim@epita.fr>
22300 * src/bison.s1: Properly indent the `alloca' CPP section.
22302 2000-03-16 Akim Demaille <akim@epita.fr>
22304 Do not hard code values of directories in `configure.in'.
22305 Update the `configure' tool chain.
22307 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22309 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22310 (AC_OUTPUT): Add m4/Makefile.
22311 Bump to bison 1.28a, 1.29 has never been released.
22312 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22313 handled via src/Makefile.am.
22314 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22315 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22317 * Makefile.am (SUBDIRS): Add m4.
22318 (ACLOCAL_AM_FLAGS): New variable.
22319 (AUTOMAKE_OPTIONS): Add check-news.
22320 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22321 the proper line number and file name.
22322 (DEFS): Propagate the location of bison library files and of the
22324 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22326 * acinclude.m4: Remove, replaced by the directory m4.
22327 * m4/Makefile.am (EXTRA_DIST): New variable.
22328 * m4/gettext.m4: New file, from the fileutils.
22329 * m4/lcmessage.m4: Likewise
22330 * m4/progtest.m4: Likewise.
22331 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22333 2000-03-10 Akim Demaille <akim@epita.fr>
22336 Formatting changes of various comments.
22337 Respect the GNU coding standards at various places.
22338 Don't use `_()' when no translation is needed.
22340 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22343 OS/2 honors TMPDIR environment variable.
22345 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22347 * doc/bison.texinfo: Tweaked spelling and grammar.
22349 Removed reference to price of printed copy.
22350 Mention BISON_SIMPLE and BISON_HAIRY.
22352 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22354 * configure.in, NEWS:
22355 Bison 1.29 released.
22357 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22359 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22360 Added reference card.
22362 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22364 * po/ru.po: Added Russian translation.
22366 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22368 * configure.in: Added Russian translation.
22370 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22372 * configure.in, NEWS, README:
22373 Released version 1.28.
22375 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22378 Squashed redefinition warning on some systems.
22380 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22381 Have configure build version string instead of relying on ANSI string
22384 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22386 * po/POTFILES.in: Got rid of version.c.
22388 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22390 * acconfig.h, configure.in:
22391 Have configure build version string instead of relying on ANSI string
22394 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22397 Dropped mention of `+' for long-named options.
22399 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22401 * src/files.c: Added <unistd.h> for unlink().
22403 * src/Makefile.am, src/system.h:
22406 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22408 * README: Added a FAQ list.
22410 * configure.in, acconfig.h:
22413 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22415 * doc/FAQ, doc/Makefile.am:
22418 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22420 * src/alloc.h, src/symtab.h, src/version.c:
22421 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22423 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22425 * src/.cvsignore, src/Makefile.am:
22426 Reorganized: sources in `src', documentation in `doc'.
22428 * src/lex.c (literalchar):
22429 fixed the code for escaping double quotes (thanks
22432 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22434 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22435 Adjusted paths to reflect directory reorganization.
22437 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22439 * doc/.cvsignore, doc/Makefile.am:
22440 Reorganized: sources in `src', documentation in `doc'.
22442 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22445 Updated AC_INIT file to reflect directory reorganization.
22447 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22448 Reorganized: sources in `src', documentation in `doc'.
22450 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22453 Don't declare calloc() and realloc() if not necessary.
22455 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22457 * configure.in, acconfig.h, acinclude.m4:
22458 Don't declare calloc() and realloc() if not necessary.
22460 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22462 * po/.cvsignore: Added i18n support.
22464 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22466 * acconfig.h, configure.in, Makefile.am:
22467 Added i18n support.
22469 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22471 * src/bison.s1: Fixed #line numbers.
22473 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22475 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22476 Added PO files from Translation Project.
22478 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22481 Added support for non-ANSI compilers (ansi2knr).
22483 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22485 * configure.in: Bumped version number to 1.27.
22488 Added `bison.simple' to list of files removed by `make distclean'.
22490 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22492 * src/files.c, src/files.h:
22493 Defined locations of parser files in config.h instead of Makefile.
22495 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22497 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22498 Defined locations of parser files in config.h instead of Makefile.
22500 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22503 Removed inappropriate use of $< macro.
22505 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22507 * po/Makefile.in.in, po/POTFILES.in:
22508 Add `po' directory skeleton.
22510 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22512 * README: Document help-bison list.
22514 * configure.in: Add check for mkstemp().
22516 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22518 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22519 Hush a few compiler warnings.
22522 Add tryclose(), which verifies that fclose was successful.
22523 Hush a couple of compiler warnings.
22525 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22527 * Makefile.am, OChangeLog:
22528 ChangeLog is now automatically generated. Include the old version as
22531 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22533 * 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:
22534 Update FSF address.
22536 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22538 * doc/bison.texinfo: Fix formatting glitch.
22540 * doc/bison.texinfo: Update FSF address.
22542 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22544 * acconfig.h: Update FSF address.
22546 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22549 Don't define PACKAGE here, since config.h defines it.
22551 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22553 * src/reader.c: Update copyright date.
22556 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22557 favor of output directly to stderr (avoids buffer overruns).
22559 * src/reader.c: Some checks for premature EOF.
22561 * 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:
22562 Use prototypes if the compiler understands them.
22564 * src/files.c: Honor TMPDIR on Unix hosts.
22565 Use prototypes if the compiler understands them.
22568 Fix a couple of buffer overrun bugs.
22569 Use prototypes if the compiler understands them.
22571 * src/system.h: Include unistd.h and ctype.h.
22572 Use #ifdef instead of #if for NLS symbols.
22574 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22576 * doc/bison.texinfo:
22577 Delete comment "consider using @set for edition number, etc..." since
22578 we now are doing so.
22580 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22583 Use prototypes if the compiler understands them.
22585 * NEWS: Document 1.26 highlights.
22587 * Makefile.am: Require Automake 1.3 or later.
22590 Use prototypes if the compiler understands them.
22592 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22595 Use VERSION symbol from automake for version number.
22597 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22599 * acconfig.h, configure.in, version.cin:
22600 Use VERSION symbol from automake for version number.
22602 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22605 Distribute original version of simple parser (bison.s1), not built
22606 version (bison.simple).
22608 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22610 * doc/bison.texinfo: Add info dir entry.
22612 * doc/bison.texinfo:
22613 Let automake put version number into documentation.
22615 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22617 * src/bison.cld, src/build.com, src/vmshlp.mar:
22618 Add non-RCS files from /gd/gnu/bison.
22620 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22623 Document the BISON_HAIRY and BISON_SIMPLE variables.
22625 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22627 * src/version.c: Build version.c automatically.
22630 Fix token numbering (used to start at 258, not 257).
22632 * src/system.h: Include config.h.
22634 * src/getargs.c: Update bug report address.
22636 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22637 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22639 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22642 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22644 * configure.in, version.cin:
22645 Build version.c automatically.
22647 * AUTHORS: Add AUTHORS file.
22649 * README: Update bug report address.
22652 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22654 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22655 Add automake stuff.
22657 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22659 * doc/bison.texinfo: Clean up some formatting.
22661 1998-05-05 Richard Stallman <rms@gnu.org>
22663 * doc/bison.texinfo:
22664 Explain better why to make a pure parser.
22666 1998-01-05 Richard Stallman <rms@gnu.org>
22668 * src/files.c (openfiles):
22669 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22670 find a temporary directory, if possible. Do not unlink files while
22673 1997-08-25 Richard Stallman <rms@gnu.org>
22675 * src/reader.c (stack_offset;):
22676 Change some warni to warns.
22678 * src/lex.c (literalchar): Use warns, not warni.
22680 1997-06-28 Richard Stallman <rms@gnu.org>
22682 * src/bison.s1: Add a Bison version comment.
22684 * src/main.c (fatal, warn, berror):
22687 1997-06-28 Richard Stallman <rms@gnu.org>
22689 * Makefile.in (bison_version): New variable.
22690 (dist): Use that variable.
22691 (bison.s1): Substitute the Bison version into bison.simple.
22693 * bison.simple: Add a Bison version comment.
22695 1997-06-18 Richard Stallman <rms@gnu.org>
22697 * src/main.c (fatal, warn, berror):
22698 Make error messages standard.
22699 (toomany): Improve error message text.
22701 * 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:
22702 new.h renamed to alloc.h.
22704 1997-06-18 Richard Stallman <rms@gnu.org>
22706 * Makefile.in: new.h renamed to alloc.h.
22708 1997-05-24 Richard Stallman <rms@gnu.org>
22710 * src/lex.c (literalchar):
22711 Fix the code for escaping \, " and '.
22713 (lex): Avoid trouble when there are many chars
22714 to discard in a char literal with just several chars in it.
22716 1997-05-17 Richard Stallman <rms@gnu.org>
22719 Use malloc, if using alloca is troublesome.
22720 (YYSTACK_USE_ALLOCA): New flag macro.
22721 Define it for some systems and compilers.
22722 (YYSTACK_ALLOC): New macro.
22723 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22724 If it was malloc'd, free it.
22726 1997-05-17 Richard Stallman <rms@gnu.org>
22729 Use malloc, if using alloca is troublesome.
22730 (YYSTACK_USE_ALLOCA): New flag macro.
22731 Define it for some systems and compilers.
22732 (YYSTACK_ALLOC): New macro.
22733 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22734 If it was malloc'd, free it.
22736 1997-04-23 Richard Stallman <rms@gnu.org>
22739 (alloca) [__hpux]: Always define as __builtin_alloca.
22741 1997-04-23 Richard Stallman <rms@gnu.org>
22744 (alloca) [__hpux]: Always define as __builtin_alloca.
22746 1997-04-22 Richard Stallman <rms@gnu.org>
22749 [__hpux]: Include alloca.h (right for HPUX 10)
22750 instead of declaring alloca (right for HPUX 9).
22752 * src/bison.s1 (__yy_memcpy):
22753 Declare arg `count' as unsigned int.
22754 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22756 1997-04-22 Richard Stallman <rms@gnu.org>
22759 [__hpux]: Include alloca.h (right for HPUX 10)
22760 instead of declaring alloca (right for HPUX 9).
22762 * bison.simple (__yy_memcpy):
22763 Declare arg `count' as unsigned int.
22764 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22766 1997-01-03 Richard Stallman <rms@gnu.org>
22768 * src/allocate.c: [__STDC__ or _MSC_VER]:
22769 Declare calloc and realloc to return void *.
22771 1997-01-02 Richard Stallman <rms@gnu.org>
22774 [_MSC_VER]: Include stdlib.h and process.h.
22775 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22777 * src/main.c (main): Return FAILURE as a value.
22778 (printable_version): Declare arg as int, not char.
22780 1997-01-02 Richard Stallman <rms@gnu.org>
22782 * Makefile.in (dist):
22783 Explicitly check for symlinks, and copy them.
22785 1996-12-19 Richard Stallman <rms@gnu.org>
22788 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22790 1996-12-18 Paul Eggert <eggert@gnu.org>
22792 * src/bison.s1 (yyparse):
22793 If __GNUC__ and YYPARSE_PARAM are both defined,
22794 declare yyparse to have a void * argument.
22796 1996-12-18 Paul Eggert <eggert@gnu.org>
22798 * bison.simple (yyparse):
22799 If __GNUC__ and YYPARSE_PARAM are both defined,
22800 declare yyparse to have a void * argument.
22802 1996-12-17 Richard Stallman <rms@gnu.org>
22804 * src/reduce.c (nbits): Add some casts.
22806 1996-08-12 Richard Stallman <rms@gnu.org>
22808 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22810 1996-08-12 Richard Stallman <rms@gnu.org>
22812 * bison.simple: Test _MSDOS as well as _MSDOS_.
22814 1996-07-31 Richard Stallman <rms@gnu.org>
22817 [__sun && __i386]: Include alloca.h.
22819 1996-07-31 Richard Stallman <rms@gnu.org>
22822 [__sun && __i386]: Include alloca.h.
22824 1996-07-30 Richard Stallman <rms@gnu.org>
22826 * src/bison.s1: Comment change.
22828 * src/bison.s1: Test _MSDOS_, not MSDOS.
22830 1996-07-30 Richard Stallman <rms@gnu.org>
22832 * bison.simple: Comment change.
22834 * bison.simple: Test _MSDOS_, not MSDOS.
22836 1996-06-01 Richard Stallman <rms@gnu.org>
22838 * 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:
22839 Insert `_' macro around many string constants.
22842 Insert `_' macro around many string constants.
22844 (main): Call setlocale, bindtextdomain and textdomain.
22846 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22847 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22848 [ENABLE_NLS]: Include libintl.h.
22849 [ENABLE_NLS] (gettext): Define.
22850 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22851 (N_, PACKAGE, LOCALEDIR): New macros.
22853 1996-06-01 Richard Stallman <rms@gnu.org>
22855 * POTFILES.in: New file.
22857 * Makefile.in (allocate.o):
22858 Define target explicitly.
22860 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22861 (LDFLAGS): Set to @LDFLAGS@.
22862 (configure): Run autoconf only if preceding `cd' succeeds.
22863 (bison.s1): Redirect output to temporary file then move the
22864 temporary to the target, rather than redirecting directly to bison.s1.
22865 (clean): Remove config.status and config.log.
22866 (distclean): Don't remove config.status here.
22868 1996-05-12 Richard Stallman <rms@gnu.org>
22871 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22873 1996-05-12 Richard Stallman <rms@gnu.org>
22876 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22878 1996-05-11 Richard Stallman <rms@gnu.org>
22880 * src/bison.s1 (__yy_memcpy):
22881 Really reorder the args, as was supposedly done on Feb 14 1995.
22882 (yyparse): Calls changed accordingly.
22884 1996-05-11 Richard Stallman <rms@gnu.org>
22886 * Makefile.in (dist): Don't use $(srcdir).
22888 * bison.simple (__yy_memcpy):
22889 Really reorder the args, as was supposedly done on Feb 14 1995.
22890 (yyparse): Calls changed accordingly.
22892 1996-01-27 Richard Stallman <rms@gnu.org>
22894 * src/output.c (output_rule_data):
22895 Test YYERROR_VERBOSE in the conditional
22896 around the definition of ttyname.
22898 1995-12-29 Richard Stallman <rms@gnu.org>
22901 Fix line numbers in #line commands.
22903 1995-12-29 Richard Stallman <rms@gnu.org>
22906 Fix line numbers in #line commands.
22908 1995-12-27 Richard Stallman <rms@gnu.org>
22910 * src/bison.s1 (YYPARSE_PARAM_DECL):
22911 In C++, make it always null.
22912 (YYPARSE_PARAM_ARG): New macro.
22913 (yyparse): Use YYPARSE_PARAM_ARG.
22915 1995-12-27 Richard Stallman <rms@gnu.org>
22917 * bison.simple (YYPARSE_PARAM_DECL):
22918 In C++, make it always null.
22919 (YYPARSE_PARAM_ARG): New macro.
22920 (yyparse): Use YYPARSE_PARAM_ARG.
22922 1995-11-29 Richard Stallman <rms@gnu.org>
22924 * doc/bison.texinfo:
22925 Describe literal string tokens, %raw, %no_lines, %token_table.
22927 1995-11-29 Daniel Hagerty <hag@gnu.org>
22929 * doc/bison.texinfo: Fixed update date
22931 1995-10-16 Richard Stallman <rms@gnu.org>
22933 * src/version.c: Version 1.25.
22935 1995-10-16 Richard Stallman <rms@gnu.org>
22937 * NEWS: *** empty log message ***
22939 1995-10-16 Richard Stallman <rms@gnu.org>
22941 * doc/bison.1, doc/bison.rnh:
22944 1995-10-15 Richard Stallman <rms@gnu.org>
22946 * src/vmsgetargs.c, src/getargs.c:
22947 Added -n, -k, and -raw switches.
22948 (noparserflag, toknumflag, rawtoknumflag): New variables.
22950 * src/symtab.h (SALIAS):
22951 New #define for adding aliases to %token.
22952 (struct bucket): Added `alias' field.
22954 * src/reduce.c (reduce_grammar):
22955 Revise error message.
22956 (print_notices): Remove final `.' from error message.
22958 * src/reader.c (reader_output_yylsp):
22960 (readgram): Use `#if 0' around code that accepted %command
22961 inside grammar rules: The documentation doesn't allow it,
22962 and it will fail since the %command processors scan for the next %.
22963 (parse_token_decl): Extended the %token
22964 declaration to allow a multi-character symbol as an alias.
22965 (parse_thong_decl): New function.
22966 (read_declarations): Added %thong declarations.
22967 (read_declarations): Handle NOOP to deal with allowing
22968 % declarations as another means to specify the flags.
22969 (readgram): Allow %prec prior to semantics embedded in a rule.
22970 (skip_to_char, read_declarations, copy_definition)
22971 (parse_token_decl, parse_start_decl, parse_type_decl)
22972 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22973 (get_type_name, copy_guard, copy_action, readgram)
22974 (get_type, packsymbols): Revised most error messages.
22975 Changed `fatal' to `warnxxx' to avoid aborting for error.
22976 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22977 (read_declarations): Improve the error message for
22978 an invalid character. Do not abort.
22979 (read_declarations, copy_guard, copy_action): Use
22980 printable_version to avoid unprintable characters in printed output.
22981 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22982 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22983 Allow the type of a non-terminal can be given
22984 more than once, as long as all specifications give the same type.
22987 (output_headers, output_trailers, output, output_gram)
22988 (output_rule_data): Implement noparserflag variable.
22989 Implement toknumflag variable.
22990 (output): Call reader_output_yylsp to output LTYPESTR.
22992 * src/main.c (main):
22993 If reader sees an error, don't process the grammar.
22994 (fatals): Updated to not use VARARGS1.
22995 (printable_version, int_to_string, warn, warni, warns, warnss)
22996 (warnsss): New error reporting functions. Avoid abort for error.
22999 Added THONG and NOOP for alias processing.
23000 Added SETOPT for the new code that allows setting options with %flags.
23003 Include getopt.h. Add some extern decls.
23004 (safegetc): New function to deal with EOF gracefully.
23005 (literalchar); new function to deal with reading \ escapes.
23006 (lex): Use literalchar.
23007 (lex): Implemented "..." tokens.
23008 (literalchar, lex, parse_percent_token): Made tokenbuffer
23009 always contain the token. This includes growing the token
23010 buffer while reading an integer.
23011 (parse_percent_token): Replaced if-else statement with percent_table.
23012 (parse_percent_token): Added % declarations as another
23013 way to specify the flags -n, -l, and -r. Also added hooks for
23014 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23015 major changes to files.c.
23016 (lex) Retain in the incoming stream a character following
23018 (skip_white_space, lex): Revised most error messages
23019 and changed fatal to warn to avoid aborting.
23020 (percent_table): Added %thong declarations.
23022 * src/gram.h: Comment changes.
23024 * src/files.c (openfiles, open_extra_files, done):
23026 and actfile file. Handle noparserflag. Both for -n switch.
23028 * src/conflicts.c (resolve_sr_conflict):
23029 Remove use of alloca.
23031 1995-06-01 Jim Meyering <meyering@gnu.org>
23033 * doc/bison.texinfo: *** empty log message ***
23035 1995-05-06 Richard Stallman <rms@gnu.org>
23037 * src/bison.s1: Comment change.
23039 1995-05-06 Richard Stallman <rms@gnu.org>
23041 * bison.simple: Comment change.
23043 1995-05-03 Richard Stallman <rms@gnu.org>
23045 * src/version.c: Version now 1.24.
23047 * src/bison.s1: Change distribution terms.
23049 * src/version.c: Version now 1.23.
23051 1995-05-03 Richard Stallman <rms@gnu.org>
23053 * doc/bison.texinfo:
23054 Rewrite "Conditions for Using Bison".
23055 Update version to 1.24.
23057 1995-05-03 Richard Stallman <rms@gnu.org>
23059 * bison.simple: Change distribution terms.
23061 1995-02-23 Richard Stallman <rms@gnu.org>
23063 * src/files.c: Test __VMS_POSIX as well as VMS.
23065 1995-02-14 Jim Meyering <meyering@gnu.org>
23067 * src/bison.s1 (__yy_memcpy):
23068 Renamed from __yy_bcopy to avoid
23069 confusion. Reverse FROM and TO arguments to be consistent with
23072 1995-02-14 Jim Meyering <meyering@gnu.org>
23074 * bison.simple (__yy_memcpy):
23075 Renamed from __yy_bcopy to avoid
23076 confusion. Reverse FROM and TO arguments to be consistent with
23079 1994-11-10 David J. MacKenzie <djm@gnu.org>
23085 * Makefile.in (DISTFILES): Include NEWS.
23087 * Makefile.in (DISTFILES):
23088 Include install-sh, not install.sh.
23090 * configure.in: Update to Autoconf v2 macro names.
23092 1994-10-05 David J. MacKenzie <djm@gnu.org>
23094 * Makefile.in: fix typo
23096 * Makefile.in (prefix, exec_prefix):
23097 Let configure set them.
23099 1994-09-28 David J. MacKenzie <djm@gnu.org>
23101 * Makefile.in: Set datadir to $(prefix)/share.
23103 1994-09-15 Richard Stallman <rms@gnu.org>
23106 Update copyright notice and GPL version.
23108 1994-09-15 Richard Stallman <rms@gnu.org>
23111 Update copyright notice and GPL version.
23113 1994-07-12 Richard Stallman <rms@gnu.org>
23115 * src/reduce.c, src/reader.c:
23118 1994-05-05 David J. MacKenzie <djm@gnu.org>
23120 * Makefile.in: entered into RCS
23122 1994-03-26 Richard Stallman <rms@gnu.org>
23124 * src/bison.s1: entered into RCS
23126 1994-03-26 Richard Stallman <rms@gnu.org>
23128 * bison.simple: entered into RCS
23130 1994-03-25 Richard Stallman <rms@gnu.org>
23132 * src/main.c: entered into RCS
23134 1994-03-24 Richard Stallman <rms@gnu.org>
23136 * src/conflicts.c: entered into RCS
23138 1994-01-02 Richard Stallman <rms@gnu.org>
23140 * Makefile.in: *** empty log message ***
23142 1993-11-21 Richard Stallman <rms@gnu.org>
23144 * src/bison.s1: *** empty log message ***
23146 1993-11-21 Richard Stallman <rms@gnu.org>
23148 * doc/bison.texinfo: entered into RCS
23150 * doc/bison.texinfo: *** empty log message ***
23152 1993-11-21 Richard Stallman <rms@gnu.org>
23154 * bison.simple: *** empty log message ***
23156 1993-10-25 David J. MacKenzie <djm@gnu.org>
23158 * doc/bison.texinfo: *** empty log message ***
23160 1993-10-19 Richard Stallman <rms@gnu.org>
23162 * src/bison.s1: *** empty log message ***
23164 1993-10-19 Richard Stallman <rms@gnu.org>
23166 * bison.simple: *** empty log message ***
23168 1993-10-14 Richard Stallman <rms@gnu.org>
23170 * src/bison.s1: *** empty log message ***
23172 1993-10-14 Richard Stallman <rms@gnu.org>
23174 * bison.simple: *** empty log message ***
23176 1993-09-14 David J. MacKenzie <djm@gnu.org>
23178 * doc/bison.texinfo: *** empty log message ***
23180 1993-09-13 Noah Friedman <friedman@gnu.org>
23182 * Makefile.in: *** empty log message ***
23184 1993-09-10 Richard Stallman <rms@gnu.org>
23186 * src/conflicts.c: *** empty log message ***
23188 * src/system.h: entered into RCS
23190 1993-09-10 Richard Stallman <rms@gnu.org>
23192 * doc/bison.1: entered into RCS
23194 1993-09-06 Noah Friedman <friedman@gnu.org>
23196 * src/version.c: entered into RCS
23198 1993-09-06 Noah Friedman <friedman@gnu.org>
23200 * Makefile.in: *** empty log message ***
23202 1993-07-30 David J. MacKenzie <djm@gnu.org>
23204 * Makefile.in: *** empty log message ***
23206 1993-07-24 Richard Stallman <rms@gnu.org>
23208 * src/bison.s1: *** empty log message ***
23210 1993-07-24 Richard Stallman <rms@gnu.org>
23212 * bison.simple: *** empty log message ***
23214 1993-07-08 David J. MacKenzie <djm@gnu.org>
23216 * Makefile.in: *** empty log message ***
23218 1993-07-04 Richard Stallman <rms@gnu.org>
23220 * src/bison.s1: *** empty log message ***
23222 1993-07-04 Richard Stallman <rms@gnu.org>
23224 * bison.simple: *** empty log message ***
23226 1993-06-26 David J. MacKenzie <djm@gnu.org>
23228 * src/getargs.c: entered into RCS
23230 1993-06-26 David J. MacKenzie <djm@gnu.org>
23232 * doc/bison.texinfo: *** empty log message ***
23234 * doc/bison.1: New file.
23236 1993-06-25 Richard Stallman <rms@gnu.org>
23238 * src/getargs.c: New file.
23240 1993-06-16 Richard Stallman <rms@gnu.org>
23242 * src/bison.s1: *** empty log message ***
23244 1993-06-16 Richard Stallman <rms@gnu.org>
23246 * bison.simple: *** empty log message ***
23248 1993-06-03 Richard Stallman <rms@gnu.org>
23250 * src/bison.s1: New file.
23252 1993-06-03 Richard Stallman <rms@gnu.org>
23254 * doc/bison.texinfo: *** empty log message ***
23256 1993-06-03 Richard Stallman <rms@gnu.org>
23258 * bison.simple: New file.
23260 1993-05-19 Richard Stallman <rms@gnu.org>
23262 * doc/bison.texinfo: New file.
23264 1993-05-07 Noah Friedman <friedman@gnu.org>
23266 * Makefile.in: *** empty log message ***
23268 1993-04-28 Noah Friedman <friedman@gnu.org>
23270 * src/reader.c: *** empty log message ***
23272 1993-04-23 Noah Friedman <friedman@gnu.org>
23274 * src/alloc.h: entered into RCS
23276 1993-04-20 David J. MacKenzie <djm@gnu.org>
23278 * src/version.c: *** empty log message ***
23280 * src/files.c, src/allocate.c:
23283 * src/reader.c: *** empty log message ***
23285 * src/lex.c: entered into RCS
23287 * src/conflicts.c: New file.
23289 * src/symtab.c: entered into RCS
23291 * src/alloc.h: New file.
23293 * src/LR0.c: entered into RCS
23295 1993-04-18 Noah Friedman <friedman@gnu.org>
23297 * src/reader.c: New file.
23299 * src/version.c: *** empty log message ***
23301 1993-04-18 Noah Friedman <friedman@gnu.org>
23303 * Makefile.in: *** empty log message ***
23305 1993-04-17 Noah Friedman <friedman@gnu.org>
23307 * Makefile.in: *** empty log message ***
23309 1993-04-15 Richard Stallman <rms@gnu.org>
23311 * src/main.c, src/files.c:
23314 1993-04-15 Noah Friedman <friedman@gnu.org>
23316 * configure.in: entered into RCS
23318 * configure.in: *** empty log message ***
23320 * configure.in: New file.
23322 1993-04-14 Richard Stallman <rms@gnu.org>
23324 * Makefile.in: New file.
23326 1993-04-13 Richard Stallman <rms@gnu.org>
23328 * src/version.c: New file.
23330 1993-03-25 Richard Stallman <rms@gnu.org>
23332 * src/output.c: entered into RCS
23334 1992-09-25 Richard Stallman <rms@gnu.org>
23336 * configure.bat: entered into RCS
23338 1992-06-22 Richard Stallman <rms@gnu.org>
23340 * src/vmsgetargs.c: entered into RCS
23342 1992-06-22 Richard Stallman <rms@gnu.org>
23344 * doc/bison.rnh: entered into RCS
23346 1992-04-20 David J. MacKenzie <djm@gnu.org>
23348 * README: entered into RCS
23350 1992-01-22 Richard Stallman <rms@gnu.org>
23352 * src/machine.h: entered into RCS
23354 1991-12-21 Richard Stallman <rms@gnu.org>
23356 * src/lalr.c, src/closure.c:
23359 1991-12-20 Richard Stallman <rms@gnu.org>
23361 * src/state.h: entered into RCS
23363 1991-12-18 Richard Stallman <rms@gnu.org>
23365 * src/print.c, src/nullable.c, src/derives.c:
23368 1991-11-03 David J. MacKenzie <djm@gnu.org>
23370 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23373 1988-09-09 Richard Stallman <rms@gnu.org>
23375 * src/bison.hairy: entered into RCS
23377 1987-12-16 Richard Stallman <rms@gnu.org>
23379 * REFERENCES: entered into RCS
23384 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23385 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23386 2008, 2009, 2010 Free Software Foundation, Inc.
23388 Copying and distribution of this file, with or without
23389 modification, are permitted provided the copyright notice and this
23390 notice are preserved.