1 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
3 Fix portability problem on OpenBSD 4.7.
5 Jim Meyering reported this in
6 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
7 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
8 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
10 * src/parse-gram.c, src/parse-gram.h: Regenerate.
11 * tests/regression.at: Tamper with the renamed witness.
13 Adjust to recent changes to gnulib bootstrap.
15 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
16 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
17 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
18 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
19 anymore and don't know of anybody else who does. If someone needs
20 these files, they can resurrect them.
21 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
22 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
23 Omit leading '/', since bootstrap omits it.
24 Adjust file names to match current contents better.
25 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
26 installed just for us.
27 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
28 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
29 needed somehow. Don't have time to look into why.
30 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
31 the GNU malloc behavior, where malloc (0) != NULL unless we're
32 out of storage? If not, we can omit malloc-gnu; but for now I left
35 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
38 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
41 * NEWS (2.4.3): Set date.
43 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
45 maint: add gettext version to release announcements.
46 Suggested by Paul Hilfinger at
47 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
48 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
49 * cfg.mk (bootstrap-tools): Add gettext.
51 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
53 doc: fix -W and %expect documentation some.
54 * NEWS (2.4.3): Mention that there are documentation fixes.
55 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
56 turns conflicts into errors not warnings.
57 (Shift/Reduce): Likewise.
58 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
60 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
62 -Werror: fix for rules useless in parser after conflicts.
63 * NEWS (2.4.3): Document fix.
64 * src/complain.c (error_message): Extend to handle incomplete
65 error messages so warn and warn_at can be used in more cases.
66 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
67 -Werror is always obeyed.
68 * src/reduce.c (reduce_print): Use warn so that the "warnings
69 being treated as errors" message is printed consistently before
70 the first warning message. This makes testing easier.
71 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
72 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
73 --warnings=error when warnings appear in bison's stderr.
75 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
77 maint: enable gnits only at stable releases.
78 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
79 version string should disable gnits. Explain in comments.
81 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
84 * po/POTFILES.in: Add src/graphviz.c.
86 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
89 * po/POTFILES.in: Add remaining gnulib files that have
92 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
94 maint: use announce-gen's new --mail-headers.
95 * HACKING (Announce): Update instructions.
96 * cfg.mk (announcement_Cc_): Define.
97 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
98 required by latest gnulib.
99 * gnulib: Update to latest.
101 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
103 tests: handle Valgrind that complains about >&-.
104 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
105 (Output files: -dv >&-): Skip test group if running
106 maintainer-check-valgrind.
108 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
110 Update from GFDL GFDL 1.2 to 1.3.
111 * doc/bison.texinfo: Update GFDL version number.
112 * doc/fdl.texi: Update to version 1.3, taken from:
113 http://www.gnu.org/licenses/fdl.texi
115 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
117 Do not use date ranges in copyright notices.
118 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
120 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
121 * TODO, bootstrap, bootstrap.conf:
122 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
123 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
124 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
125 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
126 * data/lalr1.java, data/location.cc:
127 * data/xslt/bison.xsl:
128 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
129 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
130 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
131 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
132 * djgpp/subpipe.c, djgpp/subpipe.h:
133 * djgpp/testsuite.sed, doc/bison.texinfo:
134 * doc/refcard.tex, etc/README, etc/bench.pl.in:
135 * examples/calc++/Makefile.am, examples/extexi:
136 * lib/abitset.c, lib/abitset.h:
137 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
138 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
139 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
140 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
141 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
142 * lib/libiberty.h, lib/main.c, lib/timevar.c:
143 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
144 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
145 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
146 * src/AnnotationList.c, src/AnnotationList.h:
147 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
148 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
149 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
150 * src/complain.h, src/conflicts.c, src/conflicts.h:
151 * src/derives.c, src/derives.h, src/files.c, src/files.h:
152 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
153 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
154 * src/ielr.h, src/lalr.c, src/lalr.h:
155 * src/location.c, src/location.h, src/main.c:
156 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
157 * src/named-ref.h, src/nullable.c, src/nullable.h:
158 * src/output.c, src/output.h, src/parse-gram.y:
159 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
160 * src/print_graph.c, src/print_graph.h, src/reader.c:
161 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
162 * src/relation.h, src/scan-code.h, src/scan-code.l:
163 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
164 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
165 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
166 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
167 * tests/actions.at, tests/atlocal.in, tests/c++.at:
168 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
169 * tests/existing.at, tests/glr-regression.at:
170 * tests/headers.at, tests/input.at, tests/java.at:
171 * tests/local.at, tests/named-refs.at:
172 * tests/output.at, tests/push.at, tests/reduce.at:
173 * tests/regression.at, tests/sets.at, tests/skeletons.at:
174 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
175 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
176 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
178 Don't use date ranges in copyright notices.
180 2010-05-11 Akim Demaille <demaille@gostai.com>
182 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
183 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
184 header file to the implementation file, after the user %code
186 * NEWS (2.5): Document this.
188 2010-05-07 Akim Demaille <demaille@gostai.com>
191 * data/lalr1.cc (YYRHSLOC): New.
192 (YYLLOC_DEFAULT): Use it.
193 * data/glr.cc: If location_type was user defined, do not include
194 location.hh, and do not produce location.hh and position.hh.
195 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
196 Check that glr.cc supports user defined location_type.
197 * NEWS: Document this.
199 2010-05-10 Akim Demaille <demaille@gostai.com>
201 doc: fix lalr1.cc documentation.
202 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
203 (C++ Bison Interface): Fix lalr1.cc skeleton name.
204 (C++ Parser Interface): Fix semantic_type and location_type names.
205 Document yy::parser::token.
206 Reported by Jerry Quinn.
208 2010-05-04 Akim Demaille <demaille@gostai.com>
210 lalr1.cc: don't generate location.hh when location_type is defined
211 * data/bison.m4 (b4_percent_define_use): New.
212 (b4_percent_define_get): Use it.
213 Accept a default value.
214 * data/c++.m4: Do not provide a default value for the %define
215 variable location_type, rather, use b4_percent_define_get with a
216 default argument where its value is needed.
217 * data/lalr1.cc: Do not load location.cc (which outputs both
218 location.hh and position.hh) if the user defined location_type.
219 Do not include location.hh either.
220 * data/glr.cc: Likewise.
222 2010-05-04 Akim Demaille <demaille@gostai.com>
224 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
225 * tests/calc.at (Span): Instead of begin/end, as in the built-in
226 location class, use first and last.
227 Define YYLLOC_DEFAULT to adjust to these changes.
228 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
229 location_type changes.
231 2010-05-04 Akim Demaille <demaille@gostai.com>
233 tests: enhance AT_SYNCLINES_COMPILE.
234 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
236 (AT_SYNCLINES_COMPILE): here.
237 Add more distcc patterns.
239 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
241 tests: fix maintainer-xml-check.
242 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
243 Update output to include comments now produced by --graph.
244 (xsl:template match="automaton"): As for --graph, name the
245 digraph after the grammar file.
246 * src/print-xml.c (escape_bufs): Enlarge array.
247 (print_xml): Add bug-report and url attributes to
248 bison-xml-report element.
250 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
252 In DOT output, convert from "/*" comments to "//" comments.
253 This handles the possibility that a "*/" might appear in
254 variable portions of those comments at some point in the future.
255 * src/graphviz.c (start_graph): Implement.
257 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
259 Document that undefined %prec identifier warnings will remain.
260 * NEWS (2.4.3): Here.
263 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
265 Revert 2009-12-30 change for undefined %prec token complaints.
266 That is, keep them as warnings because that should be sufficient
267 to satisfy POSIX without creating backward compatibility issues.
268 Suggested by Richard Stallman at
269 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
270 * NEWS (2.5): Remove mention of complaint.
271 * src/reader.c (grammar_rule_check): Convert complaint back to
273 * tests/input.at (%prec's token must be defined): Update.
275 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
277 build: don't require src/bison during bootstrap.
278 Suggested by Eric Blake at
279 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
280 * bootstrap.conf (bootstrap_epilogue): New function to make sure
281 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
283 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
285 i18n: fix untranslatable string.
286 Reported by Goran Uddeborg at
287 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
288 * src/muscle-tab.c (muscle_percent_define_insert): Here.
290 2010-04-13 Akim Demaille <demaille@gostai.com>
292 tests: calc: minor refactoring.
293 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
295 2010-04-13 Akim Demaille <demaille@gostai.com>
297 tests: calc: simplify location management.
298 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
299 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
300 define the appropriate AT_LOC accessors.
301 * tests/calc.at: Use AT_LOC accessors.
303 2010-04-13 Akim Demaille <demaille@gostai.com>
306 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
307 Define AT_LOCATION_TYPE_IF.
308 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
309 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
310 used, provide a user location type and use it.
311 (Simple LALR1 C++ Calculator): Add a test case for location_type.
313 2010-04-13 Akim Demaille <demaille@gostai.com>
315 tests: check fclose's return value.
316 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
318 2010-04-13 Akim Demaille <demaille@gostai.com>
320 tests: don't depend on the actual location type.
321 * tests/calc.at: Use yy::parser::location_type rather than
322 yy::location, since the former is always right, and might point to
323 another type than the latter.
325 2010-04-13 Akim Demaille <demaille@gostai.com>
328 * tests/calc.at: Formatting changes.
330 2010-04-13 Akim Demaille <demaille@gostai.com>
332 lalr1.cc: remove useless forward declaration.
333 * data/lalr1.cc: Include location.hh before stack.hh.
334 Remove the useless forward declarations of position and location.
335 Reported by Chris Morley.
336 * data/glr.cc: Likewise.
338 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
340 * NEWS (2.4.3): Mention fix for Sun Studio C++.
342 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
344 tests: fix for newer Sun Studio C++.
345 Reported by Dagobert Michelsen at
346 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
347 * THANKS (Dagobert Michelsen): Add.
348 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
349 Autoconf macro for handling the restrict keyword.
350 * gnulib: Update to latest, which no longer overrides that macro
353 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
355 portability: fix pointer arithmetic to conform to C standard.
356 Reported by Tys Lefering at
357 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
358 This fix is already implemented in glr.c and does not apply to
360 * data/lalr1.cc (yy::parser::parse): Increase size of
361 yyerror_range and adjust subscripting so you don't have to
362 subtract one from the beginning of the array.
363 * data/yacc.c (b4_declare_parser_state_variables,
364 yyparse, yypush_parse): Likewise.
366 2010-04-05 Akim Demaille <demaille@gostai.com>
368 remove useless include.
369 * src/graphviz.h: Don't include stdbool.h.
371 2010-04-05 Akim Demaille <demaille@gostai.com>
373 graph: sign the output file.
374 * src/graphviz.c (start_graph): Issue comments about Bison.
375 Suggested by Tys Lefering.
377 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
379 portability: fix test suite for GCC 4.5's new #error message.
380 Reported by Tys Lefering at
381 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
382 * NEWS (2.4.3): Mention.
383 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
385 2010-03-30 Akim Demaille <demaille@gostai.com>
388 * src/graphviz.h: Add missing license notice.
391 2010-03-25 Akim Demaille <demaille@gostai.com>
393 tests: fix 250: parse.error=verbose overflow.
394 * tests/regression.at (parse.error=verbose overflow): Avoid the
395 double inclusion of stdlib.h as it triggers hard errors.
397 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
399 portability: fix for BSD make.
400 Reported by Johan van Selst at
401 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
402 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
403 this dependency list as in package.m4's target rule.
405 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
407 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
408 Reported by Johan van Selst at
409 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
411 * THANKS (Johan van Selst): Add.
412 * gnulib: Update to latest.
414 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
416 maint: update for changes to gnulib's announce-gen.
417 * HACKING (Announce): RELEASE_TYPE=major must now be written
420 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
423 * NEWS (2.4.2): Set version and date. For the recent test suite
424 portability fixes, don't be so optimistic about their success
425 given the lack of feedback on the affected platforms.
427 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
429 tests: fix maintainer-xml-check for recent changes.
430 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
431 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
432 output file whose name conflicts with a previous output file
433 is now never generated.
435 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
437 portability: fix several issues with M4 subprocess.
439 M4's output pipe was not being drained upon fatal errors during
440 scan_skel. As a result, broken-pipe messages from M4 were seen
441 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
442 failure in the test suite. The problem was that, on platforms
443 where the default disposition for SIGPIPE is ignore instead of
444 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
445 then reported it. However, there's some sort of race condition,
446 because the new test group occasionally succeeded.
447 Reported by Albert Chin at
448 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
450 There were also problems with the test suite livelocking on
451 Tru64 5.1b. Reported by Didier Godefroy at
452 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
453 Switching to create_pipe_bidi suggested by Akim Demaille.
455 To attempt to solve both of these problems, switch to gnulib's
456 create_pipe_bidi and register M4 process as a slave. Along the
457 way, clean up file name conflict handling, which was affected by
458 the broken-pipe problem before the switch.
459 * NEWS (2.4.2): Document.
460 * THANKS (Didier Godefroy): Add.
461 * bootstrap.conf (gnulib_modules): Add pipe.
462 * gnulib: Update to latest to make sure we have all the latest
464 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
466 * po/POTFILES.in (lib/subpipe.c): Remove.
467 * src/files.c (compute_output_file_names): Update invocations
468 of output_file_name_check.
469 (output_file_name_check): In the case that the grammar file
470 would be overwritten, use complain instead of fatal, but replace
471 the output file name with /dev/null. Use the /dev/null solution
472 for the case of two conflicting output files as well because it
473 seems safer in case Bison one day tries to open both files at
475 * src/files.h (output_file_name_check): Update prototype.
476 * src/output.c (output_skeleton): Use create_pipe_bidi and
477 wait_subprocess. Assert that scan_skel completely drains the
479 * src/scan-skel.l (at_directive_perform): Update
480 output_file_name_check invocation.
481 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
482 grammar file actually isn't overwritten.
483 (Conflicting output files: -o foo.y): Update expected output.
484 * tests/skeletons.at (Fatal errors but M4 continues producing
485 output): New test group.
487 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
490 * HACKING (Release Procedure): Add reminder about keeping
491 POTFILES files up-to-date.
492 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
494 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
497 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
498 which is already defined in atconfig.
500 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
502 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
504 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
506 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
507 * HACKING (Release Procedure): Update notes on copyright years.
508 * Makefile.am (update-package-copyright-year): New target rule.
509 * build-aux/update-package-copyright-year: New file.
510 * cfg.mk (update-copyright): Add update-package-copyright-year
513 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
515 * bootstrap: Import improvements from latest gnulib.
517 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
519 build: require Automake 1.11.1 to avoid a security flaw.
520 * HACKING (Release Procedure): Don't document Automake security
522 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
525 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
527 gnulib: update to latest.
529 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
531 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
533 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
535 Thank the developer of the initial push parser implementation.
536 This unfortunate oversight is several years old.
537 * THANKS (Odd Arild Olsen): Add.
539 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
541 Fix some comments concerning LR(0) versus LALR(1).
543 Stop equating LR(0) with nondeterminism and LALR(1) with
544 determinism. That is, if all states are consistent, then LR(0)
545 tables are deterministic. On the other hand, LALR(1) tables
546 might be nondeterministic before conflict resolution, and GLR
547 permits LALR(1) tables to remain nondeterministic.
548 * src/LR0.c, src/LR0.h: Here.
549 * src/lalr.c, src/lalr.h: Here.
550 * src/main.c (main): Here.
551 * src/state.c, src/state.h: Here.
553 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
556 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
558 maint: run "make update-copyright"
560 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
562 POSIX: complain if %prec's token was not defined.
563 * NEWS (2.5): Document.
564 * src/reader.c (grammar_rule_check): Convert warning to
566 * tests/input.at (%prec's token must be defined): Update.
568 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
570 POSIX: warn if %prec's token was not defined.
571 Reported by Florian Krohm at
572 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
573 * NEWS (2.4.2): Document.
574 * src/reader.c (grammar_rule_check): Implement.
575 (grammar_current_rule_prec_set): Add comments explaining that we
576 here assume a %prec identifier is a token, but we still manage
578 * tests/input.at (%prec's token must be defined): New test
581 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
583 * HACKING (Release Procedure): Recommend a secure automake.
585 2008-12-11 Akim Demaille <demaille@gostai.com>
587 Propagate i18n changes into glr.c.
588 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
589 building the error message format dynamically.
590 * data/lalr1.java: Formatting changes.
592 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
594 Port small part of master's 11707b2b so future ports are easier.
595 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
597 2008-12-11 Akim Demaille <demaille@gostai.com>
599 Simplify the i18n of the error messages.
600 * data/lalr1.cc: Comment changes.
602 2008-11-11 Akim Demaille <demaille@gostai.com>
605 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
608 2008-11-11 Akim Demaille <demaille@gostai.com>
610 Support i18n of the parse error messages.
611 * TODO (lalr1.cc/I18n): Remove.
612 * data/lalr1.cc (yysyntax_error_): Support the translation of the
613 error messages, as done in yacc.c.
614 Stay within the yy* pseudo namespace.
616 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
618 Port small part of master's 8901f32e so future ports are easier.
619 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
620 argument, but name it in the function definition only when
621 verbose error messages are enabled and it'll thus be used.
622 (yy::parser::parse): Update use of yysyntax_error_.
624 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
626 portability: `<' and `>' are not always defined on addresses.
627 Specifically, don't sort objects by their memory addresses when
628 they're not allocated in the same array or other object. Though
629 I haven't found a test case where that fails on my platform, C
630 says the behavior is undefined.
631 * src/AnnotationList.c (AnnotationList__insertInto): Remove
632 FIXME. Use new id field of InadequacyList nodes rather than
633 their memory addresses when sorting.
634 (AnnotationList__compute_from_inadequacies): Add
635 inadequacy_list_node_count argument to pass to
636 InadequacyList__new_conflict.
637 * src/AnnotationList.h
638 (AnnotationList__compute_from_inadequacies): Update prototype
639 and documentation for new argument.
640 * src/InadequacyList.c (InadequacyList__new_conflict): Add
641 node_count argument and use it to assign a unique ID.
642 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
643 (InadequacyList): Add id field.
644 (InadequacyList__new_conflict): Update prototype and
645 documentation for new argument.
646 * src/ielr.c (ielr_compute_annotation_lists): Update
647 AnnotationList__compute_from_inadequacies invocation.
649 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
651 Fix handling of yychar manipulation in user semantic actions.
652 The problem was that yacc.c didn't always update the yychar
653 translation afterwards. However, other skeletons appear to be
654 fine. glr.c appears to already translate yychar before every
655 use. lalr1.cc does not define yychar and does not document its
656 replacement, yyla, for users. It does provide yyclearin, but
657 that does not manipulate yyla and thus requires no translation
658 update. In lalr1.java, yychar is out of scope during semantic
660 * NEWS (2.5): Document.
661 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
663 (yyparse, yypush_parse): Instead, translate before every use of
664 yytoken, and add comments explaining this approach.
665 * tests/actions.at (Destroying lookahead assigned by semantic
666 action): New test group checking that translation happens before
667 lookahead destructor calls at parser return. Previously,
668 incorrect destructors were called.
669 * tests/conflicts.at (%error-verbose and consistent
670 errors): New test group checking that translation happens at
671 syntax error detection before the associated verbose error
672 message and the associated lookahead destructor calls. While
673 the destructor call is fixed by this patch, the verbose error
674 message is currently incorrect due to another bug (see
675 comments in test group), so this is an expected failure for now.
677 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
679 YYFAIL: warn about uses and remove from lalr1.java.
680 * NEWS (2.5): Document.
681 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
682 and make it private. Update all uses.
683 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
685 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
688 * NEWS (2.4.2): Document deprecation and the phase-out plan.
689 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
691 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
692 YYFAIL from GCC cpp's -Wunused-macros.
693 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
695 (LocalWords): Remove YYFAIL.
697 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
700 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
701 function, which is no longer used.
703 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
705 Add gcc's -Wundef to test suite and fix another warning from it.
706 * NEWS (2.4.2): Update description of -Wundef fix.
707 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
708 (WARN_CFLAGS_TEST): New substitution.
709 * data/glr.c: Avoid warning about __STRICT_ANSI__.
710 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
712 (NO_WERROR_CFLAGS): Likewise.
713 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
715 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
717 * data/yacc.c: Reformat m4 a little.
719 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
721 Document gcc -Wundef fix.
722 * NEWS (2.4.2): Here.
723 * THANKS (Jonathan Nieder): Add.
725 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
727 Simplify y.tab.c when location tracking is disabled.
728 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
729 tracking is not enabled. Instead, unconditionally define
730 YY_LOCATION_PRINT as a no-op for backward compatibility.
732 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
734 Avoid warnings from gcc -Wundef y.tab.c.
735 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
736 defined before using them.
737 * data/lalr1.cc: Likewise.
738 * data/yacc.c: Likewise.
740 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
742 autoconf: update to latest for fix of M4 detection.
743 Reported by Eric Blake.
744 * submodules/autoconf: Update.
746 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
748 portability: use -DGNULIB_POSIXCHECK.
749 Reported by Eric Blake. See discussions at
750 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
752 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
753 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
754 * bootstrap.conf (gnulib_modules): Add all the printf modules
755 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
756 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
757 (excluded_files): Remove m4/printf-posix.m4.
758 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
759 lib/libbison.a so gnulib libraries can be linked.
761 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
763 Enable assertion output and --disable-assert for configure.
764 * bootstrap.conf (gnulib_modules): Add assert module.
765 * src/system.h (aver): Define as assert, and summarize the
766 discussion on this issue.
768 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
770 Expand GLR acronym in summary of Bison.
771 Based on discussion with Akim Demaille starting at
772 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
773 * doc/bison.texinfo (Introduction): Here.
774 * src/getargs.c (usage): Here.
776 2009-10-03 Alex Rozenman <rozenman@gmail.com>
778 Document named references.
779 * doc/bison.texinfo (Actions): Add new example and xref to
780 Using Named References node.
781 (Using Named References): New node.
783 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
786 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
788 (Sbitset__isEmpty): Use Sbitset instead of char*.
789 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
790 instead of char. This helps to avoid casting errors.
791 (Sbitset__or): Use Sbitset instead of char*.
793 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
795 portability: don't assume 8-bit bytes.
796 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
797 * src/Sbitset.h (Sbitset__nbytes): Here.
798 (Sbitset__byteAddress): Here.
799 (Sbitset__bit_mask): Here.
800 (Sbitset__last_byte_mask): Here.
801 (Sbitset__ones): Here.
802 (SBITSET__FOR_EACH): Here.
804 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
806 portability: use va_start and va_end in the same function.
807 * src/complain.c (error_message): Move va_end from here...
808 (ERROR_MESSAGE): ... to here.
810 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
812 * data/bison.m4: Update comments for rename to muscle-tab.h.
814 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
816 Rename muscle_tab.* to muscle-tab.* for consistency with master.
817 * src/Makefile.am (bison_SOURCES): Update.
818 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
819 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
820 src/tables.c: Update include.
821 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
822 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
825 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
828 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
829 replace all uses with UNIQSTR_CONCAT.
830 * src/uniqstr.c (uniqstr_vsprintf): New function.
831 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
832 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
835 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
838 * src/parse-gram.y: Clean up sorting of declarations.
839 Use types to simplify %printer declarations where possible.
840 Provide %printer for BRACKETED_ID and symbol.prec.
841 * src/symtab.c: Whitespace change.
843 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
845 tests: skip tests of file names that platform does not support.
846 Reported by Michael Raskin at
847 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
848 * THANKS (Michael Raskin): Add.
849 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
850 to fail at least for file names containing ":" or "\".
852 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
854 yysyntax_error: avoid duplicate lookahead collection.
855 Except when memory reallocation is required, this change
856 eliminates the need to invoke yysyntax_error twice and thus to
857 repeat the collection of lookaheads. It also prepares for
858 future extensions that will make those repetitions more
859 expensive and that will require additional memory management in
860 yysyntax_error. Finally, it fixes an obscure bug already
861 exercised in the test suite.
862 * data/yacc.c (yysyntax_error): Add arguments for message
863 buffer variables stored in the parser. Instead of size, return
864 status similar to yyparse status but indicating success of
865 message creation. Other than the actual reallocation of the
866 message buffer, import and clean up memory management code
868 (yyparse, yypush_parse): ... here.
869 * tests/regression.at (%error-verbose overflow): No longer an
872 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
874 yysyntax_error: test memory management more.
875 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
876 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
878 (%error-verbose overflow): New test group that reveals an
879 obscure bug. Expected fail for now.
881 2008-12-11 Akim Demaille <demaille@gostai.com>
883 Pass the token type to yysyntax_error.
884 * data/yacc.c (yysyntax_error): Take the transated token instead
888 2008-12-11 Akim Demaille <demaille@gostai.com>
890 Simplify the i18n of the error messages.
891 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
892 of building dynamically the format string.
894 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
897 * src/symtab.c (symbol_pack): Here because every symbol's number
898 is always defined by this time.
900 2009-10-03 Alex Rozenman <rozenman@gmail.com>
902 Add additional space after periods in NEWS.
905 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
907 Use the correct conversion specifier for size_t.
908 Reported by Jim Meyering.
909 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
910 because Sbitset__Index is size_t.
911 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
913 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
915 tests: don't abuse AT_BISON_CHECK.
916 * tests/regression.at (parse-gram.y: LALR = IELR): Move
917 additional shell commands outside of AT_BISON_CHECK.
919 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
921 tests: check that parse-gram.y's IELR and LALR are identical.
922 * tests/atlocal.in (abs_top_srcdir): New shell variable.
923 * tests/regression.at (parse-gram.y: LALR = IELR): New test
926 2009-09-16 Akim Demaille <demaille@gostai.com>
928 doc: comment changes.
929 * doc/bison.texinfo: Comment changes.
931 2009-09-16 Akim Demaille <demaille@gostai.com>
934 * doc/bison.texinfo: here.
936 2009-09-19 Alex Rozenman <rozenman@gmail.com>
938 Keep sub-messages aligned. Fix strings for translation.
939 * src/location.h (location_print): Add return value.
940 * src/location.c (location_print): Return number of printed
942 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
944 * src/complain.cpp (indent_ptr): New static variable.
945 (error_message, complain_at_indent, warn_at_indent): Implement
946 the alignment mechanism.
947 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
948 for translations. Use new alignment mechanism.
949 * tests/named-ref.at: Adjust test-cases.
950 * NEWS (2.5): Add an announcement about named references.
952 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
954 tests: clean up push.at test group titles.
955 * tests/push.at: Remove "Push Parsing: " from test group titles
956 because these are already under the banner "Push Parsing Tests".
958 2009-09-12 Alex Rozenman <rozenman@gmail.com>
960 Provide an additional sub-message for clarity.
961 Add "symbol not found in production" error message when
962 an "invalid reference" is detected in named references
964 * src/scan-code.l: Update "invalid reference" case.
965 * tests/named-ref.at: Adjust test-cases.
967 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
969 Clean up yacc.c a little.
970 * data/yacc.c: Clean up M4 for readability, and make output
971 whitespace more consistent. For the main parse function
972 comment, instead of saying "yyparse or yypush_parse", say either
973 "yyparse" or "yypush_parse" depending on which it actually is.
975 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
977 Complain about unused %define variables and %code qualifiers.
978 * NEWS (2.5): Document.
979 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
980 * doc/bison.texinfo (Decl Summary): Document complaint, and
981 improve %define documentation a little otherwise.
982 * tests/input.at (Reject unused %code qualifiers): Update.
983 (%define errors): Update.
984 (%define, --define, --force-define): Update.
985 (%define backward compatibility): Update.
986 (Unused %define api.pure): Update.
987 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
989 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
992 * src/output.c: Don't include assert.h.
993 (output_skeleton): Use aver not assert.
994 * src/system.h (aver): In documentation of why, add links to
995 Paul Eggert's explanations in the mailing lists.
997 2009-09-05 Alex Rozenman <rozenman@gmail.com>
999 Use "Unresolved reference" error message when no symbols were found
1000 in a symbolic reference resolution. Remove .expr and -expr from
1001 the shown reference when the reference is unresolved.
1002 * src/scan-code.l: Change the error message, adjust location columns,
1003 rename variable "exact_mode" to "explicit_bracketing".
1004 * tests/named-ref.at: Adjust existing tests and add a new one.
1006 2009-09-03 Akim Demaille <demaille@gostai.com>
1008 * NEWS (2.4.2): Add "Internationalization" item.
1010 2009-09-03 Akim Demaille <demaille@gostai.com>
1012 bootstrap: fix/improve find_tool.
1013 * bootstrap (find_tool): Improve error messages.
1014 Fix typo about find_tool_names.
1016 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1018 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1020 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1021 * src/scan-code.h (code_props_rule_action_init): Rename
1022 named_ref arg to name so it doesn't shadow named_ref type. This
1023 makes it consistent with the function definition in scan-code.l
1026 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1028 %define: accept unquoted values.
1029 * NEWS (2.5): Group all %define changes together, and document
1030 this one. Remove quotes in IELR and canonical LR entry.
1031 * doc/bison.texinfo: Remove quotes in most examples throughout.
1032 (Decl Summary): Update %define documentation.
1033 (Table of Symbols): Likewise.
1034 * src/ielr.c (LrType): Update documentation.
1035 * src/parse-gram.y (content.opt): Add production for ID.
1036 * tests/calc.at: Remove quotes in most tests.
1037 * tests/existing.at: Likewise.
1038 * tests/input.at: Likewise.
1039 * tests/local.at: Likewise.
1040 * tests/push.at: Likewise.
1041 * tests/reduce.at: Likewise.
1042 * tests/torture.at: Likewise.
1044 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1046 %define lr.type: make values lowercase IDs.
1047 That is, "LALR" => "lalr", "IELR" => "ielr", and
1048 "canonical LR" => "canonical-lr".
1049 * NEWS (2.5): Update documentation.
1050 * doc/bison.texinfo (Decl Summary): Likewise.
1051 * src/ielr.c (ielr): Use new values.
1052 * src/ielr.h (ielr): Update documentation.
1053 * src/reader.c (prepare_percent_define_front_end_variables): Use
1054 and validate new values.
1055 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1057 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1059 2009-08-27 Eric Blake <ebb9@byu.net>
1061 scan-gram: avoid portability trap with ctype usage.
1062 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1063 Avoid compiler warning.
1065 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1067 tests: use perl for printing special sequences to files.
1068 And skip tests if perl is not available. This is better than
1069 playing tricks with shell portability. Suggested by Akim
1071 * tests/input.at (Bad character literals): Use it here for
1072 omitting final newlines.
1073 (Bad escapes in literals): Use it here for special characters.
1075 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1077 tests: show a use of %define lr.default-reductions "consistent"
1078 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1079 prevents the omission of expected tokens for %error-verbose.
1081 2009-08-26 Akim Demaille <demaille@gostai.com>
1083 tests: portability fix.
1084 * tests/input.at (Bad escapes in literals): Don't expect "echo
1085 '\0'" to output \ then 0.
1087 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1089 Actually handle the yytable zero value correctly this time.
1090 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1091 mention zero values in the YYTABLE comments.
1092 * data/glr.c (yytable_value_is_error): Don't check for zero
1094 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1095 * data/yacc.c (yytable_value_is_error): Likewise.
1096 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1097 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1098 * src/tables.h: In header comments, explain why it's useless to
1099 check for a zero value in yytable.
1101 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1103 More fixes related to last two patches.
1104 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1106 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1107 yytable comments: zero indicates syntax error not default
1109 * data/glr.c (yyis_pact_ninf): Rename to...
1110 (yypact_value_is_default): ... this.
1111 (yyisDefaultedState): Update for rename.
1112 (yyis_table_ninf): Rename to...
1113 (yytable_value_is_error): ... this, and check for value zero
1114 besides just YYTABLE_NINF.
1115 (yygetLRActions): Check for default value from yypact. It
1116 appears that this check is always performed before this function
1117 is invoked, and so adding the check here is probably redundant.
1118 However, the code may evolve after this subtlety is forgotten.
1119 Also, update for rename to yytable_value_is_error. Because that
1120 macro now checks for zero, a different but equivalent branch of
1121 the if-then-else here is evaluated.
1122 (yyreportSyntaxError): Update for rename to
1123 yytable_value_is_error. The zero condition was mishandled
1125 (yyrecoverSyntaxError): Update for renames. No behavioral
1127 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1129 (yy_table_value_is_error_): New function.
1130 (parse): Use new functions where possible. No behavioral
1132 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1133 The zero condition was mishandled before.
1134 * data/yacc.c (yyis_pact_ninf): Rename to...
1135 (yypact_value_is_default): ... this.
1136 (yyis_table_ninf): Rename to...
1137 (yytable_value_is_error): ... this, and check for value zero
1138 besides just YYTABLE_NINF.
1139 (yysyntax_error): Update for rename to yytable_value_is_error.
1140 The zero condition was mishandled before.
1141 (yyparse): Update for renames. No behavioral changes.
1142 * src/tables.h: Improve comments about yypact, yytable, etc.
1143 more. Most importantly, say yytable value of zero means syntax
1144 error not default action.
1146 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1148 Fix %error-verbose for conflicts resolved by %nonassoc.
1149 * NEWS (2.5): Document.
1150 * data/glr.c (yyreportSyntaxError): Fix this by checking
1152 * data/yacc.c (yysyntax_error): Likewise.
1153 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1155 * data/lalr1.java (yysyntax_error): Likewise.
1156 * tests/conflicts.at (%nonassoc and eof): Update expected output
1159 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1161 Some code and documentation improvements.
1162 * data/c.m4 (b4_table_value_equals): New macro to capture
1164 * data/glr.c (yyis_pact_ninf): Use it here.
1165 (yyis_table_ninf): Likewise.
1166 (yyreportSyntaxError): Improve internal comments.
1167 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1168 Use it everywhere possible.
1169 (yyis_table_ninf): Likewise.
1170 (yysyntax_error): Improve internal comments.
1171 * data/lalr1.cc (yysyntax_error_): Likewise.
1172 * data/lalr1.java (yysyntax_error): Likewise.
1173 * src/tables.h: Improve comments about yypact, yytable, etc.
1175 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1177 Use locale when quoting.
1178 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1179 quote rather than implementing quoting here.
1181 2009-08-20 Eric Blake <ebb9@byu.net>
1183 Make previous patch more robust.
1184 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1186 (output_skeleton): Use it.
1187 Suggested by Akim Demaille.
1189 Import latest m4/m4.m4.
1190 * submodules/autoconf: Update to autoconf 2.64.
1191 * configure.ac (M4_GNU_OPTION): New define.
1192 * src/output.c (output_skeleton): Use it to resolve FIXME.
1193 * NEWS: Mention this.
1195 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1197 Fix complaints about escape sequences.
1198 Discussed starting at
1199 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1200 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1201 For a \0 and similar escape sequences meaning the null
1202 character, report an invalid escape sequence instead of an
1203 invalid null character because the latter does not actually
1204 appear in the user's input.
1205 In all escape sequence complaints, don't escape the initial
1206 backslash, and don't quote when the sequence appears at the end
1207 of the complaint line unless there's whitespace that quotearg
1209 Consistently say "invalid" not "unrecognized".
1210 Consistently prefer "empty character literal" over "extra
1211 characters in character literal" warning for invalid escape
1212 sequences; that is, consistently discard those sequences.
1213 * tests/input.at (Bad escapes in literals): New.
1215 2009-08-19 Akim Demaille <demaille@gostai.com>
1218 * doc/bison.texinfo: Fix minor Texinfo errors.
1220 2009-08-19 Akim Demaille <demaille@gostai.com>
1222 doc: %initial-action to initialize yylloc.
1223 Reported by Bill Allombert.
1224 * doc/bison.texinfo: Set fill-column to 76.
1225 (Location Type): Document the use of %initial-action to initialize
1228 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1230 maint: update for gnulib's recent update-copyright changes
1232 * .x-update-copyright (COPYING): Add as it's no longer implied
1233 when .x-update-copyright is present.
1234 * cfg.mk (update-copyright-local): Remove, now ignored.
1235 (update-copyright): Declare update-b4-copyright as a dependency.
1237 2009-08-17 Akim Demaille <demaille@gostai.com>
1239 build: require gettext 0.17.
1241 Suggested by Bruno Haible.
1242 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1243 * configure.ac: require gettext 0.17 to ensure compatibility with
1246 2009-08-17 Akim Demaille <demaille@gostai.com>
1248 build: lower gettext requirements.
1250 Bison was uselessly requiring the formatstring macros from
1251 gettext, which resulted in mo files not being installed on systems
1252 that perfectly supported Bison mo files. Lower the requirement.
1253 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1255 * configure.ac: Require need-ngettext instead of
1256 need-formatstring-macros.
1257 Reported by Martin Jabocs.
1258 Suggested by Bruno Haible.
1259 * INSTALL: Restructure.
1260 (Internationalization): New.
1262 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1264 maint: fix use of copyright year intervals.
1266 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1267 as now recommended in gnulib/NEWS.
1268 * build-aux/update-b4-copyright: Fix.
1269 * cfg.mk (update-copyright-env): Configure update-copyright.
1271 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1273 Make it easier to write deterministic tests.
1274 Continues Akim's work from his 2009-06-10 commits.
1275 * src/reader.c (check_and_convert_grammar): Don't add any
1276 symbols after the first symbols_do invocation.
1277 * src/symtab.c (symbols_sorted): New static global.
1278 (user_token_number_redeclaration): Update comments.
1279 (symbol_from_uniqstr): If a new symbol is being created, assert
1280 that symbols_sorted hasn't been allocated yet.
1281 (symbols_free): Free symbols_sorted.
1282 (symbols_cmp, symbols_cmp_qsort): New functions.
1283 (symbols_do): Sort symbol_table into symbols_sorted on first
1285 * tests/input.at (Numbered tokens): Recombine tests now that the
1286 output should be deterministic across multiple numbers.
1288 2009-08-12 Akim Demaille <demaille@gostai.com>
1292 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1294 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1296 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1298 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1300 Miscellaneous code readability improvements.
1302 * src/reader.c (reader): Move %define front-end variable
1303 defaults and checking into...
1304 (prepare_percent_define_front_end_variables): ... this new
1307 * src/scan-gram.l (INITIAL): For consistency with string
1308 literals, don't store open quote on character literal. It's
1309 discarded before returning anyway.
1310 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1311 Make length test more readable, and make the character stored
1312 for an empty literal more obvious while consistent with the
1315 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1316 USER_NUMBER_HAS_STRING_ALIAS throughout.
1317 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1318 that is repeated in symtab.h. Improve argument names to make it
1319 clear which side of the symbol-string alias pair is which.
1320 (symbol_check_alias_consistency): Improve local variable names
1321 for the same purpose.
1322 * src/symtab.h (struct symbol): Make comments about aliases
1324 (symbol_make_alias): Improve comments and argument name.
1325 * src/output.c (token_definitions_output): Update for rename to
1326 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1328 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1330 Convert "misleading reference" messages to warnings.
1331 * src/scan-code.l: New function 'show_sub_messages', more
1333 * tests/named-ref.at: Adjust tests.
1335 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1337 maint: run "make update-copyright"
1339 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1341 maint: make update-b4-copyright easier to use
1342 * build-aux/update-b4-copyright: In warnings, report line
1343 numbers rather than character positions.
1344 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1345 that update-copyright runs it.
1348 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1350 maint: clean up update-b4-copyright code
1351 * build-aux/update-b4-copyright: Do not accept 2-digit
1352 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1353 Don't accept a `[' in a b4_copyright argument.
1354 Format code more consistently.
1355 Don't assume b4*copyright never occurs.
1357 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1359 maint: automate b4_copyright updates.
1360 * Makefile.am (update-b4-copyright): New target rule.
1361 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1362 * build-aux/update-b4-copyright: New.
1363 * data/yacc.c: Remove stray characters around b4_copyright
1366 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1368 maint: automate annual package-wide copyright-year update.
1369 * .x-update-copyright: New.
1370 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1371 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1372 update-copyright. Remove gnumakefile, which is implied by
1373 maintainer-makefile.
1374 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1376 * maint.mk: Remove, now copied from gnulib.
1377 * examples/extexi: Add missing "(C)" in copyright statement so
1378 update-copyright can recognize it.
1379 * src/LR0.h: Likewise.
1380 * src/print.h: Likewise.
1381 * src/print_graph.h: Likewise.
1382 * src/gram.c: Add missing comma in copyright statement.
1383 * src/gram.h: Likewise.
1385 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1387 Fix "make distcheck".
1388 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1391 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1393 Pacify "gcc -Wunused" for the input function from Flex.
1394 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1396 * src/scan-code.l: Add "%option noinput", which I cannot find in
1397 the Flex manual, but which Flex has supported since at least as
1398 far back as 2.5.4. However, if any of our developers still use
1399 Flex 2.5.4, they'll need to stop configuring with
1400 --enable-gcc-warnings because "%option noinput" didn't work
1401 correctly until Flex 2.5.6.
1402 * src/scan-gram.l: Likewise.
1403 * src/scan-skel.l: Likewise.
1405 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1407 Fix --enable-gcc-warnings problems.
1408 * src/reader.c: Adjust variable names.
1409 * src/scan-code.l: Fix prototypes and adjust names.
1410 * src/named-ref.c: Remove redundant "if".
1412 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1414 Fix a --enable-gcc-warnings problem.
1415 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1418 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1420 Fix some memory leaks.
1421 * src/named-ref.c: Add a pointer check (named_ref_free).
1422 * src/scan-code.l: New function (variant_table_free). Called in
1424 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1426 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1428 Warn about character literals not of length one.
1429 * NEWS (2.5): Document.
1430 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1432 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1433 * tests/input.at (Bad character literals): New test group.
1435 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1437 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1439 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1441 Some M4 cleanup in the testsuite.
1442 Suggested by Eric Blake at
1443 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1444 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1445 complicate the code by distinguishing between a missing value
1446 and an empty string value for an optional argument. This fix is
1447 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1448 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1449 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1450 arguments are not needed because of the following changes.
1452 Bison developers should use GNU M4 and should not use
1453 POSIXLY_CORRECT when building the test suite, so do not
1454 complicate the code by avoiding $10 and above.
1455 Do not quote an empty string value for an optional argument, and
1456 do not distinguish between a missing value and an empty string
1459 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1461 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1463 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1465 Revert unnecessary column realignment in --help output.
1466 Reported by Akim Demaille at
1467 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1468 * src/getargs.c (usage): Here.
1470 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1472 Alphabetical order in src/Makefile.am.
1473 * src/Makefile.am: Adjust.
1475 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1477 Style changes and factoring.
1478 * src/named-ref.h: Add comments.
1479 * src/parse-gram.y: Readability and style changes.
1480 * src/reader.c: Factoring: assign_named_ref function.
1481 * src/scan-code.l: Factoring and style changes. Rename
1482 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1483 Use "unsigned" type for variant index. Improve readablity.
1484 * src/scan-gram.l: Change error messages and add comments.
1485 * src/symlist.h: symbol_list_null: New function decl.
1486 * src/symlist.c: symbol_list_null: Implement here.
1487 * tests/named-refs.at: Adjust for new error messages.
1489 2009-06-29 Eric Blake <ebb9@byu.net>
1491 scan-code: avoid compiler warnings
1492 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1494 2009-06-29 Akim Demaille <demaille@gostai.com>
1496 build: avoid concurrent extraction of calc++.
1497 * examples/calc++/Makefile.am (calc.stamp): New.
1498 Depend on it to create the sources of calc++ so that concurrent
1499 builds don't launch several "extexi" in parallel.
1500 Not only this is inefficient, this also builds incorrect sources
1501 with several extractions mixed together.
1503 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1505 Implement support for named symbol references.
1506 * src/parse-gram.y: Add new syntax (named_ref.opt).
1507 * src/reader.c: Store named refs in symbol lists.
1508 * src/reader.h: New argument for symbol_append and
1509 action_append functions.
1510 * src/scan-code.h: Add new field (named_ref) into
1511 code_props data structure. Keeps named ref of midrule
1513 * src/scan-code.l: Support for named refs in semantic
1514 action code. New function 'parse_named_ref'.
1515 * src/scan-gram.l: Support bracketed id.
1516 * src/symlist.c: Store named refs in symbol lists.
1517 * src/symlist.h: New field in symbol list: named_ref.
1518 * src/named-ref.h: New file, a struct for named_ref.
1519 * src/named-ref.cp: New file, named_ref_new function.
1520 * src/local.mk: Add two new files.
1521 * tests/testsuite.at: Include new test group:
1522 * tests/named-refs.at: this new file.
1524 2009-06-25 Akim Demaille <demaille@gostai.com>
1526 hash: check insertion for memory exhaustion.
1527 * src/uniqstr.c (uniqstr_new): New.
1529 2009-06-11 Akim Demaille <demaille@gostai.com>
1532 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1533 * src/print-xml.c: Style changes.
1534 * tests/conflicts.at: Comment changes.
1536 2009-06-11 Akim Demaille <demaille@gostai.com>
1538 xml: beware of user strings used to give a %prec to rules.
1539 * tests/conflicts.at (%prec with user strings): New.
1540 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1543 2009-06-11 Akim Demaille <demaille@gostai.com>
1545 hash: check insertion for memory exhaustion.
1546 * src/muscle-tab.c (muscle_insert, muscle_grow)
1547 * src/state.c (state_hash_insert): Check the return value of
1550 2009-06-10 Akim Demaille <demaille@gostai.com>
1552 deterministic test suite.
1553 Some consistency checks on symbols are performed after all the
1554 symbols were read, by an iteration over the symbol table. This
1555 traversal is nondeterministic, which can be a problem for test
1558 Addresses another form of nondeterminism reported by Joel E. Denny.
1559 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1561 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1563 Use different file names for the three tests to make the
1566 2009-06-10 Akim Demaille <demaille@gostai.com>
1568 deterministic user-token-number redeclaration errors.
1569 Address nondeterminism reported by Joel E. Denny.
1570 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1572 * src/uniqstr.h: Comment changes.
1573 * src/location.h (boundary_cmp, location_cmp): New.
1574 * src/symtab.c (user_token_number_redeclaration): New.
1575 (symbol_translation): Use it.
1576 * tests/input.at (Numbered tokens): Adjust the expected output.
1578 2009-05-25 Akim Demaille <demaille@gostai.com>
1581 * gnulib: Update to latest.
1582 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1583 * m4/.gitignore: Regen.
1584 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1585 Call xalloc_die on hash_insert failures.
1586 Requested by the new __warn_unused_result__ attribute of
1589 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1591 Convert multiple variable definition warnings to complaints.
1592 * NEWS (2.5): Add a new entry for that change.
1593 * doc/bison.texinfo (Decl Summary): Update %define entry.
1594 (Bison Options): Update -D/--define/-F/--force-define entry.
1595 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1596 * src/muscle_tab.h (muscle_percent_define_insert): Update
1598 * tests/input.at (`%define errors'): Update.
1599 (`%define, --define, --force-define'): Update.
1601 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1603 -F/--force-define and relative %define/-D/--define priorities.
1604 * NEWS (2.5): Add documentation to -D/--define entry.
1605 * build-aux/cross-options.pl: Hard-code association of
1606 --force-define with %define.
1607 * doc/bison.texinfo (Decl Summary): In %define entry,
1608 cross-reference command-line options.
1609 (Bison Options): Add documentation to -D/--define entry.
1610 (Option Cross Key): Widen column for --force-define row.
1611 * src/getargs.c (usage): Document -F/--force-define. Realign
1613 (short_options, long_options, getargs): Parse -F/--force-define,
1614 and update muscle_percent_define_insert invocation.
1615 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1616 (muscle_percent_define_insert): Add argument with that type.
1617 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1618 -F/--force-define behavior and priorities.
1619 * src/parse-gram.y (prologue_declaration): Update
1620 muscle_percent_define_insert invocations.
1621 * tests/input.at (`%define, --define'): Rename to...
1622 (`%define, --define, --force-define'): ... this and extend.
1624 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1626 Update some comments to make sense for -D.
1627 * data/bison.m4 (b4_check_user_names): In header comments, say
1628 "user occurrence" instead of "grammar occurrence".
1629 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1630 (muscle_percent_code_grow): Likewise just for consistency.
1632 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1634 * data/c++.m4: Update copyright year.
1636 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1638 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1640 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1642 Handle a trailing `:' in a user-supplied C++ namespace better.
1643 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1644 among the closing braces here. This fix might make the
1645 generated code easier to debug, but otherwise it should be
1646 insignificant because a trailing `:' is a C++ error already.
1648 2009-05-19 Akim Demaille <demaille@gostai.com>
1650 remove useless variable.
1651 * src/getargs.c (skeleton_arg): Remove now useless variable.
1652 Should help the compiler see that this printf-like call is sane.
1654 2009-05-11 Akim Demaille <demaille@gostai.com>
1656 doc: use C++ headers.
1657 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1660 2009-05-05 Akim Demaille <demaille@gostai.com>
1662 fix hexadecimal token number support.
1663 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1665 2009-05-05 Akim Demaille <demaille@gostai.com>
1667 tests: check token numbers.
1668 * tests/input.at (Numbered tokens): New.
1670 2009-05-04 Akim Demaille <demaille@gostai.com>
1672 bison: catch bad symbol names.
1673 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1674 * tests/input.at: Adjust.
1676 2009-05-04 Akim Demaille <demaille@gostai.com>
1679 * src/scan-gram.l: Untabify to be robust to zealous editors.
1681 2009-05-04 Akim Demaille <demaille@gostai.com>
1683 identifiers: dashes are letters.
1684 Dashes can now start identifiers (symbols and directives).
1686 * src/scan-gram.l ({letter}): Add dash.
1688 * tests/input.at (Symbols): Adjust.
1689 Remove stray comment.
1690 * tests/regression.at (Invalid inputs): Adjust error message.
1691 * doc/bison.texinfo (Symbols): Update.
1693 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1695 Declare %code to be a permanent feature.
1696 * NEWS (2.4.2): Here.
1697 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1699 (Decl Summary): Likewise.
1701 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1703 Convert underscores to dashes in some %define variable names.
1704 For now, just api.push-pull and lr.keep-unreachable-states.
1705 Maintain old names for backward compatibility.
1706 * NEWS (2.5): Document.
1707 * data/c.m4 (b4_identification): Update comment.
1708 * data/yacc.c: Update access.
1709 * doc/bison.texinfo: Update.
1710 * etc/bench.pl.in (bench_grammar): Update use.
1711 * src/files.c (tr): Move to...
1712 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1713 think of a better place to expose it. My logic is that, for all
1714 uses of tr so far, command-line arguments can be involved, and
1715 getargs.h is already included.
1716 * src/main.c (main): Update access.
1717 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1718 variable names to new variable names before assigning value.
1719 * src/reader.c (reader): Update setting default.
1720 * tests/calc.at: Update uses.
1721 * tests/conflicts.at (Unreachable States After Conflict
1722 Resolution): Update use.
1723 * tests/input.at (%define enum variables): Update use.
1724 (%define backward compatibility): New test group.
1725 * tests/push.at: Update uses.
1726 * tests/reduce.at: Update uses.
1727 * tests/torture.at: Update uses.
1729 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1731 Set all front-end %define defaults in one place.
1732 * src/main.c (main): Move lr.keep_unreachable_states default...
1733 * src/reader.c (reader): ... to here.
1735 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1737 Rename lr.default_reductions to lr.default-reductions.
1739 * doc/bison.texinfo: Here.
1740 * src/lalr.c (initialize_LA): Here.
1741 * src/print.c (print_reductions): Here.
1742 * src/reader.c (reader): Here.
1743 * src/tables.c (action_row): Here.
1744 * tests/input.at (%define enum variables): Here.
1745 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1747 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1749 Pacify ./configure --enable-gcc-warnings.
1750 * tests/input.at (Symbols): Prototype yyerror and yylex.
1752 2009-04-21 Akim Demaille <demaille@gostai.com>
1754 tests: check the use of dashes and periods in symbols.
1755 * tests/input.at (Symbol): New test group.
1757 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1759 Document how `%define "var" "value"' is not M4-friendly.
1760 * src/parse-gram.y (variable): In comments here.
1762 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1764 Add copyright updates missed during previous cherry pick.
1765 * src/output.c: Here.
1766 * src/parse-gram.y: Here.
1767 * src/scan-gram.l: Here.
1769 2009-04-20 Akim Demaille <demaille@gostai.com>
1771 variables: accept dashes.
1772 * src/scan-gram.l ({id}): Also accept dashes after the initial
1774 ({directive}): Use {id}.
1775 * src/parse-gram.y: Comment and formatting changes.
1776 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1778 * src/complain.h, src/complain.c (yacc_at): New.
1779 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1781 * src/output.c (token_definitions_output): Do not #define token
1784 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1786 Clean up recent patches a little.
1787 Reported by Akim Demaille.
1788 * doc/bison.texinfo (Understanding): Fix typos.
1789 * src/print.c (print_reductions): Don't use negated variable.
1791 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1793 List accepted values for a %define enum variable with an invalid value.
1794 Suggested by Akim Demaille at
1795 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1796 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1797 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1798 * tests/input.at (%define lr.default_reductions invalid values): Merge
1800 (%define enum variables): ... here, and update output.
1802 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1804 Rename "default rule" to "default reduction".
1805 This includes changing variable names in code, changing
1806 comments, and renaming %define lr.default_rules to %define
1807 lr.default_reductions.
1808 * NEWS (2.5): Update IELR documentation.
1809 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1810 Adjust YYDEFACT and yydefact_ documentation.
1811 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1812 and lr.type documentation. Make some other wording
1814 (Glossary): Adjust cross-references and Default Reduction
1816 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1817 Remove a confusing comment pointed out by Akim Demaille.
1818 (initialize_LA): Adjust code.
1819 * src/print-xml.c (print_reductions): Adjust code.
1820 * src/print.c (print_reductions): Adjust code.
1821 * src/reader.c (reader): Adjust code.
1822 * src/tables.c (action_row): Adjust code.
1823 (token_actions): Adjust code.
1824 * src/tables.h: Adjust YYDEFACT documentation.
1825 * tests/input.at (%define lr.default_rules invalid values):
1826 Rename test group to...
1827 (%define lr.default_reductions invalid values): ... this, and
1828 update grammar file and expected output.
1829 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1830 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1832 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1834 Document %define lr.type and lr.default_rules.
1835 * NEWS (2.5): Add an entry.
1836 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1837 besides just LALR(1) and GLR(1).
1838 * doc/bison.texinfo (Introduction): Likewise.
1839 (Language and Grammar): Bison is no longer limited to LALR(1)
1841 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1842 when trying to distinguish from GLR. Talk about LR(1) grammars
1843 rather than LALR(1) grammars.
1844 (Decl Summary): In %define api.push_pull entry, say it applies
1845 to deterministic parsers in C rather than LALR(1) parsers in C.
1846 Add lr.default_rules entry.
1848 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1850 (Generalized LR Parsing): Same changes as for the previous GLR
1852 (Memory Management): Say deterministic rather than LALR(1).
1853 (Understanding): Correct some bison output.
1854 Index discussion of "accepting state".
1855 Say deterministic rather than LALR(1).
1856 (Bison Options): In --yacc entry, say deterministic rather than
1858 In --report, --graph, and --xml entries, just don't mention
1860 (C++ Parsers): Say deterministic rather than LALR(1).
1861 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1862 (Glossary): Add Accepting State, Consistent State, Default Rule,
1863 and IELR(1) definitions.
1864 In Generalized LR (GLR) definition, make same changes as in
1865 previous GLR sections.
1866 In LALR(1) definition, say Bison uses LALR(1) by default rather
1867 than implying Bison is limited to LALR(1).
1868 (LocalWords): Add IELR.
1870 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1872 Finish implementing %define lr.type.
1873 Its value can be "LALR", "IELR", or "canonical LR".
1874 * lib/timevar.def (TV_IELR_PHASE1): New var.
1875 (TV_IELR_PHASE2): New var.
1876 (TV_IELR_PHASE3): New var.
1877 (TV_IELR_PHASE4): New var.
1878 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1879 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1880 Sbitset.h, ielr.h, and ielr.c.
1881 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1882 trace_types): Add trace_ielr.
1883 * src/lalr.h, src/lalr.c (ngotos): Export it.
1885 (goto_follows): ... this, update all uses, and export it.
1886 (set_goto_map): Export it.
1887 (map_goto): Export it.
1888 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1890 (initialize_LA): Export it. Move lookback allocation to...
1891 (lalr): ... here because, for canonical LR, initialize_LA must
1892 be invoked but lookback and much of the rest of LALR isn't
1894 * main.c (main): Instead of lalr, invoke ielr, which invokes
1896 * src/reader.c (reader): Default lr.type to "LALR".
1897 Default lr.default_rules to "accepting" if lr.type is "canonical
1898 LR". Leave the default as "all" otherwise.
1899 Check for a valid lr.type value.
1900 * src/state.h, src/state.c (struct state_list): Add state_list
1902 (state_new): Initialize state_list member to NULL.
1903 (state_new_isocore): New function, exported.
1904 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1905 exercises all values of lr.type.
1906 (GNU AWK Grammar): Rename test group to...
1907 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1908 AT_TEST_EXISTING_GRAMMAR.
1909 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1910 (GNU pic Grammar): Rename test group to...
1911 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1912 AT_TEST_EXISTING_GRAMMAR.
1913 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1914 all values of lr.type.
1915 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1916 (Lane Split): Likewise.
1917 (Complex Lane Split): Likewise.
1918 (Split During Added Lookahead Propagation): Likewise.
1920 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1922 Add new files for IELR and canonical LR implementation.
1923 * src/AnnotationList.c: New.
1924 * src/AnnotationList.h: New.
1925 * src/InadequacyList.c: New.
1926 * src/InadequacyList.h: New.
1927 * src/Sbitset.c: New.
1928 * src/Sbitset.h: New.
1932 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1934 Implement %define lr.default_rules.
1935 Its value describes the states that are permitted to contain
1936 default rules: "all", "consistent", or "accepting".
1937 * src/reader.c (reader): Default lr.default_rules to "all".
1938 Check for a valid lr.default_rules value.
1939 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1940 is "accepting", then only mark the accepting state as
1942 (initialize_LA): Tell state_lookahead_tokens_count whether
1943 lr.default_rules is "accepting".
1944 * src/tables.c (action_row): If lr.default_rules is not "all",
1945 then disable default rules in inconsistent states.
1946 * src/print.c (print_reductions): Use this opportunity to
1947 perform some assertions about whether lr.default_rules was
1949 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1950 helps with checking the parser tables for a grammar.
1951 * tests/input.at (%define lr.default_rules invalid values): New
1953 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1954 AT_TEST_TABLES_AND_PARSE.
1955 (`no %define lr.default_rules'): New test group generated by
1956 AT_TEST_LR_DEFAULT_RULES.
1957 (`%define lr.default_rules "all"'): Likewise.
1958 (`%define lr.default_rules "consistent"'): Likewise.
1959 (`%define lr.default_rules "accepting"'): Likewise.
1961 2009-04-20 Akim Demaille <demaille@gostai.com>
1963 Consistently refer to Yacc, not YACC.
1964 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1966 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1968 Pacify make maintainer-check-posix.
1969 * tests/input.at (%define, --define): Move bison command-line
1970 options before grammar file name.
1972 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1974 Document semicolon warnings.
1977 2008-12-08 Akim Demaille <demaille@gostai.com>
1979 Fix portability issue in the test suite.
1980 * tests/local.at (AT_MATCHES_CHECK): New.
1981 Based on Perl instead of Sed. Sed has too many portability
1982 pitfalls, not ever Sed is GNU Sed.
1983 * tests/actions.at (Fix user actions without a trailing semicolon):
1986 2008-12-07 Di-an Jan <dianj@freeshell.org>
1988 Implement the FIXME that ends an user action with a semicolon
1989 if it seems necessary.
1990 * src/scan-code.l (flex rules section): Flag cpp directive from
1991 any `#' to the first unescaped end-of-line. Semicolon is not
1992 needed after `;', `{', '}', or cpp directives and is needed after
1993 any other token (whitespaces and comments have no effect).
1994 * tests/actions.at (Fix user actions without a trailing semicolon):
1996 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1997 to make user actions complete statements.
1998 Adjust column numbers in error messages.
1999 * tests/regression.at (Fix user actions without a trailing semicolon):
2000 Remove. Covered by new test.
2002 2009-04-14 Akim Demaille <demaille@gostai.com>
2005 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2006 (Table of Symbols): Remove duplicate entry for %debug.
2008 2009-04-10 Eric Blake <ebb9@byu.net>
2010 submodules: update to latest
2011 * submodules/autoconf: Use latest upstream Autoconf.
2013 2009-04-06 Eric Blake <ebb9@byu.net>
2015 Work around autoconf 2.63b bug in testsuite.
2016 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2017 autoconf bug related to # in test.
2019 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2021 * NEWS (2.5): Describe new -D/--define feature.
2023 2008-11-10 Akim Demaille <demaille@gostai.com>
2026 * src/getargs.h, src/getargs.c (trace_muscle): New.
2027 (trace_types, trace_args): Support it.
2028 * src/output.c (output_skeleton): Use it.
2030 2008-11-10 Akim Demaille <demaille@gostai.com>
2033 * src/output.c (muscles_output): New, extracted from...
2034 (output_skeleton): here.
2037 2008-11-21 Akim Demaille <demaille@gostai.com>
2039 Display the changes in cross-options.texi.
2040 * build-aux/cross-options.pl ($sep): New, to separate items.
2041 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2044 2008-11-20 Di-an Jan <dianj@freeshell.org>
2046 Improves options in the manual.
2047 * doc/bison.texinfo (-g, -x): Add space before argument.
2048 (Option Cross Key): Implement FIXME: listing directives also.
2049 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2050 (Short Option): Special case -d. Put arguments inside @option.
2051 (Bison Directive): Add column, automatically extracted from
2052 src/scan-gram.l (actual name passed as the first argument)
2053 with special case for %define.
2054 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2055 to build-aux/cross-options.pl.
2056 * src/getargs.c (usage): Document limitations of cross-options.pl.
2057 * src/scan-gram.l: Likewise.
2059 2009-02-25 Akim Demaille <demaille@gostai.com>
2062 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2064 2008-12-08 Akim Demaille <demaille@gostai.com>
2066 Install autoconf as a submodule to get m4sugar.
2067 * .gitmodules: Add submodules/autoconf.
2068 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2069 submodules/autoconf.
2071 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2073 Simplify last patch slightly.
2074 * src/getargs.c (getargs): Here.
2076 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2078 Fix last warning from --enable-gcc-warnings.
2079 * src/getargs.c (getargs): Don't assign const address to non-const
2082 2008-11-17 Di-an Jan <dianj@freeshell.org>
2084 Handle --enable-gcc-warnings.
2085 * src/getargs.c (command_line_location): Set parameters to void.
2087 2008-11-11 Akim Demaille <demaille@gostai.com>
2090 * tests/actions.at, tests/regression.at: Use it.
2092 2008-11-07 Akim Demaille <demaille@gostai.com>
2094 Pass command line location to skeleton_arg and language_argmatch.
2095 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2096 The location argument is now mandatory.
2097 Adjust all dependencies.
2098 (getargs): Use command_line_location.
2100 2008-11-07 Akim Demaille <demaille@gostai.com>
2103 * src/getargs.c (usage): Document -D.
2104 Fix help string for --locations.
2105 (command_line_location): New.
2106 (short_options, long_options, getargs): Support -D, --define.
2107 (getargs): Move -d support at the right place.
2108 * doc/bison.texinfo (Bison Options): Update.
2109 * tests/input.at (%define, --define): New.
2111 2008-11-07 Akim Demaille <demaille@gostai.com>
2113 Initialize the muscle table before parsing the command line.
2114 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2115 (getargs): Define file_name.
2116 * src/main.c (main): Initialize muscle_tab before calling
2118 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2119 its value is not available yet.
2121 2008-11-09 Akim Demaille <demaille@gostai.com>
2123 Require the generation of parse-gram.output.
2124 * src/Makefile.am (YACC): Pass --report=all.
2126 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2128 * NEWS (2.5): New stub.
2130 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2132 Fix options documentation.
2133 * build-aux/cross-options.pl: As in --help output, write optional
2134 arguments as [=ARG] not =[ARG].
2135 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2137 2008-11-07 Akim Demaille <demaille@gostai.com>
2140 * src/getargs.c (usage): Fix help string for -W.
2142 2008-11-07 Akim Demaille <demaille@gostai.com>
2144 Handle more general types of option arguments.
2145 * build-aux/cross-options.pl: The argument ends at the first
2146 space, not the first non-symbol character.
2147 Use @var for each word appearing the argument description.
2149 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2151 Remove spurious initial empty lines.
2152 * data/location.cc: End the @output lines with an @.
2154 2008-11-04 Akim Demaille <demaille@gostai.com>
2156 Remove spurious initial empty lines.
2157 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2158 * data/yacc.c: End the @output lines with an @.
2160 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2162 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2163 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2164 requirements for a correct m4 are stricter.
2165 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2166 * configure.ac: Update to use AC_PROG_GNU_M4.
2167 Reported by Eric Blake.
2169 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2171 Help with updating web manual.
2172 * HACKING: Incorporate instructions from gnulib/doc/README.
2173 * bootstrap.conf (gnulib_modules): Add gendocs.
2175 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2177 Fix strange %define locations for default values.
2178 Reported by Akim Demaille at
2179 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2180 and discussed again starting at
2181 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2182 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2183 because location information is bogus.
2184 Use angle brackets to delimit fake file name because square brackets
2185 look like underexpanded m4. Choose a better fake file name.
2186 Use negative line numbers.
2187 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2188 * src/location.c (location_print): If line for a boundary is negative,
2189 only print that boundary's file name.
2190 * src/location.h: Document that.
2191 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2192 defaults): Update output.
2194 2008-11-07 Akim Demaille <demaille@gostai.com>
2196 Locations without columns for command line arguments.
2197 * src/location.c (location_print): Don't display negative columns.
2198 * src/location.h: Document this.
2200 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2202 Add reminder about uploading public key to keys.gnupg.net.
2203 * HACKING (Release Procedure): Here.
2205 2009-03-31 Akim Demaille <demaille@gostai.com>
2207 bootstrap: --help to stdout.
2208 * bootstrap (usage): Don't send --help to stderr.
2209 Use a here doc instead of a long string.
2211 2009-03-31 Akim Demaille <demaille@gostai.com>
2213 bootstrap: README-hacking no longer exists
2214 * bootstrap (checkout_only_file): Set to HACKING.
2216 2009-03-26 Akim Demaille <demaille@gostai.com>
2218 doc: merge HACKING and README-hacking.
2219 Two files is confusing.
2220 Reported by Alexandre Duret-Lutz.
2222 * README-hacking: Merge into...
2223 * HACKING (Working from the repository): here.
2225 2009-03-26 Akim Demaille <demaille@gostai.com>
2227 doc: update README-hacking.
2228 * README-hacking: We now use git and git submodules.
2229 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2231 2009-03-26 Akim Demaille <demaille@gostai.com>
2233 lalr1.cc: avoid GCC 4.3 warnings.
2234 GCC 4.3 now warns about "a || b && c" and asks for explicit
2236 Reported by Alexandre Duret-Lutz.
2237 * data/location.cc: Update copyright years.
2238 (Position::operator==): Use parens to make precedence explicit.
2239 Compare lines and columns first, as they are more likely to be
2240 different, and they are faster to compare.
2242 2009-03-26 Akim Demaille <demaille@gostai.com>
2245 * gnulib: Update to latest.
2246 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2249 2009-01-08 Akim Demaille <demaille@gostai.com>
2251 Fix grep portability issues.
2252 Grep on Solaris does not support -q.
2253 Reported by Summum Bonum.
2255 * NEWS: Add a stub for 2.4.2.
2256 * THANKS: Add Summum Bonum.
2257 * tests/atlocal.in (EGREP): New.
2258 (CC, CXX, XSLTPROC): Make it possible to override them via
2260 * tests/java.at: Use $EGREP instead of egrep.
2261 Use AT_CHECK's ignore instead of grep's -q.
2263 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2266 * NEWS: Set version and date.
2267 * lib/Makefile.am: Update copyright year.
2268 * tests/atlocal.in: Update copyright year.
2270 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2272 Semicolon feature removal is not about future language support.
2273 * NEWS: The semicolon feature is no longer active for newer languages,
2274 so don't claim that it causes trouble for them.
2276 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2278 * gnulib: Update submodule to HEAD.
2280 2008-12-09 Akim Demaille <demaille@gostai.com>
2283 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2285 2008-12-05 Eric Blake <ebb9@byu.net>
2287 Build testsuite with newer autoconf.
2288 * tests/output.at (m4_expand): Don't override in newer autoconf,
2289 where the underlying implementation changed.
2290 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2291 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2292 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2293 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2294 since some of them contain unbalanced ')'.
2296 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2298 * NEWS: Clarify a little.
2300 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2302 * NEWS: Update for recent changes.
2304 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2306 Fix unexpanded macros in GLR defines file.
2307 Reported by Csaba Raduly at
2308 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2309 * THANKS (Csaba Raduly): Add.
2310 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2311 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2312 lexer in a separate module that includes the defines file.
2313 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2315 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2316 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2317 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2318 (AT_DATA_SOURCE_PROLOGUE): New.
2319 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2320 (AT_DATA_SOURCE): New.
2321 (AT_FULL_COMPILE): New, copied from master branch and extended to
2322 support an additional source file.
2324 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2326 Don't let maintainer-*-check targets force a version update.
2327 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2330 2008-11-17 Di-an Jan <dianj@freeshell.org>
2332 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2333 Align menus. Adjust word wrapping. Use node names for menu names.
2334 (Examples): Don't abbreviate node names.
2335 (LocalWords): Remove abbreviations.
2336 (Copying): Make description a sentence.
2337 (Java Action Features): Remove period to match the rest of menu.
2339 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2341 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2342 * configure.ac: Adjust usage.
2343 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2344 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2345 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2347 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2349 Don't add a semicolon to actions for %skeleton or %language.
2350 It breaks Java test cases as reported by Akim Demaille.
2351 * src/scan-code.l: Implement.
2353 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2355 Clean up %skeleton and %language priority implementation.
2356 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2357 remove static qualifier because others will soon need to see it.
2358 (language_prio): Likewise.
2359 (getargs): Use command_line_prio rather than 0.
2360 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2362 (skeleton_prio): Extern it.
2363 (language_prio): Extern it.
2364 * src/parse-gram.y: Use grammar_prio rather than 1.
2366 2008-11-04 Akim Demaille <demaille@gostai.com>
2368 * NEWS: Mention the trailing semicolon in action.
2370 2008-11-04 Akim Demaille <demaille@gostai.com>
2373 * NEWS: Use more outline-mode markup.
2374 Suggested by Jim Meyering.
2376 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2378 Fix user actions without a trailing semicolon.
2379 Reported by Sergei Steshenko at
2380 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2381 * THANKS (Sergei Steshenko): Add.
2382 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2383 * tests/regression.at (Fix user actions without a trailing semicolon):
2386 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2388 Initiate further development.
2389 * NEWS: Create an empty section for new entries.
2390 * gnulib: Update submodule to HEAD.
2392 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2394 * NEWS: Version 2.4.
2396 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2398 Prepare for next release.
2399 * NEWS: Briefly mention changes since 2.3b.
2400 * README: Say GNU m4 1.4.6, which we've been requiring in release
2401 announcements already, not 1.4.3, which breaks the build.
2403 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2405 Say %language is experimental.
2406 We're thinking of extending it's effect on output file naming. See the
2408 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2409 * NEWS: Say it's experimental.
2410 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2411 recommend it over %skeleton for now.
2412 (Bison Options): Likewise.
2413 (C++ Bison Interface): Use %skeleton not %language.
2414 (Calc++ Parser): Use %skeleton not %language.
2415 * src/getargs.c (usage): Say it's experimental.
2417 2008-11-01 Di-an Jan <dianj@freeshell.org>
2418 Paolo Bonzini <bonzini@gnu.org>
2420 Support all Java parser class modifiers.
2421 * data/java.m4 (b4_percent_define_get3): New.
2422 (b4_final_if, b4_strictfp_if): New.
2423 * data/lalr1.java (final, strictfp, extends, implements): Support.
2424 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2426 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2427 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2428 (AT_CHECK_JAVA_GREP): New.
2429 (Java parser class modifiers): New test.
2430 (Java parser class extends and implements): New test.
2432 Model exception propagation better with throws and lex_throws.
2433 * data/java.m4 (b4_list2): New.
2434 (throws): Change default.
2435 * data/lalr1.java (yyaction): Add throws.
2436 (parse): Add lex_throws in addition to throws.
2437 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2438 * tests/java.at (Java throws specifications): New test.
2440 Improve documentation for Java parsers.
2441 * doc/bison.texinfo (Java Parsers): Add subsections.
2442 Don't quote first argument of %define.
2443 (Java Bison Interface): Document output files. Move documentation
2444 of parser class and merge into Java Parser Interface. Document
2445 features that error out. Document directives with no effect.
2446 Move note about Javadoc higher.
2447 (Java Semantic Values): Explicitly mention stype.
2448 Document that generic types cannot be used.
2449 (Java Location Values): Use @deftypeivar. Document constructors.
2450 Correct return value for toString.
2451 (Java Parser Interface): List undocumented constants/fields.
2452 Move documentation of fields added by %parse-param closer to list
2453 of members. Document that token names are added as fields.
2454 Document constructors accurately. Remove error method.
2455 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2456 Interface. Describe %code lexer and yylex accutately.
2457 Remove documentation that does not match the code.
2458 (Java Action Features): New.
2459 (Java Differences): Add reference. Add item on semantic values.
2460 Add note about @{ ... @}. Clarify %% epilogue placement.
2461 (Java Declarations Summary): New.
2464 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2465 (b4_remove_comma): Quote test argument.
2466 (b4_identification): Remove "bison" field.
2467 * tests/java.at (Java parser class and package names): New test.
2468 (Java %parse-param and %lex-param): New test.
2469 (Java stype, position_class and location_class): New test.
2471 2008-10-31 Di-an Jan <dianj@freeshell.org>
2473 * data/lalr1.jave: Update copyright years.
2474 (YYParser): Correct name of "generated from" file in Javadoc:
2475 use b4_file_name instead of @ofile@.
2476 (Location constructor): Correct Javadoc parameter name.
2477 (yylloc): Add missing opening m4 quote after b4_location_if.
2478 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2479 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2480 (YYParser constructor): Correct Javadoc parameter name.
2482 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2484 Always put auxiliary code files in the same dir as other output files.
2485 * src/files.c (compute_file_name_parts): When the user specifies
2486 --output but not --file-prefix, extract the directory prefix from the
2487 file prefix not from the grammar file name. This affects the location
2488 of files like location.hh generated by the C++ skeleton. The includes
2489 in the other output files require this fix.
2490 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2491 for expected output files.
2492 (Output files): Add a test for the above.
2494 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2496 * gnulib: Update submodule to HEAD.
2498 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2500 Update copyright year.
2501 * src/files.c: Here.
2503 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2505 Don't overwrite the input file.
2506 * src/files.c (output_file_name_check): Fatal error if using input file
2508 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2510 (Conflicting output files): Add test.
2512 2008-10-28 Akim Demaille <demaille@gostai.com>
2515 * data/lalr1.cc: Formatting changes.
2517 2008-10-28 Akim Demaille <demaille@gostai.com>
2519 Don't define debugging functions when !YYDEBUG.
2520 * data/lalr1.cc (debug_stream, set_debug_stream)
2521 (debug_level_type, debug_level, set_debug_level): Don't
2522 declare them when YYDEBUG is not defined.
2523 The implementation are already YYDEBUG-aware.
2525 2008-10-28 Akim Demaille <demaille@gostai.com>
2527 Prefer "continue" for empty loop bodies.
2528 * etc/bench.pl.in: Use "continue" instead of {}.
2530 2008-10-28 Akim Demaille <demaille@gostai.com>
2532 Space and comments changes.
2533 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2534 * data/c.m4, data/lalr1.cc: Space changes.
2536 2008-10-28 Akim Demaille <demaille@gostai.com>
2538 Make gnulib a submodule.
2540 * .gitmodules (gnulib): New.
2542 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2544 Fix yyerror_range for user-defined location type in C++. Reported by
2546 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2547 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2548 * THANKS (Georg Sauthoff): Add.
2550 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2552 Update several administrative files mainly to facilitate releasing.
2553 * HACKING (Administrivia): Make the git-merge-changelog notes more
2555 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2556 (Release Procedure): Update for git and add numerous details that were
2558 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2559 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2560 that announcements don't claim we bootstrapped with whatever bison
2561 happened to be in PATH. Add flex as a bootstrap tool.
2562 * Makefile.maint: Remove, previously replaced by maint.mk.
2563 * Makefile.cfg: Remove, and migrate settings to...
2564 * cfg.mk: ... here for the sake of `make announcement'.
2565 * bootstrap.conf (gnulib_modules): Add announce-gen.
2566 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2569 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2571 Small but important bugfixes for the Java skeleton.
2572 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2573 (yy_symbol_print): Call toString on yyvaluep.
2575 2008-08-29 Akim Demaille <demaille@gostai.com>
2577 Clarify UPDATED use.
2578 * doc/bison.texinfo: It refers to the last edition of this file,
2579 not to the release date of Bison.
2580 Reported by Joel E. Denny.
2582 2008-08-29 Akim Demaille <demaille@gostai.com>
2584 * README: Update FAQ pointer.
2585 Reported by Joel E. Denny.
2587 2008-08-27 Eric Blake <ebb9@byu.net>
2589 Resync m4sugar from autoconf.
2590 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2591 (m4_init): Adjust to latest m4.git changes.
2592 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2594 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2595 (_m4_list_cmp): Reduce side effects.
2597 2008-08-27 Akim Demaille <demaille@gostai.com>
2599 Check yyerrok in calc.at.
2600 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2601 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2604 2008-08-27 Akim Demaille <demaille@gostai.com>
2606 Support yyerrok in lalr1.cc.
2607 YYBACKUP is still to import back into lalr1.cc.
2608 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2610 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2612 For maintainer-check*, don't recompile for a $(VERSION) update.
2614 (_is-dist-target): Override the one in GNUmakefile.
2615 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2617 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2619 Update for recent change to gnulib.
2620 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2623 2008-08-15 Eric Blake <ebb9@byu.net>
2625 Remaining m4sugar merge from autoconf.
2626 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2627 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2628 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2629 * src/output.c (output_skeleton): Tell m4 how to find it.
2631 Partial m4sugar merge from autoconf: m4_map.
2632 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2633 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2634 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2635 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2637 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2639 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2642 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2644 Keep .version and PACKAGE_VERSION in sync.
2645 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2646 dependency, and add comments justifying this in more detail. Discussed
2648 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2650 2008-08-06 Eric Blake <ebb9@byu.net>
2652 Partial m4sugar merge from autoconf: m4_shiftn.
2653 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2654 (m4_shift2, m4_shift3): New macros.
2655 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2656 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2657 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2658 * data/java.m4 (b4_remove_comma): Likewise.
2660 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2661 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2662 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2663 (m4_init): Consolidate wrapped text into single m4_wrap.
2664 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2667 2008-08-05 Eric Blake <ebb9@byu.net>
2669 Partial m4sugar merge from autoconf: builtins, version.m4.
2670 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2671 (m4_prepend): Remove, as it is unused and inherently quadratic,
2672 whereas m4_append is linear in newer m4.
2673 (m4_mkstemp): New builtin.
2674 (m4_symbols): Make rename conditional.
2675 (m4_version_prereq): Ensure fatal error if used in bison, which
2676 intentionally lacks version.m4.
2678 Fix comments in m4sugar.
2679 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2681 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2683 Update for recent .gitignore fix in Gnulib.
2684 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2685 anchored .gitignore entries.
2687 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2689 Set gnu or gnits strictness.
2690 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2691 development and gnits strictness for releases. Based on Eric Blake's
2693 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2695 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2697 * NEWS: Clarify documentation of %language.
2699 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2701 Support usage of git-merge-changelog.
2702 * .gitattributes: New.
2703 * HACKING: Document usage of git-merge-changelog.
2704 * bootstrap: Install git-merge-changelog entries in .git/config
2707 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2709 Remove remaining dependence on CVS Id keyword.
2710 * ChangeLog: For the sake of people still using CVS, don't use dollars
2712 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2714 * data/xslt/xml2dot.xsl: Likewise.
2715 * data/xslt/xml2text.xsl: Likewise.
2716 * data/xslt/xml2xhtml.xsl: Likewise.
2717 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2718 * doc/Makefile.am (neutralize): Remove, no longer needed.
2719 (.x.1): Don't use neutralize.
2720 (edit): Don't substitute for ID.
2721 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2723 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2725 Fix dependence on computed configure variables.
2726 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2727 $(top_srcdir)/configure.ac so that changes to computed variables, such
2728 as PACKAGE_VERSION, are seen.
2729 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2731 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2733 Update copyright dates for recent changes.
2734 * Makefile.am: Here.
2735 * src/Makefile.am: Here.
2736 * src/reduce.c: Here.
2737 * tests/reduce.at: Here.
2739 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2741 Use git-version-gen for version names between releases.
2742 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2743 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2744 * .prev-version: New.
2745 * .version.in: Remove.
2746 * ChangeLog: Remove the Id previously used for capturing the CVS
2748 * GNUmakefile: Remove, now copied from Gnulib.
2749 * Makefile.am: Add code suggested by comments in
2750 build-aux/git-version-gen.
2751 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2752 .prev-version, and .version.
2753 * NEWS (2.3b+): Rename to...
2754 (?.?): ... this because we're dropping the "+" version naming scheme,
2755 but, in general, we still can't be sure of our next release name.
2756 * bootstrap: Add a quick hack to remove from .gitignore the
2757 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2758 entry. This should really be fixed in gnulib instead.
2759 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2760 * configure.ac (AC_INIT): Set version name by invoking
2761 build-aux/git-version-gen.
2762 (AC_CONFIG_FILES): Remove .version, now generated by
2763 build-aux/git-version-gen.
2764 * maint.mk: New, copied from coreutils.
2765 * doc/.cvsignore (bison.1): Add.
2766 * doc/.gitignore (/bison.1): Add.
2767 * doc/bison.1: Remove, generated.
2768 * src/.cvsignore (revision.c): Remove.
2769 * src/.gitignore (/revision.c): Remove.
2770 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2771 (BUILT_SOURCES): Remove revision.c.
2772 (revision.c): Remove.
2773 * src/getargs.c (version): Don't print revision after the VERSION.
2774 * src/revision.h: Remove.
2776 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2778 Fix untranslatable composition of sentences. Reported by Goran
2780 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2781 * THANKS (Goran Uddeborg): Add.
2782 * src/reduce.c (reduce_print): Report the number of nonterminals and
2783 rules useless in the grammar in separate sentences.
2784 * tests/reduce.at (Useless Rules): Update output.
2785 (Reduced Automaton): Likewise.
2786 (Underivable Rules): Likewise.
2787 (Empty Language): Likewise.
2789 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2791 Fix some .gitignore and .cvsignore problems.
2792 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2793 (insert_vc_ignore): ... this new function, which prepends `/' to all
2794 .gitignore entries before passing them to insert_sorted_if_absent.
2795 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2796 .cvsignore files are maintained even though Bison developers run
2797 bootstrap while using Git.
2798 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2801 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2802 unneeded. Reported by Eric Blake.
2803 * lib/.gitignore (/*~): Add.
2804 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2805 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2807 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2809 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2811 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2812 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2813 * bootstrap.conf (gnulib_modules): Add unsetenv.
2814 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2815 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2817 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2818 the first argument because it may become position-dependent, and unset
2819 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2820 Add comments explaining these issues in more detail.
2822 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2824 Add .gitignore everywhere based on .cvsignore.
2826 * build-aux/.gitignore: New.
2827 * data/.gitignore: New.
2828 * doc/.gitignore: New.
2829 * etc/.gitignore: New.
2830 * examples/.gitignore: New.
2831 * examples/calc++/.gitignore: New.
2832 * lib/.gitignore: New.
2833 * m4/.gitignore: New.
2834 * po/.gitignore: New.
2835 * runtime-po/.gitignore: New.
2836 * src/.gitignore: New.
2837 * tests/.gitignore: New.
2839 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2841 * NEWS (2.3b+): New section, empty for now.
2842 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2844 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2846 * NEWS (2.3b): Update release date since there has been a delay in
2847 getting the announcements and tarballs out.
2849 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2851 * NEWS: Version 2.3b.
2852 * configure.ac (AC_INIT): Likewise.
2853 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2855 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2857 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2858 been doing it for years.
2859 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2860 (Release Procedure): Add FIXME about make alpha being unmaintained.
2862 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2864 * data/yacc.c: Reformat m4 a little for readability.
2865 * src/lalr.c (build_relations): Correct comment.
2867 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2869 DJGPP specific issue.
2870 * djgpp/config.sed: Fixes required to run configure scripts generated
2873 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2875 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2876 coordinator@translationproject.org.
2878 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2880 * THANKS: Add Eric Blake.
2882 2008-04-23 Eric Blake <ebb9@byu.net>
2884 Revert prior patch, by working around autoconf regression.
2885 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2886 ("Output file name: ("): Uncomment test.
2887 ("Output file name: )"): Likewise.
2888 Based on an idea from Noah Misch.
2890 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2892 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2893 2.61. Reported by Juan Manuel Guerrero at
2894 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2895 * tests/output.at ("Output file name: ("): Comment out test case for
2897 ("Output file name: )"): Likewise.
2899 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2901 * GNUmakefile: Update git-version-gen invocation so make dist
2904 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2906 Update to the current gnulib CVS repository, and fix trigraph handling
2908 * bootstrap: Update gnulib CVS repository URL.
2909 (symlink_to_dir): Encapsulate the code that guarantees the destination
2910 directory exists into...
2911 (check_dst_dir): ... this new function, and...
2912 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2913 fail when copying files into lib/uniwidth/.
2914 * src/output.c (prepare_symbols): When writing yytname muscles, where
2915 symbol names will be encoded in C-string literals, tell quotearg to
2916 escape trigraphs. This used to be the default in gnulib.
2917 * tests/regression.at (Token definitions): Because of the change in
2918 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2919 escapes trigraphs in symbol names. Thus, yytname no longer has
2920 trigraphs unnecessarily doubly escaped. Update test case output.
2921 Extend test case to be sure Bison's own error messages will no longer
2922 have trigraphs in symbol names unnecessarily escaped once.
2924 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2926 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2927 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2928 * .cvsignore: Add .version.
2930 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2931 * configure.ac (AC_CONFIG_FILES): Add .version.
2932 * build-aux/.cvsignore: Add git-version-gen.
2934 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2936 * NEWS (2.3a+): Mention that -g now takes an argument.
2937 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2938 consistency. Update the -g and -x entries now that they take
2939 arguments. Use brackets to indicate optional arguments.
2940 * src/getargs.c (usage): Explain the relationship between arguments of
2941 long and short options more completely. Document --defines and -d
2942 separately since the former takes an argument but, for POSIX Yacc, the
2944 (short_options): Let -W take an optional argument like --warnings.
2945 (getargs): Sort cases.
2947 2008-02-28 Akim Demaille <demaille@gostai.com>
2949 * doc/bison.texinfo: Fix a few typos.
2951 2008-02-28 Akim Demaille <akim@epita.fr>
2953 * doc/bison.texinfo (Bison Options): Document -W.
2954 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2956 2008-02-28 Akim Demaille <akim@epita.fr>
2958 * src/getargs.c (short_options): Split and sort for readability.
2959 -g and -x take optional arguments, just like their long options.
2960 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2962 Fix the handling of $opt which resulted in all the argument to be
2963 considered as optional.
2965 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2967 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2968 say its interface is experimental.
2969 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2971 (Bison Options): In the -L and --language entry, mention Java.
2972 (Java Bison Interface): Say the interface is experimental.
2973 * src/getargs.c (usage): Mention -L and --language.
2975 * NEWS (2.3a+): Say the push parsing interface is experimental.
2976 * doc/bison.texinfo (Push Decl): Likewise.
2977 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2978 (Push Parser Function): Likewise.
2979 (Pull Parser Function): Likewise.
2980 (Parser Create Function): Likewise.
2981 (Parser Delete Function): Likewise.
2982 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2983 yypull_parse, and yypush_parse entries.
2985 * NEWS (2.3a+): Mention XML support, and say the schema is
2987 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2988 * src/getargs.c (usage): Say the XML schema is experimental.
2990 * NEWS (2.3a+): Say option instead of flag.
2992 2008-02-21 Wojciech Polak <polak@gnu.org>
2994 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2997 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2999 Fix impure push parser compile error reported by Bob Rossi at
3000 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3001 * data/yacc.c: Clean up whitespace in the output a little.
3002 (yypstate_allocated): Define for impure push parsers regardless of
3003 whether the pull interface is also requested.
3004 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3005 check impure push parsers without the pull interface.
3007 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3008 yyerror takes arguments specified by %parse-param while yypstate_new
3010 * doc/bison.texinfo (Parser Create Function): Document that
3011 yypstate_new returns 0 for multiple impure parser instances.
3012 * tests/push.at (Push Parsing: Multiple impure instances): Update
3013 expected stderr output.
3015 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3017 * runtime-po/POTFILES.in (push.c): Remove.
3019 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3021 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3022 * data/push.c: Rename to...
3023 * data/yacc.c: ... this, overwriting it.
3024 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3025 `%push-pull-parser' -> `%define api.push_pull "both"'.
3026 Remove old yacc.c tests, and update push.c tests to yacc.c.
3028 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3030 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3031 `"%code top" blocks' instead of `%code "top" blocks'.
3032 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3033 Clean up whitespace in the output a little.
3035 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3037 Fix documentation problems reported by Tim Josling at
3038 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3039 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3040 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3041 integers. Explain the effect of literal string aliases on error
3042 messages. Copy token 0 documentation from the C++ skeleton
3045 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3047 Accept a token number in a %left, %right, or %nonassoc for POSIX
3048 conformance. Reported by Tim Josling at
3049 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3050 * NEWS (2.3a+): Mention.
3051 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3052 and code numbers are treated by precedence declarations.
3053 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3055 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3057 (symbol.prec): New, just like symbol but allows INT.
3058 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3060 * tests/regression.at (Token number in precedence declaration): New
3063 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3065 DJGPP specific issues.
3066 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3067 be changed. Copyright timestamp adjusted.
3068 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3069 be changed. Copyright timestamp adjusted.
3070 * djgpp/config.site: Copyright timestamp adjusted.
3071 * djgpp/config_h.sed: Copyright timestamp adjusted.
3072 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3073 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3074 filename translation list.
3075 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3076 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3077 files shall be created. Before trying to use the temp dir where the
3078 environment variable points to check that the dir really exists. If
3079 not default to the cwd as temp dir. Copyright timestamp adjusted.
3080 * djgpp/subpipe.h: Copyright timestamp adjusted.
3081 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3083 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3085 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3087 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3089 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3090 Problem reported by Claudio Saavedra in
3091 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3093 2008-01-05 Wojciech Polak <polak@gnu.org>
3095 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3096 document's title with the input grammar file name.
3098 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3100 Automate regression testing of the XML/XSLT implementation. Discussed
3102 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3103 * configure.ac (XSLTPROC): New substitution.
3104 * Makefile.am (maintainer-xml-check): New phony target invoking...
3105 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3106 invoking make maintainer-check with BISON_TEST_XML=1.
3107 * tests/atlocal.in (XSLTPROC): New.
3108 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3109 not to report reachable memory when Bison is expected to have a
3110 non-zero exit status and (2) to compare XML/XSLT output with --graph
3111 and --report=all output for every working grammar when
3113 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3114 (AT_BISON_CHECK_XML): New.
3115 (AT_QUELL_VALGRIND): New.
3116 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3117 (AT_CHECK): ... don't redefine this since this was the old way to
3119 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3120 AT_BISON_CHECK invocations.
3121 * tests/c++.at: Likewise.
3122 * tests/calc.at: Likewise.
3123 * tests/conflicts.at: Likewise.
3124 * tests/cxx-type.at: Likewise.
3125 * tests/existing.at: Likewise.
3126 * tests/glr-regression.at: Likewise.
3127 * tests/headers.at: Likewise.
3128 * tests/input.at: Likewise.
3129 * tests/java.at: Likewise.
3130 * tests/output.at: Likewise.
3131 * tests/push.at: Likewise.
3132 * tests/reduce.at: Likewise.
3133 * tests/regression.at: Likewise.
3134 * tests/sets.at: Likewise.
3135 * tests/skeletons.at: Likewise.
3136 * tests/synclines.at: Likewise.
3137 * tests/torture.at: Likewise.
3138 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3139 tends to hang xsltproc.
3140 (Big horizontal): Likewise.
3142 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3144 In XML output, remove redundant class attribute on symbol element.
3145 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3146 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3147 look up a symbol to determine whether it's a nonterminal or terminal.
3148 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3149 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3151 Add prec/assoc information to XML output.
3152 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3153 %prec, add a percent_prec attribute.
3154 * src/print-xml.c (print_grammar): For each terminal that has a
3155 precedence or associativity, add a prec or assoc attribute.
3157 (xml_puts): Use xml_indent.
3158 (xml_printf): Use xml_indent.
3159 * src/print-xml.h (xml_indent): Prototype.
3161 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3162 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3164 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3166 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3167 (bison:ruleByNumber): ... this for clarity.
3168 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3169 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3170 (xsl:template match="reduction"): Update.
3171 (xsl:template match="item"): Update.
3172 (xsl:template match="reduction"): Update.
3174 In the XML output, don't print the list of rules where symbols appear.
3175 Compute it in XSLT instead. Discussed at
3176 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3177 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3178 (bison:ruleByRhs): New.
3179 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3181 (xsl:template match="terminal/rule"): Remove.
3182 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3184 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3186 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3187 bison:ruleByRhs and mode="number-link" for rule template.
3188 (xsl:template match="terminal/rule"): Remove.
3189 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3190 bison:ruleByRhs and mode="number-link" for rule template.
3191 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3193 (xsl:template match="rule" mode="number-link"): ... this.
3194 * src/print-xml.c (print_grammar): Don't print the list of rules.
3196 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3198 Don't let --report affect XML output; always print all information.
3200 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3201 * src/conflicts.c (log_resolution): Implement.
3202 * src/print-xml.c (print_core): Implement.
3203 (print_state): Implement.
3204 (print_xml): Implement.
3206 * NEWS (2.3a+): Fix quotes.
3207 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3208 don't let %verbose clear the list specified by --report.
3210 2007-11-26 Akim Demaille <akim@epita.fr>
3212 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3214 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3216 In the XML output, list useless and unused symbols and rules with the
3217 useful ones and add a "usefulness" attribute. Discussed starting at
3218 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3219 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3220 (grammar_rules_print_xml): Print all rules instead of just those
3221 useful in the grammar, and add a "usefulness" attribute.
3222 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3223 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3224 (print_grammar): Print all nonterminals instead of just useful ones,
3225 and add a "usefulness" attribute to nonterminals and terminals.
3226 (print_xml): Don't print a separate "reductions" or
3227 "rules-useless-in-parser" element.
3228 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3229 (reduce_xml): Remove.
3230 (reduce_token_unused_in_grammar): New.
3231 (reduce_nonterminal_useless_in_grammar): New.
3232 * src/reduce.h (reduce_xml): Remove prototype.
3233 (reduce_token_unused_in_grammar): Add prototype.
3234 (reduce_nonterminal_useless_in_grammar): Add prototype.
3235 * data/xslt/xml2text.xsl: Update for XML changes.
3236 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3237 * tests/reduce.at (Useless Terminals): Update output.
3238 (Useless Rules): Update output.
3239 (Reduced Automaton): Update output.
3241 Say "Terminals unused in grammar" instead of "Unused terminals".
3242 * NEWS (2.3a+): Update.
3243 * doc/bison.texinfo (Understanding): Update example output.
3244 * src/reduce.c (reduce_output): Implement.
3245 * data/xslt/xml2text.xsl: Implement.
3246 * data/xslt/xml2xhtml.xsl: Implement.
3248 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3250 Accept --report-file=FILE to override the default `.output' filename.
3251 * NEWS (2.3a+): Mention.
3252 * doc/bison.texinfo (Bison Options): Add an entry.
3253 * src/files.c (compute_output_file_names): Don't override
3254 spec_verbose_file if already set.
3255 * src/getargs.c (usage): Document --report-file.
3256 (REPORT_FILE_OPTION): New anonymous enum member.
3257 (long_options): Add entry for it.
3258 (getargs): Add case for it setting spec_verbose_file.
3260 * build-aux/cross-options.pl: Don't record a short option just because
3262 * doc/.cvsignore: Add yacc.1.
3264 2007-11-14 Akim Demaille <akim@epita.fr>
3266 * doc/yacc.1.in: New.
3267 * configure.ac, doc/Makefile.am: Adjust.
3268 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3270 Use AC_SUBST for assignments too.
3271 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3273 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3275 * src/gram.c: Remove comments that duplicate comments in gram.h.
3277 When reporting useless rules and nonterminals, say "useless in grammar"
3278 instead of "useless", and say "useless in parser" instead of "never
3279 reduced". Discussed starting at
3280 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3281 * NEWS (2.3a+): Mention this change.
3282 * data/xslt/xml2text.xsl: Update output text and expected input XML
3283 element names to match changes below.
3284 * data/xslt/xml2xhtml.xsl: Likewise.
3285 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3286 Contents: "Rules useless in parser due to conflicts".
3287 * doc/bison.texinfo (Decl Summary): Reword a little.
3288 (Understanding): Update example output for changes below.
3289 * src/gram.c: (rule_useful_p): Rename to...
3290 (rule_useful_in_grammar_p): ... this.
3291 (rule_useless_p): Rename to...
3292 (rule_useless_in_grammar_p): ... this.
3293 (rule_never_reduced_p): Rename to...
3294 (rule_useless_in_parser_p): ... this.
3295 (grammar_rules_print): Update for renames.
3296 (grammar_rules_print_xml): Update for renames.
3297 (grammar_rules_never_reduced_report): Rename to...
3298 (grammar_rules_useless_report): ... this since it is used for either
3299 kind of useless rule.
3300 * src/gram.h: Reword comments and update function names in prototypes.
3301 * src/main.c (main): Say "rule useless in parser due to conflicts".
3302 * src/print-xml.c (print_rules_never_reduced): Rename to...
3303 (print_rules_useless_in_parser): ... this, and rename output XML
3304 element "rules-never-reduced" to "rules-useless-in-parser".
3305 (print_xml): Update for rename.
3306 * src/print.c (print_results): Say "Rules useless in parser due to
3308 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3309 (nonterminals_reduce): Say "nonterminal useless in grammar".
3310 (reduce_output): Say "Nonterminals useless in grammar".
3311 Say "Rules useless in grammar".
3312 (reduce_xml): Rename output XML element "useless" to
3313 "useless-in-grammar".
3314 (reduce_print): Don't report the count of grammatically useless rules
3315 as "rules never reduced" just because %yacc is specified.
3316 In the correct report of this count, say nonterminal(s) and rule(s)
3317 "useless in grammar".
3318 * tests/conflicts.at (S/R in initial): Update expected output.
3319 (Defaulted Conflicted Reduction): Likewise.
3320 (Unreachable States After Conflict Resolution): Likewise.
3321 * tests/existing.at (GNU pic Grammar): Likewise.
3322 * tests/reduce.at (Useless Nonterminals): Likewise.
3323 (Useless Rules): Likewise.
3324 (Reduced Automaton): Likewise.
3325 (Underivable Rules): Likewise.
3326 (Empty Language): Likewise.
3328 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3330 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3331 here document and before the EOF so that BSD's implementation of Bourne
3332 shell doesn't parse the delimiter as part of the here document.
3333 * doc/.cvsignore: Add cross-options.texi.
3334 * src/getargs.c (usage): Add a blank line after the warning categories.
3336 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3338 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3340 2007-11-05 Akim Demaille <akim@epita.fr>
3342 Remove Id: from bison.1.
3343 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3344 (perl -0777 -pi -e 's/\.PP\nId): New.
3345 (.x.1): Use it to ignore the version control revision.
3347 2007-11-05 Akim Demaille <demaille@gostai.com>
3349 * build-aux/Makefile.am: Ship cross-options.pl.
3350 * doc/Makefile.am: Always refer to cross-options.texi with
3352 (MAINTAINERCLEANFILES): Add it.
3354 2007-11-04 Akim Demaille <demaille@gostai.com>
3356 Generate the long/short option cross-table.
3357 * build-aux/cross-options.pl: New.
3358 * doc/Makefile.am (cross-options.texi): New.
3359 * doc/bison.texinfo: Use it.
3361 2007-11-04 Akim Demaille <demaille@gostai.com>
3363 Generate bison.1 using help2man.
3364 * doc/common.x, doc/bison.x: New.
3365 * doc/Makefile.am (bison.1, .x.1): New.
3366 The code is taken from autoconf-2.61/man/Makefile.am.
3367 * configure.ac: Look for help2man.
3369 2007-11-04 Akim Demaille <demaille@gostai.com>
3372 * src/getargs.c (usage): Document -W, make it clear that -d,
3373 -g and -x have optional arguments.
3375 2007-11-04 Akim Demaille <demaille@gostai.com>
3377 Find sha1sum when named gsha1sum.
3378 * bootstrap (find_tool): New.
3381 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3383 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3385 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3386 * NEWS (2.3a+): Mention.
3387 * data/bison.m4 (b4_pure_if): Don't define it here.
3388 * data/c.m4 (b4_identification): Depend on individual skeletons to
3389 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3390 values of the %define variables api.pure or api.push_pull. Define
3391 YYPURE, YYPUSH, and YYPULL accordingly.
3392 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3393 glr.cc has already defined b4_pure_flag.
3394 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3395 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3396 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3397 * doc/bison.texinfo (Pure Decl): Update.
3398 (Push Decl): Update.
3399 (Decl Summary): Add api.pure to %define entry.
3400 In %pure-parser entry, say it's deprecated and reference %define.
3401 (Pure Calling): Update.
3402 (Error Reporting): Update.
3403 (C++ Scanner Interface): Update.
3404 (How Can I Reset the Parser): Update.
3405 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3407 * src/getargs.c (pure_parser): Remove global variable.
3408 * src/getargs.h (pure_parser): Remove extern.
3409 * src/output.c (prepare): Don't define pure_flag muscle.
3410 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3411 wrapper around `%define api.pure'.
3412 * tests/calc.at (Simple LALR Calculator): Update.
3413 (Simple GLR Calculator): Update.
3414 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3416 (GLR: Resolve ambiguity, pure, locations): Update.
3417 (GLR: Merge conflicting parses, pure, no locations): Update.
3418 (GLR: Merge conflicting parses, pure, locations): Update.
3419 * tests/glr-regression.at (Uninitialized location when reporting
3421 * tests/input.at (Unused %define api.pure): New test case.
3422 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3423 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3424 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3426 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3428 %define push_pull -> %define api.push_pull. Discussed starting at
3429 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3430 * data/push.c: Expect the new name.
3431 * data/yacc.c: Likewise.
3432 * doc/bison.texinfo (Push Decl): Update.
3433 (Decl Summary): Update %define entry.
3434 (Push Parser Function): Update.
3435 (Pull Parser Function): Update.
3436 (Parser Create Function): Update.
3437 (Parser Delete Function): Update.
3438 * tests/calc.at (Simple LALR Calculator): Update.
3439 * tests/input.at (%define enum variables): Update.
3440 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3441 (Push Parsing: Multiple impure instances): Update.
3442 (Push Parsing: Unsupported Skeletons): Update.
3443 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3444 (Exploding the Stack Size with Malloc): Update.
3446 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3449 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3451 For the XML output's terminal element, rename @number to @token-number,
3452 and add @symbol-number. In the nonterminal element, rename @number to
3453 @symbol-number. Discussed starting at
3454 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3455 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3457 (xsl:template match="nonterminal"): Likewise.
3458 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3459 (xsl:template match="nonterminal"): Likewise.
3460 * src/print-xml.c (print_grammar): Implement.
3462 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3464 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3465 2007-10-11 change, the child elements here are items not rules.
3466 (xsl:template match="item"): New.
3467 (xsl:template match="rule"): Update for new reduced itemset.
3468 (xsl:template match="point"): Remove.
3469 (xsl:template match="empty"): For consistency with --graph, don't
3470 output "/* empty */".
3471 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3472 line-wrap, don't pass a negative value as first-line-length since this
3473 won't work with the following changes.
3474 (xsl:template name="line-wrap"): Simplify slightly.
3475 (xsl:template name="ws-search"): Eliminate recursion.
3476 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3477 set next to an item whose dot is not at the end of the RHS even if it
3478 happens to be associated with the same rule.
3480 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3482 Add %define lr.keep_unreachable_states.
3483 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3484 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3485 * src/main.c (main): Implement it.
3486 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3487 Extend to test it, and fix a typo.
3489 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3491 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3492 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3493 the example .output text.
3494 * tests/regression.at (Extra lookahead sets in report): Improve wording
3497 2007-10-17 Wojciech Polak <polak@gnu.org>
3499 * src/print-xml.c (print_grammar): Renamed
3500 <terminal> and <nonterminal> attributes:
3501 "type" to "number" and "symbol" to "name".
3502 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3503 Use new attribute names.
3504 (xsl:template match="nonterminal"): Likewise.
3505 * data/xslt/xml2xhtml.xsl: Likewise.
3507 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3509 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3510 (Option Cross Key): Likewise.
3512 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3513 next to an item whose dot is not at the end of the RHS even if it
3514 happens to be associated with the same rule.
3515 * src/print.c (print_core): Likewise.
3516 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3517 (Resolved SR Conflicts): Update output.
3518 * tests/regression.at (Extra lookahead sets in report): New test case.
3520 2007-10-11 Wojciech Polak <polak@gnu.org>
3522 * src/print-xml.c (print_core): Remove item set
3524 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3525 Improve processing time. Suggested by Joel E. Denny.
3526 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3527 Write xsl:param "required" attribute as comment.
3528 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3529 (xsl:template match="rule"): Support new reduced itemset.
3530 (xsl:template match="point"): Remove.
3531 * data/xslt/xml2xhtml.xsl: Likewise.
3533 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3535 * src/getargs.c (version): Update copyright year.
3537 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3539 Make xml2dot.xsl and --graph produce the same output.
3540 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
3541 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3543 (xsl:template name="output-node"): Use the new escape template instead
3544 of the string-replace template directly.
3545 (xsl:template name="output-edge"): Likewise.
3546 (xsl:template name="escape"): New, escapes backslashes and newlines in
3547 addition to quotation marks.
3548 * src/graphviz.c (start_graph, output_node, output_edge): Add
3549 whitespace to output for legibility.
3551 Make xml2text.xsl and --report produce the same output, and remove the
3552 XML "conflicts" element since a conflict summary is easily extracted
3554 * data/xslt/bison.xsl: New.
3555 (xsl:template match="state" mode="bison:count-conflicts): New.
3556 * data/xslt/xml2text.xsl: Import bison.xsl.
3557 (xsl:template match="bison-xml-report"): Instead of styling the
3558 "conflicts" element, style the "automaton" element with mode
3559 "conflicts". Unlike the former, the latter lists S/R and R/R
3560 conflicts for a state on the same line.
3561 (xsl:template match="conflicts"): Remove.
3562 (xsl:template match="conflict"): Remove.
3563 (xsl:template match="terminal"): Line-wrap the list of rules in which
3564 the terminal is used.
3565 (xsl:template match="nonterminal"): Likewise for nonterminals.
3566 (xsl:template match="automaton" mode="conflicts"): New.
3567 (xsl:template match="state" mode="conflicts"): New.
3568 (xsl:template name="line-wrap"): New.
3569 (xsl:template name="ws-search"): New.
3570 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3571 (xsl:template match="bison-xml-report"): Instead of styling the
3572 "conflicts" element, style the "automaton" element with mode
3574 (xsl:template match="conflicts"): Remove.
3575 (xsl:template match="conflict"): Remove.
3576 (xsl:template match="automaton" mode="conflicts"): New.
3577 (xsl:template match="state" mode="conflicts): New.
3578 * src/conflicts.c (conflicts_output_xml): Remove.
3579 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3580 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3581 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3582 the corresponding XSLT is easier. Also, never wrap between a word and
3583 the comma that follows it.
3585 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3587 Improve C++ namespace support. Discussed starting at
3588 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3589 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3590 b4_namespace_close): New macros that interpret the %define variable
3591 "namespace" so its value can contain "::" to indicate nested
3593 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3595 * data/lalr1.cc (b4_namespace): Likewise.
3596 * data/location.cc (b4_namespace): Likewise.
3597 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3598 inside a new table in the general %define entry. Document `%define
3599 namespace' there as well. Point the %name-prefix entry to it since it
3600 explains it more completely in the case of C++.
3601 (C++ Bison Interface): Mention `%define namespace' instead of
3603 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3605 * tests/c++.at (Relative namespace references): New test case.
3606 (Absolute namespace references): New test case.
3607 (Syntactically invalid namespace references): New test case.
3608 * tests/input.at (C++ namespace reference errors): New test case.
3610 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3612 Add syncline support and location accessor to internal %define
3614 * data/bison.m4 (b4_percent_define_get_loc): New.
3615 (b4_percent_define_get_syncline): New.
3616 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3617 (b4_percent_define_default): Record defining location as line 1 rather
3618 than 0 for the sake of synchronizing #line's, and define
3619 b4_percent_define_syncline(VARIABLE).
3620 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3621 * src/muscle_tab.c (muscle_syncline_grow): New.
3622 (muscle_code_grow): Use muscle_syncline_grow.
3623 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3624 define b4_percent_define_syncline(VARIABLE).
3625 (muscle_percent_define_get_loc): New.
3626 (muscle_percent_define_get_syncline): New.
3627 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3628 remove some unused variables.
3629 (muscle_percent_define_default): Record defining location as line 1
3630 rather than 0 for the sake of synchronizing #line's, and define
3631 b4_percent_define_syncline(VARIABLE).
3632 (muscle_percent_define_check_values): Use
3633 muscle_percent_define_get_loc.
3634 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3635 (muscle_percent_define_get_syncline): Prototype.
3636 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3637 defaults): Update output for location change.
3638 (Complaining during macro argument expansion): Extend to test
3639 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3641 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3643 Fix some error-reporting macro bugs.
3644 * data/bison.m4 (b4_cat): New.
3645 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3646 to stdout so they don't become arguments to other macros. Update
3647 comments and add examples.
3648 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3650 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3651 after printing the error directive so that M4 doesn't report subsequent
3652 problems that are induced by this problem.
3653 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3654 instead of just in them. Recognize @\n in both places. Both expand to
3655 the empty string. Needed by b4_cat.
3656 * tests/skeletons.at (Complaining during macro argument expansion):
3658 (Fatal errors make M4 exit immediately): New test case.
3660 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3662 Implement --print-datadir.
3663 * src/getargs.c (usage): Mention.
3664 (PRINT_DATADIR_OPTION): New anonymous enum member.
3665 (long_options): Add entry for it.
3666 (getargs): Add case for it calling compute_pkgdatadir.
3667 * src/output.c (output_skeleton): Encapsulate data directory
3668 computation from here...
3669 (prepare): ... and from here...
3670 (compute_pkgdatadir): ... into this new function.
3671 * src/output.h (compute_pkgdatadir): Prototype.
3673 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3675 * src/print-xml.c (escape_bufs): New static global variable
3677 (xml_escape_n): ... the static local variable buf here.
3678 (print_xml): Free memory for escape_bufs.
3679 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3681 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3683 Replace `%push-parser' and `%push-pull-parser' with
3684 `%define push_pull "push"' and `%define push_pull "both"'.
3685 `%define push_pull "pull"' is the default.
3686 * doc/bison.texinfo (Push Decl, Push Parser Function,
3687 Pull Parser Function, Parser Create Function, Parser Delete Function):
3688 Update declarations.
3689 (Decl Summary, Table of Symbols): Replace %push-parser and
3690 %push-pull-parser entries with a %define push_pull entry.
3691 * data/bison.m4 (b4_percent_define_check_values): New macro.
3692 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3694 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3696 * data/push.c: ... to here and compute them from the value of the
3697 %define variable push_pull.
3698 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3699 parsing requests here...
3700 * data/yacc.c: ... hack this to switch to push.c any time
3701 b4_use_push_pull_flag or the %define variable push_pull is set. This
3702 will go away when we mv push.c yacc.c.
3703 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3704 push parsing is not supported since unused %define variables are
3706 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3707 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3708 comments for consistency with b4_percent_define_check_values.
3709 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3711 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3713 (prologue_declaration): Remove %push-parser and %push-pull-parser
3715 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3716 * tests/calc.at: Update declarations.
3717 * tests/input.at (%define enum variables): New test case.
3718 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3720 (Push Parsing: Multiple impure instances): Update declaration.
3721 (Push Parsing: Unsupported Skeletons): New test case.
3722 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3724 (Exploding the Stack Size with Malloc): Update declaration.
3726 2007-09-24 Wojciech Polak <polak@gnu.org>
3728 Add XSLT transformations.
3730 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3731 * data/xslt/xml2text.xsl: Transform XML into plain text.
3732 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3733 * data/Makefile.am (xsltdir): New variable.
3734 (dist_xslt_DATA): Add xslt/*.xsl files.
3736 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3738 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3739 Problem reported by Wojciech Polak.
3740 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3741 (xml_printf): Undo change I made on 21 September; that is,
3742 indent 2 spaces, not 1.
3744 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3746 Pacify ./configure --enable-gcc-warnings.
3747 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3748 `char const *' instead of `char *'.
3749 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3750 local variable `sep'.
3752 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3754 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3756 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3757 (xml_printf): Indent just 1 space for level.
3758 (e_char, xlate_char): Remove.
3759 (xml_escape_string): Rewrite to avoid undefined behavior (used
3760 storage that was freed from the stack).
3761 (xml_escape_n): Don't bother checking for subscript error.
3763 2007-09-21 Wojciech Polak <polak@gnu.org>
3765 Add Bison XML Automaton Report.
3767 Add support for an -x option to generate an XML report.
3768 It is not documented yet.
3769 * src/print-xml.c: New file.
3770 * src/print-xml.h: Likewise.
3771 * lib/timevar.def (TV_XML): New var.
3772 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3773 * src/conflicts.c: Include print-xml.h.
3774 (solved_conflicts_xml_obstack): New var.
3775 (log_resolution, conflicts_solve, conflicts_free):
3776 Add support for XML report.
3777 (conflicts_output_val): New function.
3778 * src/conflicts.h (conflicts_output_val): New decl.
3779 * src/files.c (spec_xml_file): New var.
3780 (compute_output_file_names, output_file_names_free): Add XML support.
3781 * src/files.h (spec_xml_file): New decl.
3782 * src/getargs.c (xml_flag): New var.
3783 (usage, short_options, long_options, getargs): Add XML support.
3784 * src/getargs.h (xml_flag): New decl.
3785 * src/gram.c: Include print-xml.h.
3786 (rule_lhs_print_xml, rule_rhs_print_xml):
3787 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3789 * src/gram.h: Declare external ones.
3790 * src/main.c: Include print-xml.h.
3791 (main): Add XML support.
3792 * src/reduce.c: Include print-xml.h.
3793 (reduce_xml): New function.
3794 * src/reduce.h: Declare it.
3795 * src/state.c: Include print-xml.h.
3796 (state_new): Add XML support.
3797 (state_rule_lookahead_tokens_print_xml): New function.
3798 * src/state.h: Declare it.
3799 (struct state): New member solved_conflicts_xml.
3800 * src/symtab.c (symbol_class_get_string): New function.
3801 * src/symtab.h: Declare it.
3803 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3805 * GNUmakefile: Switch to coreutils's version.
3806 * bootstrap: Likewise.
3807 * Makefile.cfg: Adjust to new GNUmakefile.
3808 * README-hacking: Likewise.
3812 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3813 Bruno Haible <bruno@clisp.org>
3815 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3816 and is a script that invokes bison. Tighten the code. Add comments.
3818 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3820 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3821 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3822 * doc/bison.texinfo (Decl Summary): Fix.
3823 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3824 * tests/input.at (Boolean %define variables): Update output.
3825 * tests/skeletons.at (%define boolean variables: invalid skeleton
3826 defaults): Rename to...
3827 (%define Boolean variables: invalid skeleton defaults): ... this and
3830 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3832 In impure push mode, don't allow more than one yypstate to be allocated
3833 since multiple impure parsers would corrupt yynerrs.
3834 * data/push.c (yypstate_allocated): New static global variable
3836 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3837 exhaustion if yypstate_allocated is 1, but still return 2.
3838 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3839 already 1. Otherwise, set it to 1.
3840 (yypstate_delete): Set it to 0.
3841 * tests/push.at (Push Parsing: Multiple impure instances): New test
3844 2007-08-17 Bob Rossi <bob@brasko.net>
3846 * doc/bison.texinfo (Push Decl): Document the push parser.
3847 (Table of Symbols): Ditto.
3849 (Decl Summary): Ditto.
3850 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3851 Parser Create Function, Parser Delete Function):
3852 Add new push parser symbols.
3853 (Table of Symbols): Document push-parser, push-pull-parser,
3854 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3856 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3859 * doc/gpl-3.0.texi: New file.
3860 * doc/gpl.texi: Remove.
3861 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3862 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3863 * README-hacking, TODO, bootstrap, bootstrap.conf:
3864 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3865 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3866 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3867 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3868 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3869 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3870 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3871 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3872 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3873 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3874 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3875 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3876 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3877 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3878 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3879 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3880 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3881 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3882 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3883 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3884 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3885 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3886 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3887 * src/complain.c, src/complain.h, src/conflicts.c:
3888 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3889 * src/files.h, src/flex-scanner.h, src/getargs.c:
3890 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3891 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3892 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3893 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3894 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3895 * src/print.c, src/print.h, src/print_graph.c:
3896 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3897 * src/reduce.h, src/relation.c, src/relation.h:
3898 * src/revision.h, src/scan-code.h, src/scan-code.l:
3899 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3900 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3901 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3902 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3903 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3904 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3905 * tests/existing.at, tests/glr-regression.at:
3906 * tests/headers.at, tests/input.at, tests/java.at:
3907 * tests/local.at, tests/output.at, tests/push.at:
3908 * tests/reduce.at, tests/regression.at, tests/sets.at:
3909 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3913 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3915 Get rid of broken %no-parser, -n, and --no-parser implementation and
3917 * TODO: Don't mention them.
3918 * doc/bison.1: Likewise.
3919 * doc/bison.texinfo (Decl Summary): Likewise.
3920 (Bison Options): Likewise.
3921 (Option Cross Key): Likewise.
3922 * src/getargs.c (no_parser_flag): Remove global variable.
3923 (usage): Don't print description of -n and --no-parser.
3924 (long_options): Remove --no-parser entry here.
3925 (getargs): Remove -n case in the switch here.
3926 * src/getargs.h (no_parser_flag): Remove extern.
3927 * tests/regression.at (Web2c Actions): Remove comment that mentions
3930 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3932 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3933 name user variables starting with `yy'. Just pass NULL instead of a
3934 dummy local &yylval to yypush_parse.
3935 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3938 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3940 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3941 true since it's then always used regardless of whether yyoverflow is
3942 defined. Reported by Christian Burger at
3943 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3944 * THANKS: Add Christian Burger.
3946 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3947 node names: say "Decl Summary" not "Bison Declaration Summary".
3949 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3951 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3952 determine whether this function has already complained about an invalid
3953 value for a %define boolean variable, don't check whether Bison has
3954 ever examined the value. As written, the check was a tautology.
3955 Instead, record and check for this complaint using a separate muscle.
3957 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3959 Fix push parsing memory leak reported by Brandon Lucia at
3960 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3961 * THANKS: Add Brandon Lucia.
3962 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3963 but the parse never completed and thus freed it.
3964 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3965 * tests/testsuite.at: Include push.at.
3966 * test/push.at: New.
3967 (Push Parsing: Memory Leak for Early Deletion): New test case.
3969 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3971 Improve handling of multiple S/R conflicts in the same state and of S/R
3972 conflicts involving multiple reductions.
3973 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3974 set for a state here or Bison will abort if it is reassigned on a
3975 later conflicted reduction in the same state.
3976 Similarly, don't finalize and assign the solved conflicts report here
3977 or it will be lost if it is reassigned on a later conflicted reduction
3979 (set_conflicts): Instead, assign them both here after all S/R conflicts
3980 in the state have been fully examined.
3981 * src/print.c (shift_set): Rename to...
3982 (no_reduce_set): ... this.
3983 (print_reductions): Update for rename, and add %nonassoc error action
3984 tokens to no_reduce_set so that, when printing the first remaining
3985 reduction on an error action token, the reduction is enclosed in
3987 (print_results): Update for rename.
3988 * tests/conflicts.at (Solved conflicts report for multiple reductions
3989 in a state): New test case.
3990 (%nonassoc error actions for multiple reductions in a state): New test
3993 * src/main.c (main): Don't depend on C99 features.
3995 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3997 * build-aux/.cvsignore: Add compile.
3998 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4001 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4003 * bootstrap (slurp): Create target directories that don't exist.
4004 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4006 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4008 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4010 * closure.c (closure): Likewise.
4011 * state.h (reductions): Comment sorting of rules.
4012 (state): Comment sorting of items.
4014 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4016 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4017 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4018 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4019 definition in order to avoid Gnulib headers since we don't use config.h
4021 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4022 rather than AT_DATA so that config.h is included.
4024 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4026 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4027 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4028 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4029 and so that YYFPRINTF is guaranteed to be defined here.
4031 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4033 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4035 (muscle_percent_define_check_values): ... this more helpful function.
4036 Again, it's not used yet, but it will be.
4037 * src/muscle_tab.h: Likewise.
4039 Improve some comments in parser table construction.
4040 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4041 (generate_states): Don't mention ruleset, which is internal to closure.
4042 * src/closure.c (closure): Explain sorting of core and itemset, which
4043 is required for this function to behave correctly.
4044 * src/closure.h (closure): Mention sorting.
4046 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4048 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4049 move the check for disabled transitions to an aver since conflict
4050 resolution hasn't happened yet.
4052 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4053 labels a state as inconsistent just because it has error transitions.
4054 The original form of this check appeared in revision 1.1 of lalr.c,
4055 which was committed on 1991-12-21. Now (at least), changing the
4056 consistency label on such a state appears to have no useful effect in
4057 any of the places it is examined, which I enumerate below. The key
4058 point to understanding each item in this enumeration is that a state
4059 with an error transition is labelled consistent in the first place only
4060 if it has no rules, so the check cannot matter for states that have
4061 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4062 to try to identify its conflicts, and a state must have *rules* to have
4063 conflicts. (2) Labelling a state as inconsistent will affect how
4064 action_row sets the default *rule* for the state. (3) Labelling a
4065 state as inconsistent will cause build_relations to add lookback edges
4066 to *rules* in that state.
4067 * src/state.h (struct state): Word the comment for member consistent
4070 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4072 Don't depend on C99 features.
4073 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4074 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4075 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4076 * src/state.c (state_mark_reachable_states): Fix for-loop.
4077 (state_remove_unreachable_states): Fix for-loop.
4079 Don't widen struct state with member reachable just to temporarily
4080 record reachability. Instead, use a local bitset.
4081 * src/state.h (struct state): Remove member.
4082 * src/state.c (state_new): Don't initialize it.
4083 (state_mark_reachable_states): Rename to...
4084 (state_record_reachable_states): ... this, and use bitset.
4085 (state_remove_unreachable_states): Use bitset.
4087 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4089 * src/Makefile.am (yacc): Quote target action commands properly so
4090 that the yacc script isn't corrupt. Reported by Hans Aberg at
4091 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4093 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4094 the case of pure parsers. Reported by Frans Englich at
4095 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4096 * THANKS: Add Frans Englich.
4098 * NEWS (2.3a+): In the %code entry, reference section `Bison
4099 Declaration Summary' from the manual now since the %code summary has
4101 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4102 in the rules section must be terminated by semicolons.
4104 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4106 Extend the front-end API for %define variables to more completely
4107 mirror the back-end. This will be useful in the future.
4108 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4109 Update comments to mention the new front-end counterparts of these
4111 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4112 for muscle_string_decode and muscle_location_decode.
4113 (muscle_string_decode): New static function.
4114 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4115 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4117 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4118 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4119 implementation more closely.
4120 (muscle_percent_define_invalid_value): New function.
4121 * src/muscle_tab.h (muscle_percent_define_get,
4122 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4125 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4127 * NEWS (2.3a+): Mention yesterday's state-removal change.
4128 (2.3a): Remove the %language entry, which was added after 2.3a.
4129 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4130 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4131 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4132 tests/existing.at: Update copyright date.
4134 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4136 If conflict resolution makes states unreachable, remove those states,
4137 report rules that are then unused, and don't report conflicts in those
4139 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4140 New global function.
4141 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4143 * src/main.c (main): After conflict resolution, remove the unreachable
4144 states and update all data structures that reference states by number.
4145 * src/state.c (state_new): Initialize each state's reachable member to
4147 (state_mark_reachable_states): New static function.
4148 (state_remove_unreachable_states): New global function.
4149 * src/state.h (struct state): Add member bool reachable.
4150 (state_remove_unreachable_states): Prototype.
4151 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4153 * tests/existing.at (GNU pic Grammar): Update test case output now that
4154 an unused rule is discovered.
4156 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4158 Minor code cleanup in parser table construction.
4159 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4160 (new_itemsets, save_reductions): Update for rename to nitemset.
4161 * src/closure.c (nritemset): Rename to...
4162 (nitemset): ... this since the "r" appears to meaningless and isn't
4163 used in the comments.
4164 (closure): Update for rename.
4165 * src/closure.h (nritemset): Update extern to...
4166 (nitemset): ... this.
4167 * src/lalr.c (LA): Fix a typo in comments.
4168 * src/print.c (print_core): Update for rename to nitemset.
4169 * src/print_graph.c (print_graph): Likewise.
4170 * src/state.h: Fix some typos in header comments.
4172 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4174 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4175 still sticks to ASCII. Sorry!
4177 * README-hacking: New file, taken mostly from coreutils, with changes
4178 for Bison. Contains much of the contents of:
4179 * README-cvs: Remove.
4180 * bootstrap: Sync from gnulib.
4181 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4182 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4184 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4186 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4188 (Java Differences): Fix some typos.
4189 * THANKS: Add Sebastian Setzer.
4191 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4193 * data/java.m4 (b4_single_class_if): Remove.
4194 (b4_abstract_if): Look at "%define abstract".
4196 (b4_union_name): Rename...
4197 (b4_yystype): ... to this. Map to "%define stype".
4198 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4199 b4_maybe_throws): Fix quoting.
4200 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4201 * data/lalr1.java (Lexer interface): Always define.
4202 (Lexer interface within parser class): Remove.
4203 (YYLexer class): New, used when "%code lexer" is present.
4204 (constructor): When "%code lexer" is used, pass %lex-param
4205 to the lexer constructor.
4206 (yylex, yyparse): Remove %lex-param from method invocations
4207 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4209 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4210 abstract". Rename "%define union_name" to "%define stype".
4211 Rename method names according to previous patch.
4212 (Java Scanner Interface): Describe "%code lexer" instead of
4213 "%pure-parser" and "%define single_class".
4214 (Java Differences): Mention "%code lexer".
4216 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4217 Include scanner here, using macros from tests/local.at.
4218 (AT_DATA_CALC_Y): Remove final argument.
4219 (_AT_CHECK_JAVA_CALC): Likewise.
4220 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4221 of %locations and %error-verbose.
4222 (main): Test with and without %lex-param.
4223 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4224 (AT_BISON_OPTION_POPDEFS): Pop it.
4226 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4228 DJGPP spefic issue. Inhibit the use of disallowed characters for
4229 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4230 and concern testsuite case 46.
4231 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4232 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4233 * djgpp/config.bat: Inhibit the use of disallowed characters.
4235 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4237 Miscellaneous %define and %code cleanup.
4238 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4239 values are interpreted.
4240 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4241 documentation a little more.
4242 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4243 muscle_percent_define_insert, muscle_percent_code_grow): New
4245 * src/muscle_tab.h (muscle_percent_define_insert,
4246 muscle_percent_code_grow): Prototype.
4247 * src/parse-gram.y (prologue_declaration): Use
4248 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4249 %define and %code directives.
4251 Make it easy to share %define boolean variables between the front-end
4252 and back-end. Though not used yet, this will be useful in the future.
4253 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4254 Bison uses of names rather than just skeleton uses of names.
4255 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4256 b4_percent_define_skeleton_variables(VARIABLE) to
4257 b4_percent_define_bison_variables(VARIABLE).
4258 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4259 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4260 b4_percent_code_bison_qualifiers(QUALIFIER).
4261 (b4_check_user_names_wrap): Update for renames.
4262 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4263 muscle_percent_define_default): New functions mimicking
4264 b4_percent_define_flag_if and b4_percent_define_default.
4266 For %define variables, report locations for invalid values and
4268 * data/bison.m4 (b4_percent_define_flag_if): Read
4269 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4271 (b4_percent_define_default): Save a special location in
4272 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4273 must later be reported as invalid.
4274 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4276 (muscle_percent_define_insert): Record the location of VARIABLE in
4277 muscle percent_define_loc(VARIABLE), and use it to report the previous
4278 location for a redefinition.
4279 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4280 (muscle_percent_define_default): Update like b4_percent_define_default.
4281 (muscle_grow_user_name_list): Rename to...
4282 (muscle_user_name_list_grow): ... this for consistency and use
4283 muscle_location_grow.
4284 * src/muscle_tab.h (muscle_location_grow): Prototype.
4285 * tests/input.at (%define errors): Update expected output.
4286 * tests/skeletons.at (%define boolean variables: invalid skeleton
4287 defaults): New test case.
4289 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4291 * src/print.c (lookahead_set, state_default_rule): Remove.
4292 (print_reductions): Replace state_default_rule invocation with
4293 equivalent use of yydefact, which was computed in token_actions in
4295 (print_results): Don't allocate lookahead_set.
4297 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4299 * data/lalr1.java: Prefix all private members with yy.
4301 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4303 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4304 Sebastien Fricker at
4305 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4306 * THANKS: Add Sebastien Fricker.
4307 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4308 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4309 accept a variable number of arguments.
4311 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4313 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4315 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4317 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4318 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4319 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4321 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4323 Undo my 2007-02-07 change, switching back to the c-strcase module
4324 introduced in the 2007-02-03 change. Bruno Haible reported that
4325 the 2007-02-07 change would be dangerous in Turkish if we add a
4326 language whose name contains "i", since "i" is not lowercase "I"
4328 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4329 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4330 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4331 * m4/.cvsignore: Remove strcase.m4.
4332 * src/getargs.c: Revert 2007-02-07 change, as follows.
4333 Include c-strcase.h.
4334 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4336 2007-02-11 Bruno Haible <bruno@clisp.org>
4338 Enable the Java related testsuite tests when the only Java compiler
4339 found is a gcj < 4.3. Discussed at
4340 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4341 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4343 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4345 * data/Makefile.am: Update copyright date.
4346 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4347 yypstate_new returns NULL.
4348 (yypstate_new): Return NULL if malloc does.
4349 * src/reader.c (packgram): Move translation of rule actions from the
4350 beginning of packgram to...
4351 (check_and_convert_grammar): ... here right before packgram is invoked
4352 so it's easier to write more complete comments, and remove redundant
4355 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4357 As in semantic actions, make @$ in %initial-action, %destructor, and
4358 %printer imply %locations.
4359 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4361 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4362 (@$ in %initial-action implies %locations,
4363 @$ in %destructor implies %locations,
4364 @$ in %printer implies %locations): ... these new test cases.
4366 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4368 Undo most of the 2007-02-03 change, switching to the strcase module
4369 now that gnulib strcase has been fixed.
4370 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4371 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4372 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4373 * m4/.cvsignore: Add strcase.m4.
4374 * src/getargs.c: Revert 2007-02-03 change, as follows.
4375 Don't include c-strcase.h.
4376 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4377 strcasecmp has "unspecified behavior" outside the POSIX locale,
4378 but it works fine in practice if at least one argument is ASCII,
4379 as is the case in Bison.
4381 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4383 * tests/java.at: Skip tests if only one of javac/java is present.
4384 Reported by Joel E. Denny.
4385 * tests/atlocal.in: Adjust copyright years.
4387 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4389 * data/lalr1.java (Stack): Work around old verifiers that disallow
4390 access to the private fields of an inner class, from the outer class.
4391 We can make Stack's fields public because user code doesn't have access
4392 to the instance of Stack used by parse(). Reported by Paul Eggert.
4394 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4396 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4397 the right spot for these files?
4398 * bootstrap.conf (gnulib_modules): Add c-strcase.
4399 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4401 * src/getargs.c: Include c-strcase.h.
4402 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4403 to avoid unspecified behavior.
4405 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4407 * doc/bison.texinfo (Decl Summary): Correct typo.
4409 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4411 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4412 Complain if the value does not match empty, "true" or "false".
4413 * data/c++.m4: Adjust default definitions of %define variables.
4414 * data/java.m4: Adjust default definitions of %define variables.
4415 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4417 * tests/input.at (Boolean %define variables): Test new behavior.
4419 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4421 * NEWS: Mention java.
4422 * TODO: Remove things that are done.
4423 * bootstrap.conf: Add javacomp-script and javaexec-script.
4424 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4426 * data/Makefile.am: Add new files.
4427 * data/java-skel.m4: New.
4428 * data/java.m4: New.
4429 * data/lalr1.java: New.
4431 * doc/bison.texinfo: Put "A Complete C++ Example" under
4432 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4433 under Other Languages.
4435 * src/getargs.c (valid_languages): Add Java.
4436 * src/getargs.h (struct bison_language): Update size of string fields.
4438 * tests/Makefile.am: Add java.at.
4439 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4440 * tests/java.at: New.
4441 * tests/testsuite.at: Include it.
4443 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4446 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4447 at_directive_argv arguments so these no longer have to be global
4448 variables. Also, update the implementation for the following changes.
4449 (fail_for_at_directive_too_many_args,
4450 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4451 (at_directive_name): Remove as at_directive_argv[0] will be used for
4453 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4454 for the directive name.
4455 (at_directive_argc, at_directive_argv): Make these local within
4456 skel_lex instead of global.
4457 (INITIAL): Update directive start action for above changes.
4458 (SC_AT_DIRECTIVE_ARG): Rename to...
4459 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4460 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4461 (scan_skel): Move yylex_destroy to...
4462 (skel_scanner_free): ... here.
4463 * tests/skeletons.at (installed skeleton file name): Rename to...
4464 (installed skeleton file names): ... this.
4466 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4468 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4469 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4470 Summary" not "Directives".
4471 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4472 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4473 since the former is now the more complete one.
4474 (Prologue Alternatives): Likewise and do the same for %defines.
4475 (Table of Symbols): Add summary of %code, add summary of %define, and
4476 move full %code documentation to...
4477 (Decl Summary): ... here for consistency with other entries in these
4479 Move %define entry in order to keep this list alphabetized.
4480 Reword %define entry a little to put less emphasis on the skeleton
4481 concept, which most users shouldn't have to think about.
4483 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4485 Adjust to recent gnulib changes.
4486 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4487 Add string.h, string_.h, unistd_.h, wchar_.h.
4488 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4489 * src/system.h: Don't include <stpcpy.h>; this is now done by
4492 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4494 Simplify implementation of unqualified %code, implement macros for
4495 uniform treatment of boolean %define flags. Document %define.
4496 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4497 b4_percent_code_ifdef): New.
4498 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4499 * data/c++.m4: Define default value for global_tokens_and_yystype.
4500 * data/glr.cc: Likewise.
4501 * data/location.cc: Use b4_percent_define_flag_if.
4503 * doc/bison.texinfo (Decl Summary): Document %define.
4505 * src/parse-gram.y (Unqualified %code): Change muscle name to
4507 (content.opt): Default to empty.
4509 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4511 Implement support for relative and absolute skeleton file names.
4512 Discussed starting at
4513 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4514 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4515 (Bison Options): Document in --skeleton entry.
4516 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4517 full_skeleton can't necessarily hold all of pkgdatadir.
4518 If the specified skeleton file name contains a `/', don't prepend
4520 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4521 file name contains a `/', prepend the grammar file directory.
4522 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4523 * skeletons.at: New file.
4524 (relative skeleton file names): New test case.
4525 (installed skeleton file names): New test case.
4526 * tests/testsuite.at: Include skeletons.at.
4528 * bootstrap: Update copyright to 2007.
4530 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4532 * bootstrap: Remove occurrences of .#bootmp from the files.
4534 2007-01-17 Akim Demaille <akim@epita.fr>
4536 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4538 Use per-type %printer.
4540 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4542 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4543 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4544 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4545 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4546 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4547 tests/glr-regression.at, tests/input.at, tests/local.at,
4548 tests/output.at, tests/torture.at: Update copyright to 2007.
4550 2007-01-16 Akim Demaille <akim@epita.fr>
4552 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4554 (Calc++ Scanner): Exit with failure if we can't open the input
4556 Accept "-" standing for stdin.
4557 (Calc++ Top Level): Print the result only if the parsing was
4560 2007-01-16 Akim Demaille <akim@epita.fr>
4562 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4564 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4565 and Joel E. Denny <jdenny@ces.clemson.edu>
4567 Clean up %define and %code implementation in M4 some. Most
4568 importantly, rename all related macros to be in the b4_percent_define
4569 and b4_percent_code namespaces. Also, complete support for `.' in
4570 %define variable names and %code qualifiers.
4571 * data/bison.m4 (b4_check_user_names): Check for special
4572 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4574 (b4_get_percent_define, b4_get_percent_code): Rename to...
4575 (b4_percent_define_get, b4_percent_code_get): ... these.
4576 Extend documentation with examples.
4577 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4578 b4_percent_define_skeleton_variables and
4579 b4_percent_code_skeleton_qualifiers.
4580 Expect any value for the %define variable `foo' to be stored in the
4581 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4582 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4583 expect any unqualified %code blocks to be stored in a macro named
4584 `b4_percent_code_unqualified'.
4585 Use m4_indir so that %define variable names and %code qualifiers can
4586 contain `.', which is allowed by the grammar parser.
4587 (b4_percent_define_default): New macro to set a default value for a
4589 (m4_wrap): Update wrapped code, and fix some underquoting.
4590 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4591 Expect grammar uses of %define variables and %code qualifiers to be
4592 defined in b4_percent_define_user_variables and
4593 b4_percent_code_user_qualifiers.
4594 * data/c++.m4: Use b4_percent_define_default rather than
4595 m4_define_default. Fix some underquoting. Skeleton usage of %define
4596 variable define_location_comparison now implies skeleton usage of
4597 %define variable filename_type.
4598 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4599 data/push.c, data/yacc.c: Update macro names.
4600 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4603 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4605 DJGPP specific issues.
4607 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4608 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4610 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4612 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4613 run parsers in all tests so that Valgrind is invoked during
4614 maintainer-check-valgrind.
4615 (Duplicate representation of merged trees): Free all semantic values.
4616 (Duplicated user destructor for lookahead): Likewise.
4618 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4620 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4621 command-line prefix.
4622 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4623 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4624 miss Valgrind messages.
4625 (Exploding the Stack Size with Malloc): Likewise.
4627 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4629 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4630 locals. Reported by Juan Manuel Guerrero at
4631 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4632 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4633 Fix some indentation also.
4634 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4635 explaining this issue.
4637 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4638 and Joel E. Denny <jdenny@ces.clemson.edu>
4640 Simplify union and prologue handling, and escape union and lex/parse
4641 params with digraphs.
4642 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4643 values to the empty string since these are no longer guaranteed
4644 initialized by the front-end.
4645 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4646 braces around b4_user_stype since this is no longer done by the
4648 * src/files.c, src/files.h (pre_prologue_obstack,
4649 post_prologue_obstack): Remove.
4650 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4651 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4652 with digraphs. This fixes lex params and parse params.
4653 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4654 * src/output.c (prepare): Remove muscle insertion of the prologues.
4655 (output): Remove freeing of pre_prologue_obstack and
4656 post_prologue_obstack.
4657 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4658 than prologue_augment for prologue parsing so you don't need prologue
4660 (grammar_declaration): For %union RHS, use `braceless' instead of
4661 "{...}" so that braces are already stripped and code is escaped with
4663 * src/reader.c (prologue_augment): Remove.
4664 (reader): Remove initialization of pre_prologue_obstack and
4665 post_prologue_obstack.
4666 * src/reader.h (prologue_augment): Remove.
4668 * data/c.m4: Remove stray parenthesis.
4670 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4672 Remove quotes from variables names in %define directives and from
4673 qualifiers in %code directives, and restrict the characters that are
4674 allowed in them to M4-friendly ones. For %define, continue to support
4675 the quoted form as a deprecated feature. Discussed starting at
4676 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4677 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4679 * doc/bison.texinfo (Prologue Alternatives): Update.
4680 (Decl Summary): In %defines entry, update mention of `%code requires'
4681 and `%code provides'.
4682 (C++ Location Values): Update %define uses.
4683 (Calc++ Parser Interface): Likewise.
4684 (Calc++ Parser): Likewise, and update `%code requires' uses.
4685 (Table of Symbols): Update %code documentation.
4686 * src/parse-gram.y (prologue_declaration): For %define variables, use
4687 `variable' instead of `STRING'.
4688 (grammar_declaration): For %code qualifiers, use `ID' instead of
4690 (variable): New nonterminal that takes an `ID' or a `STRING'.
4691 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4693 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4694 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4695 (%define errors): Update %define uses.
4697 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4699 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4700 instead of muscle_insert for %define values so that M4-special
4701 characters are replaced with digraphs.
4702 * tests/input.at (%define errors): Extend to check weird values.
4704 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4706 Instead of having skeletons declare all valid %define variables and
4707 %code qualifiers, provide macros that retrieve the associated values
4708 and build these lists automatically. Thus Bison will now warn when a
4709 variable or qualifier is not used by the skeleton in the current
4710 invocation regardless of whether it might sometimes be used by that
4711 skeleton in other invocations. Also, move all %define value macros to
4712 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4713 form, which is replaced by %code.
4714 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4715 (b4_check_user_names): ... this, and change the series of valid name
4716 arguments to a single list argument for names used in the skeleton
4717 similar to the existing list argument for names used in the grammar.
4718 Warn instead of complaining.
4719 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4720 values and %code code, to format %code code properly, and to build
4721 lists of all %define variables and %code qualifiers used in the
4722 skeleton: b4_skeleton_percent_define_variables and
4723 b4_skeleton_percent_code_qualifiers.
4724 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4726 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4727 the skeleton names lists can finish building first. In place of
4728 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4729 expect the lists b4_user_percent_define_variables and
4730 b4_user_percent_code_qualifiers.
4731 * data/c++.m4: Where setting default values for b4_parser_class_name,
4732 b4_location_type, b4_filename_type, b4_namespace, and
4733 b4_define_location_comparison, update their names to the
4734 b4_percent_define_ namespace.
4735 * data/glr.c: Don't use b4_check_percent_define_variables and
4736 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4737 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4738 (b4_parser_class_name, b4_namespace): Define these using
4739 b4_get_percent_define for parser_class_name and namespace.
4740 * data/location.cc: Use b4_get_percent_define.
4741 * data/push.c: Don't use b4_check_percent_define_variables and
4742 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4743 * data/yacc.c: Likewise, and don't call m4_exit in
4744 b4_use_push_for_pull_if or m4_wrap code will never execute.
4745 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4747 (muscle_grow_user_name_list): ... this for consistency with the
4748 terminology used in bison.m4.
4749 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4750 %define variable names, and rename muscle used_percent_define_variables
4751 to user_percent_define_variables.
4752 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4753 user_percent_code_qualifiers.
4755 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4756 {CODE} form is no longer accepted.
4757 * tests/input.at (Reject bad %code qualifiers): Rename to...
4758 (Reject unused %code qualifiers): ... this, and update test output.
4759 (%define error): Update test output.
4761 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4763 Check for unrecognized %define variables similar to checking for
4764 unrecognized %code qualifiers. Check for redefined %define variables.
4765 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4767 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4768 (b4_check_percent_define_variables): New, also wraps it.
4769 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4770 variables using b4_check_percent_define_variables.
4771 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4772 all those exercised in the test suite and all those listed in the
4773 `Default values' section of c++.m4. Are there others?
4774 * data/push.c, data/yacc.c: Declare no valid %define variables.
4775 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4776 similar to muscle_find, but it works even when the muscle stores a
4778 (muscle_grow_used_name_list): New function for constructing the used
4779 name list muscles that b4_check_for_unrecognized_names requires.
4780 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4781 %define'd more than once. Define the b4_used_percent_define_variables
4782 muscle with muscle_grow_used_name_list.
4783 (grammar_declaration): Abbreviate %code code with
4784 muscle_grow_used_name_list.
4785 * tests/input.at (%define errors): New.
4787 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4789 Provide warn_at, complain_at, and fatal_at function callbacks to the
4790 skeletons, and use this for %code qualifier complaints.
4791 * data/bison.m4 (b4_error_at): New, invoked by...
4792 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4793 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4794 @fatal_at(...@) directives.
4795 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4796 qualifiers in b4_used_percent_code_qualifiers and to use
4798 * src/location.c, src/location.h (boundary_set_from_string): New global
4800 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4802 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4803 to b4_used_percent_code_qualifiers.
4804 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4806 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4807 (lineno): Rename to...
4808 (out_lineno): ... this so I don't misunderstand it again.
4809 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4810 here; these newlines are in the input but not the output file.
4811 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4812 (at_directive_perform): ... this new static function, and add handling
4813 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4815 * tests/input.at (Reject bad %code qualifiers): Update test output with
4816 locations and extend.
4818 * tests/output.at (Output file name: [, Output file name: ]): Remove
4819 bogus comment about these tests failing.
4821 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4823 Clean up b4_check_percent_code_qualifiers a little.
4824 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4825 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4826 documentation and add examples.
4827 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4830 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4832 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4833 unreliable -- especially when they're hidden inside another macro.
4834 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4835 data/c.m4: Remove m4_divert(-1).
4836 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4837 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4838 m4_divert_push(0) and m4_divert_pop(0).
4839 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4840 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4841 pushed and popped by m4sugar, should be first on the stack.
4843 Provide warn, complain, and fatal function callbacks to the skeletons.
4844 This provides more flexibility than m4_fatal, improves the error
4845 message format, and captures messages for translation. Discussed
4847 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4848 * data/bison.m4 (b4_error): New, invoked by...
4849 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4850 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4851 directives. Because these M4 macros might be called when the current
4852 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4853 the previous removal of uses of m4_divert, which caused trouble.
4854 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4855 m4_fatal to report unrecognized %code qualifiers.
4856 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4857 push parser requests.
4858 * data/glr.c: Use b4_complain instead of m4_fatal to report
4859 non-deterministic push parser requests.
4860 Update @output usage to @output(...@) form.
4861 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4862 report missing %defines. Update @output usage to @output(...@) form.
4863 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4865 * src/main.c (main): Invoke skel_scanner_free.
4866 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4867 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4868 obstack_for_string from flex-scanner.h.
4869 (YY_DECL): Use to declare skel_lex static.
4870 (decode_at_digraphs): Remove; now handled in the new
4871 SC_AT_DIRECTIVE_ARG start condition.
4872 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4874 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4875 at_directive_argv): New static globals.
4876 (INITIAL): Use fail_for_invalid_at.
4877 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4878 recognize the start of a generalized `@directive(...@)' form and
4880 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4881 directive args (using the new obstack_for_string), to decode the
4882 contained @ diagraphs, and to perform the directive. It recognizes
4883 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4885 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4886 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4888 (scan_skel): Initialize obstack_for_string on the first call.
4889 (skel_scanner_free): New function to free obstack_for_string.
4890 * tests/input.at (Reject bad %code qualifiers): Update test output.
4892 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4894 Consolidate the 4 prologue alternative directives (%code, %requires,
4895 %provides, and %code-top) into a single %code directive with an
4896 optional qualifier field. Discussed at
4897 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4898 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4900 * doc/bison.texinfo (Prologue Alternatives): Update.
4901 (Decl Summary): Update to %code "requires" and %code "provides".
4902 (Calc++ Parser): Update to %code "requires".
4903 (Table of Symbols): Remove entries for %requires, %provides, and
4904 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4905 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4906 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4907 which are skeleton-specific.
4908 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4909 declare what %code qualifiers it supports and to complain if any other
4910 qualifiers were used in the grammar.
4911 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4912 and b4_user_code([b4_percent_code_provides]) in place of
4913 b4_user_requires and b4_user_provides.
4914 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4915 Add b4_user_code([b4_percent_code_top]) and
4916 b4_user_code([b4_percent_code]).
4917 Invoke b4_check_percent_code_qualifiers.
4918 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4919 PERCENT_REQUIRES): Remove.
4920 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4921 %requires. Rewrite the %code RHS as the unqualified form defining the
4922 muscle b4_percent_code. Add another RHS for the qualified %code form,
4923 which defines muscles of the form b4_percent_code_QUALIFIER and the
4924 b4_used_percent_code_qualifiers muscle.
4925 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4926 PERCENT_REQUIRES): Remove.
4927 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4928 %code "requires" and %code "provides".
4929 * tests/input.at (Reject bad %code qualifiers): New.
4931 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4933 Use the new code_props interface for destructors and printers.
4934 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4935 printer_location members, and change the type of the destructor and
4936 printer members to code_props.
4937 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4938 symbol_printer_get, semantic_type_destructor_set,
4939 semantic_type_printer_set, default_tagged_destructor_set,
4940 default_tagless_destructor_set, default_tagged_printer_set,
4941 default_tagless_printer_set): Use code_props in arguments and return
4942 types in place of char const * and location.
4943 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4944 since the locations are now contained in the return of
4945 symbol_destructor_get and symbol_printer_get.
4946 * src/output.c (symbol_destructors_output, symbol_printers_output):
4948 (symbol_code_props_output): ... this to eliminate duplicate code.
4949 (output_skeleton): Update to use symbol_code_props_output.
4950 * src/reader.c (symbol_should_be_used): Update use of
4951 symbol_destructor_get.
4952 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4953 Update uses of the various _destructor_set and _printer_set functions.
4954 * src/symtab.c: (default_tagged_destructor_location,
4955 default_tagless_destructor_location, default_tagged_printer_location,
4956 default_tagless_printer_location): Remove since we...
4957 (default_tagged_destructor, default_tagless_destructor,
4958 default_tagged_printer, default_tagless_printer): ... change the type
4959 of these to code_props.
4960 (symbol_new, semantic_type_new, symbol_destructor_set,
4961 semantic_type_destructor_set, symbol_destructor_get,
4962 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4963 symbol_check_alias_consistency, default_tagged_destructor_set,
4964 default_tagless_destructor_set, default_tagged_printer_set,
4965 default_tagless_printer_set): Update.
4966 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4967 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4969 (symbol_print): Use SYMBOL_CODE_PRINT.
4971 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4973 Use the new code_props interface for rule actions.
4974 * src/symlist.h (symbol_list): Replace action, action_location, and
4975 used members with a code_props action_props member.
4976 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4977 grammar_midrule_action, grammar_current_rule_merge_set,
4978 grammar_current_rule_symbol_append, packgram): Update.
4979 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4980 * src/scan-code.l (handle_action_dollar): Update.
4981 (translate_rule_action): Remove, no longer used.
4982 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4984 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4986 Use the new code_props interface in parse-gram.y.
4987 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4988 Update all uses of translate_* functions to use the new code_props
4989 interface and to use gram_scanner_last_string_free and
4990 code_scanner_last_string_free where possible.
4991 (grammar_declaration): symbol_list_destructor_set and
4992 symbol_list_printer_set now perform the translation, so don't do it
4993 here. Use gram_scanner_last_string_free where possible.
4994 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4995 translate_code): Remove, no longer used.
4996 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4997 symbol_list_printer_set): Perform code translation here rather than
4998 depending on the caller to do so.
5000 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5001 * src/scan-gram.h (gram_last_string): Remove declaration.
5002 * src/scan-gram.l (last_string): Declare it static.
5004 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5006 Encapsulate code properties and related functionality for the various
5007 destructors, printers, and actions into a code_props structure and
5008 interface. This patch merely implements code_props in scan-code.h and
5009 scan-code.l. Future patches will rewrite other modules to use it.
5010 Discussed starting at
5011 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5012 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5013 consistently initialize const structs that have an empty location
5015 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5016 to ensure consistency.
5017 * src/scan-code.h (code_props): New structure.
5018 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5019 function, macro, and const global variable for initializing a
5020 code_props with no code.
5021 (code_props_plain_init, code_props_symbol_action_init,
5022 code_props_rule_action_init, code_props_translate_code): The rest of
5023 the new code_props functional interface. Among other things, the init
5024 functions set the code_props kind field so that
5025 code_props_translate_code will know whether to behave like
5026 translate_symbol_action, translate_rule_action, or translate_code.
5027 These old translate functions must remain until all other modules are
5028 updated to use the new code_props interface.
5029 (code_scanner_last_string_free): New function similar to
5030 gram_scanner_last_string_free.
5031 (code_scanner_free): Add documentation.
5032 * src/scan-code.l: Implement the new interface.
5033 (code_lex): Make it static, add a code_props* argument, and remove the
5035 (last_string): New static global similar to the one in scan-gram.l.
5036 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5038 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5039 code_props since Bison may one day use this information for destructors
5041 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5042 (handle_action_dollar): Use symbol_list_n_get and set used flag
5043 directly since symbol_list_n_used_set is removed.
5044 (translate_action): Add a code_props* argument and remove the rule,
5045 action, and location arguments. Pass the code_props* on to code_lex.
5046 (translate_rule_action, translate_symbol_action, translate_code):
5047 Rewrite as wrappers around the new code_props interface.
5048 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5049 it would eventually need to break the encapsulation of code_props.
5051 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5053 * etc/.cvsignore: New.
5055 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5057 Add maintainer-push-check to run maintainer-check using push parsing in
5058 place of pull parsing where available.
5059 * Makefile.am (maintainer-push-check): New.
5060 * data/bison.m4 (b4_use_push_for_pull_if): New.
5061 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5062 appropriately based on their existing values.
5063 (yypush_parse): Don't print push-parser-specific diagnostics if push
5064 parsing is being used in place of pull parsing.
5065 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5067 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5068 variable, and insert b4_use_push_for_pull_flag into muscles.
5069 * tests/Makefile.am (maintainer-push-check): New.
5071 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5073 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5074 (whether successful or failed) so that yypush_parse can be invoked
5075 again to start a new parse using the same yypstate.
5076 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5077 check multiple yypull_parse invocations on the same yypstate. For pull
5078 mode, extend to check multiple yyparse invocations.
5079 (Exploding the Stack Size with Alloca): Extend to try with
5081 (Exploding the Stack Size with Malloc): Likewise.
5083 * tests/calc.at (Simple LALR Calculator): Don't specify
5084 %skeleton "push.c" since %push-pull-parser implies that now.
5085 * tests/headers.at (export YYLTYPE): Don't check for the push
5086 declarations. Otherwise, this test case can't be used to see if push
5087 mode can truly emulate pull mode.
5088 * tests/input.at (Torturing the Scanner): Likewise.
5089 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5090 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5091 AT_YACC_IF, which now includes the case of push mode since %skeleton
5092 need not be used for push mode. This will be more intuitive once
5093 push.c is renamed to yacc.c.
5095 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5097 For push mode, convert yyparse from a macro to a function, invoke yylex
5098 instead of passing a yylexp argument to yypull_parse, and don't
5099 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5100 Discussed starting at
5101 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5102 * data/bison.m4 (b4_pull_if): New.
5103 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5104 * data/push.c: Improve M4 quoting a little.
5105 (b4_generate_macro_args, b4_parenthesize): Remove.
5106 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5107 any time a pull parser is requested.
5108 Don't #define this as a wrapper around yypull_parse. Instead, when
5109 both push and pull are requested, make it a function that does that
5111 (yypull_parse): If there's a b4_prefix, #define this to
5112 b4_prefix[pull_parse] when both push and pull are requested.
5113 Don't define this as a function unless both push and pull are
5115 Remove the yylexp argument and hard-code yylex invocation instead.
5116 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5118 * src/getargs.c (pull_parser): New global initialized to true.
5119 * getargs.h (pull_parser): extern it.
5120 * src/output.c (prepare): Insert pull_flag muscle.
5121 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5122 (prologue_declaration): Set both push_parser and pull_parser = true for
5123 %push-pull-parser. Set push_parser = true and pull_parser = false for
5125 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5126 %push-parser since there's no backward-compatibility concern here.
5127 Scan %push-pull-parser.
5128 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5129 instead of %push-parser.
5130 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5131 prototype it in the module that calls yyparse.
5132 * tests/input.at (Torturing the Scanner): Likewise.
5133 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5135 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5137 Update etc/bench.pl. Optimize push mode a little (the yyn change
5138 deserves most of the credit).
5139 * Makefile.am (SUBDIRS): Add etc subdirectory.
5140 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5141 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5142 yytoken, yyval, and yyloc declarations to...
5143 (yyparse or yypush_parse): ... here to improve performance. For
5144 yypush_parse invocations after the first, be sure to assign yyn its old
5146 (yypstate_new): Don't bother initializing the yyresult field since the
5147 initial value isn't used.
5148 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5149 remove the #define that, in push mode, set it to yyps->NAME.
5150 * etc/Makefile.am: New.
5151 * etc/bench.pl: Remove and build it instead from...
5152 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5153 "tests/bison" from the build directory by default rather than just
5154 invoking "bison" from $PATH.
5155 (calc_grammar): Update push parser code: don't declare yylval globally,
5156 don't define yyparse_wrapper, and don't #define yyparse.
5157 (bench_grammar): Update to check all working combinations of yacc.c,
5158 push.c, impure, pure, pull, and push.
5160 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5162 For push mode, add pull wrappers around yypush_parse.
5163 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5164 (yypull_parse): New function wrapping yypush_parse.
5165 (yyparse): New #define wrapping yypull_parse.
5166 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5168 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5169 prototype yylex in the module that calls yyparse, and don't prototype
5170 yyparse there. Otherwise, the yyparse expansion won't compile.
5171 * tests/input.at (Torturing the Scanner): Likewise.
5173 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5175 Enable push parsers to operate in impure mode. Thus, %push-parser no
5176 longer implies %pure-parser. The point of this change is to move
5177 towards being able to test the push parser code by running the entire
5178 test suite as if %push-parser had been declared.
5179 * data/push.c (yypush_parse): For impure mode, remove the
5180 yypushed_char, yypushed_val, and yypushed_loc arguments.
5181 Instead, declare these as local variables initialized to the global
5182 yychar, yylval, and yylloc.
5183 For the first yypush_parse invocation only, restore the initial values
5184 of these global variables when it's time to read a token since they
5185 have been overwritten.
5186 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5188 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5189 %pure-parser along with %push-parser since this test case was designed
5190 for pure push parsers.
5191 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5192 (AT_YACC_OR_PUSH_IF): New.
5193 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5194 add a note that it's still wrong for some cases (as it has been for a
5196 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5197 %push-parser no longer implies %pure-parser.
5199 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5201 Remove some unnecessary differences between the pull parser code and
5202 the push parser code. This patch enables yynerrs in push mode.
5203 * data/push.c: Reformat M4 a little.
5204 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5205 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5206 because push mode is on. Instead, if pure mode is on, move yynerrs
5208 (b4_declare_parser_state_variables): ... here.
5209 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5210 to yyps->NAME so it can be used in yypush_parse.
5211 (yypush_parse): Don't omit uses of yynerrs in push mode.
5213 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5215 Fix bug such that the first pushed token's value and location are
5216 sometimes overwritten (sometimes by %initial-action) before being used.
5217 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5218 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5219 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5220 more closely mimic the pull parser logic.
5221 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5222 time to read a token, which is after any initialization of yylval and
5224 (gottoken): Rename label to...
5225 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5228 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5230 Rearrange initialization of the parser state variables so that the
5231 skeleton doesn't have to have a copy for pull mode and another for push
5232 mode. This patch also fixes at least a bug such that yylloc was not
5233 initialized (with b4_location_initial_line and
5234 b4_location_initial_column) upon calling yypush_parse. However, that
5235 initialization now overwrites the first token's location;
5236 %initial-action assigning @$ already did the same thing, and both bugs
5237 will be fixed in a later patch.
5238 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5239 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5240 yyss, yyvs, yyls, and yystacksize.
5241 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5242 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5244 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5245 yyps->NAME so it can be used in yypush_parse.
5246 (yyparse or yypush_parse): For yypush_parse, don't print the
5247 "Starting parse" diagnostic for invocations after the first.
5248 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5249 yypush_parse, only do it for the first invocation.
5250 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5251 initialization to occur in yypush_parse but only on the first
5254 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5256 * data/push.c: Add CPP guards around push parser declarations in both
5257 the header and the code file.
5258 In the code file, move the push parser declarations to the same place
5259 they appear in the header file.
5260 Clean up the M4 some, especially the inconsistent underquoting in
5261 some b4_c_function_def and b4_c_function_decl uses.
5263 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5265 Encapsulate the push parser state variables into an M4 macro so the
5266 push skeleton doesn't have to list them again for pull mode's yyparse.
5267 For push mode, remove yypush_parse's local equivalents of these
5268 variables to eliminate unnecessary copying between the two sets at
5269 run-time. This patch also fixes at least a bug related to multiple
5270 %initial-action invocations in push mode.
5271 * data/push.c (b4_declare_parser_variables): Rename to...
5272 (b4_declare_scanner_communication_variables): ... this for clarity and
5274 (b4_declare_yyparse_variables): Remove and move its contents to the one
5275 spot where it was invoked.
5276 (b4_declare_parser_state_variables): New macro containing the parser
5277 state variables required by push mode.
5278 (struct yypstate): Replace all fields but yynew with
5279 b4_declare_parser_state_variables.
5280 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5281 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5282 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5283 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5284 parser state variable declarations with
5285 b4_declare_parser_state_variables.
5286 Don't initialize parser state variables when calling yypush_parse since
5287 yypstate_new already does that.
5288 Invoke the user's initial action only upon the first yypush_parse
5290 Remove all code that copies between the local parser state variables
5293 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5295 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5296 prevent a name collision in a future patch where these names will
5297 sometimes be #define'd.
5298 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5299 since it no longer has the same name as the existing argument.
5300 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5302 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5303 and Joel E. Denny <jdenny@ces.clemson.edu>
5305 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5306 that the argument is case-insensitive, and there's no `=' here.
5307 For the %skeleton entry, mention that %language is better.
5308 (Bison Options): Likewise for --language and --skeleton. Move the
5309 --skeleton entry so that the `Tuning the parser' section is sorted
5310 alphabetically on long options.
5311 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5312 %language directive in detail here; cross-reference the %language
5313 documentation instead.
5314 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5315 `%require "2.3b"' so that the example is always up-to-date.
5316 (Table of Symbols): Add entries for %language and %skeleton.
5317 * examples/extexi (normalize): Instead of replacing every %require
5318 argument with the current Bison version, just substitute for
5319 `@value{VERSION}'. This guarantees that we're testing what actually
5320 appears in the documentation.
5321 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5322 rather than `@VERSION@'.
5324 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5326 * NEWS: Reword the %language news a bit, and put it earlier.
5328 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5329 Rewrite to simplify the logic.
5330 (language_argmatch): Likewise.
5331 (program_name): We now own this var.
5332 * src/getargs.h (struct bison_language): Use char[] rather than
5335 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5337 * src/complain.c (program_name): Remove decl; no longer needed.
5338 * src/main.c (program_name): Remove; now belongs to getargs.
5340 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5342 * NEWS: Document %language.
5344 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5346 * data/c-skel.m4, data/c++-skel.m4: New files.
5347 * data/glr.c: Complain on push parsers.
5349 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5351 (Decl Summary): Document %language and %skeleton.
5352 (Command line): Document -L.
5354 * examples/extexi: Rewrite %require directive.
5355 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5357 * src/files.c (compute_exts_from_gc): Look in language structure
5359 (compute_file_name_parts): Check whether .tab should be added.
5360 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5361 (language, skeleton_arg, language_argmatch): New.
5362 (long_options): Add --language.
5363 (getargs): Use skeleton_arg, add -L/--language.
5364 * src/getargs.h: Include location.h.
5365 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5366 * src/output.c (prepare): Pick default skeleton from struct language.
5367 Don't dispatch C skeletons here.
5368 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5369 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5370 * src/scan-gram.l ("%language"): New rule.
5372 * tests/calc.at: Test %skeleton and %language.
5373 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5374 (AT_GLR_IF): Look for %skeleton "glr.cc".
5375 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5376 (AT_YACC_IF): Reject %language.
5378 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5380 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5381 since it wasn't used; only the typedef name 'semantic_type' is needed.
5382 Also, omit trailing white space.
5384 * bootstrap: Sync from coreutils.
5385 (gnulib_extra_files): Add build-aux/announce.gen.
5386 (slurp): Adjust .gitignore files like .cvsignore files.
5387 * build-aux/announce-gen: Remove from CVS, since bootstrap
5390 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5392 Make %push-parser imply %pure-parser. This fixes several bugs; see
5393 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5394 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5396 * data/push.c: Don't bother testing b4_push_if when deciding whether
5397 to expand b4_declare_parser_variables globally.
5398 (yypush_parse): Likewise in here.
5400 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5401 (yy_reduce_print): Reformat M4 for readability.
5403 2006-12-15 Bob Rossi <bob@brasko.net>
5404 and Joel Denny <jdenny@ces.clemson.edu>
5406 * data/push.c (yypstate): Add typedef, and update all uses of
5407 struct yypstate to just yypstate.
5408 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5410 2006-12-14 Bob Rossi <bob@brasko.net>
5412 * data/push.c (yypush_parse): Declare prototype regardless of
5415 2006-12-14 Bob Rossi <bob@brasko.net>
5417 * data/push.c (yyparse): Remove the prototype and the #define when in
5420 2006-12-13 Bob Rossi <bob@brasko.net>
5422 * data/push.c (yypstate_init): Rename to...
5423 (yypstate_new): ... this and use b4_c_function_def.
5424 (yypstate_delete): New.
5425 (yypush_parse): Change parameters yynval and yynlloc to be const.
5426 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5427 yypstate_delete functions.
5429 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5431 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5432 strange test case titles. Reported by Bob Rossi.
5434 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5436 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5437 of potential ambiguities in GLR grammers.
5439 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5441 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5442 `bison ', use m4_index instead of m4_substr since chopping up a string
5443 containing M4-special characters causes problems here.
5445 Fix a couple of bugs related to special characters in user-specified
5446 file names, and make it easier for skeletons to compute output file
5447 names with the same file name prefix as Bison-computed output file
5449 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5450 b4_parser_file_name and b4_spec_defines_file instead of
5451 @output_parser_name@ and @output_header_name@, which are now redundant.
5452 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5453 b4_parser_file_name, b4_spec_defines_file, and the new
5454 @basename(FILENAME@) instead of @output_parser_name@ and
5455 @output_header_name@, which inappropriately escaped the file names as
5457 * src/files.c (all_but_ext): Remove static qualifier.
5458 (compute_output_file_names): Move `free (all_but_ext)' to...
5459 (output_file_names_free): ... here since all_but_ext is needed later.
5460 * src/files.h (all_but_ext): Extern.
5461 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5462 exactly what MUSCLE_INSERT_STRING used to do.
5463 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5464 characters are escaped properly.
5465 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5467 For pkgdatadir muscle, maintain previous functionality by using
5468 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5469 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5470 digraphs would never be expanded. Hopefully no one has M4-special
5471 characters in his Bison installation path.
5472 * src/scan-skel.l: Don't parse @output_header_name@ and
5473 @output_parser_name@ anymore since they're now redundant.
5474 In @output, use decode_at_digraphs.
5475 Parse a new @basename command that invokes last_component.
5476 (decode_at_digraphs): New.
5477 (BASE_QPUTS): Remove unused.
5478 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5479 (Output file name): New tests.
5481 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5483 Warn about output files that are generated by the skeletons and that
5484 conflict with other output files.
5485 * data/glr.c: Don't generate the header file here when glr.cc does.
5486 * src/files.c (file_names, file_names_count): New static globals.
5487 (compute_output_file_names): Invoke output_file_name_check for files
5488 not generated by the skeletons and remove existing checks.
5489 (output_file_name_check): New function that warns about conflicting
5491 (output_file_names_free): Free file_names.
5492 * src/files.h (output_file_name_check): Declare.
5493 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5495 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5496 (Conflicting output files): New tests.
5498 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5500 * doc/bison.texinfo: Fix a couple of typos.
5502 2006-12-08 Bob Rossi <bob@brasko.net>
5504 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5506 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5508 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5509 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5511 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5512 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5514 2006-12-07 Bob Rossi <bob@brasko.net>
5515 and Joel Denny <jdenny@ces.clemson.edu>
5517 * data/push.c (yypvarsinit): Change return type from void* to struct
5518 yypvars*. No longer cast to void* on return.
5519 (struct yypvars): Remove yylen since it need not be remembered between
5520 yypushparse invocations.
5521 (yypushparse): Don't copy between yylen and pv->yylen.
5523 2006-12-05 Bob Rossi <bob@brasko.net>
5525 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5526 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5527 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5528 (struct yypvars): Remove b4_declare_parser_variables.
5529 (yypvarsinit): Remove init code for removed variables.
5530 (global scope): Do not declare b4_declare_parser_variables if
5532 (yypushparse): Add b4_declare_parser_variables.
5533 Init new local variables, and remove init code for removed
5536 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5537 and yyparse for other modes.
5538 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5539 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5540 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5541 (AT_PURE_LEX_IF): True if pure or push parser.
5543 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5545 Document Yacc prologue alternatives and default %destructor's and
5546 %printer's as experimental. Don't mention Java yet. Discussed at
5547 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5548 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5549 (2.3a): Annotate this entry to say the old forms of these features were
5551 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5552 Table of Symbols): Say they're experimental. Comment out any mention
5553 of Java (we'll want this back eventually).
5555 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5557 Support a file name argument to %defines. Deprecate `=' in
5558 %file-prefix, %name-prefix, and %output. Discussed at
5559 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5560 * NEWS (2.3a+): Mention.
5561 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5562 form of %defines, and remove `=' from entries for %file-prefix,
5563 %name-prefix, and %output.
5564 * src/parse-gram.y (prologue_declaration): Implement.
5565 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5566 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5567 all but one occurrence of %name-prefix.
5568 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5569 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5570 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5571 occurrence of each of %file-prefix and %output. Add check for %defines
5573 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5574 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5575 Remove the `=' from %output.
5577 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5579 Don't escape $ in test case titles since Autoconf 2.61 now does that
5581 * tests/actions.at (Default %printer and %destructor are not for error
5582 or $undefined): Here.
5583 (Default %printer and %destructor are not for $accept): Here.
5584 * tests/input.at (Invalid $n and @n): Here.
5586 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5588 Rename <!> to <>. Discussed starting at
5589 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5590 * NEWS (2.3a+): Update.
5591 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5593 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5594 * src/scan-gram.l (INITIAL): Implement.
5595 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5596 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5598 * tests/actions.at (Default tagless %printer and %destructor,
5599 Default tagged and per-type %printer and %destructor,
5600 Default %printer and %destructor are not for error or $undefined,
5601 Default %printer and %destructor are not for $accept,
5602 Default %printer and %destructor for mid-rule values): Update.
5603 * tests/input.at (Default %printer and %destructor redeclared,
5604 Unused values with default %destructor): Update.
5606 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5608 Don't let %prec take a nonterminal.
5609 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5611 * tests/input.at (%prec takes a token): New test checking that %prec
5612 won't take a nonterminal.
5614 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5616 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5617 it was double-quoted.
5618 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5619 grammar is maintained with Bison's highest standards.
5620 * src/getargs.c: Fix some typos in Doxygen comments.
5622 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5624 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5625 later. Reported by Paul Eggert in
5626 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5627 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5628 * src/scan-code.l (translate_action): Don't bother invoking
5629 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5630 (code_scanner_free): Instead of invoking
5631 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5633 * src/scan-gram.l (gram_scanner_free): Likewise.
5634 * src/scan-skel.l (scan_skel): Likewise.
5636 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5638 * src/files.c (tr): Change return type to void.
5639 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5640 has been called previously for the same key.
5641 (muscle_find): Return storage instead of value so that
5642 --enable-gcc-warnings doesn't produce warnings that the return discards
5643 const. aver that the value and storage are the same since storage
5644 could potentially be NULL when value is not.
5645 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5648 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5650 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5651 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5652 us a slightly cleaner distribution, and also works.
5653 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5656 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5657 and Paul Eggert <eggert@cs.ucla.edu>
5659 Don't let Bison leak memory except when it complains.
5660 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5661 (spec_defines_file, dir_prefix): Now char *, not const char *,
5662 since they are freed.
5663 * src/files.c: Likewise.
5664 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5666 (tr): Now operates in-place. All uses changed.
5667 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5669 (compute_file_name_parts, compute_output_file_names): Don't store
5670 read-only data in variables that will be freed.
5671 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5672 src_extension, and header_extension.
5673 (output_file_names_free): New public function to free
5674 spec_verbose_file, spec_graph_file, spec_defines_file,
5675 parser_file_name, and dir_prefix.
5676 * src/getargs.c (getargs): Don't store read-only data in variables that
5678 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5679 (which previously existed but was unused), and quotearg_free.
5680 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5681 * src/muscle_tab.c: Likewise.
5682 (muscle_entry): Make the value char const *,
5683 and add a new storage member that is char * and can be freed.
5684 (muscle_entry_free): New private function.
5685 (muscle_init): Use it instead of free.
5686 (muscle_insert, muscle_grow): Update and use new storage member.
5687 (muscle_code_grow): Free the string passed to muscle_grow
5688 since it's not needed anymore.
5689 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5690 add a new `char *code' member.
5691 ("{...}"): Declare semantic type as code.
5692 * src/scan-code.h (translate_rule_action):
5693 (translate_symbol_action, translate_code, translate_action): Return
5694 `char const *' rather than `char *' since external code should not free
5696 * src/scan-code.l: Likewise.
5697 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5698 which is "{...}" in the parser.
5699 * tests/Makefile.am (maintainer-check-valgrind): Set
5700 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5702 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5704 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5705 expecting a non-zero exit status sets --leak-check=summary and
5706 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5707 this case, and we don't want to hear about it.
5709 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5711 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5712 instead of from the template, to simplify configuration a bit.
5713 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5714 and m4/wint_t.m4, as they are needed with the latest gnulib.
5716 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5718 Disable unset/unused mid-rule value warnings by default, and recognize
5719 --warnings=midrule-values to enable them. Discussed starting at
5720 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5721 * NEWS (2.3a+): Mention.
5722 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5723 warnings): Add entry for midrule-values subargument.
5724 * src/reader.c (symbol_should_be_used): Don't return true just because
5725 the value is a set/used mid-rule value unless
5726 --warnings=midrule-values was specified.
5727 * tests/input.at (Unused values, Unused values before symbol
5728 declarations): Run tests with and without --warnings=midrule-values.
5730 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5731 than LIST_FREE directly.
5733 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5735 Finish implementing --warnings=error, which should not be implied by
5736 --warnings=all (or by its synonyms -W and --warnings without
5738 * src/complain.c (set_warning_issued): New function to report that
5739 warnings are being treated as errors and to record an error if so.
5741 (warn_at, warn): ... here.
5742 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5743 "error - warnings are errors" does not appear above "all - all of the
5745 (getargs): For -W and --warnings without subarguments, don't let
5746 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5747 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5749 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5751 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5752 empty subargument list. For example: `bison --warnings= parser.y'.
5754 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5756 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5757 the parser header file so that gcc doesn't warn.
5759 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5761 Split the default %destructor/%printer into two kinds: <*> and <!>.
5762 Discussed starting at
5763 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5764 * NEWS (2.3a+): Mention.
5765 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5766 previous change today related to mid-rules.
5767 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5768 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5769 (TYPE_TAG_ANY): Add as <*>.
5770 (TYPE_TAG_NONE): Add as <!>.
5771 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5773 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5774 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5775 * src/symlist.c (symbol_list_default_new): Split into tagged and
5777 (symbol_list_destructor_set, symbol_list_printer_set): Split
5778 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5779 SYMLIST_DEFAULT_TAGLESS.
5780 * src/symlist.h: Update symbol_list_default*_new prototypes.
5781 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5782 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5783 * src/symtab.c (default_destructor, default_destructor_location,
5784 default_printer, default_printer_location): Split each into tagged and
5786 (symbol_destructor_get, symbol_destructor_location_get,
5787 symbol_printer_get, symbol_printer_location_get): Implement tagged
5788 default and tagless default cases.
5789 (default_destructor_set, default_printer_set): Split each into tagged
5790 and tagless versions.
5791 * src/symtab.h: Update prototypes.
5792 * tests/actions.at (Default %printer and %destructor): Rename to...
5793 (Default tagless %printer and %destructor): ... this, and extend.
5794 (Per-type %printer and %destructor): Rename to...
5795 (Default tagged and per-type %printer and %destructor): ... this, and
5797 (Default %printer and %destructor for user-defined end token): Extend.
5798 (Default %printer and %destructor are not for error or $undefined):
5800 (Default %printer and %destructor are not for $accept): Update.
5801 (Default %printer and %destructor for mid-rule values): Extend.
5802 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5803 (Unused values with default %destructor): Extend.
5805 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5807 Don't apply the default %destructor/%printer to an unreferenced midrule
5809 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5810 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5811 like $@n instead of just @n so that the default %destructor/%printer
5812 logic doesn't see them as user-defined symbols.
5813 (symbol_is_dummy): Check for both forms of the name.
5814 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5815 name for which the midrule value is referenced in any action.
5816 * tests/actions.at (Default %printer and %destructor for mid-rule
5818 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5819 for change to dummy symbol names.
5821 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5823 Warn about unset midrule $$ if the corresponding $n is used.
5824 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5826 (packgram): Before invoking grammar_rule_check on any rule, make sure
5827 all actions have already been scanned in order to set `used' flags.
5828 Otherwise, checking that a midrule's $$ is set will not always work
5829 properly because the midrule check must forward-reference the midrule's
5831 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5834 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5836 More improvements to the documentation of the prologue alternatives:
5837 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5839 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5840 some text to clarify the relative importance of the new directives and
5841 to show how these directives may be viewed as code labels.
5843 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5845 Similar to the recently removed %before-header, add %code-top as the
5846 alternative to the pre-prologue. Mentioned at
5847 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5848 Also, let the prologue alternatives appear in the grammar section.
5849 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5850 (prologue_declaration): Move the existing prologue alternatives to...
5851 (grammar_declaration): ... here and add %code-top.
5852 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5854 Clean up and extend documentation for the prologue alternatives.
5855 * NEWS (2.3a+): Describe prologue alternatives.
5856 * doc/bison.texinfo (Prologue): Move discussion of prologue
5858 (Prologue Alternatives): ... this new section, and extend it to discuss
5859 all 4 directives in detail.
5860 (Table of Symbols): Clean up discussion of prologue alternatives and
5863 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5865 DJGPP specific issues.
5867 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5868 config.bat accordingly.
5869 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5870 * djgpp/config.site: Likewise.
5872 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5874 Replace %*-header with %provides, %requires, %code. See discussion at
5875 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5877 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5878 (b4_user_start_header): Remove.
5879 * data/glr.c: Use new macros instead of b4_*start_header
5881 * data/glr.cc: Likewise.
5882 * data/lalr1.cc: Likewise.
5883 * data/push.c: Likewise.
5884 * data/yacc.c: Likewise.
5886 * doc/bison.texinfo: Remove %before-header, rename
5887 %{start,end,after}-header to %requires, %provides, %code.
5889 * src/parse-gram.y: Likewise (also rename token names accordingly).
5890 * src/scan-gram.l: Likewise.
5891 * tests/actions.at: Likewise.
5893 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5895 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5896 Problem reported by Joel E. Denny.
5898 2006-10-14 Jim Meyering <jim@meyering.net>
5900 (Sync from coreutils.)
5901 Work also when the working directory (with e.g. coreutils sources)
5902 is version controlled with git, rather than CVS.
5903 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5905 In messages and comments, say e.g., "checked-out sources",
5906 rather than "CVS sources".
5907 (version_controlled_file): New function. Work for git as well as
5908 for CVS. Don't use grep's -q option.
5909 (slurp): Call it here, in place of CVS-specific code.
5911 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5913 Fix testsuite for ./configure --enable-gcc-warnings:
5914 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5915 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5916 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5917 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5918 * test/regression.at (Diagnostic that expects two alternatives):
5921 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5923 * bootstrap.conf (gnulib_modules): Add config-h.
5924 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5925 worry about HAVE_CONFIG_H.
5926 * lib/abitset.c: Likewise.
5927 * lib/bitset.c: Likewise.
5928 * lib/bitset_stats.c: Likewise.
5929 * lib/bitsetv-print.c: Likewise.
5930 * lib/bitsetv.c: Likewise.
5931 * lib/ebitset.c: Likewise.
5932 * lib/get-errno.c: Likewise.
5933 * lib/lbitset.c: Likewise.
5934 * lib/subpipe.c: Likewise.
5935 * lib/timevar.c: Likewise.
5936 * lib/vbitset.c: Likewise.
5937 * lib/bitset.c: Include "bitset.h" first, to test interface.
5938 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5939 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5940 * lib/bitsetv.c: Include "bitsetv.h" first.
5941 * lib/get-errno.c: Include "get-errno.h" first.
5942 * m4/.cvsignore: Add config-h.m4.
5943 * tests/actions.at (Default %printer and %destructor for ...):
5944 Adjust expected line numbers in output to reflect removal of #if
5945 HAVE_CONFIG_H lines.
5946 * tests/glr-regression.at (Missed %merge type warnings when ...):
5948 * tests/regression.at (Braced code in declaration in rules section):
5950 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5951 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5952 Include <config.h> unconditionally.
5954 * bootstrap: Sync from coreutils, as follows:
5956 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5958 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5959 variable was sometimes used without being initialized. This
5960 messed up the installation of the INSTALL file in some cases.
5962 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5964 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5965 --copy. Inspired by a suggestion from Bruno Haible.
5967 2006-10-03 Jim Meyering <jim@meyering.net>
5969 * bootstrap: Undo last change to this file, since now gnulib-tool
5970 sticks with the automake default in generating dependencies.
5972 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5974 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5975 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5977 * doc/bison.1: Add copyright notice.
5979 * data/glr.c: Don't include <stdarg.h>; not used.
5981 * NEWS: The -g and --graph options now output graphs in Graphviz
5982 DOT format, not VCG format.
5983 * doc/bison.1: Likewise.
5984 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5985 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5987 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5988 * TODO: Remove Graphviz entry.
5989 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5990 remove vcg.c, vcg.h, vcg_defaults.h.
5991 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5992 * src/graphviz.c, src/graphviz.h: New files.
5993 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5994 * src/files.h: Make comment more generic.
5995 * src/main.c (main): Likewise.
5996 * src/print_graph.h: Likewise.
5997 * src/getargs.c (usage): Make usage description more generic.
5998 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5999 (static_graph, fgraph): Remove. All uses changed to pass
6000 arguments instead of sharing a static var.
6001 (print_core, print_actions, print_state, print_graph):
6002 Output graphviz format rather than VCG format.
6003 * tests/.cvsignore: Remove *.vcg; add *.dot.
6004 * tests/output.at: Expect *.dot files, not *.vcg files.
6006 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6007 accommodates the 2006-10-08 change.
6009 2006-10-11 Bob Rossi <bob@brasko.net>
6011 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6012 (b4_yyssa, b4_yyerror_range): New macros.
6013 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6014 (yypvarsinit): Remove init of removed fields.
6015 (yypushparse): Remove use of removed fields; use new macros instead.
6017 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6019 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6020 in a push parser. Reindent slightly to match yacc.c better.
6022 2006-10-11 Bob Rossi <bob@brasko.net>
6024 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6026 (yypvarsinit, yypushparse): Remove init of removed fields.
6027 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6029 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6031 * THANKS: Add Paolo Bonzini and Bob Rossi.
6033 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6035 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6036 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6037 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6038 b4_define_user_cde and uses): Remove.
6039 (b4_comment, b4_prefix, b4_sync_start): New.
6040 * data/bison.m4: New file, with most of the content removed from c.m4.
6041 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6042 * src/output.c (output_skeleton): Pass bison.m4.
6043 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6046 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6048 Fix test failure reported by Tom Lane in
6049 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6050 and try to make such failures easier to catch in the future.
6051 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6052 that's now the caller's responsibility.
6053 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6054 Set yychar = YYEOF if it's negative.
6055 * tests/actions.at (yylex): Abort if asked to read past EOF.
6056 * tests/conflicts.at (yylex): Likewise.
6057 * tests/cxx-type.at (yylex): Likewise.
6058 * tests/glr-regression.at (yylex): Likewise.
6059 * tests/input.at (yylex): Likewise.
6060 * tests/regression.at (yylex): Likewise.
6061 * tests/torture.at (yylex): Likewise.
6063 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6065 Fix problems with translating English-language diagnostics.
6066 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6067 respect to bison-runtime pot generation. The YY_ stuff
6068 wasn't being captured.
6069 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6070 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6071 * runtime-po/POTFILES.in: Add data/push.c.
6073 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6075 Merge bootstrap changes from coreutils.
6077 2006-09-28 Jim Meyering <jim@meyering.net>
6079 Automatically generated dependencies are important even
6080 when all of the sources in a directory come from gnulib.
6081 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6082 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6084 2006-09-23 Jim Meyering <jim@meyering.net>
6086 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6088 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6090 * bootstrap: Add support for --force.
6091 (usage): New function. Describe usage less tersely.
6092 (CVS_only_file): New var.
6094 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6096 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6097 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6098 Adjust white space and comments to match GNU style better.
6100 2006-09-20 Bob Rossi <bob@brasko.net>
6102 * data/push.c (yyresult_get): Remove function.
6103 (YYPUSH_MORE): Add #define.
6104 (yypushparse): Modify return value.
6106 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6108 * stamp-h.in: Remove; no longer needed.
6109 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6110 Remove config.h, config.hin, intl (no longer created).
6111 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6114 Sync bootstrap from coreutils, as follows:
6116 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6118 * bootstrap (symlink_to_gnulib): New function.
6119 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6120 to copies-of-gnulib.
6121 (cp_mark_as_generated, slurp, gnulib_files):
6122 Avoid making a copy if it's the same as the old version.
6123 (gnulib_files): Add support for this variable (used by Bison).
6125 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6127 * src/getargs.c (usage): Rework to use conventions similar to
6128 coreutils, to make translation a bit easier and the code a bit
6129 smaller. Problem reported by Tim Van Holder.
6131 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6133 Use some of gnulib's new modules, taken from coreutils.
6135 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6136 * bootstrap.conf: New file.
6137 (gnulib_modules): Add configmake, inttypes, unistd.
6138 (XGETTEXT_OPTIONS): Add complain, complain_at,
6139 fatal, fatal_at, warn, warn_at, unexpected_end.
6140 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6141 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6143 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6145 (GNULIB_AUTOCONF_SNIPPET): Remove.
6146 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6148 * lib/.cvsignore: Add inttypes_.h.
6149 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6150 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6151 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6152 no-longer-necessary initializations.
6153 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6154 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6155 use the unistd module.
6156 * src/system.h: Likewise.
6157 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6158 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6159 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6160 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6161 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6162 * src/system.h: Include inttypes.h unconditionally, now that we
6163 use the inttypes module. Don't bother to include stdint.h, since
6164 inttypes.h now does that for us.
6165 (LOCALEDIR): Remove, now that we use the configmake module.
6166 * src/getargs.c: Include configmake.h.
6167 * src/main.c: Likewise.
6168 * src/output.c: Likewise.
6169 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6170 not from $abs_top_builddir, since config.h moved.
6173 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6174 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6176 * src/parse-gram.y (symbol_declaration): Don't put statements
6177 before declarations; it's not portable to C89.
6178 * src/scan-code.l (handle_action_at): Likewise.
6180 * src/scan-code.l: Always initialize braces_level; the old code
6181 left it uninitialized and therefore had undefined behavior.
6183 Don't attempt to redefine 'assert', since it runs afoul of
6184 systems where standard headers (mistakenly) include <assert.h>.
6185 Instead, define and use our own alternative, called 'aver'.
6186 * src/reader.c: Don't include assert.h, since we no longer
6188 * src/scan-code.l: Likewise.
6189 * src/system.h (assert): Remove, replacing with....
6190 (aver): New function, taking a bool arg. All uses changed.
6191 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6192 not merely an integer.
6194 2006-09-15 Bob Rossi <bob@brasko.net>
6196 Add support for push parsing. Based on the original work of
6197 Odd Arild Olsen <oao@fibula.no>.
6198 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6199 * data/c.m4 (YYPUSH): New.
6200 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6201 * data/push.c: New file.
6202 * src/getargs.c (push_parser): New var.
6203 * src/getargs.h (push_parser): New declaration.
6204 * src/output.c (prepare): Add macro insertion of `push_flag'.
6205 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6206 (prologue_declaration): Parse %push-parser.
6207 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6208 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6209 list of removed lines from the traces observed.
6210 (AT_CHECK_CALC_LALR): Added push parser tests.
6212 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6214 * NEWS: Version 2.3a.
6215 * configure.ac (AC_INIT): Likewise.
6217 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6218 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6219 due to header ordering dependencies. I don't know why the #define
6222 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6223 runtime cost when YYDEBUG is not defined, and so that some tests
6224 that used to fail now work. Problem and initial suggestion by
6226 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6227 * data/glr.cc (b4_parser_class_name):
6228 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6229 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6230 (yydebug_) [YYDEBUG]: New member.
6231 (yycdebug_): Now defined only if YYDEBUG.
6232 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6233 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6234 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6236 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6237 Define only if YYDEBUG.
6238 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6240 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6241 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6242 AT_CHECK_CALC_GLR_CC that are working now.
6244 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6246 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6247 We don't need them in glr.cc, and glr.c defines them.
6248 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6249 assumes that defining it to anything is the same as defining
6250 it to 1. Problem reported by Paolo Bonzini.
6252 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6254 * data/c.m4 (b4_null, b4_case): Define.
6255 * src/output.c (prepare_symbols): Use b4_null.
6256 (user_actions_output): Use b4_case.
6258 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6260 * data/glr.c (b4_shared_declarations): Put start-header first,
6261 before any #includes that we generate, so that feature-test
6262 macros work. Problem reported by Michael Deutschmann in
6263 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6264 * data/lalr1.cc: Likewise.
6265 * doc/bison.texinfo (Prologue): Document that feature-test macros
6266 should be defined before any Bison declarations.
6267 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6268 that depend on location.hh after, not before, Bison decls, since
6269 we now include location.hh after the first user prologue.
6271 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6272 Sander Brandenburg in
6273 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6274 Also, fix minor white space and comment issues.
6275 (Prologue): Mention that it's better to define feature-test macros
6276 before Bison declarations. Problem reported by Michael Deutschmann.
6278 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6280 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6281 This adjusts to recent gnulib changes.
6283 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6285 Finish implementation of per-type %destructor/%printer. Discussed
6287 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6289 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6290 * NEWS (2.3+): Add a description of this feature to the default
6291 %destructor/%printer description.
6292 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6293 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6294 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6295 list node contains a semantic type.
6296 * src/symtab.c, src/symtab.h: Extend with a table that associates
6297 semantic types with their %destructor's and %printer's.
6298 (semantic_type_from_uniqstr, semantic_type_get,
6299 semantic_type_destructor_set, semantic_type_printer_set): New functions
6300 composing the public interface of that table.
6301 (symbol_destructor_get, symbol_destructor_location_get,
6302 symbol_printer_get, symbol_printer_location_get): If there's no
6303 per-symbol %destructor/%printer, look up the per-type before trying
6305 * tests/actions.at (Per-type %printer and %destructor): New test case.
6306 * tests/input.at (Default %printer and %destructor redeclared):
6307 Extend to check that multiple occurrences of %symbol-default in a
6308 single %destructor/%printer declaration is an error.
6309 (Per-type %printer and %destructor redeclared, Unused values with
6310 per-type %destructor): New test cases.
6312 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6314 Require default %destructor/%printer to be declared using
6315 %symbol-default instead of an empty symbol list, and start working on
6316 new per-type %destructor/%printer. Discussed at
6317 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6318 * NEWS (2.3+): Add %symbol-default to example.
6319 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6320 (Table of Symbols): Add entry for %symbol-default.
6321 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6322 (generic_symlist, generic_symlist_item): New nonterminals for creating
6323 a list in which each item is a symbol, semantic type, or
6325 (grammar_declaration): Use generic_symlist in %destructor and %printer
6326 declarations instead of symbols.1 or an empty list.
6327 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6328 for changes to symbol_list.
6329 * src/reader.c: Update for changes to symbol_list.
6330 * src/scan-code.l: Likewise.
6331 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6332 * src/symlist.c, src/symlist.h: Extend such that a list node may
6333 represent a semantic type or a %symbol-default in addition to just an
6334 ordinary symbol. Add switched functions for setting %destructor's and
6336 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6337 %destructor/%printer declarations.
6339 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6341 Whether the default %destructor/%printer applies to a particular symbol
6342 isn't a question of whether the user *declares* that symbol (in %token,
6343 for example). It's a question of whether the user by any means
6344 *defines* the symbol at all (by simply using a char token, for
6345 example). $end is defined by Bison whereas any other token with token
6346 number 0 is defined by the user. The error token is always defined by
6347 Bison regardless of whether the user declares it with %token, but we
6348 may one day let the user define error as a nonterminal instead.
6349 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6350 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6351 the meaning of "user-defined".
6352 * tests/actions.at (Default %printer and %destructor for user-declared
6353 end token): Rename to...
6354 (Default %printer and %destructor for user-defined end token): ...
6357 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6358 computation of whether to apply the default, don't maintain a list of
6359 every Bison-defined symbol. Instead, just check for a first character
6360 of '$', which a user symbol cannot have, and check for the error token.
6362 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6364 Don't apply the default %destructor or %printer to the error token,
6365 $undefined, or $accept. This change fits the general rule that the
6366 default %destructor and %printer are only for user-declared symbols,
6367 and it solves several difficulties that are described in the new test
6369 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6370 * tests/actions.at (Default %printer and %destructor are not for error
6371 or $undefined, Default %printer and %destructor are not for $accept):
6374 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6376 Allow %start after the first rule.
6377 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6378 when parsing the first rule.
6379 (check_and_convert_grammar): Search for it here after all grammar
6380 declarations have been parsed. Skip midrules, which have dummy LHS
6382 * src/symtab.c (symbol_is_dummy): New function.
6383 * src/symtab.h (symbol_is_dummy): Declare it.
6384 * tests/input.at (%start after first rule): New test.
6386 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6388 Redo some of the previous commit: add back the ability to use
6389 non-aliased/undeclared string literals since it might be useful to
6390 those declaring %token-table.
6391 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6392 commit: don't worry about complaints from symbols_pack.
6393 * src/symtab.c (symbol_new, symbol_class_set,
6394 symbol_check_alias_consistency): Undo changes in previous commit: count
6395 each string literal as a new symbol and token, assign it a symbol
6396 number, and don't complain about non-aliased string literals.
6397 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6398 and token counts but does still set aliased tokens to the same number,
6399 symbol_pack_processor now leaves empty slots in the symbols array.
6401 * tests/regression.at (Undeclared string literal): Remove test case
6402 added in previous commit since non-aliased string literals are allowed
6404 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6405 remove unnecessary string literal declarations.
6406 * tests/sets.at (Firsts): Likewise.
6408 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6410 Don't allow an undeclared string literal, but allow a string literal to
6411 be used before its declaration.
6412 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6413 symbols_pack complained.
6414 * src/symtab.c (symbol_new): Don't count a string literal as a new
6416 (symbol_class_set): Don't count a string literal as a new token, and
6417 don't assign it a symbol number since symbol_make_alias does that.
6418 (symbol_make_alias): It's not necessary to decrement the symbol and
6419 token counts anymore. Don't assume that an alias declaration occurs
6420 before any uses of the identifier or string, and thus don't assert that
6421 one of them has the highest symbol number so far.
6422 (symbol_check_alias_consistency): Complain if there's a string literal
6423 that wasn't declared as an alias.
6424 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6425 symbol_pack asserts that every token has been assigned a symbol number
6426 although undeclared string literals have not.
6427 * tests/regression.at (String alias declared after use, Undeclared
6428 string literal): New test cases.
6429 (Characters Escapes, Web2c Actions): Declare string literals as
6431 * tests/sets.at (Firsts): Likewise.
6433 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6435 In the grammar scanner, STRING_FINISH unclosed constructs and return
6436 them to the parser in order to improve error messages.
6437 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6438 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6439 * tests/input.at (Unclosed constructs): New test case.
6440 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6443 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6446 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6448 Handle string aliases for character tokens correctly.
6449 * src/symtab.c (symbol_user_token_number_set): If the token has an
6450 alias, check and set its alias's user token number instead of its own,
6451 which is set to indicate the alias. Previously, every occurrence of
6452 the character token in the grammar overwrote that alias indicator with
6454 * tests/input.at (String aliases for character tokens): New test.
6456 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6458 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6460 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6462 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6463 to prevent failures when building on older platforms.
6464 Check for autopoint failure.
6465 Set XGETTEXT_OPTIONS to values that check for C format strings,
6466 so that translators are warned about them (this also helps
6467 prevent core dumps).
6469 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6470 function, since it simplifies our code a bit.
6472 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6473 rather than -W, so we don't get bogus warnings about sign comparisons.
6474 Add -Wpointer-arith, since that warning is useful (it reports code
6475 that does not conform to C89 and that some compilers reject).
6476 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6477 since it's no longer needed.
6479 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6481 Clean up scanners a bit.
6482 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6483 definitions so gcc won't warn when obstack_for_string is unused.
6484 * src/scan-code.l: config.h and system.h are already #include'd by
6485 scan-code-c.c, so get rid of them here.
6486 * src/scan-gram.l: Likewise.
6487 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6488 definitions rather than duplicating the rest of it.
6489 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6491 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6493 Suppress signed/unsigned comparison warnings for yycheck.
6494 * data/c.m4 (b4_safest_int_type): New macro.
6495 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6496 a signed int type, cast it to b4_safest_int_type first.
6497 * data/yacc.c: Likewise.
6498 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6501 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6503 * doc/bison.texinfo: Fix some typos.
6505 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6507 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6508 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6510 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6511 the latest gnulib does this a different way.
6512 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6513 translation was patched, so stop omitting it.
6515 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6517 Enable declaration of default %printer/%destructor. Make the parser
6518 use these for all user-declared grammar symbols for which the user does
6519 not declare a specific %printer/%destructor. Thus, the parser uses it
6520 for token 0 if the user declares it but not if Bison generates it as
6521 $end. Discussed starting at
6522 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6523 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6525 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6526 * NEWS (2.3+): Mention.
6527 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6528 declare a %destructor for a mid-rule's semantic value. It's just
6529 impossible to declare one specific to it.
6530 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6531 code. Describe default %destructor form.
6532 * src/parse-gram.y (grammar_declaration): Parse default
6533 %printer/%destructor declarations.
6534 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6535 and symbol_destructor_location_get rather than accessing the destructor
6536 and destructor_location members of struct symbol.
6537 (symbol_printers_output): Likewise but for %printer's.
6538 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6540 * src/symtab.c (default_destructor, default_destructor_location,
6541 default_printer, default_printer_location): New static global
6542 variables to record the default %destructor and %printer.
6543 (symbol_destructor_get, symbol_destructor_location_get,
6544 symbol_printer_get, symbol_printer_location_get): New functions to
6545 compute the appropriate %destructor and %printer for a symbol.
6546 (default_destructor_set, default_printer_set): New functions to set the
6547 default %destructor and %printer.
6548 * src/symtab.h: Prototype all those new functions.
6549 * tests/actions.at (Default %printer and %destructor): New test to
6550 check that the right %printer and %destructor are called, that they're
6551 not called for $end, and that $$ and @$ work correctly.
6552 (Default %printer and %destructor for user-declared end token): New
6553 test to check that the default %printer and %destructor are called for
6554 a user-declared end token.
6555 * tests/input.at (Default %printer and %destructor redeclared, Unused
6556 values with default %destructor): New tests to check related grammar
6557 warnings and errors.
6559 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6561 Clean up handling of %destructor for the end token (token 0).
6562 Discussed starting at
6563 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6565 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6567 Make the skeletons consistent in how they pop the end token and invoke
6569 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6570 state, which has token number 0, since this would invoke the
6571 %destructor for the end token.
6572 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6573 until after shifting the end token, or else it won't be popped.
6574 * data/yacc.c (yyparse): Likewise.
6576 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6577 it's the end token. Upon termination, destroy an unshifted lookahead
6578 even when it's the end token.
6579 * data/lalr1.cc (yy::parser::parse): Likewise.
6580 * data/yacc.c (yyparse): Likewise.
6582 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6583 value warnings for the end token when the user gives the end token a
6586 * tests/actions.at (Printers and Destructors): Test all the above.
6588 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6590 Update to latest gnulib and gettext versions.
6591 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6593 (gnulib_files): Add m4/warning.m4. Don't worry about files
6594 overwritten by autopoint.
6595 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6596 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6598 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6599 so that we can remove the intl files at a better time.
6600 (intl_files_to_remove): Remove aclocal.m4, since it gets
6601 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6602 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6603 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6604 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6605 Remove datarootdir hack; no longer needed.
6606 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6607 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6608 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6610 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6611 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6613 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6615 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6616 it with --assume-autoconf='latest-stable'.
6618 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6620 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6621 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6623 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6624 those from muscle_tab.c since the old ones are misleading.
6626 2006-07-13 Akim Demaille <akim@epita.fr>
6628 Support %define "KEY" {VALUE}.
6629 * src/scan-code.h, src/scan-code.l (translate_action)
6630 (translate_rule_action, translate_symbol_action, translate_code):
6631 Return char *, not const char *.
6632 * src/parse-gram.y (declaration): Rename as...
6633 (prologue_declaration): this.
6634 (string_content): Remove this nonterminal, use STRING.
6635 (braceless, content, content.opt): New nonterminal.
6637 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6639 * src/scan-gram.l (getargs.h): Don't include it.
6641 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6643 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6644 rather than a for-loop that declares a local bool variable. This
6645 should work around a compatibility problem with a Cray x1e C++
6646 compiler reported by Hung Nguyen in
6647 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6648 The for-loop was introduced in the 2004-11-17 change but I don't
6649 know why it was needed.
6651 2006-07-12 Akim Demaille <akim@epita.fr>
6653 * data/c.m4: Comment changes.
6655 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6657 * src/complain.c (error_message, ERROR_MESSAGE): New.
6659 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6660 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6662 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6664 * NEWS: Instead of %union, you can define and use your own union type
6665 YYSTYPE if your grammar contains at least one <type> tag.
6666 Your YYSTYPE need not be a macro; it can be a typedef.
6667 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6668 (Union Decl, Decl Summary): Document this.
6669 * data/glr.c (YYSTYPE): Implement this.
6670 * data/glr.cc (YYSTYPE): Likewise.
6671 * data/lalr1.cc (YYSTYPE): Likewise.
6672 * data/yacc.c (YYSTYPE): Likewise.
6673 * src/output.c (prepare): Output tag_seen_flag.
6674 * src/parse-gram.y (declaration, grammar_declaration):
6675 Use 'union_seen' rather than 'typed' to determine whether
6676 %union has been seen, since grammars can now be typed without
6678 (symbol_declaration, type.opt, symbol_def):
6679 Keep track of whether a tag has been seen.
6680 * src/reader.c (union_seen, tag_seen): New vars.
6682 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6683 * src/scan-code.l (untyped_var_seen): New variable.
6684 (handle_action_dollar): Adjust to above changes.
6685 (handle_action_dollar, handle_action_at):
6686 Improve overflow checking for outlandish numbers.
6687 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6688 avoid new diagnostics generated by above changes.
6689 * tests/regression.at (YYSTYPE typedef): Add test to check
6690 for type tags without %union.
6692 * src/symlist.c (symbol_list_length): Return int, not unsigned
6693 int, since callers expect int. This may need to get revisited
6694 once we have proper integer overflow checking.
6696 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6697 object is now static.
6699 * src/getargs.c (flags_argmatch): Return void, not int,
6700 to pacify ./configure --enable-gcc-warnings.
6702 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6703 since last_string is already defined to FLEX_PREFIX (last_string).
6705 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6707 Implement --warnings/-W.
6708 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6710 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6712 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6713 (warnings_args, warnings_types): New.
6714 (getargs, short_options, long_options): Accept -W/--warnings.
6715 Sort the options by alphabetical order, upper case letter right
6716 before its lower case.
6718 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6720 Change %merge result type clash warnings to errors. Discussed at
6721 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6722 * src/reader.c (record_merge_function_type): Use complain_at.
6723 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6724 declared later): Update test case results.
6726 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6728 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6729 to be in alphabetical order.
6730 (trace_args): Spelling fixes.
6732 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6734 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6735 so they don't collide with user-defined macros.
6736 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6737 this was never guaranteed, and now that we're using gnulib stdint,
6738 which defines int_fast16_t to long int, the problem is exposed.
6740 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6742 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6743 need the full POSIX semantics (and weren't implementing them
6746 Adjust to Autoconf 2.60 and today's gnulib.
6747 * bootstrap (gnulib_modules): Add stdint.
6748 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6749 no longer copies it.
6750 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6751 since stdint needs the former and wcwidth (which is now required
6752 by mbswidth) needs the latter.
6753 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6754 work around a compatibility glitch between gettext 0.14.6 and
6756 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6757 Do not check for uintptr_t, since new stdint module does the right
6759 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6760 Add stdint.h, stdint_.h, wcwidth.h.
6761 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6762 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6763 stdint.m4, wchar_t.m4, wcwidth.m4.
6764 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6765 usual order for ../lib/*.h files.
6766 (file_name_split): Use last_component, not base_name, to adjust
6768 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6769 for ../lib/*.h files.
6770 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6771 Define unconditionally, since we now assume the stdint module.
6772 * src/scan-skel.l: Include <dirname.h>.
6773 (BASE_QPUTS): Use last_component, not base_name.
6774 * src/system.h: Include <unlocked-io.h> in the usual order
6775 for ../lib/*.h files. Include <stdint.h> unconditionally,
6776 since we now use the stdint module.
6777 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6778 HAVE_UINTPTR_T, since we now use the stdint module.
6779 (base_name): Remove decl, since files now include <dirname.h>
6782 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6784 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6786 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6787 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6789 * tests/calc.at: Adjust.
6791 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6793 * data/c.m4 (b4_basename): New.
6794 (b4_syncline): Also output the location of its invocation (from
6796 (b4_user_action, b4_define_user_action, b4_user_actions)
6797 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6798 (b4_user_stype): New.
6799 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6801 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6803 In the grammar file, the first column is 1 not 0 on the first line as
6804 on every other line.
6805 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6806 * tests/input.at (Torturing the Scanner): Update output.
6808 * src/scan-gram.l (scanner_cursor): Declare it static.
6810 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6812 In warnings, say "previous declaration" rather than "first
6814 * src/symtab.c (redeclaration): Do that here.
6815 * src/reader.c (record_merge_function_type): In the case of a result
6816 type clash, report the previous declaration rather than the very first
6817 one in the grammar file.
6818 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6819 declared later): Add a third declaration to check this behavior.
6820 * tests/input.at (Incompatible Aliases): Update output.
6822 2006-06-27 Akim Demaille <akim@epita.fr>
6824 * doc/Doxyfile.in: New.
6825 * doc/Makefile.am: Use it.
6826 * src/lalr.h, src/symtab.h: Initial doxygenation.
6828 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6830 Don't miss %merge result type warnings just because the LHS types are
6831 declared after the %merge. This continues the effort of the previous
6833 * src/reader.c (get_merge_function): Don't set the merger type yet.
6834 (record_merge_function_type): New function for setting the merger type
6835 and checking for clashes.
6836 (grammar_current_rule_merge_set): Set the location of the %merge for
6838 (packgram): Invoke record_merge_function_type for each rule now that
6839 all symbol type declarations have been parsed.
6840 * src/reader.h (merger_list.type_declaration_location): New member
6841 storing the location of the first %merge from which the type for this
6842 merging function was derived.
6843 * src/symlist.h (symbol_list.merger_declaration_location): New member
6844 storing the location of a rule's %merge, if any.
6845 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6846 declared later): New test to catch the error fixed by the above patch.
6848 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6850 Get action warnings (grammar_rule_check) right even when symbol
6851 declarations appear after the rules. Discussed at
6852 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6854 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6855 Don't mistake the type of $$ in a midrule to be that of its parent
6857 * src/reader.c (grammar_current_rule_end): Don't invoke
6858 grammar_rule_check yet since not all symbol declarations may have been
6860 (grammar_midrule_action): Likewise.
6861 Don't record whether the midrule's $$ has been used yet since actions
6862 haven't been translated yet.
6863 Record the midrule's parent rule and its RHS index within the parent
6865 (grammar_current_rule_action_append): Don't translate the action yet
6866 since not all symbol declarations may have been parsed yet and, thus,
6867 warnings about types for $$, $n, @$, and @n can't be reported yet.
6868 (packgram): Translate the action and invoke grammar_rule_check now that
6869 all symbol declarations have been parsed.
6870 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6871 after parsing the entire grammar file, the symbol list here in the case
6872 of a midrule is actually the midrule's empty RHS, so reference its
6873 parent rule's RHS where necessary.
6874 On the other hand, now that you can already know it's a midrule, you
6875 aren't forced to think $$ has the same type as its parent rule's $$.
6876 (handle_action_at): In the case of a midrule, reference the parent rule
6878 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6880 (symbol_list_length): Now that this is invoked after all rules have
6881 been parsed, a NULL symbol (rather than a NULL symbol list node)
6882 terminates a rule. symbol_list_print already does this correctly.
6883 * src/symlist.h (symbol_list.midrule_parent_rule,
6884 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6885 remember their relationships with their parents.
6886 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6887 fixed by the above patch.
6888 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6890 (Unused values): ... this old test case and...
6891 (Unused values before symbol declarations): ... this new test case.
6892 This one is the same as `Unused values' except that all symbol
6893 declarations appear after the rules in order to catch the rest of the
6894 errors fixed by the above patch.
6896 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6899 * src/reader.c (current_rule): Declare it static since it's no longer
6900 used outside this file.
6901 (grammar_current_rule_action_append): Remove redundant arguments from
6902 translate_rule_action invocation.
6903 * src/reader.h (current_rule): Remove this unused extern.
6904 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6905 * src/scan-code.l (translate_rule_action): Likewise.
6907 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6909 Clean up yesterday's patch.
6910 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6912 * src/reader.c (grammar_current_rule_action_append): ... here for
6913 consistency with grammar_current_rule_symbol_append.
6914 * tests/regression.at (Braced code in declaration in rules section):
6915 Make yyerror and yylex static as usual.
6917 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6919 Fix bug that mistakes braced code in a declaration in the rules section
6920 to be a rule action. Mentioned at
6921 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6922 * src/scan-gram.l: Move midrule action detection from the start of the
6923 scanning of any braced code to...
6924 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6925 action. For readability, use $2 and @2 rather than the equivalent
6927 * tests/regression.at (Braced code in declaration in rules section):
6928 New test to catch the error fixed by the above patch.
6930 Work on code readability some.
6931 * src/scan-code.l (current_rule): Get rid of this misleading and
6932 redundant declaration: it's actually extern'ed in reader.h.
6933 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6934 translate_action): Add a rule argument and use it instead of the global
6936 (translate_rule_action): This already receives current_rule through an
6937 argument, so pass it on to translate_action instead of assigning
6938 current_rule to current_rule.
6939 (translate_symbol_action, translate_code): Pass rule = NULL to
6942 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6944 Rename %before-definitions to %start-header and %after-definitions to
6945 %end-header. Don't use these declarations to separate pre-prologue
6946 blocks from post-prologue blocks. Add new order-independent
6947 declarations %before-header and %after-header as alternatives to the
6948 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6949 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6950 * NEWS (2.3+): Update for these changes.
6951 * data/glr.c (b4_before_definitions): Update to...
6952 (b4_start_header): ... this.
6953 (b4_after_definitions): Update to...
6954 (b4_end_header): ... this.
6955 * data/glr.cc: Likewise.
6956 * data/lalr1.cc: Likewise.
6957 * data/yacc.c: Likewise.
6958 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6959 prologue blocks with %*-header declarations.
6960 (Calc++ Parser): Likewise.
6961 (Decl Summary): Update names.
6962 (Table of Symbols): Update description.
6963 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6964 (PERCENT_END_HEADER): ... this.
6965 (PERCENT_BEFORE_DEFINITIONS): Update to...
6966 (PERCENT_START_HEADER): ... this.
6967 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6968 (declaration): Update token names and m4 macro names.
6969 When parsing %end-header and %start-header, invoke translate_code
6970 before muscle_code_grow, and no longer set global booleans to remember
6971 whether these declarations have been seen.
6972 Parse new %after-header and %before-header.
6973 * src/reader.c (before_definitions, after_definitions): Remove.
6974 (prologue_augment): Accept a new bool argument to specify whether to
6975 augment the pre-prologue or post-prologue.
6976 * src/reader.h (before_definitions, after_definitions): Remove these
6978 (prologue_augment): Add new bool argument.
6979 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6980 (PERCENT_END_HEADER): ... this.
6981 (PERCENT_BEFORE_DEFINITIONS): Update to...
6982 (PERCENT_START_HEADER): ... this.
6983 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6984 * tests/actions.at (Printers and Destructors): Update names.
6986 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6988 Add comparison operators for C++ location classes. Discussed at
6989 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6990 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6991 declaration indicating whether filename_type has an operator==. If
6992 filename_type is `std::string', it defaults to `1', `0' otherwise.
6993 * data/location.cc: Iff b4_define_location_comparison is `1', add
6994 operator== and operator!= for class position and for class location.
6997 * src/scan-action.l: Remove unused file.
6998 * src/symtab.c (symbol_printer_set): Use printer_location not
6999 destructor_location.
7000 * src/symtab.h (struct symbol): Replace incorrect source comment for
7002 * tests/input.at (Incompatible Aliases): Update output with correct
7005 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7007 Don't put the pre-prologue in the header file. For the yacc.c code
7008 file and the glr.c header and code files, move the pre-prologue before
7009 the token definitions. Add new %before-definitions and
7010 %after-definitions to declare code that will go in both the header file
7011 and code file. Discussed at
7012 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7013 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7015 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7016 * NEWS (2.3+): Describe these changes.
7017 * data/glr.c (b4_pre_prologue): Move from within to before...
7018 (b4_shared_declarations): ... this.
7019 Add new b4_before_definitions before b4_token_enums.
7020 Add new b4_after_definitions at the end.
7021 * data/glr.cc (b4_pre_prologue): Replace with...
7022 (b4_before_definitions): ... this in the header file.
7023 (b4_after_definitions): New near the end of the header file.
7024 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7025 code file right before including the header file.
7026 (b4_before_definitions): New in the previous position of
7027 b4_pre_prologue in the header file.
7028 (b4_after_definitions): New near the end of the header file.
7029 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7030 (b4_token_enums_defines): In the code file, move to right before
7031 YYSTYPE for consistency with the header file.
7032 (b4_before_definitions): New right before b4_token_enums_defines in
7033 both the header and code file.
7034 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7035 header and code file.
7036 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7037 of prologues for %union dependencies.
7038 (Decl Summary): In %defines description, mention the effect of
7039 %before-definitions and %after-definitions on the header file.
7040 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7041 than in the pre-prologue so that make check succeeds.
7042 (Table of Symbols): Add entries for %before-definitions and
7044 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7045 %before-definitions.
7046 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7047 (declaration): Parse those declarations and append to
7048 b4_before_definitions and b4_after_definitions, respectively.
7049 * src/reader.c (before_definitions, after_definitions): New bools to
7050 track whether those declarations have been seen.
7051 (prologue_augment): Add to the post-prologue if %union,
7052 %before-definitions, or %after-definitions has been seen.
7053 * src/reader.h (before_definitions, after_definitions): New extern's.
7054 * src/scan-gram.l: Scan the new declarations.
7055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7056 prologue block in a %before-definitions or a %after-definitions based
7057 on whether the %union is declared.
7058 * tests/regression.at (Early token definitions with --yacc, Early token
7059 definitions without --yacc): Move tests for token definitions into the
7060 post-prologue since token names are no longer defined in the
7063 2006-06-20 Akim Demaille <akim@epita.fr>
7065 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7066 (symbol_get): Use it.
7067 * src/parse-gram.y: Use it.
7069 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7071 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7072 build succeeds when configured with --enable-gcc-warnings.
7074 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7076 * src/parse-gram.y (char_name): New function.
7077 (CHAR, STRING, string_content): For %printer, properly escape.
7078 (ID): Prefer fputs to fprintf.
7079 (id): Reindent to be consistent with other rules.
7080 Properly quote char.
7082 The Translation Project changed its way of publishing translations
7083 to maintainers. I haven't received any responses to my request
7084 for supporting the old way, or for documenting the new way. I
7085 have modified 'bootstrap' to use screen scraping
7086 (in this case, HTML scraping). This is unreliable and inelegant,
7087 but I don't see any better way. Yuck.
7088 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7089 (get_translations): New function, which uses HTML scraping to
7090 deduce locations of latest translations.
7091 Use this function to grab both bison and bison-runtime .po files.
7092 Don't bother priming the pump for the runtime-po domain any more,
7093 as it's now translated better than bison is.
7095 2006-06-19 Akim Demaille <akim@epita.fr>
7097 * src/scan-gram.l: No longer "parse" things after `%union' until
7098 `{'. Rather, return a single "%union" token.
7099 No longer make symbols: return strings, and leave the conversion
7100 to symbols to the parser.
7101 (SC_PRE_CODE, token_type): Remove.
7102 * src/parse-gram.y (%union): New field `character'.
7105 (ID, ID_COLON): Now that the scanner no longer makes them
7106 identifiers, adjust all uses to invoke symbol_get.
7107 (id_colon): New, wraps the conversion from string to symbol.
7108 (%union): Accept a possible union_name.
7109 (symbol): Now can be a char.
7110 * data/c.m4 (b4_union_name): Leave a default value.
7111 * data/glr.c, data/yacc.c: Use it.
7113 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7115 For associating token numbers with token names for "yacc.c", don't use
7116 #define statements unless `--yacc' is specified; always use enum
7117 yytokentype. Most important discussions start at:
7118 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7119 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7121 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7122 * NEWS (2.3+): Mention.
7123 * data/c.m4 (b4_yacc_if): New.
7124 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7126 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7127 on token name definitions.
7128 * src/getargs.c (usage): Capitalize `Yacc' in English.
7129 * src/output.c (prepare): Define b4_yacc_flag.
7130 * tests/regression.at (Early token definitions): Test that tokens names
7131 are defined before the pre-prologue not just before the post-prologue.
7132 Remove this test case and copy to...
7133 (Early token definitions with --yacc): ... this to test #define's.
7134 (Early token definitions without --yacc): ... and this to test enums.
7136 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7138 * NEWS: Reword the post-2.3 change to not be so optimistic about
7139 removing the old "look-ahead" spelling.
7140 Update previous look-ahead/lookahead change reports.
7141 * REFERENCES: look-ahead -> lookahead (since that's
7142 what he actually wrote).
7143 * doc/refcard.tex: look ahead -> lookahead,
7144 look-ahead -> lookahead
7146 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7148 For consistency, use `lookahead' instead of `look-ahead' or
7149 `look_ahead'. Discussed starting at
7150 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7152 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7153 * NEWS: For the next release, note the change to `--report'.
7154 * TODO, doc/bison.1: Update English.
7155 * doc/bison.texinfo: Update English.
7156 (Understanding Your Parser, Bison Options): Document as
7157 `--report=lookahead' rather than `--report=look-ahead'.
7158 * src/conflicts.c: Update English in comments.
7159 (lookahead_set): Rename from look_ahead_set.
7160 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7161 (resolve_sr_conflict): Rename local look_ahead_tokens to
7162 lookahead_tokens, and update other uses.
7163 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7164 count_rr_conflicts, conflicts_free): Update uses.
7165 * src/getargs.c (report_args): Move "lookahead" before alternate
7167 (report_types): Update uses.
7168 (usage): For `--report' usage description, state `lookahead' spelling
7169 rather than `look-ahead'.
7170 * src/getargs.h (report.report_lookahead_tokens): Rename from
7171 report_look_ahead_tokens.
7172 * src/lalr.c: Update English in comments.
7173 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7174 (state_lookahead_tokens_count): Rename from
7175 state_look_ahead_tokens_count.
7176 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7177 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7178 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7180 Update English in output.
7181 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7182 * src/print.c: Update English in comments.
7183 (lookahead_set): Rename from look_ahead_set.
7184 (print_reduction): Rename argument lookahead_token from
7186 (print_core, state_default_rule, print_reductions, print_results):
7188 * src/print_graph.c: Update English in comments.
7189 (print_core): Update uses.
7190 * src/state.c: Update English in comments.
7191 (reductions_new): Update uses.
7192 (state_rule_lookahead_tokens_print): Rename from
7193 state_rule_look_ahead_tokens_print, and update other uses.
7194 * src/state.h: Update English in comments.
7195 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7196 (state_rule_lookahead_tokens_print): Rename from
7197 state_rule_look_ahead_tokens_print.
7198 * src/tables.c: Update English in comments.
7199 (conflict_row, action_row): Update uses.
7200 * tests/glr-regression.at
7201 (Incorrect lookahead during deterministic GLR,
7202 Incorrect lookahead during nondeterministic GLR): Rename
7203 print_look_ahead to print_lookahead.
7204 * tests/torture.at: Update English in comments.
7205 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7206 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7207 (Many lookahead tokens): Update uses.
7208 * data/glr.c: Update English in comments.
7209 * lalr1.cc: Likewise.
7211 * src/conflicts.h: Likewise.
7212 * src/lalr.h: Likewise.
7213 * src/main.c: Likewise.
7214 * src/output.c: Likewise.
7215 * src/parse-gram.c: Likewise.
7216 * src/tables.h: Likewise.
7217 * tests/calc.at: Likewise.
7219 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7221 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7223 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7225 * TODO: Add request from Nelson H. F. Beebe to be able to install
7226 Bison without installing the yacc script.
7228 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7230 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7231 and yytext if they're already #define'd.
7232 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7233 * src/scan-code-c.c: ... here.
7234 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7237 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7239 Get Bison to build again when configured with --enable-gcc-warnings.
7240 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7242 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7243 loc argument as it shadows a global.
7244 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7247 * src/.cvsignore: Add scan-code.c.
7249 2006-06-07 Akim Demaille <akim@epita.fr>
7251 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7253 * src/scan-code.l: here.
7254 * tests/input.at (Torturing the Scanner): Fix another location
7257 2006-06-07 Akim Demaille <akim@epita.fr>
7259 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7261 2006-06-06 Akim Demaille <akim@epita.fr>
7263 Extract the parsing of user actions from the grammar scanner.
7264 As a consequence, the relation between the grammar scanner and
7265 parser is much simpler. We can also split "composite tokens" back
7267 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7268 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7270 * src/location.h, src/location.c (add_column_width)
7271 (location_compute): these.
7272 Fix the column count: the initial column is 0.
7273 (location_print): Be robust to ending column being 0.
7274 * src/location.h (boundary_set): New.
7275 * src/main.c: Adjust to scanner_free being renamed as
7277 * src/output.c: Include scan-code.h.
7278 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7280 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7281 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7282 which is now, again, a separate token.
7283 Adjust all dependencies.
7284 Whereever actions with $ and @ are used, use translate_code.
7285 (action): Remove this nonterminal which is now useless.
7286 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7287 (grammar_current_rule_action_append): Use translate_code.
7288 (packgram): Bound check ruleno, itemno, and rule_length.
7289 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7290 (last_string, last_braced_code_loc, max_left_semantic_context)
7291 (scanner_initialize, scanner_free, scanner_last_string_free)
7292 (gram_out, gram_lineno, YY_DECL_): Move to...
7293 * src/scan-gram.h: this new file.
7294 (YY_DECL): Rename as...
7296 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7297 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7298 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7299 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7300 Move these declarations, and...
7301 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7303 * src/flex-scanner.h: this new file.
7304 * src/scan-gram.l (rule_length, rule_length_overflow)
7305 (increment_rule_length): Remove.
7306 (last_braced_code_loc): Rename as...
7307 (gram_last_braced_code_loc): this.
7308 Adjust to the changes of the parser.
7309 Move all the handling of $ and @ into...
7310 * src/scan-code.l: here.
7311 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7312 (handle_action_dollar, handle_action_at): Move to...
7313 * src/scan-code.l: here.
7314 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7315 scan-code.h, scan-code-c.c, scan-gram.h.
7316 (EXTRA_bison_SOURCES): Add scan-code.l.
7317 (BUILT_SOURCES): Add scan-code.c.
7318 (yacc): Be robust to white spaces.
7320 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7321 * tests/regression.at: Adjust the column numbers.
7322 * tests/regression.at: Adjust the error message.
7324 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7326 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7327 Use Akim's wording from
7328 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7330 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7332 Between Bison releases, manually append `+' to the previous Bison
7333 release number, and use that as a signal to automatically print the
7334 ChangeLog's CVS Id keyword from --version. Discussed starting at
7335 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7336 * ChangeLog: Add Id header.
7337 * configure.ac (AC_INIT): Append `+' to `2.3'.
7338 * src/.cvsignore: Add revision.c.
7339 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7340 (BUILT_SOURCES): Add revision.c.
7341 (revision.c): New target rule. This file defines a new global variable
7342 named revision. It initializes it with either the Id from ChangeLog
7343 or, if VERSION doesn't contain `+', with the empty string.
7344 * src/getargs.c (version): Print the value of revision.
7345 * src/revision.h: Extern revision.
7347 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7349 * NEWS: Version 2.3.
7350 * configure.ac (AC_INIT): Likewise.
7352 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7354 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7355 with no arguments, not as an object-like macro. This is for
7356 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7357 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7358 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7361 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7363 * src/getargs.c (usage): Back out yesterday's modification of the
7364 --help output so that we don't have to wait for translation before
7367 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7369 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7370 Problem reported by Akim Demaille.
7372 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7374 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7376 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7378 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7379 generated source code. Problem reported by Frans Englich in
7380 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7382 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7384 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7385 shell, not within 'make', so that 'make' by an ordinary builder
7386 (using GNU make) does not worry about configuring gzip. This also
7387 works around a bug reported independently by Keith Thompson and by
7388 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7389 stderr rather than stdout, messing up the build logs.
7391 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7393 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7394 to make sure that YYID will never be unused. This fixes a 'make
7395 maintainer-check' failure caused by the recent changes to the 'Trivial
7396 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7398 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7400 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7402 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7403 state before an empty RHS is always resolved here. Only the location
7404 of that state is guaranteed to be resolved, and that's enough. This
7405 fixes the remaining bug reported by Derek M. Jones in
7406 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7407 * tests/glr-regression.at (Uninitialized location when reporting
7408 ambiguity): Test the above case.
7409 Also, the embedded comments in this test case claim it checks the case
7410 of an empty RHS that has inherited the initial location. However, the
7411 corresponding LHS was already resolved, so yyresolveLocations didn't
7412 actually have reason to modify it. Fix this by forcing
7413 nondeterministic operation at the beginning of the parse.
7415 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7417 * data/c.m4 (b4_yy_symbol_print_generate):
7418 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7419 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7420 of the bugs reported today by Derek M Jones in
7421 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7422 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7423 defined to be a type name without parens or brackets.
7424 (Location Type): Similarly for YYLTYPE.
7425 * tests/regression.at (Trivial grammars): Put in a test for this
7426 bug that will be caught by 'make maintainer-check' (though not,
7427 alas, by 'make check' unless your compiler is picky).
7429 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7431 * NEWS: Version 2.2.
7432 * configure.ac (AC_INIT): Likewise.
7434 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7436 * data/glr.c (yyreportTree): Make room in yystates for the state
7437 preceding the RHS. This fixes the segmentation fault reported by Derek
7439 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7440 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7441 to the user. Reported for yyreportTree by Derek M. Jones later in the
7443 * THANKS: Add Derek M. Jones.
7444 Update my email address.
7445 Fix typo in Steve Murphy's name.
7447 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7449 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7450 checking against YYLAST that caused the parser to miss a potential
7451 alternative in its diagnostic.
7452 Problem reported by Maria Jose Moron Fernandez in
7453 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7454 * data/lalr1.cc (yysyntax_error_): Likewise.
7455 * data/yacc.c (yysyntax_error): Likewise.
7456 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7457 tokens, in case we run into an older C compiler.
7458 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7459 Use them to check for the off-by-one error fixed above.
7461 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7462 YYSIZE_T, not size_t.
7463 * tests/regression.at (Trivial grammars): New test, to catch
7464 the error fixed by the above patch.
7466 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7468 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7470 Reported by Steve Murphy.
7472 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7474 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7475 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7477 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7479 Implement --trace=m4.
7480 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7481 * src/output.c (output_skeleton): When set, pass -dV to m4.
7483 Factor the handling of flags in m4.
7484 * src/output.c (prepare): Rename the muscle names debug, defines,
7485 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7486 * data/c.m4: Adjust.
7487 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7488 Use b4_define_flag_if to define other b4_FLAG_if macros.
7489 (b4_location_if): As a consequence, rename as...
7490 (b4_locations_if): this, for consistency.
7491 Adjust all the skeletons.
7493 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7495 * etc/bench.pm: Shorten bench names.
7497 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7499 * src/output.h, src/output.c (error_verbose): Move to...
7500 * src/getargs.h, src/getargs.c: here.
7502 Adjust dependencies.
7504 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7506 * data/c.m4 (b4_copyright): Put the special exception for Bison
7507 skeletons here, so we don't have to put it in each skeleton. All
7508 uses changed. Suggested by Akim Demaille. Also, wrap the
7509 copyright notice, in case it is longer than 80 columns. Replace
7510 comma by newline after title.
7512 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7514 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7515 incompatibility, not a bug. Mention that it wasn't fixed as of
7518 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7520 * examples/extexi: Enforce the precedence of concatenation over
7522 Reported by Tommy Nordgren.
7524 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7526 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7527 with the member "token".
7528 Reported by Martin Nylin.
7530 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7532 * data/glr.c: Switch to Bison 2.2 special-exception language in
7533 the copyright notice. Use more-regular format for titles and
7535 * data/glr.cc: Likewise.
7536 * data/location.cc: Likewise.
7537 * data/yacc.cc: Likewise.
7538 * doc/bison.texinfo (Conditions): Document this.
7539 * NEWS: likewise. Upgrade version to 2.2.
7541 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7543 * data/glr.cc: Remove dead code.
7545 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7547 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7548 that variable and the line breaks the bootstrap. Problem reported
7549 by Juan M. Guerrero.
7551 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7553 * doc/bison.texinfo (Multiple start-symbols): New.
7555 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7557 * etc/README, etc/bench.pl: New.
7559 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7561 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7563 Reported by Mickael Labau.
7564 * tests/input.at (Torturing the Scanner): Test it.
7566 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7568 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7569 Problem reported by Bob Rossi.
7571 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7573 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7574 and didn't really work.
7575 For the index, use @ifnotinfo, not @iftex.
7576 Minor cleanups of spacing and terminology.
7578 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7580 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7581 of AT_NAME_PREFIX when %name-prefix is not used.
7583 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7585 Apply --prefix to C++ skeletons too: they change the namespace.
7586 The test suite already exercize these cases.
7587 * data/c++.m4 (b4_namespace): New.
7588 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7589 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7590 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7591 * doc/bison.texinfo: Document it.
7592 (Option Cross Key): Use @multitable in all formats. It looks
7593 nicer, even in TeX outputs.
7594 (Rules): Use the same code whatever the output type is.
7595 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7596 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7597 * tests/calc.at: Use it, instead of hard coding `yy'.
7599 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7601 * TODO: Remove dead items.
7603 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7605 * doc/FAQ: Remove, merged into...
7606 * doc/bison.texinfo (FAQ): this.
7607 * doc/Makefile.am (EXTRA_DIST): Adjust.
7609 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7611 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7613 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7614 * doc/bison.texinfo (Calc++ Scanner): Use it.
7616 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7618 Fix two nits reported by twlevo, plus one more that I discovered.
7620 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7621 this is the usual Bison style.
7622 * src/location.h (location_print): Likewise.
7624 * src/reader.h (token_name): Likewise.
7626 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7628 Fix some nits reported by twlevo.
7629 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7630 and "POSIX". Use more-modern syntax for URLs. Mention C++
7631 and ask for Java. Don't hardwire OS version numbers. Add
7633 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7634 * src/conflicts.c (solved_conflicts_obstack): Now static.
7636 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7638 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7639 page. Say "you can use it" not "you may use it" as on the web page;
7640 we're describing capabilities not granting permission.
7642 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7644 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7645 shadowing warnings. Use usual patter for iterating through RHS.
7646 * tests/glr-regression.at
7647 (Uninitialized location when reporting ambiguity):
7648 Modify yylex so that it uses its argument, rather than trying
7649 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7650 const char -> char const.
7652 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7653 Don't use tabs inside commands; it messes up 'ps'.
7654 Problem reported by twlevo.
7656 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7658 * tests/glr-regression.at (Uninitialized location when reporting
7659 ambiguity): New test case.
7660 * data/glr.c (yyresolveLocations): New function, which uses
7662 (yyresolveValue): Invoke yyresolveLocations before reporting an
7664 * doc/bison.texinfo (Default Action for Locations): Note
7665 YYLLOC_DEFAULT's usage for ambiguity locations.
7666 (GLR Semantic Actions): Cross-reference those notes.
7668 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7670 * tests/glr-regression.at (Leaked semantic values when reporting
7671 ambiguity): Remove unnecessary union and type declarations.
7672 (Leaked lookahead after nondeterministic parse syntax error): New test
7674 * data/glr.c (yyparse): Check for zero stacks remaining before
7675 attempting to shift the lookahead so that you don't lose it.
7677 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7679 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7680 * tests/glr-regression.at (Leaked semantic values when reporting
7681 ambiguity): New test case.
7682 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7683 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7684 now unnecessary yystackp parameter.
7685 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7686 destructors can be called.
7688 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7689 in existing testcases.
7691 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7693 Don't leak semantic values for parent RHS when a user action cuts the
7694 parser, and clean up related code a bit.
7695 * tests/glr-regression.at (Leaked merged semantic value if user action
7696 cuts parse): Rename to...
7697 (Leaked semantic values if user action cuts parse): ... this. Add check
7698 for leaked parent RHS values.
7699 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7700 between an unresolved state (non-empty chain of semantic options) and
7701 an incomplete one (signaled by an empty chain).
7702 (yyresolveStates): Document the interface. Move all manipulation of a
7703 successfully or unsuccessfully resolved yyGLRState to...
7704 (yyresolveValue): ... here so that yyresolveValue always leaves a
7705 yyGLRState with consistent data and thus is easier to understand.
7706 Remove the yyvalp and yylocp parameters since they are always just
7707 taken from the yys parameter. When reporting a discarded merged value
7708 in debugging output, note that it is incompletely merged. Document the
7710 (yyresolveAction): If resolving any of the RHS states fails, destroy
7711 them all rather than leaking them. Thus, as long as user actions are
7712 written to clean up the RHS correctly, yyresolveAction always cleans up
7713 the RHS of a semantic option. Document the interface.
7715 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7717 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7718 led to a segmentation fault in GNU Pascal. Problem reported
7721 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7723 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7724 mid-rule action inside a nonterminal symbol in order to declare a
7725 destructor for its semantic value.
7727 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7729 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7730 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7731 __cplusplus && ! defined _STDLIB_H && !
7732 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7733 defined free))]: Include <stdlib.h> rather than rolling our own
7734 declarations of malloc and free, to avoid problems with
7735 incompatible declarations (using 'throw') C++'s stdlib.h. This
7736 should fix Debian bug 340012
7737 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7738 reported by Guillaume Melquiond.
7740 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7742 * NEWS: Clarify symbols versus types in unused-value warnings.
7744 * configure.ac (AC_INIT): Bump version number.
7746 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7748 * NEWS: Version 2.1a.
7749 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7750 since C99 requires this.
7752 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7754 * m4/c-working.m4: New file.
7755 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7757 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7759 * Makefile.maint: Merge from coreutils.
7761 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7763 More portability fixes for problems summarized by Nelson H. F. Beebe.
7765 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7766 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7767 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7768 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7769 messes up because C++ code is compiled in 32-bit mode but linked
7772 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7774 More portability fixes for problems summarized by Nelson H. F. Beebe.
7776 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7777 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7779 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7780 nodist_PROGRAMS, since we don't need to actually compile the
7781 example if we're just doing a plain 'make'. This avoids bothering
7782 the installer unnecessarily about problems due to weird C++
7785 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7787 More portability fixes for problems summarized by Nelson H. F. Beebe.
7789 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7790 than #include "...", and compile with -I'.'. The old method was
7791 not portable, according to Posix and the C standard, and it does
7792 not work with Sun C 5.7, where previous #line directives affect
7793 the working directory used in later #include "..." directives.
7795 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7797 Various DJGGP specific issues in /djgpp
7799 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7801 More portability fixes for problems summarized by Nelson H. F. Beebe.
7803 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7804 '#include <map>' works and that you can apply ++ to iterators.
7806 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7808 Work around portability problems summarized by Nelson H. F. Beebe in
7809 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7811 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7812 that '#include <string>' works.
7814 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7815 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7816 "warning: sorry: semantics of inline function static data `const
7817 unsigned char translate_table[262]' are wrong (you'll wind up with
7820 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7821 or, xor to not_, and_, or_, and xor_, respectively. This works
7822 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7823 random system header somewhere that includes the equivalent of
7826 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7827 -E" works; it apparently doesn't work with PathScale EKO Compiler
7830 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7832 During deterministic GLR operation, user actions should be able to
7833 influence the parse by changing yychar. To make this easier to fix and
7834 to make glr.c easier to evolve in general, don't maintain yytoken in
7835 parallel with yychar; just compute yytoken when needed.
7836 * tests/glr-regression.at (Incorrect lookahead during deterministic
7837 GLR): Check that setting yychar in a user action has the intended
7839 * data/glr.c (yyGLRStack): Remove yytokenp member.
7840 (yyclearin): Don't set *yytokenp.
7841 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7842 yychar rather than *yytokenp to determine the current lookahead.
7843 Compute yytoken locally when needed.
7844 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7847 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7848 after `--report' documentation.
7850 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7852 * src/parse-gram.y (grammar_declaration): Location of printer
7853 symbol is @1, not list->location. Bug reported by twlevo.
7854 * tests/input.at (Incompatible Aliases): Adjust to above change.
7856 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7858 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7859 all the test at once. This makes the output easier to read in the
7862 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7863 got from <http://bro-ids.org/download.html>. The bug is that
7864 when two actions appeared in succession, the second one was
7865 scanned before the first one was added to the grammar rule
7866 as a midrule action. Bison then output the incorrect warning
7867 "parse.y:905.17-906.36: warning: unused value: $3".
7868 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7869 associated with a value.
7870 (rhs): Don't invoke grammar_current_rule_action_append.
7871 (action): Invoke it here instead.
7872 * src/reader.c (grammar_midrule_action): Now extern.
7873 (grammar_current_rule_action_append): Don't invoke
7874 grammar_midrule_action; that is now the scanner's job.
7875 * src/reader.h (last_string, last_braced_code_loc):
7876 (grammar_midrule_action): New decls.
7877 * src/scan-gram.l (last_string): Now extern, sigh.
7878 (last_braced_code_loc): New extern variable.
7879 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7880 rule already has an action.
7881 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7882 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7883 Add some tests to check that the above changes fixed the bug.
7885 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7887 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7888 All used changed. Check whether the symbol has a destructor,
7889 not whether it is typed.
7890 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7891 that the values are still reported as unused. All line numbers
7894 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7896 Work around a bug in bro 0.8, which underparenthesizes its
7897 definition of YYLLOC_DEFAULT.
7898 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7900 * data/lalr1.cc: Likewise.
7901 * data/yacc.cc: Likewise.
7903 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7905 Work around a bug in Pike 7.0, and give the Pike folks a
7906 better way to override the usual int widths.
7907 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7908 user can override the types.
7909 (short): #undef, to work around a bug in Pike 7.0.
7910 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7911 (union yyalloc.yyss): Use yytype_int16 rather than short.
7913 (yysigned_char): Remove.
7914 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7915 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7916 * tests/regression.at (Web2c Actions): Adjust to above changes.
7918 * src/reader.c (check_and_convert_grammar): New function.
7919 (reader): Close the input file even if something went wrong during
7920 parsing. Minor file descriptor leak reported by twlevo.
7922 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7923 to pacify gcc -Wswitch-default.
7924 * src/scan-gram.l (adjust_location): Use a default: break; case
7925 to pacify gcc -Wswitch-default.
7926 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7927 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7928 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7929 Move these decls to scan-skel.l, since they don't need to be
7931 * src/scan-skel.l: Accept the above decls.
7932 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7935 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7937 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7938 since we don't want to insist on a version number at the start
7939 of the changelog every time.
7940 * Makefile.maint: Sync from coreutils a bit better.
7941 (sc_trailing_blank): Renamed from sc_trailing_space.
7943 (sc_no_if_have_config_h, sc_require_config_h):
7944 (sc_prohibit_assert_without_use): New rules.
7945 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7946 (sc_dd_max_sym_length): Fix leading spaces in rule.
7947 (sc_system_h_headers): Prefix with @.
7948 (sc_useless_cpp_parens, m4-check): Output line numbers.
7949 (changelog-check): Allow version only in head.
7950 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7951 satisfy new Makefile.maint rule.
7952 * data/glr.c: Likewise.
7953 * data/glr.cc: Likewise.
7954 * data/lalr1.cc: Likewise.
7955 * data/yacc.c: Likewise.
7956 * lib/ebitsetv.c: Likewise.
7957 * lib/lbitset.c: Likewise.
7958 * lib/subpipe.c: Likewise.
7959 * lib/timevar.c: Likewise.
7960 * src/system.h: Likewise.
7961 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7962 * djgpp/Makefile.maint: Add copyright notice.
7963 * djgpp/README.in: Likewise.
7964 * djgpp/config.bat: Likewise.
7965 * djgpp/config.site: Likewise.
7966 * djgpp/config_h.sed: Likewise.
7967 * djgpp/djunpack.bat: Likewise.
7968 * djgpp/config.sed: Fix copyright notice to match standard format.
7969 * djgpp/subpipe.h: Likewise.
7970 * lib/bitsetv-print.c: Likewise.
7971 * lib/bitsetv.c: Likewise.
7972 * lib/subpipe.h: Likewise.
7973 * lib/timevar.c: Likewise.
7974 * lib/timevar.h: Likewise.
7975 * djgpp/subpipe.c: Use standard recipe for config.h.
7976 * lib/abitset.c: Likewise.
7977 * lib/bitset.c: Likewise.
7978 * lib/bitset_stats.c: Likewise.
7979 * lib/bitsetv-print.c: Likewise.
7980 * lib/bitsetv.c: Likewise.
7981 * lib/ebitsetv.c: Likewise.
7982 * lib/get-errno.c: Likewise.
7983 * lib/lbitset.c: Likewise.
7984 * lib/subpipe.c: Likewise.
7985 * lib/timevar.c: Likewise.
7986 * lib/vbitset.c: Likewise.
7987 * tests/local.at: Likewise.
7988 * src/scan-gram.l: Don't include verify.h, since system.h does
7990 * .x-sc_require_config_h: New file.
7991 * .x-sc_unmarked_diagnostics: New file.
7993 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7995 Be a bit more systematic about using 'abort'.
7996 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7997 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7998 Put 'default: abort ();' before some other case, to satisfy older
8000 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8001 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8002 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8003 * src/conflicts.c (resolve_sr_conflict): Likewise.
8004 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8005 (get_decision_str, get_orientation_str, get_node_alignment_str):
8006 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8007 (get_linestyle_str, get_arrowstyle_str): Likewise.
8008 * src/conflicts.c (resolve_sr_conflict):
8009 Use a default case rather than one for the one remaining enum
8010 value, to catch invalid enum values as well.
8011 * src/lalr.c (set_goto_map, map_goto):
8012 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8013 * src/nullable.c (nullable_compute, token_definitions_output):
8015 * src/reader.c (packgram, reader): Likewise.
8016 * src/state.c (transitions_to, state_new, state_reduction_find):
8018 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8019 (symbol_pack): Likewise.
8020 * src/tables.c (conflict_row, pack_vector): Likewise.
8021 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8022 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8023 * src/system.h: Don't include <assert.h>.
8024 (assert): New macro.
8026 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8027 (Destructor Decl, Parser Function, Pure Calling):
8028 Describe rules for braces inside C code more carefully.
8030 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8032 Fix some porting glitches found by Nelson H. F. Beebe.
8033 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8034 compilers that don't understand that abort () does not return.
8035 * src/state.c (transitions_to): Likewise.
8036 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8037 that '#include <cstdlib>' works.
8038 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8039 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8040 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8041 for the benefit of some pre-C99 compilers.
8043 * bootstrap: Undo changes to gnulib files that autoreconf made.
8045 Minor fixups to get 'make maintainer-check' to work.
8046 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8047 with the new verify.h implementation.
8048 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8049 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8050 * data/yacc.c (YYUSE): Likewise.
8051 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8052 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8053 * src/parse-gram.y (declaration): Don't pass a string constant
8054 to a function that expects char *, since GCC might complain
8055 about the constant value.
8056 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8057 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8058 before #defining them.
8059 * tests/glr-regression.at
8060 (Incorrectly initialized location for empty right-hand side in GLR):
8061 In yyerror, use the msg arg.
8062 (Corrupted semantic options if user action cuts parse):
8063 (Incorrect lookahead during deterministic GLR):
8064 (Incorrect lookahead during nondeterministic GLR):
8065 Don't name a local var 'index'; it shadows string.h's 'index'.
8067 2006-01-19 Akim Demaille <akim@epita.fr>
8069 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8070 location, not just parts of it.
8072 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8074 * NEWS: Document the fact that multiple %unions are now allowed.
8075 * doc/bison.texinfo (Union Decl): Likewise.
8076 * TODO: This feature is now implemented, so remove it from
8079 * Makefile.maint: Merge with coreutils Makefile.maint.
8080 (CVS_LIST): Use build-aux version if available.
8081 (VERSION_REGEXP): New macro.
8082 (syntax-check-rules): Add sc_no_if_have_config_h,
8083 sc_prohibit_assert_without_use, sc_require_config_h,
8084 sc_useless_cpp_parens.
8085 (sc_obsolete_symbols): Check for O_NDELAY.
8086 (sc_dd_max_sym_length): Track coreutils.
8087 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8088 (sc_useless_cpp_parens): New rule.
8089 (news-date-check): Look for version or today's date.
8090 (changelog-check): Don't require version number near head.
8091 (copyright-check): Use current year instead of hardwiring 2005.
8092 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8093 (announcement): Add --gpg-key-ID.
8095 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8098 Avoid undefined behavior that addressed just before the start of an
8099 array. Problem reported by twlevo.
8100 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8101 * src/lalr.c (build_relations): Rely on new sentinel.
8102 * src/gram.c (gram_free): Adjust to new sentinel.
8104 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8106 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8107 yylookaheadNeeds. All uses updated.
8108 (yysplitStack): Rename local yynewLookaheadStatuses to
8109 yynewLookaheadNeeds.
8110 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8111 GLR): In comments, change `lookahead status' to `lookahead need'.
8113 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8115 * data/glr.c (yysplitStack): A little stylistic rewrite.
8117 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8119 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8121 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8123 * doc/bison.texinfo: Fix some typos.
8124 (GLR Semantic Actions): New subsection discussing special
8125 considerations because GLR semantic actions might be deferred.
8126 (Actions): Mention look-ahead usage of yylval.
8127 (Actions and Locations): Mention look-ahead usage of yylloc.
8128 (Special Features for Use in Actions): Add YYEOF entry and mention it
8129 in the yychar entry.
8130 In the yychar entry, remove mention of the local yychar case (pure
8131 parser) since this is irrelevant information when writing semantic
8132 actions and since it's already discussed in `Table of Symbols' where
8133 yychar is otherwise described as an external variable.
8134 In the yychar entry, don't call it the `current' look-ahead since it
8135 isn't when semantic actions are deferred.
8136 In the yychar and yyclearin entries, add note about deferred semantic
8138 Add yylloc and yylval entries discussing look-ahead usage.
8139 (Look-Ahead Tokens): When discussing yychar, don't call it the
8140 `current' look-ahead, and do mention yylval and yylloc.
8141 (Error Recovery): Cross-reference `Action Features' when mentioning
8143 (Table of Symbols): In the yychar entry, don't call it the `current'
8145 In the yylloc and yylval entries, mention look-ahead usage.
8147 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8149 * tests/glr-regression.at: Update copyright year to 2006.
8151 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8153 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8154 use during nondeterministic operation to track which stacks have
8155 actually needed the current lookahead.
8156 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8157 Allocate, deallocate, resize, and otherwise shuffle space for
8158 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8159 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8160 appropriately during nondeterministic operation.
8161 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8162 members to store the current lookahead to be used by the deferred
8164 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8165 from which the RHS is taken. Set the lookahead members of the new
8166 yySemanticOption according to the lookahead status for stack yyk.
8167 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8168 yyaddDeferredAction.
8169 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8170 members of yySemanticOption before invoking yyuserAction, and then set
8171 them back to their current values afterward.
8172 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8173 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8174 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8175 titles for consistency.
8176 (Leaked merged semantic value if user action cuts parse): In order to
8177 suppress lint warnings, use arguments in merge function, and assign
8178 char value < 128 in main.
8179 (Incorrect lookahead during deterministic GLR): New test case.
8180 (Incorrect lookahead during nondeterministic GLR): New test case.
8182 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8184 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8185 !yyvaluep as signal that no semantic value is available to print.
8186 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8187 to print a semantic value.
8189 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8191 * tests/glr-regression.at: For consistency with my newer test cases,
8194 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8196 * data/glr.c (yyresolveValue): When merging semantic options, if at
8197 least one user action succeeds but a later one cuts the parse, then
8198 destroy the semantic value before returning rather than leaking it.
8199 (yyresolveStates): If a user action cuts the parse and thus
8200 yyresolveValue fails, ignore the (unset) semantic value rather than
8201 corrupting the yyGLRState, and empty the semantic options list since
8202 the user actions should have called all necessary destructors.
8203 Simplify code with YYCHK.
8204 * tests/glr-regression.at (Corrupted semantic options if user action
8205 cuts parse): New test case.
8206 (Undesirable destructors if user action cuts parse): New test case.
8207 Before applying any of this patch, this test case never actually failed
8208 for me... but only because the corrupted semantic options usually
8210 (Leaked merged semantic value if user action cuts parse): New test
8213 2006-01-05 Akim Demaille <akim@epita.fr>
8215 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8217 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8219 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8220 _MSC_VER. Problem reported by Cenzato Marco.
8221 (b4_c_function_def): Use it.
8222 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8224 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8225 than rolling our own.
8227 2006-01-04 Akim Demaille <akim@epita.fr>
8229 Also warn about non-used mid-rule values.
8230 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8232 (symbol_list_new): Adjust.
8233 * src/reader.c (symbol_typed_p): New.
8234 (grammar_rule_check): Use it.
8235 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8237 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8239 * tests/actions.at (Exotic Dollars): Adjust.
8241 2006-01-04 Akim Demaille <akim@epita.fr>
8243 * src/reader.c (grammar_midrule_action): If $$ is set in a
8244 mid-rule, move the `used' bit to its lhs.
8245 * tests/input.at (Unused values): New.
8246 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8248 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8250 * doc/bison.texinfo (Bison Options): Say more accurately what
8252 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8253 about declarations in the grammar when in Yacc mode, as POSIX does
8254 not require a diagnostic when the grammar uses extensions.
8256 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8258 Warn about dubious constructions like "%token T T".
8260 * src/symtab.h (struct symbol.declared): New member.
8261 * src/symtab.c (symbol_new): Initialize it to false.
8262 (symbol_class_set): New arg DECLARING, specifying whether
8263 this is a declaration that we want to warn about, if there
8264 is more than one of them. All uses changed.
8266 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8267 Allow multiple %union directives, whose contents concatenate.
8268 * src/parse-gram.y (grammar_declaration): Likewise.
8269 Use muscle_code_grow, so that we don't need stype_line any more.
8272 * src/muscle_tab.c (muscle_grow): Fix comment.
8274 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8275 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8276 Update copyright year to 2006.
8278 2006-01-03 Akim Demaille <akim@epita.fr>
8280 Have glr.cc pass (some of) the calc.at tests.
8281 * data/glr.cc (b4_parse_param_orig): New.
8282 (b4_parse_param): Improve its definition, and bound it more
8283 clearly in the skeleton.
8284 (b4_epilogue): Append, instead of prepending, in order to keep
8286 Simplify the generation of auxiliary functions: locations and
8287 purity are mandated.
8288 (b4_global_tokens_and_yystype): Honor it.
8289 * data/location.cc (c++.m4): Don't include it.
8290 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8292 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8294 Be sure to initialize the first position's filename.
8295 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8297 (AT_CHECK_CALC_GLR_CC): New.
8298 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8300 2006-01-02 Akim Demaille <akim@epita.fr>
8302 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8304 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8305 * data/glr.cc: Do not include stack.hh.
8307 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8309 * data/glr.c: Reformat whitespace with tabs.
8310 (b4_lpure_formals): Remove this unused m4 macro.
8311 * tests/cxx-type.at: Reformat whitespace with tabs.
8312 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8313 since it's a member. Rename type to isNterm for clarity.
8315 2005-12-29 Akim <akim@sulaco.local>
8317 Let glr.cc catch up with symbol_value_print.
8318 * data/glr.cc (b4_yysymprint_generate): Replace by...
8319 (b4_yy_symbol_print_generate): this.
8320 (yy_symbol_print, yy_symbol_value_print): Declare them.
8322 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8324 * src/location.h (boundary): Note that a line or column equal
8325 to INT_MAX indicates an overflow.
8326 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8327 (rule_length_overflow, increment_rule_length, add_column_width):
8329 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8330 (<SC_BRACED_CODE>"}"):
8331 Use increment_rule_length rather than incrementing it by hand.
8332 (adjust_location, handle_syncline): Diagnose overflow.
8333 (handle_action_dollar, handle_action_at):
8334 Fix bug with monstrosities like $-2147483648.
8335 Remove now-unnecessary checks.
8336 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8337 (convert_ucn_to_byte): Verify assumptions.
8338 (handle_syncline): New arg LOC. All callers changed.
8339 Don't store through a value derived from char const * pointer.
8341 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8344 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8346 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8347 Remove unnecessary forward static decls.
8349 2005-12-27 Akim Demaille <akim@epita.fr>
8351 * src/reader.c (grammar_current_rule_check): Also check that $$
8353 Take the rule to check as argument, hence rename as...
8354 (grammar_rule_check): this.
8355 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8357 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8358 (grammar_midrule_action, grammar_symbol_append): Now static.
8359 * tests/torture.at (input): Don't rely on the default action
8360 being always performed.
8361 * tests/calc.at: "Set" $$ even when the action is "cut" with
8363 * tests/actions.at (Exotic Dollars): Instead of using unused
8364 values, check that the warning is issued.
8366 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8368 * NEWS: Improve wording for unused-value warnings.
8370 2005-12-22 Akim Demaille <akim@epita.fr>
8372 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8373 (b4_yysymprint_generate): Rename as...
8374 (b4_yy_symbol_print_generate): this.
8375 Generate yy_symbol_print instead of yysymprint.
8376 Generate also yy_symbol_value_print, and use it.
8378 2005-12-22 Akim Demaille <akim@epita.fr>
8380 * NEWS: Warn about unused values.
8381 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8383 (symbol_list_n_get, symbol_list_n_used_set): New.
8384 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8385 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8386 * src/reader.c (grammar_current_rule_check): Check that values are
8388 * src/symtab.c (symbol_print): Accept 0.
8389 * tests/existing.at: Remove the type information.
8391 Remove useless actions (beware of mid-rule actions: perl -000
8392 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8393 * tests/actions.at (Exotic Dollars): Use unused values.
8394 * tests/calc.at: Likewise.
8395 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8398 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8401 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8403 Undo 2005-12-01 tentative license wording change. The wording is
8404 still being reviewed by the lawyers, and we don't want to wait for
8405 them before publishing a test release. For now, revert to the
8407 * NEWS: Undo 2005-12-01 change.
8408 * data/glr.c: Revert to previous license wording.
8409 * data/glr.cc: Likewise.
8410 * data/lalr1.cc: Likewise.
8411 * data/location.cc: Likewise.
8412 * data/yacc.c: Likewise.
8414 * NEWS: Reword %destructor vs YYABORT etc.
8415 * data/glr.c: Use American spacing, for consistency.
8416 * data/glr.cc: Likewise.
8417 * data/lalr1.cc: Likewise.
8418 * data/yacc.c: Likewise.
8419 * data/yacc.c: Reformat comments slightly.
8420 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8421 for consistency. Fix some spelling errors and reword recently-included
8423 * tests/cxx-type.at: Cast results of malloc, for C++.
8425 2005-12-21 Joel E. Denny <address@hidden>
8427 * tests/cxx-type.at: Construct a tree, count the parents of shared
8428 nodes, and free each node once and only once. Previously, the memory
8429 for semantic values was leaked instead.
8431 2005-12-21 Joel E. Denny <address@hidden>
8433 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8434 (yylval, yylloc): If pure, #define to yystackp->yyval and
8435 yystackp->yyloc similar to yychar and yynerrs.
8436 (yyparse): If pure, remove local yylval and yylloc. Add local
8437 yystackp to accommodate pure definitions of yylval and yylloc.
8438 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8439 yylvalp and yyllocp to &yylval and &yylloc.
8440 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8441 namespace. Previously, nerrs and char were missing, but lval and lloc
8443 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8444 yylvalp and yyllocp parameters since, if pure, these are now always
8445 accessible through yystackp. If not pure, they are still accessible
8447 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8448 `if (YYID (N))' to pacify lint.
8450 2005-12-21 Akim Demaille <akim@epita.fr>
8452 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8453 destroy the RHS symbols of a rule.
8454 * data/yacc.c (yylen): Initialize to 0.
8455 Keep its value to the number of items to possibly shift.
8456 In particular, a regular successful parse that ends on YYFINAL by
8457 a (internal) YYACCEPT must not have yylen != 0.
8458 (yyerrorlab, yyreturn): Pop the RHS.
8459 Reorder a bit to emphasize the `shifting' bits of code.
8460 (YYPOPSTACK): Now accept a number of items to pop.
8461 * data/lalr1.cc: Likewise.
8462 * data/glr.c: Formatting changes.
8463 Use goto instead of fall through.
8464 * doc/bison.texinfo (Destructor Decl): Complete.
8466 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8468 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8469 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8470 * djgpp/config.bat: Replace every occurence of the file name
8471 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8472 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8473 * djgpp/config.sed: Replace every occurence of the file name
8474 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8475 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8476 * djgpp/djunpack.bat: DJGPP specific file.
8477 * djgpp/fnchange.lst: DJGPP specific file.
8478 * djgpp/README.in: Add new information about how to unpack the bison
8479 source on MSDOS and other systems which have 8.3 file name restrictions
8480 using djunpack.bat and fnchange.lst.
8482 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8484 * bootstrap (build_cvs_prefix): Remove; unused.
8485 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8486 when getting gnulib.
8488 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8490 * data/glr.c: Reorder typedef declarations for structs to match order
8491 of struct declarations.
8492 Rename yystack everywhere to yystackp except in yyparse where it's not
8494 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8496 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8497 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8498 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8501 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8503 * tests/sets.at (Accept): Fix typos in regular expression used to
8504 sed out the final state number.
8506 Work around portability problem on Solaris 10: flex-generated
8507 files include <stdio.h> before <config.h>, which messes up
8508 because the latter defines __EXTENSIONS__. Address the problem
8509 by creating two new little files that include <config.h> first,
8510 then include the flex-generated files. Rewrite everyone else
8511 to include <config.h> first, as well.
8512 * lib/timevar.c: Always include "config.h".
8513 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8514 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8515 (EXTRA_bison_SOURCES): New macro.
8516 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8517 * src/system.h: Don't include config.h.
8518 * src/LR0.c: Include <config.h> first.
8519 * src/assoc.c: Likewise.
8520 * src/closure.c: Likewise.
8521 * src/complain.c: Likewise.
8522 * src/conflicts.c: Likewise.
8523 * src/derives.c: Likewise.
8524 * src/files.c: Likewise.
8525 * src/getargs.c: Likewise.
8526 * src/gram.c: Likewise.
8527 * src/lalr.c: Likewise.
8528 * src/location.c: Likewise.
8529 * src/main.c: Likewise.
8530 * src/muscle_tab.c: Likewise.
8531 * src/nullable.c: Likewise.
8532 * src/output.c: Likewise.
8533 * src/parse-gram.y: Likewise.
8534 * src/print.c: Likewise.
8535 * src/print_graph.c: Likewise.
8536 * src/reader.c: Likewise.
8537 * src/reduce.c: Likewise.
8538 * src/relation.c: Likewise.
8539 * src/state.c: Likewise.
8540 * src/symlist.c: Likewise.
8541 * src/symtab.c: Likewise.
8542 * src/tables.c: Likewise.
8543 * src/uniqstr.c: Likewise.
8544 * src/vcg.c: Likewise.
8546 * src/parse-gram.y: Fix minor problems uncovered by lint.
8547 (current_lhs, current_lhs_location): Now static.
8548 (current_assoc): Remove unused variable.
8550 Cleanups so that Bison-generated parsers have less lint.
8551 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8552 Prepend /*ARGSUSED*/, for lint's sake.
8553 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8554 definition if 'lint' is defined.
8555 (YYID): New macro (or function, if lint).
8556 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8557 * data/yacc.c: Likewise.
8558 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8559 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8560 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8562 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8563 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8564 Use YYID(0) rather than 0, for lint.
8565 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8566 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8568 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8570 * tests/glr-regression.at
8571 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8572 Close memory leak reported by twlevo.
8574 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8576 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8578 (yyparse): Iterate another stack in order to call user destructors.
8579 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8581 (Duplicated user destructor for lookahead): This test now is expected
8584 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8586 * NEWS: Document the following change.
8587 * data/yacc.c: Say "parser skeleton" rather than "file", since
8588 it's no longer just a file.
8589 * data/glr.c: Grant a special exception for C GLR parsers, that
8590 reads like the already-existing exception for C LALR(1) parsers.
8591 * data/glr.cc: Likewise.
8592 * data/lalr1.cc: Likewise.
8593 * data/location.cc: Likewise.
8594 * data/yacc.c: Reword the "written by" statement to clarify that
8595 it was the parser skeleton, not the entire output file.
8596 * data/glr.c: Written by Paul Hilfinger.
8597 * data/glr.cc: Written by Akim Demaille.
8598 * data/lalr1.cc: Likewise.
8600 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8602 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8603 Fix typos in previous change that broke 'make check'.
8604 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8606 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8607 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8608 We can revert this once things settle down.
8610 * src/conflicts.c (conflicts_print): Don't print file name twice
8611 when %expect fails because there were no conflicts.
8612 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8614 * tests/conflicts.at (%expect not enough, %expect too much):
8615 (%expect with reduce conflicts): Adjust to new behavior.
8617 2005-11-18 Akim Demaille <akim@epita.fr>
8619 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8621 * NEWS: Document this.
8622 * doc/bison.texinfo (Expect Decl): Likewise.
8624 2005-11-16 Akim Demaille <akim@epita.fr>
8626 Generalize the display of semantic values and locations in traces.
8627 * data/glr.c (yy_reduce_print): Fix indices (again).
8628 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8630 * data/lalr1.cc (yyreduce_print): Rename as...
8631 (yy_reduce_print): this.
8632 Display values and locations.
8633 * data/yacc.c (yy_reduce_print): Likewise.
8634 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8635 (yysymprint): Move higher to be visible from yy_reduce_print).
8637 * tests/calc.at: Adjust the expected length of the traces.
8639 2005-11-14 Akim Demaille <akim@epita.fr>
8641 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8642 from 1 to N, while values and location start at 0.
8643 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8645 2005-11-14 Akim Demaille <akim@epita.fr>
8647 * data/glr.c (yy_reduce_print): Fix the $ number.
8649 2005-11-14 Akim Demaille <akim@epita.fr>
8651 "Use" parse parameters.
8652 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8653 * data/glr.c, data/glr.cc: Use them.
8654 * data/glr.c (YYUSE): Have a C++ definition that supports
8657 2005-11-14 Akim Demaille <akim@epita.fr>
8659 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8661 2005-11-14 Akim Demaille <akim@epita.fr>
8664 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8666 2005-11-12 Akim Demaille <akim@epita.fr>
8668 Let position and location be PODs.
8669 * data/location.cc (position::initialize, location::initialize): New.
8670 (position::position, location::location): Define only if
8671 b4_location_constructors is defined.
8672 * data/lalr1.cc (b4_location_constructors): Define it for backward
8674 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8676 2005-11-12 Akim Demaille <akim@epita.fr>
8678 * data/lalr1.cc: Move the body of the ctor and dtor into the
8679 parser file (instead of the header).
8680 Wrap the implementations in a "namespace yy".
8682 2005-11-12 Akim Demaille <akim@epita.fr>
8684 Have glr.c include its header file when created.
8685 * data/glr.c (b4_shared_declarations): New.
8686 Output them verbatim in the parser if !%defines, otherwise
8687 output then in the header file, and include it instead.
8689 2005-11-11 Akim Demaille <akim@epita.fr>
8691 * data/glr.c: Comment changes.
8693 2005-11-11 Akim Demaille <akim@epita.fr>
8695 When yydebug, report semantic and location values for reductions.
8696 * data/glr.c (yy_reduce_print): Report the semantic values and the
8698 (YY_REDUCE_PRINT): Adjust.
8699 (yyglrReduce): Use them.
8700 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8701 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8702 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8705 2005-11-10 Akim Demaille <akim@epita.fr>
8707 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8708 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8709 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8711 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8713 * m4/cxx.m4, examples/Makefile.am: Don't build
8714 examples/calc++ if no C++ compiler is available. (trivial change)
8716 2005-11-09 Akim Demaille <akim@epita.fr>
8718 * src/scan-skel.l: Use a couple of asserts.
8720 2005-11-03 Akim Demaille <akim@epita.fr>
8722 In some (weird) cases, the final state number is incorrect.
8723 Reported by Alexandre Duret-Lutz.
8724 * src/LR0.c (state_list_append): Remove the computation of
8726 (save_reductions): Do it here.
8727 (get_state): Alpha conversion.
8728 (generate_states): Use a for loop.
8729 * src/gram.h (item_number_is_rule_number)
8730 (item_number_is_symbol_number): New.
8731 * src/state.c: Use assert.
8732 * src/system.h: Include assert.h.
8733 * tests/sets.at (Accept): New.
8735 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8737 * data/glr.c (yyfill): Adjust comment.
8738 (yyresolveAction): Initialize default location properly
8739 for empty right-hand sides.
8740 (yydoAction): Ditto.
8741 Add comment explaining apparently dead code.
8742 * tests/glr-regression.at
8743 (Incorrectly initialized location for empty right-hand side in GLR):
8746 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8748 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8749 gnulib when interrupted. This fixes some race conditions and
8750 works around some portability problems (one noted by Paul
8753 2005-10-22 Akim <akim@epita.fr>
8755 * Makefile.cfg: Adjust to config -> build-aux.
8758 2005-10-21 Akim Demaille <akim@epita.fr>
8760 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8762 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8763 * data/yacc.c (b4_Pure_if): Rename as...
8764 (b4_yacc_pure_if): this.
8765 (YY_SYMBOL_PRINT, yyparse): Adjust.
8766 * doc/bison.texinfo: Formatting changes.
8768 2005-10-21 Akim Demaille <akim@epita.fr>
8770 Finish the transition config -> build-aux.
8771 * configure.ac, Makefile.am: Use build-aux.
8772 * config/prev-version, config/announce-gen, config/Makefile.am:
8774 * build-aux/prev-version, build-aux/announce-gen,
8775 * build-aux/Makefile.am: here.
8777 2005-10-14 Akim Demaille <akim@epita.fr>
8779 * examples/calc++/test: Use set -x only when VERBOSE.
8781 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8783 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8784 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8786 2005-10-13 Akim Demaille <akim@epita.fr>
8788 * src/scan-skel.l: Output the base name parts of the parser and
8790 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8792 Use this to exercise C++ outputs in subdirs.
8793 Reported by Oleg Smolsky.
8795 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8797 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8798 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8799 Problem reported by John P. Hartmann.
8800 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8803 2005-10-12 Akim Demaille <akim@epita.fr>
8805 * src/parse-gram.y (version_check): Exit 63 to please missing
8806 (stands for "version mismatch).
8807 * tests/input.at, doc/bison.texinfo: Adjust.
8809 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8811 Work around portability problems with Visual Age C compiler
8812 (xlc and xlC_r) reported by John P. Hartmann.
8813 * data/location.cc (initial_column, initial_line): Remove.
8814 All uses replaced by 0 and 1.
8815 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8816 that xlc complains about.
8817 * src/scan-skel.l (skel_wrap): Likewise.
8818 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8820 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8821 __STDC_VERSION__. Use it everywhere instead of looking at
8822 __STDC__ and __cplusplus.
8824 2005-10-10 Akim Demaille <akim@epita.fr>
8826 * examples/calc++/test: Be quiet unless VERBOSE.
8828 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8830 * data/c.m4 (yydestruct, yysymprint):
8831 Use YYUSE instead of casting to void.
8832 * data/glr.c (YYUSE): New macro.
8833 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8834 Use it instead of rolling our own.
8835 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8837 Use /*CONSTCOND*/ to suppress lint warnings.
8838 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8839 (YY_STACK_PRINT): Use 'false' not '0'.
8841 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8842 * data/yacc.c (YYUSE): New macro.
8843 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8844 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8845 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8848 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8849 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8851 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8853 Undo the parts of the unlocked-I/O change that substituted
8854 putc or puts for printf. This might hurt performance a bit,
8855 but some people prefer the printf style.
8856 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8857 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8858 All uses replaced by YYFPRINTF and YYDPRINTF.
8859 * data/yacc.c: Likewise.
8860 * lib/bitset.c (bitset_print): Likewise.
8861 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8863 * lib/lbitset.c (debug_lbitset): Likewise.
8864 * src/closure.c (print_firsts, print_fderives): Likewise.
8865 * src/gram.c (grammar_dump): Likewise.
8866 * src/lalr.c (look_ahead_tokens_print): Likewise.
8867 * src/output.c (escaped_output): Likewise.
8868 (user_actions_output): Break apart two printfs.
8869 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8870 * src/reduce.c (reduce_print): Likewise.
8871 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8872 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8874 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8875 Use assignments rather than casts-to-void to suppress
8876 unused-variable warnings. This pacifies 'lint'.
8877 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8878 unused-variable warnings.
8880 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8882 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8884 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8886 Use unlocked I/O for a minor performance improvement on hosts like
8887 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8888 is to use the gnlib unlocked-io module, and to prefer putc and
8889 puts to printf when either will work (since the latter doesn't
8890 come in an unlocked flavor).
8891 * bootstrap (gnulib_modules): Add unlocked-io.
8892 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8893 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8894 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8895 and similarly for puts and putc and printf.
8896 * data/yacc.c: Likewise.
8897 * lib/bitset.c (bitset_print): Likewise.
8898 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8899 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8901 * lib/lbitset.c (debug_lbitset): Likewise.
8902 * src/closure.c (print_firsts, print_fderives): Likewise.
8903 * src/gram.c (grammar_dump): Likewise.
8904 * src/lalr.c (look_ahead_tokens_print): Likewise.
8905 * src/output.c (escaped_output): Likewise.
8906 (user_actions_output): Coalesce two printfs.
8907 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8908 * src/reduce.c (reduce_print): Likewise.
8909 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8910 * src/system.h: Include unlocked-io.h rather than stdio.h.
8912 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8913 this confuses xgettext.
8915 2005-10-02 Akim Demaille <akim@epita.fr>
8917 * bootstrap (gnulib_modules): Add strverscmp.
8918 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8919 * m4/.cvsignore: Add strverscmp.m4.
8920 * src/parse-gram.y (%require): New token, new rule.
8921 (version_check): New.
8922 * src/scan-gram.l (%require): Adjust.
8923 * tests/input.at (AT_REQUIRE): New.
8925 * doc/bison.texinfo (Require Decl): New.
8926 (Calc++ Parser): Use %require.
8928 2005-10-02 Akim Demaille <akim@epita.fr>
8930 * data/location.cc: New.
8932 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8933 Akim Demaille <akim@epita.fr>
8935 Make sure -odir/foo.cc creates dir/location.hh etc.
8936 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8937 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8938 (spec_defines_file): Now const.
8940 (short_base_name): Remove.
8941 * src/files.c: Adjust.
8942 (dirname.h): Include.
8943 (base_name): Don't prototype it.
8944 (finput): Remove, duplicates gram_in.
8945 (full_base_name, short_base_name): Replace by...
8946 (all_but_ext, all_but_tab_ext): these.
8947 (compute_base_names): Rename as...
8948 (compute_file_name_parts): this.
8949 Update to compute the new variables, including dir_prefix.
8950 Adjust dependencies.
8951 * src/output.c (prepare): Output them.
8952 * src/reader.c: Adjust to use gram_in, not finput.
8953 * src/scan-skel.l (@dir_prefix@): New.
8955 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8957 * lib/subpipe.c: New function end_of_output_subpipe() added
8958 to allow support for non-posix systems. This is a no-op function
8961 * lib/subpipe.h: New function end_of_output_subpipe() added
8962 to allow support for non-posix systems. This is a no-op function
8965 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8966 handle the lack of pipe/fork functionality on non-posix systems.
8968 * djgpp/Makefile.maint: DJGPP specific file.
8970 * djgpp/README.in: DJGPP specific file.
8972 * djgpp/config.bat: DJGPP specific configuration file.
8974 * djgpp/config.sed: DJGPP specific configuration file.
8976 * djgpp/config.site: DJGPP specific configuration file.
8978 * djgpp/config_h.sed: DJGPP specific configuration file.
8980 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8982 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8984 2005-10-02 Akim Demaille <akim@epita.fr>
8986 * data/location.cc: New, extract from...
8987 * data/lalr1.cc: here.
8988 (location.hh): Include it after the user prologue, in case the
8989 filename type is defined by the user.
8990 Forward declation location and position before the pre-prologue.
8991 (yyresult_): Rename as...
8992 (yyresult): this, it's a local variable, not an attribute.
8993 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8995 2005-10-01 Akim Demaille <akim@epita.fr>
8997 * examples/extexi: Restore the #line generation.
8999 2005-09-30 Akim Demaille <akim@epita.fr>,
9000 Alexandre Duret-Lutz <adl@gnu.org>
9002 Move the token type and YYSTYPE in the parser class.
9003 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9004 (parser::token): New, from the moved free definition of tokens.
9005 (parser::semantic_value): Now a full definition instead of an
9006 indirection to YYSTYPE.
9007 (b4_post_prologue): No longer included in the header file, but
9008 in the implementation file.
9009 * doc/bison.texi (C+ Language Interface): Update.
9010 * src/parse-gram.y: Support unary %define.
9011 * tests/actions.at: Define global_tokens_and_yystype for backward
9012 compatibility until we update the tests.
9013 * tests/calc.at: Idem.
9014 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9015 to simplify the code.
9017 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9019 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9020 Ah, the good old days! Problem reported by Peter Klein.
9021 * bootstrap (gnulib_modules): Add strerror, strtoul.
9022 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9023 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9025 2005-09-29 Akim Demaille <akim@epita.fr>
9027 * data/c.m4 (b4_error_verbose_if): New.
9028 * data/lalr1.cc: Use it.
9029 (YYERROR_VERBOSE_IF): Remove.
9030 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9031 parser members, replaced by...
9032 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9034 (yysyntax_error_): Takes the state number as argument.
9035 (yyreduce_print_): Use the argument yyrule, not the former
9038 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9040 * bootstrap (gnulib_modules): Add verify.
9041 * lib/.cvsignore: Add verify.h.
9042 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9043 * src/system.h (verify): Remove.
9044 Include verify.h instead.
9045 * src/tables.c (tables_generate): Use new API for 'verify'.
9047 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9049 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9050 local variables whose names begin with 'yy'.
9051 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9052 Trivial changes from Joel E. Denny.
9054 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9056 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9057 don't use alloca any more.
9059 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9060 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9061 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9062 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9063 to match yacc.c, to test more hosts.
9065 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9067 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9068 doesn't affect behavior.
9069 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9071 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9072 This works a bit better with glibc, if user code has already included
9074 * doc/bison.texinfo (Bison Parser): Document that users can't
9075 arbitrarily use malloc and free for other purposes. Document
9076 that <alloca.h> and <malloc.h> might be included.
9077 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9078 user must declare alloca.
9080 * HACKING (release): Forwarn the Translation Project about
9083 2005-09-20 Akim Demaille <akim@epita.fr>
9085 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9087 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9089 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9090 (YYSTACK_ALLOC_MAXIMUM): Use it.
9091 (yysyntax_error): New function.
9092 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9093 multiple syntax errors are reported, and alloca is being used.
9094 Instead, reallocate buffers twice as big each time, so that
9095 we waste at most half the allocated memory. Start with a small
9096 (128-byte) buffer that will suffice in most cases anyway.
9097 Use yysyntax_error to do most of the work.
9099 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9100 yynerrs is the number of errors reported, not the number of
9103 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9104 Mark it as expected to fail.
9105 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9106 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9107 Don't start user-code symbols with "yy", to avoid name space problems.
9109 2005-09-19 Akim Demaille <akim@epita.fr>
9111 Remove the traits, failed experiment.
9112 It never proved useful, and anyway because of the current
9113 definition, it was not possible to have several specialization of
9114 this traits, making it useless.
9115 * data/lalr1.cc (yy:traits): Remove.
9116 Inline its definitions in the parser class.
9118 2005-09-19 Akim Demaille <akim@epita.fr>
9120 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9121 least Mac OSX with a /usr/local install of gettext.
9123 2005-09-19 Akim Demaille <akim@epita.fr>
9125 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9126 and yytoken for similarity with the other skeletons.
9128 2005-09-19 Akim Demaille <akim@epita.fr>
9130 * NEWS, configure.ac: update version number to 2.1a.
9132 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9134 * NEWS: Version 2.1.
9136 * NEWS: Remove notice of yytname change, since it was never in an
9138 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9140 * src/output.c (prepare): Likewise.
9141 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9142 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9143 is not defined. This is an awful hack, but it's enough for now.
9144 All callers changed.
9145 * tests/glr-regression-at (make_value): Args are const pointers now,
9146 to avoid GCC warning.
9147 (Duplicated user destructor for lookahead): New test. Currently
9148 skipped. It fails on my host but I'm not sure it'll always fail.
9150 2005-09-16 Akim Demaille <akim@epita.fr>
9152 * src/symtab.h (struct symbol): Declare the printer and destructor
9153 as const, to avoid accidental calls to free.
9154 (symbol_destructor_set, symbol_printer_set): Adjust.
9155 * src/symtab.c: Adjust.
9157 2005-09-16 Akim Demaille <akim@epita.fr>
9159 * data/c.m4 (b4_token_enums): New.
9160 (b4_token_defines): Rename as...
9161 (b4_token_enums_defines): this.
9162 (b4_token_defines): New, output only the #defines.
9163 * data/yacc.c, data/glr.c: Adjust.
9164 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9165 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9168 2005-09-16 Akim Demaille <akim@epita.fr>
9170 * data/lalr1.cc (yylex_): Remove, inline its code.
9171 (yyreport_syntax_error_): Remove, replaced by...
9172 (yysyntax_error_): this which returns a string and leaves to the
9173 caller the call to the users' error function.
9174 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9175 Move from members of the parser object...
9176 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9177 to local variables of the parse function.
9179 2005-09-16 Akim Demaille <akim@epita.fr>
9181 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9182 since it's in Bison's name space.
9184 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9186 * data/glr.c (yyresolveValue): Add default case to pacify
9187 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9189 * NEWS: Document when yyparse started to return 2.
9190 * doc/bison.texinfo (Parser Function): Document when yyparse
9193 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9194 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9196 (class position): file_name -> filename (reverting). All uses changed.
9198 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9200 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9201 do anything if $@ exists. This reverts part of the 2005-07-07
9204 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9206 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9207 contains obsolete information and isn't worth distributing as a
9208 separate file anyway.
9209 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9210 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9211 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9212 (yyparse): Abort if user code uses longjmp to throw an unexpected
9215 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9217 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9218 Suggested by twlevo@xs4all.nl.
9220 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9221 This avoids a diagnostic from gcc -Wswitch-enum.
9222 Problem reported by twlevo@xs4all.nl.
9224 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9225 standards. Use "file name" or "file" or "name", depending on
9227 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9228 not to hack/foo.tab.c.
9229 (Calc++ Top Level): 2nd arg of main is not const.
9230 * data/glr.c: b4_filename -> b4_file_name.
9231 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9233 (class position): filename -> file_name. All uses changed.
9234 * data/yacc.c: b4_filename -> b4_file_name.
9235 * lib/bitset.h: filename -> file_name in local vars.
9236 * lib/bitset_stats.c: Likewise.
9237 * src/files.c: Likewise.
9238 * src/scan-skel.l ("@output ".*\n): Likewise.
9239 * src/files.c (file_name_split): Renamed from filename_split.
9240 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9242 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9244 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9245 to accommodate latest gnulib.
9247 * tests/glr-regression.at (Duplicate representation of merged trees):
9248 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9250 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9253 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9255 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9256 All uses changed. Invoke user destructor after an error during a
9257 split parse (trivial change from Joel E. Denny).
9259 * tests/glr-regression.at
9260 (User destructor after an error during a split parse): New test case.
9261 Problem reported by Joel E. Denny in:
9262 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9264 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9266 * README-cvs: Give URLs for recommended tools.
9267 Mention Gzip version problem, and bootstrapping issues.
9268 Remove troubleshooting section, as it's somewhat obsolete.
9270 * bootstrap (no_cache): New var, to accommodate different wget
9271 variants. Use it instead of '-C off'. Problem reported by
9274 * data/glr.c (yydestroyStackItem): New function.
9275 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9276 debugging information. Problem reported by Joel E. Denny.
9278 2005-08-25 Akim Demaille <akim@epita.fr>
9280 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9282 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9284 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9285 Don't invoke destructor on unresolved entries.
9286 * tests/glr-regression.at
9287 (User destructor for unresolved GLR semantic value): New test case.
9288 Problem reported by Joel E. Denny in:
9289 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9291 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9293 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9295 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9296 lib-prefix.m4, po.m4.
9298 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9299 in yydestruct diagnostic, since it might not be an error.
9300 Problem reported by Joel Denny near end of
9301 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9302 * data/lalr1.cc (yyerturn): Likewise.
9303 * data/yacc.c (yyreturn): Likewise.
9304 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9306 * src/files.c: Remove obsolete FIXME comment.
9308 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9309 with the other templates, and to fix bogus run-on messages such
9310 as the one reported at the end of
9311 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9312 All callers changed to avoid the newline.
9313 (yyprocessOneStack): Output two lines rather than one, to accommodate
9314 the above change. This changes the debug output format slightly.
9316 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9317 reported by Joel E. Denny in
9318 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9320 * tests/glr-regression.at (Duplicate representation of merged trees):
9321 New test, from Joel E. Denny in:
9322 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9323 * THANKS: Add Joel E. Denny.
9325 * configure.ac (AC_INIT): Bump to 2.0c.
9327 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9329 * NEWS: Version 2.0b.
9331 * Makefile.am (SUBDIRS): Put examples before tests, so that
9332 "make check" doesn't finish with "All 1 tests passed".
9334 * tests/regression.at (Token definitions): Don't rely on
9335 AT_PARSER_CHECK for data that contains backslashes. It currently
9336 uses 'echo', and 'echo' isn't portable if its argument contains
9337 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9338 that the byte '\0xff' is not printable in the C locale; it is,
9339 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9340 not printable, so use '\0x81' to test.
9342 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9343 version of GCC, since the macro is used with non-GCC compilers.
9345 Fix core dump reported by Pablo De Napoli in
9346 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9347 * tests/regression.at (Invalid inputs with {}): New test.
9348 * src/parse-gram.y (token_name): Translate type before using
9351 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9352 the user's name space. All uses changed to __attribute__
9354 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9355 Add __attribute__ ((__noreturn__)).
9357 * etc/clcommit: Remove. We weren't using it, and it failed
9358 "make maintainer-distcheck".
9359 * Makefile.maint: Merge from coreutils.
9360 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9361 (syntax-check-rules): Change list of rules as described below.
9362 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9363 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9364 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9365 (sc_trailing_space): New rules.
9366 (sc_xalloc_h_in_src): Remove.
9367 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9368 (sc_space_tab, sc_error_exit_success, sc_changelog):
9369 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9370 (makefile-check, po-check, author_mark_check):
9371 (makefile_path_separator_check, copyright-check):
9372 Use grep -n, to make it easier to find violations.
9373 Use CVS_LIST and CVS_LIST_EXCEPT.
9374 (header_regexp, h_re): Remove.
9376 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9377 (my-distcheck): Use more-modern GCC flags.
9378 (signatures, %.asc): Remove.
9379 (rel-files, announcement): Remove signatures.
9380 Restore old updating code, even though we don't use it, so
9381 that we're the same as coreutils.
9382 (alpha, beta, major): Depend on news-date-check.
9383 Make the upload commands.
9385 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9386 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9387 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9388 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9389 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9390 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9391 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9392 * tests/sets.at: Likewise.
9394 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9395 we comment out the Autoconf version number.
9396 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9397 it's error-prone and "make maintainer-distcheck" rejects it.
9399 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9400 Indent calls to "error" to pacify "make maintainer-distcheck",
9401 when the calls are not intended to be translated.
9402 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9404 * src/Makefile.am (DEFS): Use +=, to pacify
9405 "make maintainer-distcheck".
9406 (bison_SOURCES): Add scan-skel.h.
9407 (sc_tight_scope): New rule, from coreutils.
9409 * src/files.c (src_extension, header_extension):
9410 Now static, not extern.
9411 * src/getargs.c (short_options): Likewise.
9412 * src/muscle_tab.c (muscle_table): Likewise.
9413 * src/parse-gram.y (current_class, current_type, current_prec):
9415 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9416 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9417 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9418 void, to avoid warning when NLS is disabled.
9419 * src/output.c: Include scan-skel.h.
9420 (scan_skel): Remove decl, since scan-skel.h does this.
9422 Indent calls to "error" to pacify "make maintainer-distcheck".
9423 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9424 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9425 "make maintainer-distcheck".
9426 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9427 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9428 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9429 (skel_lex_destroy, scan_skel): Move these decls to...
9430 * src/scan-skel.h: New file.
9431 * src/uniqstr.c (uniqstr_assert):
9432 Indent calls to "error" to pacify "make maintainer-distcheck".
9434 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9437 * tests/torture.at: Revamp to avoid misuse of atoi that
9438 "make maintainer-distcheck" complained about.
9440 * examples/extexi (message): Don't print a message more than once,
9441 and omit line-number decoration that makes Emacs compile think
9442 that informative messages are worth worrying about.
9444 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9446 * configure.ac: Update version number.
9448 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9450 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9451 autogenerated by the maintainer.
9452 * examples/calc++/.cvsignore: Add *.yy.
9454 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9455 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9456 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9458 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9460 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9461 from maintainer-distcheck about casting the argument of 'free'.
9463 * NEWS: Mention recent yytname changes.
9464 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9466 * bootstrap: For translations that have not yet been upgraded to
9467 the new runtime-po domain, prime the pump by extracting the
9468 relevant strings from the obsolete translations. This code can be
9469 removed once the bison-runtime domain has been translated by each
9472 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9473 now that token names are already quoted.
9475 Fix problem reported by Anthony Heading.
9476 * data/glr.c (YYTOKEN_TABLE): New macro.
9477 (yytname): Define if YYTOKEN_TABLE.
9478 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9479 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9480 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9481 * src/output.c (prepare_symbols): Output token_table_flag.
9483 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9485 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9486 again if the first call fails.
9488 * data/glr.c (yytnamerr): New function.
9489 (yyreportSyntaxError): Use it to dequote most string literals.
9490 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9491 with other skeletons. All uses changed.
9492 (yytnameerr_): New function.
9493 (yyreport_syntax_error): Use it to dequote most string literals.
9494 * data/yacc.c (yytnamerr): New function.
9495 (yyerrlab): Use it to decode most string literals.
9496 * doc/bison.texinfo (Decl Summary, Calling Convention):
9497 Clarify quoting convention of yytname.
9498 * src/output.c (prepare_symbols): Quote all names. This undoes
9499 the 2005-04-17 change, which is now accomplished (mostly) via
9500 changes in the parsers as described above.
9501 * tests/regression.at (Token definitions, Web2c Actions):
9502 Undo most 2005-04-17 change here, too.
9504 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9506 Fix more problems reported by twlevo@xs4all.nl.
9507 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9508 remove trailing spaces. This loses the exit status of ./types,
9509 and isn't needed since ./types shouldn't be emitting trailing
9511 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9512 as the stack isn't valid in that case.
9514 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9515 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9516 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9517 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9519 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9520 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9521 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9524 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9525 overly-picky compilers that reject 'char *foo = "bar";'.
9527 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9528 to FILE * parameter, not to stderr. This fixes a typo introduced
9529 in the 2005-07-12 change.
9531 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9532 warnings from GCC 4.
9534 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9535 (yyglrShiftDefer, yysplitStack):
9536 Remove unused parameters b4_pure_formals. All uses changed.
9537 (yyglrShift): Remove unused parameters b4_user_formals.
9539 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9541 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9543 Destructor cleanups and regularization among the three skeletons.
9544 * NEWS: Document the behavior changes.
9545 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9546 stack before failing, as the cleanup code will do it for us now.
9547 * data/lalr1.cc (yyerrlab): Likewise.
9548 * data/glr.c (yyparse): Pop everything off the stack before
9549 freeing it, so that destructors get called properly.
9550 * data/lalr1.cc (yyreturn): Likewise.
9551 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9552 This is more consistent.
9553 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9554 why destructors might be called. 1.875 -> 2.1.
9555 (Destructor Decl, Decl Summary, Table of Symbols):
9556 Some English-language cleanups for %destructor.
9557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9558 Add output line for destructor of start symbol.
9559 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9560 because of that same extra output line.
9562 * NEWS: Document minor wording changes in diagnostics of
9563 Bison-generated parsers.
9564 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9565 Remove unused formals. All uses changed.
9566 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9567 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9568 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9569 Rename yyoverflowab to yyexhaustedlab.
9570 When memory exhaustion occurs during syntax-error reporting,
9571 report it separately rather than in a single diagnostic; this
9573 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9574 (Memory Exhausted): Renamed from Parser Stack Overflow.
9575 Revamp wording slightly to prefer "memory exhaustion".
9576 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9578 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9580 Add i18n support to the GLR skeleton. Partially fix the C++
9581 skeleton; a C++ expert needs to finish this. Remove debugging
9582 msgids; there's little point to having them translated, since they
9583 can be understood only by someone who can read the
9584 (English-language) source code.
9586 Generate runtime-po/bison-runtime.pot automatically, so that we
9587 don't have to worry about garbage getting in that file. We'll
9588 make sure after the next official release that old msgids don't
9590 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9592 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9594 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9595 Fix typos in explanations of the runtime file.
9596 * bootstrap: Change gettext keyword from YYI18N to YY_.
9597 Use standard Makefile.in.in in runtime-po, since we'll arrange
9598 for backward-compatible bison-runtime.po files in a different way.
9599 * data/glr.c (YY_): New macro, from yacc.c.
9600 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9601 Translate messages intended for users.
9602 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9603 the wording in the other skeletons. We don't know that the memory
9605 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9606 Use same method that yacc.c uses.
9607 Don't translate debugging messages.
9608 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9609 it doesn't work (yet), and requires C++ expertise to fix.
9610 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9611 Move defn to a more logical place, to be consistent with other
9613 Don't translate debugging messages.
9614 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9615 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9616 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9617 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9619 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9620 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9622 * tests/glr-regression.at (Badly Collapsed GLR States):
9624 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9625 yylex should return 0 at EOF rather than aborting.
9627 Improve tests for stack overflow in GLR parser.
9628 Problem reported by twlevo@xs4all.nl.
9629 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9631 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9632 can handle the problem.
9633 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9634 (yyparse): New local variable yyresult to record the result.
9635 Use result of setjmp to set it, rather than storing itinto
9637 (yyDone): Remove label.
9638 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9639 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9640 if YYABORT is used).
9641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9642 yyparse status; put status > 1 into diagnostic.
9643 Check that status==2 works.
9644 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9645 Use exit status 3 for failure to open (which shouldn't happen).
9647 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9649 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9650 1 on syntax error; just let yyparse do its thing.
9651 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9652 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9653 (Exploding the Stack Size with Alloca):
9654 (Exploding the Stack Size with Malloc):
9655 Expect exit status 2, not 1, since the parser is supposed to blow
9656 its stack. Problem reported by twlevo@xs4all.nl.
9658 * data/glr.c (yyparse): Don't assume that the initial calls
9659 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9660 Print a stack-overflow message and fail instead.
9661 Initialize the line-number information before creating the stack,
9662 so that the stack-overflow message can report line zero safely.
9664 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9666 Fix problems reported by twlevo@xs4all.nl.
9667 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9668 (yyuserMerge): Provide a default case if b4_mergers is empty.
9669 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9670 * tests/glr-regression.at
9671 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9672 Add casts to pacify C++ compilers.
9673 * tests/glr-regression.at (Improper merging of GLR delayed action
9674 sets): Declare yylex before using it.
9675 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9676 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9677 test for valgrind; valgrind is independent of g++.
9678 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9679 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9680 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9681 Use a destructor, so that we can expand the stack. Change
9682 YYSTYPE to char * so that we can free it. Cast result of malloc.
9684 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9686 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9687 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9689 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9691 * PACKAGING: New file, suggested by Bruno Haible and taken from
9692 similar wording in gettext's PACKAGING file.
9693 * NEWS: Mention PACKAGING.
9694 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9696 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9698 * NEWS: Document recent i18n improvements.
9699 * bootstrap: Get runtime translations into runtime-po.
9700 Create runtime-po files automatically, if possible.
9701 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9702 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9703 does not infringe on the user's name space.
9704 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9705 * doc/bison.texinfo (Internationalization): Revamp the English
9706 and Texinfo syntax a bit, to try to make it clearer.
9707 (Bison Options, Option Cross Key): Mention --print-localedir.
9708 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9709 YYENABLE_NLS. Quote a bit more.
9710 * runtime-po/.cvsignore: New file.
9711 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9712 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9713 * runtime-po/quot.sed: Likewise.
9714 * runtime-po/boldquot.sed: Likewise.
9715 * runtime-po/en@quot.header: Likewise.
9716 * runtime-po/en@boldquot.header: Likewise.
9717 * runtime-po/insert-header.sin: Likewise.
9718 * runtime-po/remove-potcdate.sin: Likewise.
9719 * runtime-po/Makevars: Likewise.
9720 * runtime-po/LINGUAS: Likewise.
9721 * runtime-po/de.po: Likewise; we will rely on the translation project
9722 to maintain this, so "bootstrap" should get it.
9723 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9725 * src/main.c (main): Bind the bison-runtime domain, too.
9727 2005-07-12 Bruno Haible <bruno@clisp.org>
9729 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9730 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9731 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9732 * runtime-po: New directory.
9733 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9734 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9735 * runtime-po/Rules-quot: New file, copied from po/.
9736 * runtime-po/quot.sed: Likewise.
9737 * runtime-po/boldquot.sed: Likewise.
9738 * runtime-po/en@quot.header: Likewise.
9739 * runtime-po/en@boldquot.header: Likewise.
9740 * runtime-po/insert-header.sin: Likewise.
9741 * runtime-po/remove-potcdate.sin: Likewise.
9742 * runtime-po/Makevars: New file.
9743 * runtime-po/POTFILES.in: New file.
9744 * runtime-po/LINGUAS: New file.
9745 * runtime-po/bison-runtime.pot: New file.
9746 * runtime-po/de.po: New file.
9747 * m4/bison.m4: New file.
9748 * Makefile.am (SUBDIRS): Add runtime-po.
9749 (aclocaldir, aclocal_DATA): New variables.
9750 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9752 * src/getargs.c (usage): Document --print-localedir option.
9753 (PRINT_LOCALEDIR_OPTION): New enum item.
9754 (long_options): Add --print-localedir option.
9755 (getargs): Handle --print-localedir option.
9756 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9757 (Internationalization): New section.
9759 2005-07-12 Akim Demaille <akim@epita.fr>
9761 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9762 for consistency with the rest of the code.
9763 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9766 2005-07-12 Akim Demaille <akim@epita.fr>
9768 * src/parse-gram.y: Use %printer instead of YYPRINT.
9770 2005-07-12 Akim Demaille <akim@epita.fr>
9772 * src/symtab.h, src/symtab.c (symbol_print): New.
9773 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9774 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9776 2005-07-12 Akim Demaille <akim@epita.fr>
9778 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9779 b4_at_dollar and b4_dollar_dollar.
9781 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9783 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9784 and Pennello's paper.
9786 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9788 * data/yacc.c (yyparse): Undo previous patch. Instead,
9789 set yylsp[0] and yyvsp[0] only if the initial action
9790 sets yylloc and yylval, respectively.
9792 * data/yacc.c (yyparse): In the initial action, set
9793 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9794 This avoids the use of undefined variables if the initial
9795 action does not set yylloc and/or yylval.
9797 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9799 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9800 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9801 Remove from CVS. These files are automatically generated.
9802 * examples/extexi: Clarify that this file is now part of Bison,
9803 not GNU M4, and that it works with any POSIX-compatible Awk.
9804 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9805 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9806 so that we also get calc++-parser.yy. Geneate it.
9807 Use $(AWK), not gawk, since any conforming Awk will do.
9808 Put comment before action, since older 'make' can't handle comment
9810 $(BUILT_SOURCES): List all built sources, not just some of them.
9811 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9812 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9813 $($(calc_sources_generated)): Remove unnecessary test for existence
9814 of target. (This had a shell syntax error anyway; a stray "x".)
9815 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9817 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9819 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9820 implied by the other modules.
9822 2005-07-06 Akim Demaille <akim@epita.fr>
9824 Bind examples/calc++ to the package.
9825 * examples/calc++/Makefile: Remove, replaced by...
9826 * examples/calc++/Makefile.am: ... this new file.
9827 * examples/calc++/test: Remove input.
9828 * examples/calc++/compile: Remove.
9829 * examples/Makefile.am: New.
9830 * configure.ac, Makefile.am: Adjust.
9831 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9833 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9835 * data/glr.c (yyFail): Drastically simplify; since the format argument
9836 never had any % directives, we can simply pass it to yyerror.
9837 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9838 be modified later, as that is the usual style in glr.c.
9839 Problems reported by Paul Hilfinger.
9841 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9842 and size overflow errors.
9843 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9844 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9845 (YYSIZEMAX): New macro.
9846 (yystpcpy): New function, taken from yacc.c.
9847 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9848 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9849 so that we don't have to maintain their signatures.
9850 (yyFail): Check for buffer overflow, by using vsnprintf rather
9851 than vsprintf. Allocate a bigger buffer if possible.
9852 Report an error if buffer allocation fails.
9853 (yyStackOverflow): New function.
9854 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9855 the initialization was successful. It might fail if storage was
9857 (yyexpandGLRStack): Add more checks for storage allocation failure.
9858 Use yyStackOverflow to report failures.
9859 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9860 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9861 Don't assume stack number fits in int.
9862 (yysplitStack): Check for storage allocation failure.
9863 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9864 can print diagnostics on storage allocation failure. All callers
9866 (yyresolveValue): Use yybool for boolean.
9867 (yyreportSyntaxError): Check for size-calculation overflow.
9868 This code is taken from yacc.c.
9869 (yyparse): Check for storage allocation errors when allocating
9872 2005-07-05 Akim Demaille <akim@epita.fr>
9874 Extract calc++ from the documentation.
9875 * doc/bison.texinfo (Calc++): Add the extraction marks.
9876 * examples/extexi: New, from the aborted GNU Programming 2E.
9877 Separate the different paragraph of a file with empty lines.
9878 * examples/Makefile: Use it to extract the whole calc++ example.
9880 2005-06-24 Akim Demaille <akim@epita.fr>
9882 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9885 2005-06-22 Akim Demaille <akim@epita.fr>
9887 * doc/bison.texinfo (C++ Language Interface): First stab.
9888 (C++ Parsers): Remove.
9890 2005-06-22 Akim Demaille <akim@epita.fr>
9892 * data/lalr1.cc (yylex_): Honor %lex-param.
9894 2005-06-22 Akim Demaille <akim@epita.fr>
9896 Start a set of simple examples.
9897 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9898 * examples/calc++/calc++-driver.hh,
9899 * examples/calc++/calc++-parser.yy,
9900 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9901 * examples/calc++/compile, examples/calc++/test: New.
9903 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9905 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9906 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9907 which stems from the 2005-05-27 patch.
9909 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9911 * data/glr.c: Modify treatment of unused parameters to permit use
9912 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9914 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9916 Fix infringement on user name space reported by Janos Zoltan Szabo.
9917 * data/yacc.c (yyparse): strlen -> yystrlen.
9919 2005-05-30 Akim Demaille <akim@epita.fr>
9921 * data/lalr1.cc (_): New.
9922 Translate the various messages.
9924 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9926 Fix infringement on user name space reported by Bruno Haible.
9927 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9928 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9929 the user's name space.
9930 (alloca): Include <stdlib.h> to get it, if it's not built in.
9931 (YYMALLOC, YYFREE): Define only if needed.
9932 (malloc, free): Declare, but only if needed, as this infringes on
9933 the user name space.
9935 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9937 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9938 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9940 * lib/ebitset.c (min, max): Undef before defining.
9941 * lib/vbitset.c (min, max): Likewise.
9942 * lib/subpipe.c (create_subpipe): Save local variables in case
9943 vfork clobbers them.
9945 2005-05-24 Bruno Haible <bruno@clisp.org>
9947 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9948 error message syntax used by gcc-4.0.
9950 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9952 * README: Mention m4 1.4.3. Remove obsolete advice about
9953 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9955 * bootstrap: Remove workaround for problem I encountered with
9956 gettext 0.14.1; it seems to be fixed now.
9958 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9960 * NEWS: Version 2.0a.
9962 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9963 the previous change.
9965 Various maintainer cleanups.
9966 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9967 conftest*, for benefit of CVS commands run at the same time as
9968 "configure". Add build-aux, since "bootstrap" now creates it and
9970 * Makefile.cfg (move_if_change): Remove.
9971 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9972 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9973 (po_repo, do-po-update, po-update, wget_files, get-targets):
9974 (config.guess-url_prefix, config.sub-url_prefix):
9975 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9976 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9977 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9979 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9980 this is now the recommended name.
9981 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9982 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9983 ylwrap. These files now go into build-aux.
9984 * config/move-if-change: Remove.
9985 * config/prev-version.txt: Bump from 1.75 to 2.0.
9987 * bootstrap: Add stdio-safer, unistd-safer modules.
9988 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9990 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9991 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9992 * lib/subpipe.c: Include "unistd-safer.h".
9993 (create_subpipe): Make sure all the newly-created
9994 file descriptors are > 2, so that diagnostics don't
9995 get sent down them (which might cause Bison to hang, in theory).
9996 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9997 * src/files.c (xfopen): Use fopen_safer, not fopen.
9999 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10000 yesterday's yacc.c fix.
10002 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10004 * data/glr.c, data/lalr1.cc: Update copyright date.
10006 Fix a destructor bug reported by Wolfgang Spraul in
10007 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10008 * data/yacc.c (yyabortlab): Don't call destructor, and
10009 don't set yychar to EMPTY.
10010 (yyoverflowlab): Don't call destructor.
10011 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10012 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10013 since we no longer output the message "discarding lookahead token
10016 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10018 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10019 fix a small glitch in debugging output.
10020 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10021 after YY_SYMBOL_PRINT where needed.
10023 (struct yyGLRState): Add some comments.
10024 (struct yySemanticOption): Add some comments.
10025 (union yyGLRStackItem): Add comment.
10027 (yymergeOptionSets): Correct this to properly perform the union,
10028 avoiding infinite reported by Michael Rosien.
10031 * tests/glr-regression.at: Add test for GLR merging error reported
10034 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10036 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10037 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10038 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10039 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10040 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10041 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10042 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10043 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10044 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10045 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10046 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10047 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10048 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10049 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10050 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10051 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10052 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10053 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10054 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10055 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10056 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10057 src/output.h, src/parse-gram.c, src/parse-gram.h,
10058 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10059 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10060 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10061 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10062 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10063 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10064 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10065 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10066 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10067 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10068 tests/reduce.at, tests/regression.at, tests/sets.at,
10069 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10070 Update FSF postal mail address.
10072 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10074 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10075 Problem reported by Ralf Menzel.
10077 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10079 * tests/actions.at: Test that stack overflow invokes destructors.
10080 From Marcus Holland-Moritz.
10081 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10083 (yyreturn): to here. That way, destructors are called properly
10084 even if the stack overflows, or the user calls YYACCEPT or
10085 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10086 (yyoverflowlab): Destroy the lookahead.
10088 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10090 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10092 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10094 * NEWS: Bison-generated C parsers no longer quote literal strings
10095 associated with tokens.
10096 * src/output.c (prepare_symbols): Don't escape strings,
10097 since users don't want to see C escapes.
10098 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10100 * tests/input.at (Torturing the Scanner): Likewise.
10101 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10103 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10105 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10106 the data size is known to be too small and we can't increase it.
10107 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10109 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10111 * src/parse-gram.y: Include quotearg.h.
10112 (string_as_id): Quote $1 before using it as a key, since the
10113 lexer no longer quotes it for us.
10114 (string_content): Don't strip quotes, since lexer no longer
10116 * src/scan-gram.l: Include quotearg.h.
10117 ("\""): Omit quote.
10118 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10119 a key, since the rest of the lexer doesn't quote it.
10120 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10121 * tests/regression.at (Token definitions): Check for backslashes
10124 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10125 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10126 (yyparse): Revamp code to generate long syntax error message, to
10127 make it easier to translate, and to avoid problems with arithmetic
10128 overflow. Change "virtual memory" to "memory" in diagnostic, since
10129 we don't know whether the memory is virtual.
10131 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10133 * NEWS: Bison-generated C parsers now use the _ macro to
10135 * data/yacc.c (_) [!defined _]: New macro.
10136 All English strings wrapped inside this macro.
10137 * doc/bison.texinfo (Bison Parser): Document _.
10138 * po/POTFILES.in: Include src/parse-gram.c, since it now
10139 includes translateable strings that parse-gram.y doesn't.
10141 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10143 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10144 reverting the 2004-10-11 change to this function.
10145 (symbol_check_alias_consistency): Don't call symbol_type_set
10146 if the type name is already correct.
10147 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10149 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10151 * tests/regression.at (Token definitions): Don't use a token named
10152 c, as that generates a "#define c ..." that runs afoul of buggy
10153 stdlib.h that uses the identifier c as a member of struct
10154 drand48_data. Problem reported by Horst Wente.
10156 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10158 * bootstrap: Change translation URL from
10159 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10160 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10161 redirection glitches. Problem reported by twlevo@xs4all.nl.
10163 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10165 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10166 after operands; POSIX says this isn't portable for the c99 command.
10168 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10170 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10171 immediately if a data overrun has occurred; this may help us track
10172 down what may be a spurious failure on MacOS.
10174 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10176 Respond to problems reported by twlevo@xs4all.nl.
10178 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10180 * src/vcg.h: Comment fix.
10181 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10182 (G_CMAX): Change to -1 instead of INT_MAX.
10184 * data/yacc.c (yyparse): Omit spaces before #line.
10186 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10188 * src/tables.c (state_number_to_vector_number): Put it inside an
10189 "#if 0", since it's not currently used. Problem reported by
10192 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10194 * src/output.c (escaped_output): Renamed from
10195 escaped_file_name_output, since we now use it for symbol tags as
10196 well. All uses changed.
10197 (symbol_destructors_output, symbol_printers_output):
10198 Escape symbol tags too.
10199 Problem reported by Matyas Forstner in
10200 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10202 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10204 * src/output.c (user_actions_output, token_definitions_output,
10205 symbol_destructors_output, symbol_printers_output): Likewise.
10206 * src/reader.c (prologue_augment): Likewise.
10207 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10209 * src/vcg.c (output_edge): Don't quote linestyle arg.
10210 Problem reported by twlevo@xs4all.nl.
10212 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10214 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10215 example, reported by Derek M Jones. Also, make the example even
10216 more outrageous, to better illustrate how bad the problem is.
10218 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10220 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10221 putsym. Typo reported by Sebastian Piping.
10223 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10225 * doc/bison.texinfo (Language and Grammar): some -> same
10226 (Epilogue): int he -> in the
10227 Typos reported by Sebastian Piping via Justin Pence.
10229 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10231 * tests/glr-regression.at (Improper handling of embedded actions
10232 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10233 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10234 with dollar signs in test names.
10235 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10236 for a similar reason.
10238 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10240 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10241 wants to redefine G_VIEW.
10243 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10245 * src/vcg.c (get_view_str): Remove case for normal_view.
10246 Problem reported by twlevo@xs4all.nl.
10248 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10250 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10251 Problem reported by twlevo@xs4all.nl.
10253 * doc/bison.texinfo: Change @dircategory from "GNU programming
10254 tools" to "Software development". Requested by Richard Stallman
10257 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10259 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10260 Problem reported by twlevo@xs4all.nl.
10262 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10264 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10265 keyword; it's not needed with modern compilers, and it doesn't
10266 affect correctness with older compilers. Suggested by
10269 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10271 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10272 gcc -Wswitch-default.
10273 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10274 * data/yacc.c (yyparse): Likewise.
10276 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10278 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10279 already. Let config.h define any nonstandard values.
10281 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10283 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10284 for the benefit of slower hosts. Problem reported by
10285 Nelson H. F. Beebe.
10287 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10289 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10290 being defined and not used.
10291 * data/lalr1.cc (yyparse): Likewise.
10292 Use "if (false)" rather than "if (0)".
10294 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10296 * TODO: Mention that we should allow NUL bytes in tokens.
10298 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10300 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10301 Problem reported by Hans Aberg.
10303 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10305 * src/getargs.c (version): Happy new year; update overall
10306 program copyright date from 2004 to 2005.
10308 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10309 Problem reported by Hans Aberg.
10310 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10311 (Output file names.): Add a test for the case when standard output
10314 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10316 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10317 to fix an oversight in the Bison 2.0 manual.
10319 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10321 * NEWS: Version 2.0. Reformat the existing news items since
10322 1.875, so that related items are grouped together.
10323 * configure.ac (AC_INIT): Bump version to 2.0.
10324 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10326 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10327 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10328 otherwise, we're not testing alloca. Unfortunately there's no
10329 simple way to consult HAVE_ALLOCA here.
10331 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10334 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10335 hand. This avoids a warning about comparing int to size_t when
10336 GCC warnings are enabled.
10338 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10340 * NEWS: Bison-generated parsers no longer default to using the
10341 alloca function (when available) to extend the parser stack, due
10342 to widespread problems in unchecked stack-overflow detection.
10343 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10344 responsibility to set it to a positive value. This lets the user
10345 specify a value that is not a preprocessor constant.
10346 * data/yacc.c (YYMAXDEPTH): Likewise.
10347 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10348 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10349 to be a compile-time constant. However, explain the constraints on it.
10350 Also, explain the constraints on YYINITDEPTH.
10351 (Table of Symbols): Explain that alloca is no longer the default.
10352 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10355 * doc/bison.texinfo (Location Default Action): Mention that n must
10356 be zero when k is zero. Suggested by Frank Heckenbach.
10358 2004-12-22 Akim Demaille <akim@epita.fr>
10360 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10361 (parser::state_type, parser::semantic_type, parser::location_type):
10362 Private, not public.
10363 (parser::parse): Return ints, not bool.
10364 Returning a bool introduces a problem: 0 corresponds to false, and
10365 it seems weird to return false on success. Returning true changes
10366 the conventions for yyparse.
10367 Alternatively we could return void and send an exception.
10368 There is no clear consensus (yet?).
10369 (state_stack, semantic_stack, location_stack): Rename as...
10370 (state_stack_type, semantic_stack_type, location_stack_type): these.
10371 Private, not public.
10372 * tests/c++.at: New.
10373 * tests/testsuite.at, tests/Makefile.am: Adjust.
10375 2004-12-21 Akim Demaille <akim@epita.fr>
10377 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10379 2004-12-21 Akim Demaille <akim@epita.fr>
10381 Don't impose std::string for filenames.
10383 * data/lalr1.cc (b4_filename_type): New.
10384 (position::filename): Use it.
10385 (parser.hh): Move the inclusion of stack.hh and location.hh below
10386 the user code, so that needed headers for the filename type can be
10388 Forward declare them before the user code.
10389 * tests/Makefile.am (check-local, installcheck-local): Pass
10390 TESTSUITEFLAGS to the TESTSUITE.
10392 2004-12-20 Akim Demaille <akim@epita.fr>
10394 Use more STL like names: my_class instead of MyClass.
10396 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10397 (SemanticStack, SemanticType, StateStack, StateType)
10398 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10399 (Parser::value): Rename as...
10400 (location_stack, location_type, rhs_number_type, semantic_stack)
10401 (semantic_type, state_stack, state_type, token_number_type, stack)
10402 (slice, traits, parser::yylloc, parser::yylval): these.
10404 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10406 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10408 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10409 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10411 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10413 Remove uses of 'short int' and 'unsigned short int'. This raises
10414 some arbitrary limits. It uses more memory but nowadays that's
10415 not much of an issue.
10417 This change does not affect the generated parsers; that's a different
10418 task, as some users will want to conserve memory there.
10420 Ideally we should use size_t to represent all object counts, and
10421 something like ptrdiff_t to represent signed differences of object
10422 counts; but that will require more code-cleanup than I have the
10423 time to do right now.
10425 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10426 Use size_t, not int or short int, to count objects.
10427 * src/closure.c (nritemset, closure): Likewise.
10428 * src/closure.h (nritemset, closure): Likewise.
10429 * src/nullable.c (nullable_compute): Likewise.
10430 * src/print.c (print_core): Likewise.
10431 * src/print_graph.c (print_core): Likewise.
10432 * src/state.c (state_compare, state_hash): Likewise.
10433 * src/state.h (struct state): Likewise.
10434 * src/tables.c (default_goto, goto_actions): Likewise.
10436 * src/gram.h (rule_number, rule): Use int, not short int.
10437 * src/output.c (prepare_rules): Likewise.
10438 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10439 errs, reductions): Likewise.
10440 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10442 * src/tables.c (vector_number, tally, action_number,
10443 ACTION_NUMBER_MINIMUM): Likewise.
10444 * src/output.c (muscle_insert_short_int_table): Remove.
10446 2004-12-17 Akim Demaille <akim@epita.fr>
10448 * data/lalr1.cc: Extensive Doxygenation.
10449 (error_): Rename as...
10450 (error): this, since it is visible to the user.
10452 (Parser::message): Now an automatic variable from...
10453 (Parser::yyreport_syntax_error_): here.
10454 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10456 * tests/input.at: Escape $.
10458 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10460 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10461 Parenthesize rhs to avoid obscure problems with mistakes like
10462 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10463 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10464 b4_rhs_location): Likewise.
10465 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10466 b4_rhs_location): Likewise.
10468 2004-12-16 Akim Demaille <akim@epita.fr>
10470 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10471 yacc.c: be sure to stay within yycheck_.
10472 * tests/actions.at: Re-enable C++ tests.
10474 2004-12-16 Akim Demaille <akim@epita.fr>
10476 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10479 2004-12-16 Akim Demaille <akim@epita.fr>
10481 Use #define to handle the %name-prefix.
10483 * data/glr.c, data/yacc.c: Comment changes.
10484 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10485 so that one can refer to yylex in the parser file, and have it
10486 renamed, as is the case with other skeletons.
10488 2004-12-16 Akim Demaille <akim@epita.fr>
10490 Move lalr1.cc internals into yy*.
10492 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10493 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10494 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10495 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10496 (empty_, final_, terror_, errcode_, ntokens_)
10497 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10498 (looka_, ilooka_, error_range_, nerrs_):
10500 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10501 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10502 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10503 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10504 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10505 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10506 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10507 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10510 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10512 Fix some problems reported by twlevo at xs4all.
10513 * src/symtab.c (symbol_new): Report an error if the input grammar
10514 contains too many symbols. This is better than calling abort() later.
10515 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10516 (struct node, struct graph):
10517 Rename member expand to stretch. All uses changed.
10518 (struct graph): Remove member layoutalgorithm. All uses removed.
10519 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10520 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10522 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10524 2004-12-15 Akim Demaille <akim@epita.fr>
10526 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10527 Add more Doxygen comments.
10528 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10529 (report_syntax_error_, translate_): Rename as...
10530 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10531 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10533 2004-12-15 Akim Demaille <akim@epita.fr>
10535 * data/lalr1.cc (lex_): Rename as...
10537 Move the trace here.
10538 Take the %name-prefix into account.
10539 Reported by Alexandre Duret-Lutz.
10541 2004-12-15 Akim Demaille <akim@epita.fr>
10543 Simplify the C++ parser constructor.
10545 * data/lalr1.cc (debug_): Rename as...
10546 (yydebug_): so that the parser's internals are always in the yy*
10549 (b4_parse_param_decl): Remove the leading comma as it is now only
10550 called as unique argument list.
10551 (Parser::Parser): Remove the constructor accepting a location and
10552 an initial debugging level.
10553 Remove from the other ctor the argument for the debugging level.
10554 (debug_level_type, debug_level, set_debug_level): New.
10556 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10559 2004-12-15 Akim Demaille <akim@epita.fr>
10561 Remove b4_root related material: failure experiment
10562 (which goal was to allow to derive from a class).
10564 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10565 definitions and uses.
10567 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10569 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10570 not 2, since it's not portable to subtract 1 from the start of an
10571 array. The new item 0 is never set or used. All uses changed.
10573 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10574 the default definition of YYLLOC_DEFAULT. Problem reported
10575 by Frank Heckenbach.
10577 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10579 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10580 the normal case and one for the error case. Just use the
10581 first one uniformly. Problem reported by Frank Heckenbach.
10582 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10583 use exactly the same macro in both places.
10584 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10585 so that the normal-case YYRHSLOC works for the error case too.
10587 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10588 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10589 * doc/bison.texinfo (Location Default Action): Don't claim that
10590 we have an array of locations. Use the same macro for both glr
10591 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10594 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10596 * HACKING: Update email addresses to send announcements to.
10598 * configure.ac (AC_INIT): Bump version to 1.875f.
10600 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10602 * NEWS: Version 1.875e.
10603 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10605 * src/scan-skel.l: Include "complain.h", for "fatal".
10607 * src/relation.h (relation_print, relation_digraph):
10608 Relation sizes are of type relation_node, not size_t (this is
10609 merely a doc fix, since the two types are equivalent).
10610 (relation_transpose): Relation sizes are of type relation_node,
10612 * src/relation.c: Likewise.
10613 (top, infinity): Now of type relation_node, not int.
10614 (traverse, relation_transpose): Use relation_node, not int.
10616 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10617 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10618 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10621 specifying whether the test should be skipped. Use it tp
10622 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10623 fail on some hosts, and should be skipped.
10625 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10627 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10628 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10629 unless otherwise specified below.
10631 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10632 to allocate kernel_base, kernel_items, kernel_size, since
10633 they needn't be initialized to 0.
10634 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10635 * src/closure.c (new_closure): Likewise, for itemset.
10636 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10637 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10638 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10639 (build_relations): Likewise for edge, states1, includes.
10640 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10641 * src/reader.c (packgram): Likewise, for ritem, rules.
10642 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10643 * src/relation.c (relation_digraph): Likewise for VERTICES.
10644 (relation_transpose): Likewise for new_R, end_R.
10645 * src/symtab.c (symbols_token_translations_init): Likewise for
10646 token_translations.
10647 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10648 (token_actions): Likewise for yydefact, actrow, conflrow,
10650 (save_column): Likewise for froms[symno], tos[symno].
10651 (goto_actions): Likewise for state_count.
10652 (pack_table): Likewise for base, pos, check.
10653 (tables_generate): Likewise for width.
10655 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10656 for initial core. Just have a separate core, so we needn't worry
10657 about whether kernel_size and kernel_base are initialized.
10659 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10660 kernel_size, kernel_items): Remove unnecessary initialization.
10661 * src/conflicts.c (conflicts): Likewise.
10662 * src/derives.c (derives): Likewise.
10663 * src/muscle_tablc (muscle_insert): Likewise.
10664 * src/relation.c (relation_digraph): Likewise.
10665 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10666 conflrow, conflict_table, conflict_list, table, check):
10669 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10670 This is because all callers pass unsigned int.
10671 * src/closure.h (new_closure): Likewise.
10673 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10674 (build_relations): Initialize includes[i] in all cases.
10675 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10676 and rules[ruleno].precsym. Initialize members in order.
10677 * src/relation.c (relation_transpose): Always initialize new_R[i]
10679 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10681 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10682 conflict_list[0] was always 0, but now it isn't initialized.
10684 * src/table.c (table_grow): When conflict_table grew, the grown
10685 area wasn't cleared. Fix this.
10687 * lib/.cvsignore: Add strdup.c, strdup.h.
10688 * m4/.cvsignore: Add strdup.m4.
10690 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10692 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10693 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10694 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10695 ngotos + 1 without checking for overflow.
10696 (build_relations): Use END_NODE, not -1, to denote end of edges.
10697 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10698 build_relations): Use goto_number, not int, for goto numbers.
10699 * src/tables.c (save_column, default_goto): Likewise.
10701 2004-11-23 Akim Demaille <akim@epita.fr>
10703 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10704 of #defining from yystype.
10705 Don't typedef yystype, C++ does not need it.
10706 This lets it possible to forward declare it as union.
10708 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10710 * bootstrap (gnulib_modules): Add extensions.
10711 Problem reported by Jim Meyering.
10713 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10715 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10716 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10717 src/system.h, src/tables.c: XFREE -> free, to accommodate
10718 recent change to gnulib xalloc.h.
10719 Problem reported by Jim Meyering.
10721 2004-11-17 Akim Demaille <akim@epita.fr>
10723 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10725 2004-11-17 Akim Demaille <akim@epita.fr>,
10726 Alexandre Duret-Lutz <adl@gnu.org>
10728 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10730 (YYCDEBUG): Adjust.
10731 Use it instead of cdebug_.
10732 (Parser::debug_stream, Parser::set_debug_stream): New.
10733 (Parser::symprint_): Define cdebug_ for temporary backward
10735 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10738 2004-11-17 Akim Demaille <akim@epita.fr>
10740 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10741 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10742 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10743 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10745 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10747 * data/glr.c (yyloc_default): Remove; not used.
10748 Problem reported by Frank Heckenbach.
10750 2004-10-25 Akim Demaille <akim@epita.fr>
10752 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10753 Introduce another definition to address simple location arrays.
10754 (yyGLRStack): New member: yyerror_range.
10755 (yyrecoverSyntaxError, yyparse): Update it.
10756 (yyrecoverSyntaxError): Use it when shifting the error token to
10757 have an accurate range, equivalent to the one computed by both
10758 yacc.c and lalr1.cc.
10759 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10760 that column numbers start at column 0, as per GNU Coding
10761 Standards, the others tests, and the doc.
10762 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10763 Adjust to the above change (first column is 0).
10764 And adjust the location of the "<error>", now covering the whole
10767 2004-10-22 Akim Demaille <akim@epita.fr>
10768 and Paul Eggert <eggert@cs.ucla.edu>
10770 Remove some arbitrary limits on goto numbers and relations.
10771 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10772 initial values, since they're never used.
10773 (set_goto_map): ngotos is now unsigned, so test for overflow
10774 by seeing whether it wraps around to zero.
10775 * src/lalr.h (goto_number): Now size_t, not short int.
10776 (GOTO_NUMBER_MAXIMUM): Remove.
10777 * src/relation.c (relation_print, traverse, relation_transpose):
10778 Check for END_NODE rather than looking at sign.
10779 * src/relation.h (END_NODE): New macro.
10780 (relation_node): Now size_t, not short int.
10782 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10784 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10785 keyword, not an identifier. Problem reported by Baron Schwartz in
10786 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10788 2004-10-11 Akim Demaille <akim@epita.fr>
10790 * src/symtab.c (symbol_check_alias_consistency): Also check
10791 type names, destructors, and printers.
10792 Reported by Alexandre Duret-Lutz.
10793 Recode the handling of associativity and precedence in terms
10794 of symbol_precedence_set.
10795 Accept no redeclaration at all, not even equal to the previous
10797 (redeclaration): New.
10798 Use it to factor redeclaration complaints.
10799 (symbol_make_alias): Don't set the type of the alias, let
10800 symbol_check_alias_consistency do it as for other features.
10801 * src/symtab.h (symbol): Add new member prec_location, and
10803 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10804 * tests/input.at (Incompatible Aliases): New.
10806 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10808 .cvsignore fixes to accommodate gnulib changes,
10809 and the practice of naming build directories "_build".
10810 * .cvsignore: Add "_*". Sort.
10811 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10812 * m4/.cvsignore: Add "*_gl.m4".
10814 2004-10-06 Akim Demaille <akim@epita.fr>
10816 * src/parse-gram.y (add_param): Fix the truncation of trailing
10819 2004-10-05 Akim Demaille <akim@epita.fr>
10821 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10822 whether the reducion was empty or not. This leaves room to
10823 improve the use of YYLLOC_DEFAULT in such a case.
10824 lalr1.cc is still experimental, so changing this is acceptable.
10825 And finally, there are probably not many users who changed the
10826 handling of locations in GLR, so changing is admissible too.
10828 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10829 empty reduction, set @$ to an empty location ending the previously
10831 Adjust uses to make sure the code is triggered on empty
10833 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10834 expected output: empty reductions have empty locations.
10836 2004-09-29 Akim Demaille <akim@epita.fr>
10838 * data/lalr1.cc: Move towards a more standard C++ coding style
10839 for templates: Class < T > -> Class<T>.
10841 2004-09-29 Akim Demaille <akim@epita.fr>
10843 * data/lalr1.cc: Reinstall the former ctor, for sake of
10844 compatibility, but warn it will be removed.
10845 Move towards a more standard C++ coding style (i.e., type *var ->
10848 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10850 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10851 since it's less likely to work if NULs are involved in the future.
10853 2004-09-27 Akim Demaille <akim@epita.fr>
10855 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10857 2004-09-27 Akim Demaille <akim@epita.fr>
10859 * data/lalr1.cc (b4_parse_param_decl_1): New.
10860 (b4_parse_param_decl): Use it to have different names between attribute
10861 and argument names.
10862 (b4_cc_constructor_call): Likewise.
10864 2004-09-24 Akim Demaille <akim@epita.fr>
10866 * src/parse-gram.y (add_param): Strip the leading and trailing
10867 blanks from a formal argument declaration.
10868 (YY_LOCATION_PRINT): New.
10870 2004-09-24 Akim Demaille <akim@epita.fr>
10872 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10873 after the location.
10875 2004-09-24 Akim Demaille <akim@epita.fr>
10877 * doc/bison.texinfo (Table of Symbols): Sort.
10879 2004-09-21 Akim Demaille <akim@epita.fr>
10881 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10882 the useless parentheses.
10883 Suggested by Paul Eggert.
10885 2004-09-20 Akim Demaille <akim@epita.fr>
10887 Let the initial-action act on the look-ahead, and use it for the
10888 "initial push" (corresponding to an hypothetical beginning-of-file).
10889 And let lalr1.cc honor %initial-action.
10891 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10893 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10894 (Parser::Parser): Remove the ctor that used to initialize it.
10895 (Parser::parse): Like in the other skeletons, issue the "starting
10896 parse" message before any action.
10897 Honor %initial-action.
10898 Initialize the stacks with the lookahead.
10899 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10901 Push them in the stacks.
10902 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10904 2004-09-20 Akim Demaille <akim@epita.fr>
10906 * doc/bison.texinfo (Initial Action Decl): New.
10908 2004-09-20 Akim Demaille <akim@epita.fr>
10910 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10911 clearer criterion to define it.
10912 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10913 When reducing on an empty RHS, use the latest stacked location as
10915 yylloc is not always available.
10916 * data/glr.c: Likewise.
10917 Also, honor initial-actions.
10919 2004-09-20 Akim Demaille <akim@epita.fr>
10921 * data/yacc.c (YY_LOCATION_PRINT): New.
10922 Define when we know YYLTYPE's structure, i.e., when the default
10923 YYLLOC_DEFAULT is used.
10924 * data/c.m4 (b4_yysymprint_generate): Use it.
10925 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10926 value of the result.
10927 (error_start_): Replace with...
10928 (error_range_): this location array.
10929 This allows to replace code relying on the implementation of
10930 locations by portable code.
10931 * data/yacc.c (yylerrsp): Replace with...
10932 (yyerror_range): this.
10933 Every time a token is popped, update yyerror_range[0], to have an
10934 accurate location for the error token.
10935 * data/glr.c (YY_LOCATION_PRINT): New.
10936 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10937 deference a pointer.
10938 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10939 report the location in %printers.
10941 * src/scan-skel.l: Instead of abort, report error messages to ease
10942 understanding skeleton scanning failures.
10944 2004-09-16 Akim Demaille <akim@epita.fr>
10946 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10947 (iterator, const_iterator): these, to be more in the C++ spirit.
10948 Also, return reverse iterators so that when displaying the stack
10949 we display its bottom first.
10950 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10952 We should probably use vector here though.
10954 2004-09-16 Akim Demaille <akim@epita.fr>
10956 Have more complete shift traces.
10958 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10959 to report Shifts instead of ad hoc YYDPRINTF invocations,
10960 including for the error token.
10961 * data/lalr1.cc (symprint_): Output the location.
10962 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10963 output the location within the %printer.
10964 Activate GLR tests, at least to make sure they compile properly.
10965 They still don't pass though.
10966 * tests/calc.at: Adjust expect verbose output, since now "Entering
10967 state..." is on a different line than the "Shifting" message.
10969 2004-09-08 Akim Demaille <akim@epita.fr>
10971 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10972 Bison directive from the Bison file to the invocation of this
10973 macro, so that these directives are passed to
10974 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10975 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10976 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10977 the extra Bison directives instead of the whole series.
10978 Change the grammar so that there are recoverable errors, and
10979 unrecoverable errors. Now we can have the parser give up before
10980 consuming the whole input. As a result we now can observe that
10981 the lookahead is freed when needed.
10982 Change the parser source to parse argv[1] instead of a hard coded
10984 Simplify yylex, and give a value and location to EOF.
10985 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10986 passed directives already coded in the file.
10987 Add some tests to check the location of "error".
10988 For some tests, the C++ parser is correct, and not yacc.c.
10989 For other tests, they provide different, but unsatisfying, values,
10990 so keep the C++ value so that at least one parser is "correct"
10991 according to the test suite.
10992 (Actions after errors): Remove, this is subsumed by the
10993 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10995 2004-09-06 Akim Demaille <akim@epita.fr>
10997 * data/lalr1.cc: Adjust the indentation of the labels.
10998 (Parser::pop): New.
11001 2004-09-06 Akim Demaille <akim@epita.fr>
11003 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11004 argument, an informative message.
11005 Call YY_SYMBOL_PRINT.
11006 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11007 * data/lalr1.cc (destruct_): Likewise.
11008 In addition, no longer depend on b4_yysymprint_generate and
11009 b4_yydestruct_generate to generate these functions, do it "by
11012 2004-09-03 Akim Demaille <akim@epita.fr>
11014 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11015 invoked, yydestruct the lookahead.
11016 * tests/calc.at (Calculator $1): Update the expected lengths of
11017 traces: there is an added line for the discarded lookahead.
11018 * doc/bison.texinfo (Destructor Decl): Some rewording.
11019 Define "discarded" symbols.
11021 2004-09-02 Akim Demaille <akim@epita.fr>
11023 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11025 2004-09-02 Akim Demaille <akim@epita.fr>
11027 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11028 (YYDSYMPRINTF): Rename as...
11029 (YY_SYMBOL_PRINT): this.
11030 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11032 Use it instead of direct symprint_ calls.
11033 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11036 2004-09-02 Akim Demaille <akim@epita.fr>
11038 * data/lalr1.cc (b4_yysymprint_generate): New.
11039 (symprint_): New member function, defined when YYDEBUG.
11040 Use it consistently instead of token/nterm debugging output by
11042 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11043 %printer calls to use cdebug_ when using lalr1.cc.
11045 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11047 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11048 with #ifdef YYDEBUG.
11050 2004-08-26 Akim Demaille <akim@epita.fr>
11052 * doc/bison.texinfo (Implementing Loops): Rename as...
11053 (Implementing Gotos/Loops): this.
11055 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11057 Adjust to latest gnulib.
11058 * bootstrap (gnulib_modules): Add xalloc-die.
11059 Set LC_ALL=C so that file names sort consistently.
11060 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11061 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11062 uintmax_t.m4, ulonglong.m4.
11063 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11064 po.m4 since we are now using _gl.m4 instead.
11066 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11068 * src/scan-action.l: Remove. Scanning of semantic actions is
11069 handled in scan-gram.l.
11071 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11073 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11075 * src/location.h (struct): The file member is a uniqstr.
11076 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11078 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11080 Fix bug with non-%union parsers that have printers or destructors,
11081 which led to a Bison core dump. Reported by Peter Fales in
11082 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11084 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11085 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11086 not to our own type.
11087 * src/output.c (symbol_destructors_output, symbol_printers_output):
11088 Don't assume %union.
11089 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11090 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11091 UNION-FLAG. All callers changed.
11092 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11093 Use type char, not unsigned int, when declaring an array of char;
11094 this lets us remove a cast.
11095 (Printers and Destructors): Add non-%union test cases.
11097 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11099 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11100 GLR writeups. E.g., avoid frenchspacing and the future tense,
11101 change "lookahead" to "look-ahead", and change "wrt" to "with
11104 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11106 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11107 New sections, split off from the GLR Parsers section. Put the new
11108 Simple GLR Parser near the start of the GLR section, for clarity.
11109 Rewrite connective text.
11111 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11113 * doc/bison.texinfo (Simple GLR Parsers): New section.
11115 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11117 * NEWS, TODO, doc/bison.texinfo:
11118 Use "look-ahead" instead of "lookahead", to be consistent.
11119 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11120 while we're fixing "look-ahead".
11121 * src/conflicts.c (shift_set): Renamed from shiftset.
11122 (look_ahead_set): Renamed from lookaheadset.
11123 * src/print.c: Likewise.
11124 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11125 name for "lookahead".
11126 (report_types, usage): Likewise.
11127 * src/getargs.h (report_look_ahead_tokens): Renamed from
11129 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11130 compute_lookaheads.
11131 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11132 (look_ahead_tokens_print): Renamed from lookaheads_print.
11133 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11134 state_rule_lookaheads_print.
11135 * src/state.h: Likewise.
11136 (reductions.look_ahead_tokens): Renamed from lookaheads.
11137 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11138 AT_DATA_LOOKAHEADS_GRAMMAR.
11140 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11142 * README: Update location of patched M4 distribution.
11144 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11146 Don't assume the C++ compiler takes the same arguments as the C compiler
11148 * configure.ac (O0CXXFLAGS): New var.
11149 * tests/atlocal.in (CXXFLAGS): Use it.
11151 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11153 Fix some "make check" problems with C++ reported by
11154 Albert Chin-A-Young for Tru64 C++ in this thread:
11155 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11157 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11158 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11159 Output to a .cc file for C++, not to a .c file.
11160 * tests/calc.at (AT_CHECK_CALC): Likewise.
11161 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11162 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11164 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11166 * tests/calc.at, tests/actions.at: Workaround for SGI
11167 C++ compiler. (trivial change)
11169 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11171 Spent a few hours checking out which prerequisite versions the
11172 current sources actually require. I went all the way back to
11173 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11174 a seemingly endless set of combinations of versions more recent
11175 than that. The bottom line is that the current sources require
11176 fairly recent versions of the build tools, and it'll be some work
11178 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11179 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11180 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11181 Add comments explaining why those particular versions are
11184 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11185 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11186 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11188 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11189 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11191 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11193 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11194 0.11.5. Suggested by Bruno Haible.
11195 * bootstrap: Remove gettext version checking.
11197 * doc/bison.texinfo (Decl Summary): Also mention that %union
11198 can depend on prerequisite types. Problem reported by Tim
11201 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11203 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11204 * README-alpha: Don't tell people not to package this.
11206 * bootstrap: Don't assume $(...) works; use `...` instead.
11207 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11210 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11211 put into the -d output file, and mention what to do if YYSTYPE is
11212 defined as a macro.
11214 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11216 Undo change made earlier today: it caused autopoint to not bring
11217 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11220 * bootstrap: Check that gettext version matches what's in
11221 configure.ac. Warn users to ignore robots.txt ERROR 404.
11222 * bootstrap: Undo today's earlier change (logged below).
11223 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11225 The gettext version checking is causing more trouble than it's
11226 curing; remove it. Problem reported by Paul Hilfinger.
11228 * bootstrap: Issue a warning that one can expect a message
11229 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11230 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11232 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11234 Ensure that the C++ compiler used for testing actually works on a
11235 simple test program; if not, skip the C++-related tests. Problem
11236 reported by Vin Shelton in:
11237 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11239 * m4/cxx.m4: New file.
11240 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11241 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11242 * tests/local.at (AT_COMPILE_CXX): Use it.
11244 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11246 * data/glr.c (yylloc): Output this macro even if locations are not
11247 being generated, as the GLR parser needs it even in that case.
11248 Problem reported by Troy A. Johnson
11249 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11251 * configure.ac (AC_INIT): Update to 1.875e.
11253 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11255 * NEWS: Version 1.875d.
11256 * configure.ac (AC_INIT): Likewise.
11257 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11259 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11260 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11261 lalr1.cc runs afoul of the first, and the last two are no longer
11262 supported by GCC 3.4.0.
11263 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11264 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11266 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11268 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11269 unsigned int, for compatibility with latest gnulib hash module.
11270 * src/state.c (state_hash, state_hasher): Likewise.
11271 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11272 * src/uniqstr.c (hash_uniqstr): Likewise.
11274 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11276 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11278 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11279 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11280 character and string literals.
11281 (unexpected_end): New function.
11282 (unexpected_eof): Use it.
11283 (unexpected_newline): New function.
11284 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11287 * NEWS: Document %expect-rr.
11289 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11290 Fix typo by replacing $1 with $option.
11291 Remove more 'intl'-related files.
11292 Don't DEFUN AM_INTL_SUBDIR twice.
11294 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11295 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11297 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11298 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11299 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11300 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11301 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11302 * src/.cvsignore: Add *.output.
11304 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11305 gets copied to the output file.
11307 2004-04-28 Paul Eggert <eggert@twinsun.com>
11309 Get files from the gnulib and po repositories, instead of relying
11310 on them being in our CVS. Upgrade to latest versions of gnulib
11313 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11314 * bootstrap: Bootstrap from gnulib and po repositories.
11315 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11316 * README-cvs: Document these changes. Remove version numbers from
11317 mentions of build tools, since they change so often. Mention Flex.
11319 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11320 (gl_USE_SYSTEM_EXTENSIONS): Add.
11321 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11322 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11324 (AC_ISC_POSIX): Remove; we no longer support this
11325 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11326 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11327 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11328 Do not check for C89 headers, except for locale.h which is used
11329 by the Yacc library and must port to K&R hosts.
11330 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11331 Do not check for C89 functions, except for setlocale which is
11332 used by the Yacc library.
11333 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11334 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11335 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11336 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11337 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11338 AM_GNU_GETTEXT): Remove; now done by:
11339 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11340 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11343 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11344 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11345 Define to empty, as gnulib.mk will do the rest for us.
11346 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11348 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11349 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11351 * src/files.c: Include gnulib's xstrndup.h.
11353 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11354 (REALLOC): Use xnrealloc, for likewise.
11355 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11356 (strnlen, memrchr): Remove decls; functions no longer used.
11357 Include <stpcpy.h>.
11359 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11360 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11361 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11362 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11363 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11364 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11365 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11366 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11367 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11368 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11369 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11370 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11371 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11372 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11373 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11374 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11375 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11376 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11377 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11378 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11379 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11380 Remove, as these files are now generated automatically
11381 by bootstrap or automake.
11383 * po/ChangeLog: Remove: all but one entry was a duplicate
11384 of this file, and I moved that 2000-11-02 entry here.
11386 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11387 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11388 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11389 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11390 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11391 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11392 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11393 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11394 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11395 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11396 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11398 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11399 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11400 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11401 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11402 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11403 * src/.cvsignore: Remove *_.c.
11406 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11407 support it. (The latest stable gzip doesn't.)
11409 2004-04-27 Paul Eggert <eggert@twinsun.com>
11411 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11412 case, as stos_ is now used by destructors due to the 2004-02-09
11415 Remove more K&R C support.
11416 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11417 * lib/subpipe.c (errno): Remove decl.
11418 Include <stdlib.h> unconditionally.
11419 (EXIT_FAILURE): Remove macro.
11420 * src/complain.c (vfprintf, strerror): Remove.
11421 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11423 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11424 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11425 (strchr, strspn, memchr): Remove decls.
11426 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11427 unconditionally. Do not declare perror.
11428 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11431 * src/complain.c (_): Remove useless defn, as system.h defines this.
11433 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11434 with latest obstack.h.
11435 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11436 to procedure types, as obstack.h now does that for us.
11437 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11439 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11440 so that this include file can stand alone.
11441 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11442 does this now. Include subpipe.h first after config.h, to
11443 test whether it can stand alone.
11445 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11446 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11447 unused declaration.
11449 * tests/synclines.at (%union synch line): Put a dummy member in
11450 the union, because empty unions aren't allowed in C. Caught
11453 2004-04-13 Jim Meyering <jim@meyering.net>
11455 * src/conflicts.c (conflicts_print): Correct format string typo:
11456 use `%%' to produce literal `%'. (trivial change)
11458 2004-03-30 Paul Eggert <eggert@twinsun.com>
11460 * src/getargs.c (version): Update copyright year to 2004.
11462 * data/c.m4 (b4_int_type): Use 'short int' rather than
11463 'short', and similarly for 'long', 'unsigned', etc.
11464 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11465 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11466 yy_yypstack, yydumpstack): Likewise.
11467 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11468 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11470 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11471 yy_stack_print, yyparse): Likewise.
11472 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11473 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11474 * lib/bitset.c (bitset_print): Likewise.
11475 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11476 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11477 * lib/bitsetv.c (bitsetv_dump): Likewise.
11478 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11479 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11481 * src/LR0.c (allocate_itemsets): Likewise.
11482 * src/gram.h (rule_number, rule): Likewise.
11483 * src/lalr.h (goto_number): Likewise.
11484 * src/nullable.c (nullable_compute): Likewise.
11485 * src/output.c (prepare_rules): Likewise.
11486 * src/relation.c (relation_print, relation_digraph): Likewise.
11487 * src/relation.h (relation_node): Likewise.
11488 * src/state.h (state_number, transitions, errs, reductions,
11489 struct state): Likewise.
11490 * src/symtab.h (symbol_number, struct symbol): Likewise.
11491 * src/tables.c (vector_number, tally, action_number,
11492 default_goto, goto_actions): Likewise.
11493 * tests/existing.at (GNU Cim Grammar): Likewise.
11494 * tests/regression.at (Web2c Actions): Likewise.
11496 * src/output.c (muscle_insert_short_int_table): Renamed from
11497 muscle_insert_short_table. All uses changed.
11499 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11501 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11502 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11503 Add %expect-rr rule.
11505 * src/scan-gram.l: Recognize %expect-rr.
11507 * src/conflicts.h (expected_sr_conflicts): Rename from
11508 expected_conflicts.
11509 (expected_rr_conflicts): Declare.
11511 * src/conflicts.c (expected_sr_conflicts): Rename from
11512 expected_conflicts.
11513 (expected_rr_conflicts): Define.
11514 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11516 Use expected_sr_conflicts in place of expected_conflicts.
11517 Warn if expected_rr_conflicts used in non-GLR parser.
11519 * doc/bison.texinfo: Add documentation for %expect-rr.
11521 2004-03-08 Paul Eggert <eggert@gnu.org>
11523 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11524 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11526 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11528 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11529 * src/scan-gram.l (scan_integer): New function.
11531 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11532 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11533 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11534 Say "long int", not "long", for uniformity with GNU style.
11536 2004-02-25 Paul Eggert <eggert@twinsun.com>
11538 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11539 compilers. This fixes a problem with Intel's C++ compiler being
11540 chatty, reported by Guido Trentalancia in
11541 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11543 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11545 Support %destructor and merge error locations in lalr1.cc.
11547 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11548 (Parser::stos_): Define unconditionally.
11549 (Parser::destruct_): New method. Generate its body with
11550 b4_yydestruct_generate.
11551 (Parser::error_start_): New attribute.
11552 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11553 token which are discarded.
11554 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11555 error_start_ when erroneous token are discarded.
11556 (Parser::parse) <yyerrlab1>: Compute the location of the error
11557 token so that it covers all the discarded tokens.
11558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11559 it can be called with `%skeleton "lalr1.cc"', and do that.
11561 2004-02-02 Paul Eggert <eggert@twinsun.com>
11563 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11564 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11565 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11566 There's no need to mention top_builddir since Automake does that
11568 (INCLUDES): Remove, as Automake says it's obsolescent.
11569 Contents migrated into AM_CPPFLAGS as described above.
11570 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11572 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11574 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11575 (yyreportSyntaxError): Handle case where lookahead token is
11578 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11580 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11581 resulting parsers are compilable with C++.
11583 2003-12-23 Paul Eggert <eggert@twinsun.com>
11585 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11586 * src/output.c (output_skeleton): Rename local var.
11587 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11588 Bison tokens, as this runs afoul of the 2003-10-07 change that
11589 disallowed NUL bytes in character constants or string literals.
11591 * tests/local.at: Require Autoconf 2.59's Autotest.
11592 * tests/testsuite.at: Don't include local.at, since we now assume
11593 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11595 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11596 multiple inclusion warnings.
11598 2003-12-02 Akim Demaille <akim@epita.fr>
11600 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11604 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11606 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11608 2003-10-07 Paul Eggert <eggert@twinsun.com>
11610 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11611 if testsuite doesn't exist.
11613 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11614 literals, unfortunately.
11615 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11616 Complain about NUL bytes in character constants or string literals.
11618 2003-10-05 Paul Eggert <eggert@twinsun.com>
11620 * NEWS: Don't document %no-default-prec, as it's still
11622 * doc/bison.texinfo: Document %no-default-prec only if
11623 the defaultprec flag is set. Normally it's not.
11625 2003-10-04 Paul Eggert <eggert@twinsun.com>
11627 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11628 non-modifiable lvalue, instead of a modifiable one.
11629 * doc/bison.texinfo (Actions): Document that $$ can
11630 be assigned to. Do not claim that $$ and $N are
11631 array element references: user code should not rely on this.
11633 2003-10-01 Paul Eggert <eggert@twinsun.com>
11635 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11636 (grammar_declaration): Use it.
11637 * src/scan-gram.l: New token %no-default-prec.
11638 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11639 * NEWS, doc/bison.texinfo: Document the above.
11641 2003-10-01 Akim Demaille <akim@epita.fr>
11643 VCG no longer supports long_straight_phase.
11645 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11646 * src/print_graph.c (print_graph): Adjust.
11648 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11649 and Paul Eggert <eggert@twinsun.com>
11651 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11652 Table of Symbols): Document %default-prec.
11653 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11654 (grammar_declaration): Set default_prec on %default-prec.
11655 * src/scan-gram.l (%default-prec): New token.
11656 * src/reader.h (default_prec): New flag.
11657 * src/reader.c: Likewise.
11658 (packgram): Handle it.
11659 * tests/conflicts.at (%default-prec without %prec,
11660 %default-prec with %prec, %default-prec 1): New tests.
11662 2003-09-30 Paul Eggert <eggert@twinsun.com>
11664 * tests/testsuite.at: Include local.at, not input.at, fixing
11665 a typo in the 2003-08-25 patch.
11667 2003-08-27 Akim Demaille <akim@epita.fr>
11669 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11672 2003-08-26 Akim Demaille <akim@epita.fr>
11674 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11675 "<\#" to avoid magic from Gnus when posting parts of this script.
11677 2003-08-26 Akim Demaille <akim@epita.fr>
11679 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11680 (Parser::parse): here.
11681 Adjust: nerrs and errstatus is now replaced by...
11682 (Parser::nerrs_, Parser::errstatus_): New.
11684 2003-08-25 Akim Demaille <akim@epita.fr>
11686 * config/announce-gen, Makefile.cfg: New.
11687 * Makefile.am: Adjust.
11688 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11689 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11691 2003-08-25 Akim Demaille <akim@epita.fr>
11693 When reducing initial empty rules, Bison parser read an initial
11694 location that is not defined. This results in garbage, and that
11695 affects Bison's own parser. Therefore we need (i) to extend Bison
11696 to support a means to initialize this location, and (ii) to use
11697 this CVS Bison to fix CVS Bison's parser.
11699 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11701 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11702 * src/parse-gram.y: Adjust.
11703 (%initial-action): New.
11704 (%error-verbose): Since we require CVS Bison, there is no reason
11706 * src/scan-gram.l: Adjust.
11707 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11708 * data/yacc.c (yyparse): Use b4_initial_action.
11710 2003-08-25 Akim Demaille <akim@epita.fr>
11712 * doc/bison.texinfo: Don't promote stdout for error messages.
11714 2003-08-25 Akim Demaille <akim@epita.fr>
11716 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11717 From Alexandre Duret-Lutz.
11719 2003-08-25 Akim Demaille <akim@epita.fr>
11723 2003-08-25 Akim Demaille <akim@epita.fr>
11725 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11728 2003-08-25 Akim Demaille <akim@epita.fr>
11730 * data/lalr1.cc (Parser::reduce_print_): New.
11733 2003-08-25 Akim Demaille <akim@epita.fr>
11735 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11736 error recovery loops. This patch is based on
11737 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11738 Also, augment the similarity between lalr1.cc and yacc.c.
11739 Note: the locations of error recovery rules are not correct yet.
11741 * data/lalr1.cc: Comment changes to augment the similarity between
11742 lalr1.cc and yacc.c.
11743 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11744 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11745 yyerrlab), when hitting EOF, pop the whole stack here instead of
11746 merely falling thru the default error handling mechanism.
11747 (yyerrorlab): New label, with the old contents of YYERROR,
11748 plus the following change: pop the stack of rhs corresponding
11749 to the production that invoked YYERROR. That is how Yacc
11750 behaves (required by POSIX).
11751 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11754 2003-08-25 Akim Demaille <akim@epita.fr>
11756 Tune local.at so that people can "autom4te -l autotest calc.at -o
11757 calc" for instance, to extract a sub test suite.
11759 * tests/testsuite.at: Move the initialization, Autotest version
11760 requirement, and AT_TESTED invocation into...
11761 * tests/local.at: here.
11762 * tests/testsuite.at: Include it for compatibility with Autoconf
11764 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11767 2003-08-04 Paul Eggert <eggert@twinsun.com>
11769 Rework code slightly to avoid gcc -Wtraditional warnings.
11770 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11771 The returned value is now stored in *YY0. All callers changed.
11772 * src/output.c (merge_output): Adjust to the above change.
11774 2003-07-26 Paul Eggert <eggert@twinsun.com>
11776 * data/glr.c (YYASSERT): New macro.
11777 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11778 yyresolveStates, yyprocessOneStack):
11779 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11780 Derived from a suggestion by Frank Heckenbach.
11782 2003-07-25 Paul Eggert <eggert@twinsun.com>
11784 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11785 for portability to K&R C (after ansi2knr, presumably). See
11786 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11787 by Frank Heckenbach, though I have omitted the structure-initialization
11788 part of his glr-knr.diff patch since I recall that the Portable
11789 C Compiler didn't require that change.
11791 Let the user specify how to allocate and free memory.
11792 Derived from a suggestion by Frank Heckenbach in
11793 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11794 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11795 All uses of free, malloc, realloc changed to use these macros,
11796 and unnecessary casts removed.
11797 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11799 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11801 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11802 use s.empty() rather than s == "" to test for empty string; see
11803 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11806 2003-06-25 Akim Demaille <akim@epita.fr>
11808 * config/depcomp, config/install-sh: Update from masters.
11810 2003-06-20 Paul Eggert <eggert@twinsun.com>
11812 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11813 and return properly parenthesized result.
11814 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11815 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11816 Remove unnecessary parentheses from uses.
11817 * doc/bison.texinfo (Location Default Action): Describe the
11818 conventions for parentheses.
11820 2003-06-19 Paul Eggert <eggert@twinsun.com>
11822 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11823 yyreportTree): Do not assume that size_t is the same width as int,
11824 when printing sizes. Print sizes using an unsigned format.
11825 Problem reported by Frank Heckenbach in
11826 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11828 Port to Forte Developer 7 C compiler.
11829 * data/glr.c (struct YYLTYPE): If locations are not being used,
11830 declare a single dummy member, as empty structs do not conform
11832 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11833 the Forte Developer 7 C compiler complains that end-of-loop
11834 code is not reached.
11836 2003-06-17 Paul Eggert <eggert@twinsun.com>
11838 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11839 avoid warnings from picky compilers about redefinition of PARAMS.
11841 2003-06-17 Paul Eggert <eggert@twinsun.com>
11845 * NEWS: Document 1.875b.
11847 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11848 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11849 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11850 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11851 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11852 per recent gettext manual's suggestion.
11853 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11854 Use prototypes, not old-style definitions.
11855 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11856 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11857 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11858 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11859 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11860 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11861 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11862 vbitset_or_and_cmp, vbitset_copy): Likewise.
11864 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11865 Do not include <stdlib.h>.
11866 (PARAMS): Define unconditionally for C89.
11867 (ATTRIBUTE_NORETURN): Remove.
11868 (ATTRIBUTE_UNUSED): Define unconditionally.
11870 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11871 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11872 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11873 * lib/vbitset.c, lib/vbitset.h: New files.
11874 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11875 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11878 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11879 `How Can I Reset @code{yyparse}', since texinfo does not allow
11880 arbitrary @ in node names.
11882 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11883 shouldn't be needed according to the gettext 0.12.1 documentation
11884 but which seem to be needed anyway: codeset.m4 glibc21.m4
11885 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11886 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11887 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11889 * lib/.cvsignore: Add stdbool.h.
11890 * m4/.cvsignore: Add nls.m4, po.m4.
11892 Upgrade to CVS gnulib.
11893 * stdbool_.h: File renamed from stdbool.h.in.
11894 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11896 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11897 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11898 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11899 (MOSTLYCLEANFILES): New var.
11900 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11901 (stdbool.h): New rule.
11902 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11903 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11904 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11905 m4/quote.m4: Upgrade to today's gnulib.
11907 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11908 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11909 the tests right now.
11910 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11911 yyerror are declared before use; C99 requires this.
11913 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11915 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11917 (yyrecoverSyntaxError): Correct the logic for setting and testing
11919 Correct comment on handling EOF.
11920 Allow states with only a default reduction, rather than failing
11921 (I can't quite reconstruct why these were not allowed before).
11923 Fixes to avoid problem that $-N rules in GLR parsers can cause
11924 buffer overruns, corrupting state.
11926 * src/output.c (prepare_rules): Output max_left_semantic_context
11928 * src/reader.h (max_left_semantic_context): New variable declaration.
11929 * src/scan-gram.l (max_left_semantic_context): Define.
11930 (handle_action_dollar): Update max_left_semantic_context.
11931 * data/glr.c (YYMAXLEFT): New definition.
11932 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11933 (yyresolveAction): Ditto.
11935 Fixes to problems with location handling in GLR parsers reported by
11936 Frank Heckenbach (2003/06/05).
11938 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11939 (YYRHSLOC): Add parentheses, and define only if locations used.
11940 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11941 locations not used.
11942 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11943 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11945 * tests/cxx-type.at: Exercise location information; update tests
11946 to differentiate output with and without locations.
11947 Remove forward declarations of yylex and yyerror---caused errors
11948 because default YYLTYPE not yet defined.
11949 Change semantic actions to compute strings, rather than printing
11950 them directly (to test proper passing of semantics values). Change
11951 output to prefix notation and update test data and expected results.
11952 (yylex): Track locations.
11953 (stmtMerge): Return value rather than printing, and include arguments
11956 2003-06-03 Paul Eggert <eggert@twinsun.com>
11958 Avoid warnings generated by GCC 2.95.4 when Bison is
11959 configured with --enable-gcc-warnings.
11960 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11961 yy::]b4_parser_class_name[::translate_,
11962 yy::Stack::operator[] (unsigned),
11963 yy::Stack::operator[] (unsigned) const,
11964 yy::Slice::operator[] (unsigned),
11965 yy::Slice::operator[] (unsigned) const):
11966 Rename local vars to avoid warnings.
11967 * tests/glr-regression.at (Improper handling of embedded actions
11968 and $-N in GLR parsers): Remove unused local variable from yylex.
11969 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11970 (void) as arg when not pure, since we now assume C89 when building
11971 Bison. Pacify GCC by using parameter.
11973 2003-06-02 Paul Eggert <eggert@twinsun.com>
11975 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11976 yy::Location::lines, yy::Location::columns): Rename arguments
11977 to avoid shadowing; this removes a warning generated by GCC 3.3.
11979 2003-06-01 Paul Eggert <eggert@twinsun.com>
11981 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11982 to g++, as GCC 3.3 complains if you do it.
11983 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11984 everything that WARNING_CFLAGS has, except omit warnings
11985 not suitable for C++.
11986 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11987 * tests/atlocal.in (CXXFLAGS): New var.
11988 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11990 Fix a GLR parser bug I reported in February; see
11991 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11992 The problem was that GLR parsers did not conform to the C standard,
11993 because actions like { $1 = $2 + $3; } expanded to expressions
11994 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11995 to a local variable. The C standard says that expressions
11996 like (var = f ()) + (var = f ()) have undefined behavior.
11997 Another problem was that GCC sometimes issues warnings that
11998 yyfill and its parameters are unused.
12000 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12001 as possibly unused.
12002 (yyfill): New function.
12004 (yyuserAction): Change type of yynormal to bool, so that it matches
12005 the new yyfill signature. Mark it as possibly unused.
12008 Follow up on a bug I reported in February, where a Bison-generated
12009 parser can loop. Provide a test case and a fix for yacc.c. I
12010 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12011 The original bug report is in:
12012 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12014 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12015 macro's size was becoming unwieldy.
12016 (yyerrlab): Do not discard an empty lookahead symbol, as this
12017 might destroy garbage.
12018 (yyerrorlab): New label, with the old contents of YYERROR,
12019 plus the following change: pop the stack of rhs corresponding
12020 to the production that invoked YYERROR. That is how Yacc
12021 behaves, and POSIX requires this behavior.
12022 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12023 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12024 Define 'alarm' to do nothing if unistd.h is not available.
12025 Add a new rule "exp: '-' error;" to test the above change to
12026 data/yacc.c. Use 'alarm' to abort any test taking longer than
12027 10 seconds, as it's probably looping.
12028 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12029 Also, the new yacc.c generates two fewer diagnostics for an
12032 2003-05-24 Paul Eggert <eggert@twinsun.com>
12034 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12035 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12036 This fixes a problem reported by John Bowman when the Compaq/HP
12037 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12038 -ansi -Wall -gall).
12039 * data/yacc.c (union yyalloc): Likewise.
12040 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12042 Switch from 'int' to 'bool' where that makes sense.
12044 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12045 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12046 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12047 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12048 Return or accept bool, not int. All callers changed.
12049 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12050 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12051 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12052 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12053 bitset_or_and_cmp_): Likewise.
12054 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12055 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12056 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12057 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12058 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12059 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12060 bitset_stats_or_and_cmp): Likewise.
12061 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12062 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12063 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12064 ebitset_xor_cmp): Likewise.
12065 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12066 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12067 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12068 lbitset_xor_cmp): Likewise.
12069 * lib/bbitset.h: Include <stdbool.h>.
12070 (struct bitset_vtable): The following members now return bool, not
12071 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12072 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12074 * src/conflicts.c (count_rr_conflicts): Likewise.
12075 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12077 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12078 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12079 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12080 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12081 graph_flag): Likewise.
12082 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12083 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12084 graph_flag): Likewise.
12085 * src/output.c (error_verbose): Likewise.
12086 * src/output.h (error_verbose): Likewise.
12087 * src/reader.c (start_flag, typed): Likewise.
12088 * src/reader.h (typed): Likewise.
12089 * src/getargs.c (LOCATIONS_OPTION): New constant.
12090 (long_options, getargs): Use it.
12091 * src/lalr.c (build_relations): Use bool, not int.
12092 * src/nullable.c (nullable_compute): Likewise.
12093 * src/print.c (print_reductions): Likewise.
12094 * src/tables.c (action_row, pack_vector): Likewise.
12095 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12096 * src/output.c (prepare): Use it.
12097 * src/output.c (token_definitions_output,
12098 symbol_destructors_output, symbol_destructors_output): Use string,
12099 not boolean integer, to keep track of whether to output separator.
12100 * src/print_graph.c (print_core): Likewise.
12101 * src/state.c (state_rule_lookaheads_print): Likewise.
12103 * config/install-sh: Sync from automake 1.7.5.
12105 2003-05-14 Paul Eggert <eggert@twinsun.com>
12107 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12108 semicolon after a grammar declaration, in the interest of possible
12109 future changes to the Bison input language.
12110 Do not allow a stray semicolon at the start of the grammar.
12111 (rhses.1): Allow one or more semicolons after any rule, including
12112 just before "|" as required by POSIX.
12113 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12116 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12118 %parse-param support for lalr1.cc.
12120 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12121 b4_cc_constructor_calls, b4_cc_constructor_call,
12122 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12124 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12125 parse-param arguments.
12126 (yy::b4_parser_class_name): Declare instance variables to
12127 hold parse-param arguments.
12128 * tests/calc.at: s/value/semantic_value/ because value clashes
12129 with a member of yy::b4_parser_class_name. Adjust C++ code
12130 to handle %parse-param. Enable %parse-param test in C++.
12132 2003-05-12 Paul Eggert <eggert@twinsun.com>
12134 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12135 English a bit. Fix fclose typo. Change "const char" to "char
12136 const", and use ANSI C rather than K&R for "main". Suggest
12137 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12138 and suggest yy_switch_to_buffer.
12140 2003-05-05 Paul Eggert <eggert@twinsun.com>
12142 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12143 C89. This avoids a diagnostic on compilers that define __STDC__
12144 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12145 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12147 2003-05-03 Paul Eggert <eggert@twinsun.com>
12149 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12150 Do not overrun array bounds.
12151 This should fix a bug reported today by Olatunji Oluwabukunmi in
12152 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12154 2003-04-29 Akim Demaille <akim@epita.fr>
12156 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12157 * src/getargs.c, src/getargs.h: here, as bool, not int.
12158 (nondeterministic_parser): New.
12159 * src/parse-gram.y, src/scan-gram.l: Support
12160 %nondeterministic-parser.
12161 * src/output.c (prepare): Use nondeterministic_parser instead
12162 of glr_parser where appropriate.
12163 * src/tables.c (conflict_row, action_row, save_row)
12164 (token_actions, token_actions, pack_vector): Ditto.
12166 2003-04-29 Akim Demaille <akim@epita.fr>
12168 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12170 2003-04-29 Akim Demaille <akim@epita.fr>
12172 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12173 with %pure-parser and %locations to exercise the patch from Yakov
12176 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12178 * data/yacc.c: (b4_lex_param): Corrected for the case where
12179 %lex-param is provided and %pure-parser isn't.
12181 2003-04-27 Paul Eggert <eggert@twinsun.com>
12183 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12184 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12185 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12186 if it is not defined.
12187 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12189 2003-04-26 Paul Eggert <eggert@twinsun.com>
12191 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12192 Declare to be of type suitable for the ninf value itself, not of
12193 type suitable for the corresponding table, since the latter might
12194 be unsigned but the ninf value might be negative. This fixes a
12195 bug reported by Alexandre Duret-Lutz in
12196 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12198 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12199 invokes it. We shouldn't invoke it twice because it will attempt
12200 to put error.o in the archive twice. This fixes a glitch reported
12201 by Martin Mokrejs in
12202 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12204 2003-04-21 Paul Eggert <eggert@twinsun.com>
12206 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12209 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12211 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12212 Fix obvious typo that results in uncompilable GLR parsers
12213 when both %pure-parser and %locations are used. (trivial change)
12215 2003-04-17 Paul Eggert <eggert@twinsun.com>
12217 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12218 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12219 Do not insert the expected token via unput, as this runs afoul
12220 of a POSIX-compatibility bug in flex 2.5.31.
12221 All uses changed to BEGIN the parent state,
12222 since we no longer insert the expected token via unput.
12223 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12224 that is no longer emitted after the above change.
12226 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12227 the first one. This change is from Paul Hilfinger, and it fixes
12228 regression reported by Werner Lemberg in
12229 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12231 (resolve_sr_conflict): Don't invoke state_errs_set
12232 unless one or more tokens have been explicitly made errors.
12233 Otherwise, the above change causes Bison to abort.
12235 * tests/existing.at (GNU pic Grammar): New test case, taken from
12238 2003-03-31 Akim Demaille <akim@epita.fr>
12240 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12242 2003-03-31 Akim Demaille <akim@epita.fr>
12244 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12247 2003-03-31 Akim Demaille <akim@epita.fr>
12249 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12250 From Paul Hilfinger.
12252 2003-03-29 Akim Demaille <akim@epita.fr>
12254 * m4/error.m4: Do not put under dynamic conditions some code which
12255 expansion is under static control.
12257 2003-03-29 Akim Demaille <akim@epita.fr>
12259 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12261 2003-03-29 Akim Demaille <akim@epita.fr>
12263 * doc/bison.texinfo (Strings are Destroyed): New.
12265 2003-03-13 Paul Eggert <eggert@twinsun.com>
12267 * .cvsignore: Add configure.lineno.
12268 * src/.cvsignore: Add yacc.
12269 * tests/.cvsignore: Add testsuite.log.
12270 * doc/fdl.texi: Sync with latest FSF version.
12272 2003-03-12 Paul Eggert <eggert@twinsun.com>
12274 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12275 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12276 cursor, instead of leaving it undefined. This fixes a bug
12277 reported by Tim Van Holder in
12278 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12279 * tests/input.at (Torturing the Scanner): Test the scanner on
12280 an empty input file, which was Tim Van Holder's test case.
12282 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12283 <sys/resource.h> can be included, include sys/time.h and
12284 sys/times.h first, if available. This works around the SunOS
12285 4.1.4 porting bug reported by Bruce Becker in
12286 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12288 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12289 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12290 AC_HEADER_SYS_WAIT.
12292 Merge changes from gnulib. This was prompted because the CVS
12293 snapshot didn't build on Solaris 7 due to strnlen problems.
12295 These changes need to be merged back into gnulib:
12296 * lib/hash.c: Include <stdbool.h> unconditionally.
12297 * m4/onceonly.m4 (m4_quote): New macro.
12298 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12299 Quote AC_FOREACH variable-expansions properly.
12300 The 2003-01-03 obstack.h change also needs merging.
12301 {end of changes requiring merging}
12303 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12304 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12305 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12306 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12307 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12308 New files, imported from gnulib.
12309 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12312 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12313 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12316 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12318 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12319 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12320 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12321 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12322 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12323 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12324 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12325 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12326 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12327 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12328 (jm_PREREQ_ARGMATCH): Remove.
12329 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12330 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12332 * src/system.h: Include <stdbool.h> unconditionally.
12334 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12335 assuming at least C89 in the bitset code for some time now.
12337 2003-03-03 Akim Demaille <akim@epita.fr>
12341 2003-03-02 Akim Demaille <akim@epita.fr>
12343 * doc/bison.texinfo (Table of Symbols): Reactivate the
12344 documentation for %lex-param, and %parse-param.
12346 2003-03-02 Akim Demaille <akim@epita.fr>
12348 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12349 generate verbose error messages.
12350 Use the number of tokens as an upper bound in yytname, as it
12351 cannot be a non terminal.
12353 2003-03-02 Akim Demaille <akim@epita.fr>
12355 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12358 2003-03-02 Akim Demaille <akim@epita.fr>
12360 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12361 Use them to exercise yycheck overrun.
12362 Based on Andrew Suffield's grammar.
12364 2003-03-02 Akim Demaille <akim@epita.fr>
12366 Create tests/local.at for Bison generic testing macros.
12368 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12369 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12371 * tests/calc.at (AT_CHECK_CALC): Adjust.
12372 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12373 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12374 * tests/local.at: here.
12375 (AT_COMPILE_CXX): Tags the tests using it as c++.
12376 Ignore the test if CXX is not functional.
12378 2003-03-01 Paul Eggert <eggert@twinsun.com>
12380 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12381 not loc->end, since loc->end might contain garbage and this leads
12382 to undefined behavior on some platforms.
12383 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12384 depend on *loc, so that the reader doesn't give the the false
12385 impression that *loc is initialized.
12386 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12387 does not survive the return.
12389 2003-03-01 Akim Demaille <akim@epita.fr>
12391 * src/scan-gram.l (code_start): Always initialize it when entering
12392 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12393 yylex invocation. An alternative would be making it static, but
12394 then it starts with the second %%'s beginning, instead of its end.
12396 2003-02-28 Paul Eggert <eggert@twinsun.com>
12398 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12399 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12400 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12402 2003-02-26 Paul Eggert <eggert@twinsun.com>
12404 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12405 Remove Sequent/Pyramid discussion (nobody uses them any more).
12406 Merge VMS and MS-DOS discussion; these ports may well be dead
12407 but let's keep mentioning them for now. Put <> around email
12408 addresses. Add copyright notice.
12410 2003-02-24 Paul Eggert <eggert@twinsun.com>
12412 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12413 to avoid collision with flex use of yylineno.
12414 Problem reported by Bruce Lilly in
12415 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12416 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12417 * data/yacc.c (yy_reduce_print): Likewise.
12419 * config/depcomp: Sync with Automake 1.7.3.
12421 2003-02-21 Akim Demaille <akim@epita.fr>
12423 * data/lalr1.cc: Use temporary variables instead of casts to
12424 change integer types.
12425 Suggested by Paul Eggert.
12427 2003-02-21 Akim Demaille <akim@epita.fr>
12429 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12430 to avoid confusions with lalr1.cc's notion of Position.
12431 Suggested by Paul Eggert.
12433 2003-02-20 Akim Demaille <akim@epita.fr>
12435 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12436 before initial_columns.
12437 (location.hh): Use consistent variable names when defining the
12439 Use "last" so that we subtract from Positions, not from unsigned.
12441 2003-02-20 Akim Demaille <akim@epita.fr>
12443 * data/lalr1.cc (position.hh): New subfile, including the extended
12444 and Doxygen'ed documentation of class Position.
12445 (location.hh): Use it.
12446 Document a` la Doxygen.
12447 With the help of Benoit Perrot.
12449 2003-02-20 Akim Demaille <akim@epita.fr>
12451 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12453 Redefine AT_YYERROR_SEES_LOC_IF using it.
12454 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12456 Don't use the location in yy::Parser::error_ and
12457 yy::Parser::print_ when not %locations.
12458 Activate more lalr1.cc tests.
12460 2003-02-19 Akim Demaille <akim@epita.fr>
12462 * data/lalr1.cc: When displaying a line number, be sure to make it
12465 2003-02-19 Akim Demaille <akim@epita.fr>
12467 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12469 (YYABORT, YYACCEPT, YYERROR): New.
12470 * tests/calc.at: Renable the lalr1.cc test.
12472 2003-02-19 Akim Demaille <akim@epita.fr>
12474 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12475 error recovery, mixing with/without pops and discarding of the
12478 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12480 2003-02-17 Paul Eggert <eggert@twinsun.com>
12482 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12483 * tests/testsuite.at (AT_COMPILE): Use them.
12484 This fixes the testsuite problem reported by Robert Lentz in
12485 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12487 2003-02-12 Paul Eggert <eggert@twinsun.com>
12489 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12490 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12491 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12492 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12493 Check for malloc failure, for consistency with yacc.c.
12494 (yytname_size): Remove, for consistency with yacc.c.
12496 The bug still remains in data/lalr1.cc, as I didn't have time
12499 2003-02-06 Akim Demaille <akim@epita.fr>
12501 * configure.ac (GXX): Rename as...
12502 (CXX): this, to keep the original Autoconf semantics.
12504 * data/lalr1.cc: Fix b4_copyright invocations.
12505 If YYDEBUG is not defined, don't depend upon name_ being defined.
12506 (location.hh): Include string and iostream.
12507 (Position::filename): New member.
12508 (Position::Position ()): New.
12509 (operator<< (Position)): New.
12510 (operator- (Position, int)): New.
12511 (Location::first, Location::last): Rename as...
12512 (Location::begin, Location::end): these, to mock the conventional
12514 (operator<< (Location)): New.
12515 * tests/atlocal.in (CXX): New.
12516 * tests/testsuite.at (AT_COMPILE_CXX): New.
12517 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12518 locations in a more synthetic way.
12519 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12521 Adjust the C locations to match those from Emacs: first column is
12523 Change all the expected results.
12524 Conform to the GCS: simplify the locations when applicable.
12525 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12526 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12527 these CPP macros with the m4 macros new defined by...
12528 (AT_CHECK_PUSHDEFS): this, i.e.:
12529 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12530 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12532 (AT_CHECK_POPDEFS): Undefine them.
12533 (AT_CHECK_CALC_LALR1_CC): New.
12534 Use it for the first lalr1.cc test.
12536 2003-02-04 Akim Demaille <akim@epita.fr>
12538 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12539 Location as is defined.
12541 2003-02-04 Akim Demaille <akim@epita.fr>
12543 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12544 name_ being defined.
12546 2003-02-03 Paul Eggert <eggert@twinsun.com>
12548 * src/gram.h (start_symbol): Remove unused decl.
12550 Use more-consistent naming conventions for local vars.
12552 * src/derives.c (derives_compute): Change type of local var from
12553 int to rule_number.
12554 * src/gram.c (grammar_rules_partial_print): Likewise.
12555 * src/print.c (print_core): Likewise.
12556 * src/reduce.c (reduce_grammar_tables): Likewise.
12558 * src/gram.c (grammar_dump): Change name of item_number *
12559 local var from r to rp.
12560 * src/nullable.c (nullable_compute): Likewise.
12562 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12564 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12565 for symbol or symbol_number var.
12566 * src/reader.c (grammar_start_symbol_set): Likewise.
12567 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12569 * src/state.c (transitions_to): Likewise.
12570 * src/state.h: Likewise.
12571 * src/tables.c (symbol_number_to_vector_number): Likewise.
12573 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12576 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12579 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12582 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12583 Use str, not s, for char * var. Use ch, not c, for character var.
12584 Use size for size var.
12586 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12588 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12590 * src/uniqstr.h: Likewise.
12592 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12593 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12594 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12595 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12596 param to have same name as that of enum, so that we don't use
12597 "s" to stand for a non-state.
12599 2003-02-02 Akim Demaille <akim@epita.fr>
12601 * src/scan-skel.l: Scan more than one inert character per yylex
12604 2003-02-01 Paul Eggert <eggert@twinsun.com>
12608 * po/LINGUAS: Add ms.
12610 2003-01-30 Akim Demaille <akim@epita.fr>
12612 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12614 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12616 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12619 Changes in response to error report by S. Eken: GLR mode does not
12620 handle negative $ indices or $ indices in embedded rules correctly.
12621 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12623 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12624 (b4_rhs_location): Ditto.
12625 (yyfill): New function to copy from stack tree into array
12627 (yyuserAction): Modify to allow incremental move of semantic values
12628 to rhs array when in GLR mode.
12629 Define YYFILL to use in user-defined actions to fill semantic array
12631 Remove dummy use of yystack, as there is now a guaranteed use.
12632 (yydoAction): Modify to allow incremental move of semantic values
12633 to rhs array when in GLR mode.
12634 (yyresolveAction): Ditto.
12635 (yyglrShiftDefer): Update comment.
12636 (yyresolveStates): Use X == NULL for pointers, not !X.
12637 (yyglrReduce): Ditto.
12638 (yydoAction): Ditto
12640 * tests/glr-regr1.at: Rename to ...
12641 * tests/glr-regression.at: Add new regression test for the problems
12642 described above (adapted from S. Eken).
12643 Update copyright notice.
12644 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12645 * tests/Makefile.am: Ditto.
12647 2003-01-28 Paul Eggert <eggert@twinsun.com>
12649 * data/lalr1.cc: Do not use @output_header_name@ unless
12650 b4_defines_flag is set. This fixes two bugs reported by
12652 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12653 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12655 2003-01-21 Paul Eggert <eggert@twinsun.com>
12657 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12658 we don't need to worry about yyerrlab1 being reported as an
12659 "unused label" by non-GCC C compilers. The downside is that if
12660 locations are used then a couple of statements are duplicated each
12661 time YYERROR is invoked, but the upside is that the warnings
12663 (yyerrlab1): Move code to YERROR.
12664 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12665 This reverts some of the 2002-12-27 change.
12667 2003-01-17 Paul Eggert <eggert@twinsun.com>
12669 * src/output.c (symbol_printers_output): Fix typo that led
12670 to core dump. Problem reported by Antonio Rus in
12671 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12673 2003-01-13 Akim Demaille <akim@epita.fr>,
12674 Quoc Peyrot <chojin@lrde.epita.fr>,
12675 Robert Anisko <anisko_r@lrde.epita.fr>
12677 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12678 when the stacks contain one element, as the loop would otherwise
12679 free the last state, and then use the top state (the one we just
12680 popped). This means that the initial elements will not be freed
12681 explicitly, as is the case in yacc.c; it is not a problem, as
12682 these elements have fake values.
12684 2003-01-11 Paul Eggert <eggert@twinsun.com>
12686 * NEWS: %expect-violations are now just warnings, reverting
12687 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12688 bootstrapping problem reported by Matthias Klose; see
12689 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12690 * src/conflicts.c (conflicts_print): Likewise.
12691 * tests/conflicts.at (%expect not enough, %expect too much,
12692 %expect with reduce conflicts): Likewise.
12693 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12694 that the warning is enabled if the number of conflicts changes
12695 (not necessarily increases).
12697 * src/getargs.c (version): Update copyright year.
12699 2003-01-09 Akim Demaille <akim@epita.fr>
12701 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12703 2003-01-08 Paul Eggert <eggert@twinsun.com>
12705 * Makefile.maint (WGETFLAGS):
12706 New macro, containing "-C off" to disable proxy caches.
12707 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12708 (rel-check): Use $(WGET) instead of wget.
12710 2003-01-06 Paul Eggert <eggert@twinsun.com>
12712 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12713 the GLR paper of Scott, Johnstone and Hussain.
12715 2003-01-04 Paul Eggert <eggert@twinsun.com>
12717 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12718 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12719 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12720 (EXTRA_LIBRARIES): New var, for liby.a.
12721 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12722 (EXTRA_SCRIPTS): New var, for yacc.
12724 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12725 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12726 Problem reported by Nelson H. F. Beebe.
12728 2003-01-03 Paul Eggert <eggert@twinsun.com>
12730 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12731 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12732 when compiling Bison 1.875's `bitset bset = obstack_alloc
12733 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12735 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12736 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12737 grow to a huge size with typical invocation.
12739 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12740 Use the pattern recommended by Autoconf 2.57, except also protect
12741 against double-definition.
12742 * src/system.h: Likewise.
12743 Portability issues reported by Nelson H. F. Beebe.
12745 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12746 All uses changed. Provide a definition in both C and C++.
12747 (yytrue, yyfalse): Define even if defined (__cplusplus).
12749 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12750 Reported by Nelson H. F. Beebe.
12752 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12754 2003-01-02 Paul Eggert <eggert@twinsun.com>
12756 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12757 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12758 Bug reported by Nelson H. F. Beebe.
12760 2003-01-01 Paul Eggert <eggert@twinsun.com>
12764 2002-12-30 Paul Eggert <eggert@twinsun.com>
12766 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12768 (<INITIAL>","): Here. This causes stray "," to be treated
12771 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12772 last brace in braced code when not in Yacc mode, for compatibility
12773 with Bison 1.35. This resurrects the 2001-12-15 patch to
12776 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12777 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12779 2002-12-28 Paul Eggert <eggert@twinsun.com>
12781 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12782 that of SYM's type. This fixes Debian bug 168069, reported by
12785 2002-12-28 Paul Eggert <eggert@twinsun.com>
12789 Switch back to the Yacc style of conflict reports, undoing some
12790 of the 2002-07-30 change.
12791 * doc/bison.texinfo (Understanding): Use Yacc style for
12792 conflict reports. Also, use new way of locating rules.
12793 * src/conflicts.c (conflict_report):
12794 Renamed from conflict_report_yacc, removing the old
12795 'conflict_report'. Translate the entire conflict report at once,
12796 so that we don't assume that "," has the same interpretation in
12798 (conflicts_output): Use Yacc-style conflict report for each state,
12799 instead of our more-complicated style.
12800 (conflicts_print): Use Yacc-style conflict report, except print
12801 the input file name when not emulating Yacc.
12802 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12803 Conflicted Reduction, %expect not enough, %expect too much,
12804 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12805 * tests/existing.at (GNU Cim Grammar): Likewise.
12806 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12808 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12809 fatal): Don't invoke fflush; it's not needed and it might even be
12810 harmful for stdout, as stdout might not be open.
12811 * src/reduce.c (reduce_print): Likewise.
12813 2002-12-27 Paul Eggert <eggert@twinsun.com>
12815 Fix a bug where error locations were not being recorded correctly.
12816 This problem was originally reported by Paul Hilfinger in
12817 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12819 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12820 top of the location stack's error locations.
12821 (yyerrlab): Set it. When discarding a token, push its location
12822 onto yylerrsp so that we don't lose track of the error's end.
12823 (yyerrlab1): Now is only the target of YYERROR, so that we can
12824 properly record the location of the action that failed. For GCC
12825 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12826 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12827 (yyerrlab2): New label, which yyerrlab now falls through to.
12828 Compute the error's location by applying YYLLOC_DEFAULT to
12829 the locations of all the symbols that went into the error.
12830 * doc/bison.texinfo (Location Default Action): Mention that
12831 YYLLOC_DEFAULT is also invoked for syntax errors.
12832 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12833 Error locations include the locations of all the tokens that were
12834 discarded, not just the last token.
12836 2002-12-26 Paul Eggert <eggert@twinsun.com>
12838 * src/files.c: Include quote.h.
12839 (compute_output_file_names): Warn if we detect conflicting
12840 outputs to the same file. This should catch the misunderstanding
12841 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12843 * src/conflicts.c (conflicts_print): If the user specifies
12844 "%expect N", report an error if there are any reduce/reduce
12845 conflicts. This is what the manual says should happen.
12846 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12847 * tests/conflicts.at (%expect with reduce conflicts): New test.
12849 Don't use m4_include on relative file names, as it doesn't work as
12850 desired if there happens to be a file with that name under ".".
12852 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12853 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12854 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12855 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12856 * src/output.c (output_skeleton): Use full path names when
12857 specifying a file to include; don't rely on include path, as
12858 it's unreliable when the working file contains a file with
12861 2002-12-25 Paul Eggert <eggert@twinsun.com>
12863 Remove obsolete references to bison.simple and bison.hairy.
12864 Problem mentioned by Aubin Mahe in
12865 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12866 * data/glr.c: Comment fix.
12867 * doc/bison.1: Remove references. Also, mention "yacc".
12869 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12872 * src/parse-gram.y (declaration): Use enum "report_states" rather
12873 than its numeric value 1.
12875 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12876 opening a new one. This fixes Debian bug 165349, reported by
12879 2002-12-24 Paul Eggert <eggert@twinsun.com>
12883 * Makefile.maint (cvs-update): Don't assume that the shell
12884 supports $(...), as Solaris sh doesn't.
12886 * src/parse-gram.y (lloc_default): Remove test for empty
12887 nonterminals at the end, since it didn't change the result.
12889 2002-12-24 Paul Eggert <eggert@twinsun.com>
12891 If the user does not define YYSTYPE as a macro, Bison now declares it
12892 using typedef instead of defining it as a macro. POSIX requires this.
12893 For consistency, YYLTYPE is also declared instead of defined.
12895 %union directives can now have a tag before the `{', e.g., the
12896 directive `%union foo {...}' now generates the C code
12897 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12898 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12899 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12900 instead of `yyltype'.
12902 `yystype' and `yyltype' are now obsolescent macros instead of being
12903 typedefs or tags; they are no longer documented and will be
12904 withdrawn in a future release.
12906 * data/glr.c (b4_location_type): Remove.
12907 (YYSTYPE): Renamed from yystype.
12908 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12909 (struct YYLTYPE): Renamed from struct yyltype.
12910 (YYLTYPE): Renamed from yyltype.
12911 (yyltype, yystype): New (and obsolescent) macros,
12912 for backward compatibility.
12913 * data/yacc.c: Likewise.
12915 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12916 does not specify a union tag. This is for compatibility with
12919 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12920 const *, since it is now modified by stripping surrounding { }.
12921 (current_braced_code): Remove.
12922 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12923 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12924 trailing " {...}". Now of type <chars>.
12925 (grammar_declaration): Adjust to bundled tokens.
12926 (code_content): Remove; stripping is now done by add_param.
12927 (print_token_value): Print contents of bundled tokens.
12928 (token_name): New function.
12930 * src/reader.h (braced_code, current_braced_code): Remove.
12931 (token_name): New decl.
12933 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12934 token_type, not braced_code code_kind. All uses changed.
12935 (SC_PRE_CODE): New state, for scanning after a keyword that
12936 has (or usually has) an immediately-following braced code.
12937 (token_type): New local var, to keep track of which token type
12938 to return when scanning braced code.
12939 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12940 <INITIAL>"%parse-param", <INITIAL>"%printer",
12941 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12942 instead of returning a token type immediately.
12943 (<INITIAL>"{"): Set token type.
12944 (<SC_BRACED_CODE>"}"): Use it.
12945 (handle_action_dollar, handle_action_at): Now returns bool
12946 indicating success. Fail if ! current_rule; this prevents a core dump.
12947 (handle_symbol_code_dollar, handle_symbol_code_at):
12948 Remove; merge body into caller.
12949 (handle_dollar, handle_at): Complain in invalid contexts.
12951 * NEWS, doc/bison.texinfo: Document the above.
12952 * NEWS: Fix years and program names in copyright notice.
12954 2002-12-17 Paul Eggert <eggert@twinsun.com>
12956 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12957 Reporting, Table of Symbols): Omit mentions of %lex-param and
12958 %parse-param from the documentation for now.
12960 2002-12-15 Paul Eggert <eggert@twinsun.com>
12962 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12963 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12964 lookahead symbol, and which sets yychar in parser actions) and it
12965 disagreed with the Bison documentation. Bug
12966 reported by Andrew Walrond.
12968 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12969 as the caller now does that.
12970 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12971 (YYEMPTY): Parenthesize right hand side, since others use it.
12972 (yyparse): Don't assume that our generated code is the only code
12975 2002-12-13 Paul Eggert <eggert@twinsun.com>
12979 POSIX requires a "yacc" command.
12980 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12981 (MOSTLYCLEANFILES): Add yacc.
12983 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12984 as an alias for bison y.
12986 * po/LINGUAS: Add da.
12988 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12989 problem with latest <getopt.h>.
12990 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12992 * doc/fdl.texi: Upgrade to 1.2.
12993 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12994 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12995 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12997 * config/install-sh: Sync with autotools.
12999 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13000 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13001 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13002 locations are requested.
13003 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13004 locations are requested.
13006 2002-12-12 Paul Eggert <eggert@twinsun.com>
13008 Remove unportable casts and storage allocation tricks.
13009 While we're at it, remove almost all casts, since they
13010 usually aren't needed and are a sign of trouble.
13012 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13014 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13015 the pointer DSET returned by malloc; this isn't portable.
13016 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13017 Similarly for DERIVES.
13018 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13019 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13020 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13022 * src/derives.c (derives_compute): Do not bother invoking
13023 int_of_rule_number, since rule numbers are integers.
13025 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13026 rather than XMALLOC (char, N).
13028 * src/files.c (filename_split): Rewrite to avoid cast.
13030 * src/gram.h (symbol_number_as_item_number,
13031 item_number_as_symbol_number, rule_number_as_item_number,
13032 item_number_as_rule_number):
13033 Now inline functions rather than macros, to avoid casts.
13034 * src/state.h (state_number_as_int): Likewise.
13035 * src/tables.c (state_number_to_vector_number,
13036 symbol_number_to_vector_number): Likewise.
13038 * src/gram.h (int_of_rule_number): Remove; no longer used.
13040 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13041 since the resulting storage is always stored into.
13043 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13046 * src/muscle_tab.c (muscle_m4_output):
13047 Now inline. Return bool, not int.
13048 * src/state.c (state_compare): Likewise.
13049 * src/symtab.c (symbol_check_defined,
13050 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13051 hash_compare_symbol, hash_symbol):
13053 * src/uniqstr.c (uniqstr_print): Likewise.
13054 * src/muscle_tab.c (muscle_m4_output_processor):
13055 New function, to avoid casts.
13056 * src/state.c (state_comparator, stage_hasher): Likewise.
13057 * src/symtab.c (symbol_check_defined_processor,
13058 symbol_check_alias_consistency_processor, symbol_pack_processor,
13059 symbol_translation_processor, hash_symbol_comparator,
13060 hash_symbol_hasher): Likewise.
13061 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13062 * src/muscle_tab.c (muscles_m4_output):
13063 Use new functions instead of casting old functions unportably.
13064 * src/state.c (state_hash_new): Likewise.
13065 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13066 symbols_token_translations_init):
13068 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13070 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13071 var instead of casting to long, to avoid casts.
13072 (prepare_states): Use MALLOC rather than alloca, so that we don't
13073 have to worry about alloca.
13074 * src/state.c (state_hash_lookup): Likewise.
13076 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13077 local var instead of casting to unsigned char, to avoid casts.
13079 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13080 STATE_ALLOC): Remove.
13081 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13082 rather than calloc, and use offsetof to avoid allocating slightly
13084 (state_new): Initialize all members.
13086 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13088 * src/symtab.c (symbol_free): Remove; unused.
13089 (symbol_get): Remove cast in lhs of assignment.
13090 (symbols_do): Now static. Accept generic arguments, not
13091 hashing-related ones.
13093 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13094 (symbol_processor): Remove.
13095 (symbols_do): Remove decl; now static.
13097 * src/system.h (alloca): Remove; decl no longer needed.
13098 (<stddef.h>): Include, for offsetof.
13099 (<inttypes.>, <stdint.h>): Include if available.
13100 (uintptr_t): New type, if system lacks it.
13101 (CALLOC, MALLOC, REALLOC): New macros.
13102 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13105 * src/tables.c (table_size): Now int, to pacify GCC.
13106 (table_grow, table_ninf_remap): Use signed table size.
13107 (save_row): Don't bother initializing locals when not needed.
13108 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13109 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13111 * src/vcg.h: Correct misspellings.
13113 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13116 * src/getargs.c (getargs): Don't assume EOF == -1.
13118 2002-12-09 Paul Eggert <eggert@twinsun.com>
13120 Change identifier spellings to avoid collisions with names
13121 that are reserved by POSIX.
13123 Don't use names ending in _t, since POSIX reserves them.
13124 For consistency, remove _e and _s endings -- they're weren't
13125 needed to remove ambiguity. All uses changed.
13126 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13127 turn was just renamed from struniq_t.
13128 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13129 which in turn was just renamed from struniq_processor_t.
13130 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13131 in turn was renamed from hash_compare_struniq_t.
13132 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13133 (state_list): Renamed from state_list_t.
13134 * src/assoc.h (assoc): Renamed from assoc_t.
13135 * src/conflicts.c (enum conflict_resolution): Renamed from
13136 enum conflict_resolution_e.
13137 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13138 (rule_list): Renamed from rule_list_t.
13139 * src/getargs.h (enum trace): Renamed from enum trace_e.
13140 (enum report): Renamed from enum report_e.
13141 * src/gram.h (item_number): Renamed from item_number_t.
13142 (rule_number): Renamed from rule_number_t.
13143 (struct rule_s): Remove the "rule_s" part; not used.
13144 (rule): Renamed from rule_t.
13145 (rule_filter): Renamed from rule_filter_t.
13146 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13147 (goto_list): Renamed from goto_list_t.
13148 * src/lalr.h (goto_number): Renamed from goto_number_t.
13149 * src/location.h (location): Renamed from location_t.
13150 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13151 and moved here from:
13152 * src/muscle_tab.h (muscle_entry_t): here.
13153 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13154 (rule_list): Renamed from rule_list_t.
13155 * src/print_graph.c (static_graph): Renamed from graph.
13156 * src/reader.h (braced_code): Renamed from braced_code_t.
13157 Remove brace_code_e tag.
13158 * src/relation.h (relation_node): Renamed from relation_node_t.
13159 (relation_nodes): Renamed from relation_nodes_t.
13160 (relation): Renamed from relation_t.
13161 * src/state.h (state_number): Renamed from state_number_t.
13162 (struct state): Renamed from struct state_s.
13163 (state): Renamed from state_t.
13164 (transitions): Renamed from transitions_t. Unused (and
13165 misspelled) transtion_s tag removed.
13166 (errs): Renamed from errs_t. Unused errs_s tag removed.
13167 (reductions): Renamed from reductions_t. Unused tag
13168 reductions_s removed.
13169 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13170 (struct symbol_list): Renamed from struct symbol_list_s.
13171 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13172 (struct symbol): Renamed from struct symbol_s.
13173 (symbol): Renamed from symbol_t.
13174 * src/tables.c (vector_number): Renamed from vector_number_t.
13175 (action_number): Renamed from action_t.
13176 * src/tables.h (base_number): Renamed from base_t.
13177 * src/vcg.h (enum color): Renamed from enum color_e.
13178 (enum textmode): Renamed from enum textmode_e.
13179 (enum shape): Renamed from enum shape_e.
13180 (struct colorentry): Renamed from struct colorentry_s.
13181 (struct classname): Renamed from struct classname_s.
13182 (struct infoname): Renamed from struct infoname_s.
13183 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13184 (enum decision): Renamed from enum decision_e.
13185 (enum orientation): Renamed from enum orientation_e.
13186 (enum alignment): Renamed from enum alignment_e.
13187 (enum arrow_mode): Renamed from enum arrow_mode_e.
13188 (enum crossing_type): Renamed from enum crossing_type_e.
13189 (enum view): Renamed from enum view_e.
13190 (struct node): Renamed from struct node_s.
13191 (node): Renamed from node_t.
13192 (enum linestyle): Renamed from enum linestyle_e.
13193 (enum arrowstyle): Renamed from enum arrowstyle_e.
13194 (struct edge): Renamed from struct edge.
13195 (edge): Renamed from edge_t.
13196 (struct graph): Renamed from struct graph_s.
13197 (graph): Renamed from graph_t.
13198 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13199 Rename value_t -> value.
13200 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13201 value_t_as_yystype -> value_as_yystype.
13203 Don't include <errno.h> in the mainstream code, since it
13204 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13205 * lib/get-errno.c, lib/get-errno.h: New files.
13206 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13208 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13209 * src/output.c (output_skeleton): Likewise.
13210 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13212 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13214 (handle_action_dollar, handle_action_at): Likewise.
13215 * src/system.h: Do not include <errno.h>.
13216 (TAB_EXT): Renamed from EXT_TAB.
13217 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13219 Avoid str[a-z]*, since <string.h> reserves that name space.
13220 Change all instances of "struniq" in names to "uniqstr", and
13221 likewise for "STRUNIQ" and "UNIQSTR".
13222 * src/uniqstr.c: Renamed from src/struniq.c.
13223 * src/uniqstr.h: Renamed from src/struniq.h.
13224 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13225 * src/files.c (strsuffix): Remove; unused.
13226 (concat2): Renamed from stringappend. Now static.
13227 * src/files.h (strsuffix, stringappend): Remove; unused.
13228 * src/parse-gram.y (<chars>): Renamed from <string>.
13229 (<uniqstr>): Renamed from <struniq>.
13230 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13231 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13232 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13233 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13234 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13235 (N_EXPAND): Renamed from N_STRETCH.
13237 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13238 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13239 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13241 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13242 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13243 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13244 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13245 (BASE_MAXIMUM): Renamed from BASE_MAX.
13246 (BASE_MINIMUM): Renamed from BASE_MIN.
13247 (ACTION_MAX): Remove; unused.
13248 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13249 Unnecessary casts removed from above defines.
13252 Fix misspelling in names.
13253 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13254 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13258 * lib/timevar.c (timevar_report): Renamed from time_report,
13259 for consistency with other names.
13260 * lib/timevar.h (timevar_report): New decl.
13261 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13264 Sort include-file uses.
13266 Reorder all include files under src to be in the order "system.h".
13267 then the ../lib include files in angle brackets (alphabetized),
13268 then the . include files in double-quotes (alphabetized). Fix
13269 dependency breakages encountered in this process, as follows:
13270 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13271 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13272 * src/state.h: Include "symtab.h".
13274 2002-12-08 Paul Eggert <eggert@twinsun.com>
13276 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13277 since this causes problems when __file__ contains character
13278 sequences like "@" that are treated specially by src/scan-skel.l.
13279 Instead, just use the file's basename. This fixes the bug
13280 reported by Martin Mokrejs in
13281 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13283 2002-12-06 Paul Eggert <eggert@twinsun.com>
13285 Add support for rules that do not have trailing semicolons, as
13286 POSIX requires. Improve the quality of locations in Bison
13289 * src/location.c: Include <quotearg.h>.
13290 (empty_location): Now const.
13291 (location_print): New function. Follow the recommendation of the
13292 GNU Coding Standards for locations that span file boundaries.
13293 * src/location.h: Do not include <quotearg.h>; no longer needed.
13294 (boundary): New type.
13295 (location_t): Use it. This allows locations to span file boundaries.
13296 All member uses changed: file -> start.file or end.file (as needed),
13297 first_line -> start.line, first_column -> start.column,
13298 last_line -> end.line, last_column -> end.column.
13299 (equal_boundaries): New function.
13300 (LOCATION_RESET, LOCATION_STEP): Remove.
13301 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13302 (empty_location): Now const.
13303 (location_print): New decl.
13304 * src/parse-gram.y (lloc_default): New function, which handles
13305 empty locations more accurately.
13306 (YYLLOC_DEFAULT): Use it.
13307 (%token COLON): Remove.
13308 (%token ID_COLON): New token.
13310 (declarations, rules): Remove trailing semicolon.
13311 (declaration, rules_or_grammar_declaration):
13312 Allow empty (";") declaration.
13313 (symbol_def): Remove empty actions; no longer needed.
13314 (rules_or_grammar_declaration): Remove trailing semicolon.
13315 (semi_colon.opt): Remove.
13316 * src/reader.h: Include location.h.
13317 (scanner_cursor): New decl.
13318 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13320 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13322 (STEP): Remove. No longer needed, now that adjust_location does
13323 the work. All uses removed.
13324 (scanner_cursor): New var.
13325 (adjust_location): Renamed from extend_location. It now sets
13326 *loc and adjusts the scanner cursor. All uses changed.
13327 Don't bother testing for CR.
13328 (handle_syncline): Remove location arg; now updates scanner cursor.
13329 All callers changed.
13330 (unexpected_end_of_file): Now accepts start boundary of token or
13331 comment, not location. All callers changed. Update scanner cursor,
13333 (SC_AFTER_IDENTIFIER): New state.
13334 (context_state): Renamed from c_context. All uses changed.
13335 (id_loc, code_start, token_start): New local vars.
13336 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13337 processing of Yacc white space and equivalents here.
13338 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13339 instead of returning ID immediately, since we need to search for
13340 a subsequent colon.
13341 (<INITIAL>"'", "\""): Save token_start.
13342 (<INITIAL>"%{", "{", "%%"): Save code_start.
13343 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13344 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13345 BEGIN context_state at end, not INITIAL.
13346 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13347 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13348 Return correct token start.
13349 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13350 the start of a character, string or multiline comment is found.
13351 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13352 Reduction): Adjust reported locations to match the more-precise
13353 results now expected.
13354 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13355 * tests/reduce.at (Useless Rules, Reduced Automaton,
13356 Underivable Rules): Likewise.
13357 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13358 or "|"' now that so many other tokens are allowed by the new grammar.
13360 * src/complain.h (current_file): Remove duplicate decl;
13361 current_file is now owned by files.h.
13362 * src/complain.c, src/scan-gram.l: Include files.h.
13364 2002-12-06 Paul Eggert <eggert@twinsun.com>
13366 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13367 promotes to int; it might be unsigned int.
13368 * data/yacc.c (yy_reduce_print): Likewise.
13370 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13371 be #defined in the prologue, not in the Bison declarations.
13372 This fixes Debian Bug 102878, reported by Shaul Karl.
13374 2002-12-02 Paul Eggert <eggert@twinsun.com>
13376 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13377 * lib/strtoul.c: New file, from gnulib.
13378 This fixes a porting bug reported by Peter Klein in
13379 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13381 2002-11-30 Paul Eggert <eggert@twinsun.com>
13383 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13384 and put only a forward declaration in the prologue. This is for
13385 consistency with the other scanner helper functions.
13387 Type clashes now generate warnings, not errors, since it
13388 appears that POSIX may allow some grammars with type clashes.
13389 * src/reader.c (grammar_current_rule_check): Warn about
13390 type clashes instead of complaining.
13391 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13393 Add Yacc library, since POSIX requires it.
13394 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13395 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13396 * lib/main.c, lib/yyerror.c: New files.
13398 gram_error can be static; it need not be extern.
13399 * src/reader.h (gram_error): Remove decl.
13400 * src/parse-gram.y (gram_error): Now static. Add static decl.
13401 (print_token_value): Omit parameter names from forward decl,
13404 2002-11-29 Paul Eggert <eggert@twinsun.com>
13406 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13407 be declared before being used. E.g., one should typically
13408 declare them in the prologue. Use GNU coding style in examples.
13409 Put "const" consistently after the type it modifies. Mention
13410 that C99 supports "inline". Mention that yyerror traditionally
13413 %parse-param and %lex-param now take just one argument, the
13414 declaration; the argument name is deduced from the declaration.
13416 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13417 Reporting, Table of Symbols): Document this.
13418 * src/parse-gram.y (add_param): New function.
13420 (declaration): Implement new rule for %parse-param and %lex-param.
13421 * src/scan-gram.l: "," now elicits a warning, rather than being
13422 a token; this is more compatible with byacc.
13423 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13425 2002-11-27 Paul Eggert <eggert@twinsun.com>
13427 Rename identifiers to avoid real and potential collisions.
13429 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13430 to avoid collision with lex macro described by Bruce Lilly in
13431 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13432 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13433 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13434 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13436 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13437 The name "yycontrol" violates the name space rules, and this stuff
13438 wasn't being used anyway.
13439 (input): Remove action; this stuff wasn't being used.
13440 (gram_error): Rename local variable yylloc -> loc.
13441 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13442 (YY_DECL): Don't use "yy" at start of local variables.
13443 All uses changed, e.g., yylloc -> loc.
13444 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13445 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13446 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13447 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13449 * src/parse-gram.y (gram_error): loc is now const *.
13450 * src/reader.h (gram_error): Likewise.
13452 2002-11-24 Paul Eggert <eggert@twinsun.com>
13456 * tests/actions.at (Actions after errors): Use an output format
13457 more similar to that of the Printers and Destructors test.
13458 Test the position of the ';' token too.
13459 (Printers and Destructors): Likewise.
13460 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13461 unnecessarily alarming people when the test fails.
13463 * data/yacc.c (yyerrlab1): Move this label down, so that the
13464 parser does not discard the lookahead token if the user code
13465 invokes YYERROR. This change is required for POSIX conformance.
13467 * lib/error.c: Sync with gnulib.
13469 2002-11-22 Paul Eggert <eggert@twinsun.com>
13471 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13472 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13473 * lib/xmalloc.c: Likewise.
13475 2002-11-20 Paul Eggert <eggert@twinsun.com>
13477 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13479 2002-11-20 Paul Eggert <eggert@twinsun.com>
13481 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13482 should use `if (! x) abort ();' rather than `assert (x);', and
13483 anyway it's one less thing to worry about configuring.
13485 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13486 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13487 and replace all instances of assert with abort.
13488 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13489 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13491 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13492 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13493 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13494 hash_find_entry, hash_rehash, hash_insert): Likewise.
13495 * src/conflicts.c (resolve_sr_conflict): Likewise.
13496 * src/lalr.c (set_goto_map, map_goto): Likewise.
13497 * src/nullable.c (nullable_compute): Likewise.
13498 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13499 * src/reader.c (packgram, reader): Likewise.
13500 * src/state.c (state_new, state_free, state_transitions_set,
13501 state_reduction_find): Likewise.
13502 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13503 symbol_pack): Likewise.
13504 * src/tables.c (conflict_row, pack_vector): Likewise.
13505 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13506 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13507 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13508 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13510 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13511 (ARGMATCH_CONSTRAINT): New macro.
13512 (ARGMATCH_ASSERT): Use it.
13514 * src/system.h (verify): New macro.
13515 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13516 rather than assert.
13517 * src/tables.c (tables_generate): Likewise.
13519 * src/struniq.c (struniq_assert): Now returns void, and aborts
13520 if the assertion is false.
13521 (struniq_assert_p): Remove.
13522 * src/struniq.h: Likewise.
13524 2002-11-18 Paul Eggert <eggert@twinsun.com>
13526 * data/glr.c (yygetLRActions): Replace `yyindex' with
13527 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13528 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13529 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13531 2002-11-18 Akim Demaille <akim@epita.fr>
13533 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13535 From Tim Van Holder.
13537 2002-11-17 Paul Eggert <eggert@twinsun.com>
13539 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13540 to "SyntaxError" for consistency with my 2002-11-15 change.
13542 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13543 not define to {}, since this breaks the common use of `YYDPRINTF
13544 ((...));' if a single statement is desired (e.g. before `else').
13545 Work around GCC warnings by surrounding corresponding calls with
13547 (yyhasResolvedValue): Remove unused function.
13548 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13550 (yyreportSyntaxError): Renamed from yyreportParseError.
13551 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13553 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13554 extern when possible. Remove unused initializations.
13556 2002-11-16 Akim Demaille <akim@epita.fr>
13558 Augment the similarity between GLR and LALR traces.
13560 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13561 (YY_REDUCE_PRINT): New.
13562 (yyparse): Use them.
13563 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13565 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13566 state reached after the reduction/recovery, since...
13567 (yyparse, yyprocessOneStack): Report the state we are entering in.
13569 2002-11-16 Akim Demaille <akim@epita.fr>
13571 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13572 Add support for --trace=skeleton.
13573 * src/scan-skel.l: %option debug.
13574 Scan strings of non-@ or \n instead of character by character.
13575 (scan_skel): Handle trace_skeleton.
13577 (@output_parser_name@, @output_header_name@): ``Restore'' their
13578 support (used to be M4 macros).
13579 * data/yacc.c: Quote larger chunks, a la glr.c.
13580 * data/lalr1.cc: Likewise.
13581 The header guards are no longer available, so use some other
13582 string than `YYLSP_NEEDED'.
13584 2002-11-16 Akim Demaille <akim@epita.fr>
13586 Make the ``Printers and Destructors'' test more verbose, taking
13587 `yacc.c''s behavior as (possibly wrong) reference.
13589 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13590 instead of fprint on stdout.
13591 Set and report the last_line of the symbols.
13592 Consistently display values and locations.
13594 2002-11-16 Paul Eggert <eggert@twinsun.com>
13596 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13598 2002-11-15 Paul Eggert <eggert@twinsun.com>
13600 * tests/actions.at (Actions after errors): New test case.
13602 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13603 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13604 tests/action.at, tests/calc.at, tests/conflicts.at,
13605 tests/cxx-type.at, tests/regression.at:
13606 "parse error" -> "syntax error" for POSIX compatibility.
13607 "parsing stack overflow..." -> "parser stack overflow" so
13608 that code matches Bison documentation.
13610 2002-11-15 Akim Demaille <akim@epita.fr>
13612 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13613 take two BRACED_CODE, not two string_content.
13614 Free the scanner's obstack when we are done.
13615 (code_content): New.
13616 * tests/calc.at: Adjust.
13617 * doc/bison.texinfo: Adjust.
13618 Also, make sure to include the `,' for these declarations.
13620 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13622 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13623 definition; avoids potential autoreconf problems.
13625 2002-11-15 Akim Demaille <akim@epita.fr>
13627 Always check the value returned by yyparse.
13629 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13630 returned by yyparse.
13631 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13633 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13634 returned by yyparse.
13636 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13638 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13641 2002-11-14 Paul Eggert <eggert@twinsun.com>
13643 * src/output.c (output_skeleton): Call xfopen instead of
13644 duplicating xfopen's body.
13646 Fix bugs reported by Nelson H. F. Beebe in
13647 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13649 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13650 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13651 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13652 file twice in the grammar, as an extra check.
13654 * tests/input.at (Torturing the Scanner): Surround the
13655 backslash-newline tests with "#if 0", to make it less likely that
13656 we'll run into compiler bugs. Bring back solitary \ inside
13657 comment, but add a closing comment to work around HP C bug. Don't
13658 test backslash-newline in C character constant.
13660 2002-11-14 Akim Demaille <akim@epita.fr>
13662 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13663 status of the compiler.
13664 Calling `exit 1' is no longer needed.
13665 Reported by Nelson H. F. Beebe.
13667 2002-11-14 Akim Demaille <akim@epita.fr>
13669 * tests/atlocal.in (CPPFLAGS): We have config.h.
13670 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13672 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13673 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13674 * tests/regression.at, tests/torture.at: Use them for all the
13675 grammars that are to be compiled.
13676 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13677 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13678 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13680 2002-11-14 Akim Demaille <akim@epita.fr>
13682 * doc/bison.texinfo: Various formatting changes (alignments in
13683 samples, additional @group/@end group, GCS in samples.
13684 Use @deffn instead of simple @table to define the directives,
13685 macros, variables etc.
13687 2002-11-13 Paul Eggert <eggert@twinsun.com>
13689 Fix some bugs reported by Albert Chin-A-Young in
13690 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13692 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13693 -o c"; the HP C compiler chatters during compilation.
13694 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13695 * tests/headers.at (export YYLTYPE): Likewise.
13697 * tests/input.at (Torturing the Scanner): Remove lines containing
13698 solitary backslashes, as they tickle a bug in the HP C compiler.
13700 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13701 comments, since they're not portable. Use GNU coding style.
13703 2002-11-13 Akim Demaille <akim@epita.fr>
13705 * data/yacc.c: Leave bigger chunks of quoted text.
13706 (YYDSYMPRINTF): New.
13707 Use it to report symbol activities.
13708 * data/glr.c (YYDSYMPRINTF): New.
13711 2002-11-12 Paul Eggert <eggert@twinsun.com>
13715 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13716 (yyglrReduce): Return yyok, not 0.
13717 This should avoid the enumerated-type warnings reported
13718 by Nelson H. F. Beebe in
13719 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13721 * lib/bbitset.h (BITSET_INLINE): Remove.
13722 * lib/bitset.h [! BITSET_INLINE]: Remove.
13723 (bitset_set, bitset_reset, bitset_test): Rename local vars
13724 to avoid shadowing warnings by GCC.
13726 * data/glr.c (inline): Remove #define. It's the user's
13727 responsibility to #define it away, just like 'const'.
13728 This fixes one of the bugs reported by Nelson H. F. Beebe in
13729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13731 * Makefile.maint (po-check): Scan .l and .y files instead of the
13732 .c and the .h files that they generate. This fixes the bug
13733 reported by Tim Van Holder in:
13734 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13735 Look for N_ as well as for _. Try to avoid matching #define for
13737 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13738 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13739 * src/scan-gram.l: Revamp regular expressions so that " and '
13740 do not confuse xgettext.
13742 * src/struniq.h (struniq_new): Do not declare the return type
13743 to be 'const'; this violates the C standard.
13744 * src/struniq.c (struniq_new): Likewise.
13746 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13748 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13749 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13752 2002-11-12 Akim Demaille <akim@epita.fr>
13754 * Makefile.maint: Sync with Autoconf:
13755 (local_updates): New.
13757 2002-11-12 Akim Demaille <akim@epita.fr>
13759 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13761 2002-11-12 Akim Demaille <akim@epita.fr>
13763 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13766 2002-11-12 Akim Demaille <akim@epita.fr>
13768 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13771 2002-11-12 Akim Demaille <akim@epita.fr>
13773 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13774 Use it to test the GLR parser.
13776 2002-11-12 Akim Demaille <akim@epita.fr>
13778 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13780 * data/glr.c (yystos): New.
13781 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13782 (YYDSYMPRINT): New.
13783 (yyval): Don't define it, it is handled via M4.
13784 (yyrecoverParseError): Free verbosely the discarded symbols.
13785 * data/yacc.c (yysymprint): Remove, rather...
13786 (b4_yysymprint_generate): invoke.
13787 * data/c.m4 (b4_yysymprint_generate): New.
13788 Accept pointers as arguments, as opposed to the version from
13790 (b4_yydestruct_generate): Likewise.
13791 * tests/cations.at (Printers and Destructors): Use Bison directives
13792 instead of CPP macros.
13793 Don't rely on internal details.
13795 2002-11-12 Akim Demaille <akim@epita.fr>
13797 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13798 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13799 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13800 it against YYEMPTY and so forth), work on yytoken (i.e., set
13801 it to YYEMPTY etc.).
13802 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13803 (b4_symbol_actions): Remove.
13804 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13805 for 0, end-of-input.
13807 2002-11-12 Akim Demaille <akim@epita.fr>
13809 * doc/bison.texinfo (Destructor Decl): New.
13811 2002-11-12 Akim Demaille <akim@epita.fr>
13813 * src/tables.c (tables_generate): Use free for pointers that
13814 cannot be NULL, not XFREE.
13815 (pack_vector): Use assert, not fatal, for bound violations.
13816 * src/state.c (state_new): Likewise.
13817 * src/reader.c (reader): Likewise.
13818 * src/lalr.c (set_goto_map): Likewise.
13819 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13822 2002-11-12 Akim Demaille <akim@epita.fr>
13824 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13826 * src/scan-gram.l (last_string): Is global to the file, not to
13828 * src/parse-gram.y (input): Don't append the epilogue here,
13829 (epilogue.opt): do it here, and free the scanner's obstack.
13830 * src/reader.c (epilogue_set): Rename as...
13831 (epilogue_augment): this.
13832 * data/c.m4 (b4_epilogue): Defaults to empty.
13834 2002-11-12 Akim Demaille <akim@epita.fr>
13836 * src/getargs.c (long_options): Remove duplicates.
13837 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13839 * doc/bison.rnh: Remove.
13840 * doc/bison.texinfo (VMS Invocation): Remove.
13842 2002-11-12 Akim Demaille <akim@epita.fr>
13844 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13845 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13847 Use struniq for symbols.
13849 * src/symtab.h (symbol_t): The tag member is a struniq.
13850 (symbol_type_set): Adjust.
13851 * src/symtab.c (symbol_new): Takes a struniq.
13852 (symbol_free): Don't free the tag member.
13853 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13854 (hash_compare_symbol, hash_symbol): these.
13855 Use the fact that tags as struniqs.
13856 (symbol_get): Use struniq_new.
13857 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13859 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13860 and type members are struniqs.
13861 * src/reader.c (get_merge_function)
13862 (grammar_current_rule_merge_set): Adjust.
13863 (TYPE, current_type): Are struniq.
13865 Use struniq for file names.
13867 * src/files.h, src/files.c (infile): Split into...
13868 (grammar_file, current_file): these.
13869 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13870 * src/reduce.c (reduce_print): Likewise.
13871 * src/getargs.c (getargs): Likewise.
13872 * src/complain.h, src/complain.c: Likewise.
13873 * src/main.c (main): Call struniqs_new early enough to use it for
13875 Don't free the input file name.
13877 2002-11-12 Akim Demaille <akim@epita.fr>
13879 * src/symtab.c (symbol_free): Remove dead deactivated code:
13880 type_name are properly removed.
13881 Don't use XFREE to free items that cannot be NULL.
13882 * src/struniq.h, src/struniq.c: New.
13883 * src/main.c (main): Initialize/free struniqs.
13884 * src/parse-gram.y (%union): Add astruniq member.
13886 * src/scan-gram.l (<{tag}>): Return a struniq.
13887 Free the obstack bit that used to store it.
13888 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13890 2002-11-11 Paul Eggert <eggert@twinsun.com>
13892 Revamp to fix many (but not all) of the C- and M4-related quoting
13893 problems. Among other things, this fixes the Bison bug reported
13894 by Jan Hubicka when processing the Bash grammar; see:
13895 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13897 Use new @ escapes consistently. Represent brackets with @{ and @}
13898 rather than @<:@ and @:>@, since this works a bit better with dumb
13899 editors like vi. Represent @ with @@, since @ is now consistently
13900 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13901 __ofile__, to avoid unexpected expansions. Similarly, use @output
13902 rather than #output.
13904 * data/c.m4 (b4_copyright): Omit file name from comment, since
13905 the file name could contain "*/".
13906 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13907 be quoted. All uses changed.
13909 * data/glr.c: Use new @ escapes consistently.
13910 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13911 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13912 Remove, since they couldn't handle arbitrary characters in file
13914 * data/lalr1.cc: Likewise.
13915 * data/yacc.c: Likewise.
13917 * src/files.c (output_infix): Remove; all uses removed.
13918 * src/files.h: Likewise.
13920 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13921 mishandled funny characters in file names, and anyway it isn't
13923 * data/yacc.c: Likewise.
13924 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13926 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13927 * data/yacc.c: Likewise.
13929 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13931 (muscle_init): Quote filename as a C string.
13932 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13933 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13934 * src/output.c (escaped_file_name_output): New function.
13935 (prepare_symbols): Quote tokens for M4.
13936 (prepare): Don't insert output_infix, output_prefix,
13937 output_parser_name, output_header_name; this is now down by scan-skel.
13938 Insert skeleton as a C string.
13940 * src/output.c (user_actions_output, symbol_destructors_output,
13941 symbol_printers_output): Quote filenames for C and M4.
13942 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13944 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13945 escapes other than \\ and \'; this simplifies the code.
13946 (<SC_STRING>): Likewise, for \\ and \".
13947 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13948 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13949 Use new escapes @{ and @} for [ and ].
13951 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13952 them with auto vars.
13953 Switch to new escape scheme, where @ is the escape character uniformly.
13954 Abort if a stray escape character is found. Avoid unbounded input
13955 buffer when parsing non-escaped text.
13957 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13958 __oline__, #output, $@, and @{ do not have unintended meanings.
13960 2002-11-09 Paul Eggert <eggert@twinsun.com>
13962 Fix the test failure due to GCC warnings described in
13963 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13964 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13965 evaluate to 0 if it's impossible for NINF to be in the respective
13967 (yygetLRActions, yyrecoverParseError): Use them.
13969 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13970 counted in the token inserted at end of file. Now takes
13971 location_t *, not location_t, so that the location can be
13972 adjusted. All uses changed.
13974 * tests/regression.at (Invalid inputs): Adjust wording in
13975 diagnostic to match the new behavior.
13977 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13978 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13979 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13980 abort ();'. This reduces the runtime of the "Many lookaheads"
13981 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13984 2002-11-07 Paul Eggert <eggert@twinsun.com>
13986 * src/parse-gram.y (CHARACTER): Remove unused token.
13989 * src/scan-gram.l: Remove stack option. We no longer use the
13990 stack, since the stack was never deeper than 1; instead, use the
13991 new auto var c_context to record the stacked value.
13993 Remove nounput option. At an unexpected end of file, we now unput
13994 the minimal input necessary to end cleanly; this simplifies the
13997 Avoid unbounded token sizes where this is easy.
13999 (unexpected_end_of_file): New function.
14000 Use it to systematize the error message on unexpected EOF.
14001 (last-string): Now auto, not static.
14002 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14003 (scanner_last_string_free): Remove; not used.
14004 (percent_percent_count): Move decl to just before use.
14005 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14006 not the (never otherwised-used) CHARACTER.
14008 2002-11-07 Akim Demaille <akim@epita.fr>
14010 Let yyerror always receive the msg as last argument, so that
14011 yyerror can be variadic.
14013 * data/yacc.c (b4_yyerror_args): New.
14014 Use it when calling yyerror.
14015 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14016 Use it when calling yyerror.
14017 * doc/bison.texinfo (Error Reporting): Adjust.
14018 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14019 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14021 2002-11-06 Akim Demaille <akim@epita.fr>
14023 #line should have quoted strings.
14024 Ideally, this should be done by m4_quotearg.
14026 * src/scan-skel.l: Include quotearg.h.
14028 * src/output.c (symbol_printers_output)
14029 (symbol_destructors_output): Quote the file name.
14031 2002-11-06 Akim Demaille <akim@epita.fr>
14033 * tests/regression.at (Invalid inputs): Adjust to the recent
14036 2002-11-06 Akim Demaille <akim@epita.fr>
14038 Restore --no-lines.
14039 Reported by Jim Kent.
14041 * data/c.m4 (b4_syncline): New.
14042 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14043 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14044 * src/output.c (user_actions_output): Likewise.
14045 (prepare): Define 'b4_synclines_flag'.
14046 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14048 2002-11-06 Akim Demaille <akim@epita.fr>
14050 * src/main.c (main): Free `infile'.
14051 * src/scan-gram.l (handle_syncline): New.
14053 * src/output.c (user_actions_output, symbol_destructors_output)
14054 (symbol_printers_output): Use the location's file name, not
14056 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14058 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14060 * src/tables.c (matching_state): Don't allow states to match if
14061 either has GLR conflict entries.
14063 2002-11-05 Paul Eggert <eggert@twinsun.com>
14065 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14066 "integer out of range" rather than "invalid value".
14067 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14070 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14071 Also, remove one static variable in the scanner.
14073 * src/scan-gram.l (braces_level): Now auto, not static.
14074 Initialize to zero if the compiler is being picky.
14075 (INITIAL): Clear braces_level instead of incrementing it.
14076 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14077 as POSIX 1003.1-2001 requires.
14078 * src/system.h (IF_LINT): New macro, taken from coreutils.
14079 * configure.ac: Define "lint" if --enable-gcc-warnings.
14081 2002-11-05 Akim Demaille <akim@epita.fr>
14083 * src/scan-gram.l: When it starts with `%', complain about the
14084 whole directive, not just that `invalid character: %'.
14086 2002-11-04 Akim Demaille <akim@epita.fr>
14088 * Makefile.maint: Update from Autoconf.
14089 (update, cvs-update, po-update, do-po-update): New.
14091 2002-11-04 Akim Demaille <akim@epita.fr>
14093 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14095 Have yyerror `use' its arguments.
14096 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14097 returns true when location & yacc & pure & parse-param.
14098 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14100 2002-11-04 Akim Demaille <akim@epita.fr>
14102 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14104 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14107 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14110 2002-11-03 Paul Eggert <eggert@twinsun.com>
14112 * src/reader.c (get_merge_function, grammar_current_rule_check):
14113 Use consistent diagnostics for reporting type name clashes.
14114 Quote the types with <>, for consistency with Yacc.
14115 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14117 2002-11-03 Akim Demaille <akim@epita.fr>
14119 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14121 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14122 (b4_parse_param): Remove.
14123 Use b4_identification.
14124 Propagate b4_pure_args where needed to pass them to yyerror.
14125 * data/glr.m4 (b4_parse_param): Remove.
14126 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14127 (b4_lpure_formals): New.
14128 Use b4_identification.
14129 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14130 b4_user_formals and b4_user_args.
14131 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14132 (yyreportAmbiguity): When using a pure parser, also need
14133 the location, and the parse-params.
14135 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14136 When using a pure parser, also need the parse-params.
14138 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14139 (%pure-parser + %parse-param) LALR and GLR parsers.
14140 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14141 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14142 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14143 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14144 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14145 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14146 * doc/bison.texinfo: Untabify the whole file.
14147 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14148 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14149 (Error Reporting): Adjust to these new directives.
14150 Document %error-verbose, deprecate YYERROR_VERBOSE.
14152 2002-11-03 Akim Demaille <akim@epita.fr>
14154 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14155 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14156 command line options.
14157 * tests/cxx-type.at: Formatting changes.
14159 2002-11-03 Paul Eggert <eggert@twinsun.com>
14161 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14162 to count columns correctly, and to check for invalid inputs.
14164 Use mbsnwidth to count columns correctly. Account for tabs, too.
14165 Include mbswidth.h.
14166 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14167 (extend_location): New function.
14168 (YY_LINES): Remove.
14170 Handle CRLF in C code rather than in Lex code.
14171 (YY_INPUT): New macro.
14172 (no_cr_read): New function.
14174 Scan UCNs, even though we don't fully handle them yet.
14175 (convert_ucn_to_byte): New function.
14177 Handle backslash-newline correctly in C code.
14178 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14179 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14181 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14182 Use {splice} wherever C allows backslash-newline.
14183 YY_STEP after space, newline, vertical-tab.
14184 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14186 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14188 ({int}, handle_action_dollar, handle_action_at): Check for integer
14191 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14193 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14194 as well as \000. Check for UCHAR_MAX, not 255.
14195 Allow \x with an arbitrary positive number of digits, as in C.
14196 Check for overflow here.
14197 Allow \? and UCNs, for compatibility with C.
14199 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14200 with quote slot used by complain_at.
14202 * tests/input.at: Add tests for backslash-newline, m4 quotes
14203 in symbols, long literals, and funny escapes in strings.
14205 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14206 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14207 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14208 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14209 * m4/mbswidth.m4: New file, from GNU coreutils.
14211 * doc/bison.texinfo (Grammar Outline): Document // comments.
14212 (Symbols): Document that trigraphs have no special meaning in Bison,
14213 nor is backslash-newline allowed.
14214 (Actions): Document that trigraphs have no special meaning.
14216 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14219 2002-11-02 Paul Eggert <eggert@twinsun.com>
14221 * src/reader.c: Don't include quote.h; not needed.
14222 (get_merge_function): Reword warning to be consistent with
14223 type clash diagnostic in grammar_current_rule_check.
14225 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14226 bug in trigraph handling.
14228 * src/output.c (prepare_symbols): When printing token names,
14229 escape "[" as "@<:@" and likewise for "]".
14231 * src/system.h (errno): Remove declaration, as we are now
14232 assuming C89 or better, and C89 guarantees errno.
14234 2002-10-30 Paul Eggert <eggert@twinsun.com>
14236 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14237 Check for close failures.
14238 * src/files.h (xfclose): Return void, not int, since it always
14240 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14242 * src/output.c (output_skeleton): Use xfclose rather than fclose
14243 and ferror. xfclose now checks ferror.
14245 * data/glr.c (YYLEFTMOST_STATE): Remove.
14246 (yyreportTree): Use a stack-based leftmost state. This avoids
14247 our continuing battles with bogus warnings about initializers.
14249 2002-10-30 Akim Demaille <akim@epita.fr>
14251 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14254 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14256 * tests/glr-regr1.at: New test for reported regressions.
14257 * tests/testsuite.at: Add glr-regr1.at test.
14258 * tests/Makefile.am: Add glr-regr1.at test.
14260 2002-10-24 Paul Eggert <eggert@twinsun.com>
14264 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14265 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14266 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14267 Don't assume strdup exists; POSIX says its an XSI extension.
14268 Check for buffer overflow on input.
14270 2002-10-24 Akim Demaille <akim@epita.fr>
14272 * src/output.c (output_skeleton): Don't disable M4sugar comments
14273 too soon: it results in comments being expanded.
14274 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14277 2002-10-24 Akim Demaille <akim@epita.fr>
14279 * data/yacc.c (m4_int_type): New.
14280 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14281 char' as only yacc.c wants K&R portability.
14282 * data/glr.c (yysigned_char): Remove.
14283 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14284 Reported by Quoc Peyrot.
14286 2002-10-23 Paul Eggert <eggert@twinsun.com>
14288 * src/main.c (main): With --trace=time, report times even if a
14289 non-fatal error occurs. Formerly, the times were reported in some
14290 such cases but not in others.
14291 * src/reader.c (reader): Just return if a complaint has been issued,
14292 instead of exiting, so that 'main' can report times.
14294 2002-10-22 Akim Demaille <akim@epita.fr>
14296 * src/system.h: Include sys/types.
14297 Reported by Bert Deknuydt.
14299 2002-10-23 Paul Eggert <eggert@twinsun.com>
14301 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14302 Suggested by Art Haas.
14304 2002-10-22 Paul Eggert <eggert@twinsun.com>
14306 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14307 decl; not needed any more.
14308 * src/main.c (main): Use return to exit, undoing yesterday's change.
14309 The last OS that we could find where this wouldn't work is
14310 SunOS 3.5, and that's too old to worry about now.
14312 * data/glr.c (struct yyltype): Define members even when not
14313 doing locations. This is more consistent with yacc.c, and it
14314 works around the following bug reports:
14315 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14316 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14318 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14319 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14320 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14322 2002-10-22 Akim Demaille <akim@epita.fr>
14324 * data/README: New.
14326 2002-10-21 Paul Eggert <eggert@twinsun.com>
14328 Be consistent about 'bool'; the old code used an enum in one
14329 module and an int in another, and this violates the C standard.
14330 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14331 * configure.ac (AC_HEADER_STDBOOL): Add.
14332 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14333 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14334 * src/symtab.c (hash_compare_symbol_t): Likewise.
14335 * src/system.h (bool, false, true): Use a definition consistent
14336 with ../lib/hash.c. All uses changed.
14338 * src/complain.c (warning_issued): Renamed from warn_message_count,
14339 so that we needn't worry about integer overflow (!).
14340 Now of type bool. All uses changed.
14341 (complaint_issued): Renamed from complain_message_count; likewise.
14343 * src/main.c (main): Use exit to exit with failure.
14345 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14346 rather than 1 and 0.
14347 * src/main.c (main): Likewise.
14348 * src/getargs.c (getargs): Likewise.
14349 * src/reader.c (reader): Likewise.
14351 * src/getarg.c (getargs): Remove duplicate code for
14352 "Try `bison --help'".
14354 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14355 What was that "2" for?
14357 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14358 * src/getargs.c (usage): Likewise.
14360 * src/getargs.c (getargs): When there are too few operands, report
14361 the last one. When there are too many, report the first extra
14362 one. This is how diffutils does it.
14364 2002-10-20 Paul Eggert <eggert@twinsun.com>
14366 Remove K&R vestiges.
14367 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14368 * src/complain.c (VA_START): Remove. Assume prototypes.
14369 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14370 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14371 fatal): Assume prototypes.
14372 * src/complain.h: Assume prototypes.
14373 * src/system.h (PARAMS): Remove.
14374 Include <limits.h> unconditionally, since it's guaranteeed even
14375 for a freestanding C89 compiler.
14376 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14377 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14379 2002-10-20 Akim Demaille <akim@epita.fr>
14381 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14382 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14383 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14384 (yyresolveStates, yyresolveAction, yyresolveStack)
14385 (yyprocessOneStack): Use them.
14386 (yy_reduce_print): New.
14387 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14389 2002-10-20 Akim Demaille <akim@epita.fr>
14391 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14392 arguments and output `void'.
14393 (b4_c_function): Rename as...
14394 (b4_c_function_def): this.
14395 (b4_c_function_decl, b4_c_ansi_function_def)
14396 (b4_c_ansi_function_decl): New.
14397 Change the interpretation of the arguments: before `int, foo', now
14399 * data/yacc.c (yyparse): Prototype and define thanks to these.
14400 Adjust b4_c_function_def uses.
14401 * data/glr.c (yyparse): Likewise, but ANSI only.
14403 2002-10-20 Akim Demaille <akim@epita.fr>
14405 * src/output.c (prepare): Move the definition of `tokens_number',
14406 `nterms_number', `undef_token_number', `user_token_number_max'
14408 (prepare_tokens): Here.
14409 (prepare_tokens): Rename as...
14410 (prepare_symbols): this.
14411 (prepare): Move the definition of `rules_number' to...
14412 (prepare_rules): here.
14413 (prepare): Move the definition of `last', `final_state_number',
14414 `states_number' to...
14415 (prepare_states): here.
14416 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14418 2002-10-20 Akim Demaille <akim@epita.fr>
14420 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14422 2002-10-20 Akim Demaille <akim@epita.fr>
14424 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14427 2002-10-20 Akim Demaille <akim@epita.fr>
14429 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14430 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14432 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14434 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14435 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14438 2002-10-19 Paul Eggert <eggert@twinsun.com>
14440 Do not create a temporary file, as that involves security and
14441 cleanup headaches. Instead, use a pair of pipes.
14442 Derived from a suggestion by Florian Krohm.
14443 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14444 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14445 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14446 (BISON_PREREQ_SUBPIPE): Add.
14447 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14448 Add subpipe.h, subpipe.c.
14449 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14450 * po/POTFILES.in: Add lib/subpipe.c.
14451 * src/output.c: Include "subpipe.h".
14452 (m4_invoke): Remove decl.
14453 (scan_skel): New decl.
14454 (output_skeleton): Use pipe rather than temporary file for m4 input.
14455 Check that m4sugar.m4 is readable, to avoid deadlock.
14456 Check for pipe I/O error.
14457 * src/scan-skel.l (readpipe): Remove decl.
14458 (scan_skel): New function, to be used in place of m4_invoke.
14459 Read from stream rather than file.
14461 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14462 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14463 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14464 this generates a more-accurate value anyway.
14466 * lib/timevar.c (timervar_accumulate): Rename locals to
14467 avoid confusion with similarly-named more-global.
14468 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14470 * src/output.c (prepare): Use xstrdup to convert char const *
14471 to char *, to avoid GCC warning.
14473 2002-10-19 Akim Demaille <akim@epita.fr>
14475 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14476 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14477 Use them to have `calc.y' ready for %pure-parser.
14478 * data/yacc.c (YYLEX): Pass a yylex return type to
14479 b4_c_function_call.
14481 2002-10-19 Akim Demaille <akim@epita.fr>
14483 Prototype support of %lex-param and %parse-param.
14485 * src/parse-gram.y: Add the definition of the %lex-param and
14486 %parse-param tokens, plus their rules.
14487 Drop the `_' version of %glr-parser.
14489 * src/scan-gram.l (INITIAL): Scan them.
14490 * src/muscle_tab.c: Comment changes.
14491 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14492 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14493 (muscle_entry_s): The `value' member is no longer const.
14494 Adjust all dependencies.
14495 * src/muscle_tab.c (muscle_init): Adjust: use
14496 MUSCLE_INSERT_STRING.
14497 Initialize the obstack earlier.
14498 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14499 (muscle_pair_list_grow): New.
14500 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14501 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14502 * tests/calc.at: Use %locations, not --locations.
14503 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14505 2002-10-19 Akim Demaille <akim@epita.fr>
14507 * src/getargs.c (usage): Take status as argument and exit
14509 Report the traditional `Try ... --help' message when status != 0.
14510 (usage, version): Don't take a FILE * as arg, it is pointless.
14511 (getargs): When there is an incorrect number of arguments, make it
14512 an error, and report it GNUlically thanks to `usage ()'.
14514 2002-10-18 Paul Eggert <eggert@twinsun.com>
14516 * data/glr.c (yyreportParseError): Don't assume that sprintf
14517 yields the length of the printed string, as this is not true
14518 on SunOS 4.1.4. Reported by Peter Klein.
14520 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14521 * tests/conflicts.at (%nonassoc and eof): Likewise.
14522 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14524 2002-10-17 Akim Demaille <akim@epita.fr>
14526 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14527 * src/getargs.c (trace_types, trace_args): Adjust.
14528 * src/reader.c (grammar_current_rule_prec_set)
14529 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14530 Standardize error messages.
14531 And s/@prec/%prec/!
14532 (reader): Use trace_flag to enable scanner/parser debugging,
14533 instead of an adhoc scheme.
14534 * src/scan-gram.l: Remove trailing debugging code.
14536 2002-10-16 Paul Eggert <eggert@twinsun.com>
14538 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14541 * NEWS: Officially drop support for building Bison with K&R C,
14542 since it didn't work anyway and it's not worth worrying about.
14543 * Makefile.maint (wget_files): Remove ansi2knr.c.
14544 (ansi2knr.c-url_prefix): Remove.
14545 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14546 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14547 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14549 2002-10-15 Paul Eggert <eggert@twinsun.com>
14551 Stop using the "enum_" trick for K&R-style function definitions;
14552 it confused me, and I was the author! Instead, assume that people
14553 who want to use K&R C compilers (when using these modules in GCC,
14554 perhaps?) will run ansi2knr.
14556 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14557 All uses of "enum_" changed to "enum ".
14558 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14559 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14561 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14562 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14563 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14564 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14565 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14566 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14567 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14568 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14569 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14570 Use function prototypes; this removes the need for declaring
14571 static functions simply to provide their prototypes.
14572 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14573 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14574 bitset_count_, bitset_create, bitset_dump, bitset_first,
14575 bitset_free, bitset_init, bitset_last, bitset_next,
14576 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14577 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14578 bitset_print, bitset_release_memory, bitset_toggle_,
14579 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14580 debug_bitset): Likewise.
14581 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14582 * lib/bitset_stats.c (bitset_log_histogram_print,
14583 bitset_percent_histogram_print, bitset_stats_and,
14584 bitset_stats_and_cmp, bitset_stats_and_or,
14585 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14586 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14587 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14588 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14589 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14590 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14591 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14592 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14593 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14594 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14595 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14596 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14597 bitset_stats_zero): Likewise.
14598 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14599 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14600 bitsetv_dump, debug_bitsetv): Likewise.
14601 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14602 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14603 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14604 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14605 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14606 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14607 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14608 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14609 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14610 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14611 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14613 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14614 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14615 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14616 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14617 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14618 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14619 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14620 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14621 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14622 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14623 lbitset_xor_cmp, lbitset_zero): Likewise.
14625 2002-10-14 Akim Demaille <akim@epita.fr>
14629 2002-10-14 Akim Demaille <akim@epita.fr>
14631 * tests/Makefile.am (maintainer-check-posix): New.
14633 2002-10-14 Akim Demaille <akim@epita.fr>
14635 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14638 2002-10-14 Akim Demaille <akim@epita.fr>
14640 * src/tables.c (table_ninf_remap): base -> tab.
14641 Reported by Matt Rosing.
14643 2002-10-14 Paul Eggert <eggert@twinsun.com>
14645 * tests/action.at, tests/calc.at, tests/conflicts.at,
14646 tests/cxx-type.at, tests/headers.at, tests/input.at,
14647 tests/regression.at, tests/synclines.at, tests/torture.at:
14648 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14649 so that the tests still work even if POSIXLY_CORRECT is set.
14650 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14652 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14653 for portability to K&R hosts. Fix typo: signed char is guaranteed
14654 only to 127, not to 128.
14655 * data/glr.c (yysigned_char): New type.
14656 * data/yacc.c (yysigned_char): Likewise.
14657 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14659 2002-10-13 Paul Eggert <eggert@twinsun.com>
14661 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14662 true due to limited range of data type" warning from GCC.
14664 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14665 by wrapping enum yytokentype's definition inside #ifndef
14666 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14668 2002-10-13 Akim Demaille <akim@epita.fr>
14670 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14671 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14673 2002-10-13 Akim Demaille <akim@epita.fr>
14675 * Makefile.maint: Update from Autoconf 2.54.
14676 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14678 2002-10-13 Akim Demaille <akim@epita.fr>
14680 * src/print.c (print_state): Separate the list of solved conflicts
14681 from the other items.
14682 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14684 2002-10-13 Akim Demaille <akim@epita.fr>
14686 Let nondeterministic skeletons be usable with deterministic
14689 With the patch, GAWK compiled by GCC without -O2 passes its test
14690 suite using a GLR parser driven by LALR tables. It fails with -O2
14691 because `struct stat' gives two different answers on my machine:
14692 88 (definition of an auto var) and later 96 (memset on this var).
14693 Hence the stack is badly corrumpted. The headers inclusion is to
14694 blame: if I move the awk.h inclusion before GLR's system header
14695 inclusion, the two struct stat have the same size.
14697 * src/tables.c (pack_table): Always create conflict_table.
14698 (token_actions): Always create conflict_list.
14699 * data/glr.c (YYFLAG): Remove, unused.
14701 2002-10-13 Akim Demaille <akim@epita.fr>
14703 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14705 (VALGRIND, GXX): New.
14706 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14707 * tests/bison.in: Run $PREBISON a pre-command.
14708 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14709 (maintainer-check-g++): New.
14710 * Makefile.am (maintainer-check): New.
14712 2002-10-13 Akim Demaille <akim@epita.fr>
14714 * data/glr.c: Formatting changes.
14715 Tweak some trace messages to match yacc.c's.
14717 2002-10-13 Akim Demaille <akim@epita.fr>
14719 GLR parsers sometimes raise parse errors instead of performing the
14721 Reported by Charles-Henry de Boysson.
14723 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14724 check the length of the traces when %glr.
14725 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14727 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14729 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14730 (yyltype): Remove the yy prefix from the member names.
14731 (yytable): Complete its comment.
14732 (yygetLRActions): Map error action number from YYTABLE from
14734 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14735 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14736 not satisfying as we could compare an YYACTION computed from
14737 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14738 only value for error actions.
14739 (yyreportParseError): In verbose parse error messages, don't issue
14740 `error' in the list of expected tokens.
14741 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14742 next action to perform to match glr.c's decoding.
14743 (yytable): Complete its comment.
14745 2002-10-13 Paul Eggert <eggert@twinsun.com>
14747 Fix problem reported by Henrik Grubbstroem in
14748 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14749 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14750 because the Bison parser reads the second action before reducing
14752 * src/scan-gram.l (rule_length): New static var.
14753 Use it to keep track of the rule length in the scanner, since
14754 we can't expect the parser to be in lock-step sync with the scanner.
14755 (handle_action_dollar, handle_action_at): Use this var.
14756 * tests/actions.at (Exotic Dollars): Test for the problem.
14758 2002-10-12 Paul Eggert <eggert@twinsun.com>
14760 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14761 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14762 Include <sys/time.h> when checking for clock_t and struct tms.
14763 Use same include order as source.
14764 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14765 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14767 * lib/timevar.c: Update copyright date and clarify comments.
14768 (get_time) [IN_GCC]: Keep the GCC version for reference.
14770 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14771 GCC version as of today, then merge Bison's changes.
14772 Change "GCC" to "Bison" in copyright notice. timevar.def's
14773 author is Akim, so change that too.
14775 * src/reader.c (grammar_current_rule_check):
14776 Don't worry about the default action if $$ is untyped.
14777 Prevents bogus warnings reported by Jim Gifford in
14778 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14780 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14781 * data/glr.c, data/lalr1.cc, data/yacc.c:
14782 Output token definitions before the first part of user declarations.
14783 Fixes compatibility problem reported by Jim Gifford for kbd in
14784 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14786 2002-10-11 Paul Eggert <eggert@twinsun.com>
14788 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14789 (yyparse): here. This undoes some of the 2002-07-25 change.
14790 Compatibility problem reported by Ralf S. Engelschall with
14791 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14793 2002-10-11 Akim Demaille <akim@epita.fr>
14795 * tests/regression.at Characters Escapes): New.
14796 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14798 Reported by Jan Nieuwenhuizen.
14800 2002-10-11 Akim Demaille <akim@epita.fr>
14804 2002-10-10 Paul Eggert <eggert@twinsun.com>
14806 Portability fixes for bitsets; this also avoids several GCC
14809 * lib/abitset.c: Include <stddef.h>, for offsetof.
14810 * lib/lbitset.c: Likewise.
14812 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14813 properly for vectors of objects. Do not assume that adding a
14814 header size to a multiple of a word size yields a value that is
14815 properly aligned for the whole union.
14816 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14818 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14819 unique names for structures.
14820 * lib/ebitset.c (ebitset_bytes): Likewise.
14821 * lib/lbitset.c (lbitset_bytes): Likewise.
14823 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14824 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14825 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14826 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14827 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14828 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14829 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14830 to improve the type-checking that GCC can do.
14831 * lib/bitset.c (bitset_op4_cmp): Likewise.
14832 * lib/bitset_stats.c (bitset_stats_count,
14833 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14834 bitset_stats_copy, bitset_stats_disjoint_p,
14835 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14836 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14837 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14838 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14839 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14840 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14841 bitset_stats_or_and_cmp): Likewise.
14842 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14843 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14844 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14845 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14847 * lib/abitset.h: Include bitset.h, not bbitset.h.
14848 * lib/ebitset.h: Likewise.
14849 * lib/lbitset.h: Likewise.
14851 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14852 All instances of parameters of type enum bitset_opts are now of
14853 type enum_bitset_opts, to conform to the C Standard, and similarly
14854 for enum_bitset_type.
14855 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14856 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14858 Do not use "struct bitset_struct" to mean different things in
14859 different modules. Not only is this confusing, it violates
14860 the C Standard, which requires that structure types in different
14861 modules must be compatible if one is to be passed to the other.
14862 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14863 All instances of "struct bitset_struct *" replaced with "bitset".
14864 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14865 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14866 struct lbitset_struct, struct bitset_stats_struct): New types.
14867 All uses of struct bitset_struct changed to union bitset_union,
14869 * lib/abitset.c (struct abitset_struct, abitset,
14870 struct bitset_struct): Remove.
14871 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14872 struct bitset_struct): Remove.
14873 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14874 bitset_struct): Remove.
14875 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14878 Do not call a function of type T using a call that assumes the
14879 function is of a different type U. Standard C requires that a
14880 function must be called with a type that is compatible with its
14882 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14884 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14886 * lib/ebitset.c (PFV): Remove.
14887 * lib/lbitset.c (PFV): Likewise.
14888 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14889 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14891 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14892 (ebitset_vtable): Use them.
14893 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14894 lbitset_xor): New functions.
14895 (lbitset_vtable): Use them.
14897 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14900 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14902 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14903 Use offsetof, for simplicity.
14905 2002-10-06 Paul Eggert <eggert@twinsun.com>
14907 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14908 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14909 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14910 which was inadvertently undone by the 2002-09-30 patch.
14911 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14912 the same width as int.
14914 2002-10-04 Paul Eggert <eggert@twinsun.com>
14918 * configure.ac (AC_INIT), NEWS: Increment version number.
14920 * doc/bison.texinfo: Minor spelling, grammar, and white space
14922 (Symbols): Mention that any negative value returned from yylex
14923 signifies end-of-input. Warn about negative chars. Mention
14924 the portable Standard C character set.
14926 The GNU coding standard says CFLAGS and YFLAGS are reserved
14927 for the installer to set.
14928 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14929 * src/Makefile.am (AM_CFLAGS): Likewise.
14930 (AM_YFLAGS): Renamed from YFLAGS.
14932 Fix some MAX and MIN problems.
14933 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14934 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14935 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14936 * src/reader.c (reader): Use it.
14938 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14939 POSIX 1003.1-2001 has removed fgrep.
14941 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14943 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14944 interpreted as signed.
14945 * lib/ebitset.c (ebitset_list): Fix bug.
14947 2002-10-01 Paul Eggert <eggert@twinsun.com>
14949 More fixes for 64-bit hosts and large bitsets.
14951 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14952 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14953 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14954 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14955 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14956 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14957 bitset_count_): Likewise.
14958 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14959 bitset_first, bitset_last): Likewise.
14960 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14961 bitset_stats_list_reverse, bitset_stats_size,
14962 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14964 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14965 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14966 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14967 bitsetv_reflexive_transitive_closure): Likewise.
14968 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14969 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14971 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14974 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14975 Use size_t, not unsigned int, to count bytes.
14976 * lib/abitset.h (abitset_bytes): Likewise.
14977 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14979 * lib/bitset.h (bitset_bytes): Likewise.
14980 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14981 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14982 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14983 * lib/ebitset.c (ebitset_bytes): Likewise.
14984 * lib/ebitset.h (ebitset_bytes): Likewise.
14985 * lib/lbitset.c (lbitset_bytes): Likewise.
14986 * lib/lbitset.h (lbitset_bytes): Likewise.
14988 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14989 abitset_subset_p, abitset_disjoint_p, abitset_and,
14990 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14991 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14992 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14993 abitset_or_and, abitset_or_and_cmp):
14994 Use bitset_windex instead of unsigned int.
14995 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14996 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14997 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14998 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15000 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15002 * lib/bitset.c (bitset_print):
15003 Use proper printf formats for widths of integer types.
15004 * lib/bitset_stats.c (bitset_percent_histogram_print,
15005 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15006 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15007 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15008 * lib/lbitset.c (lbitset_bytes): Likewise.
15010 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15011 BITSET_SIZE_MAX): New macros.
15012 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15013 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15014 to BITSET_WINDEX_MAX.
15016 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15017 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15018 since we now return the bitset_bindex type (not int).
15020 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15021 when computing sizes.
15022 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15024 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15025 and avoid cast to unsigned.
15027 2002-09-30 Akim Demaille <akim@epita.fr>
15029 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15030 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15031 Updates from Michael Hayes.
15033 2002-09-30 Art Haas <ahaas@neosoft.com>
15035 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15037 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15040 2002-09-27 Akim Demaille <akim@epita.fr>
15044 2002-09-27 Akim Demaille <akim@epita.fr>
15046 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15047 (Because of AC_LIBSOURCE).
15049 2002-09-27 Akim Demaille <akim@epita.fr>
15051 Playing with Autoscan.
15053 * configure.ac: Remove the old LIBOBJ tweaks.
15054 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15055 * lib/strrchr.c: New.
15056 * lib/strtol.c: New, from the Coreutils 4.5.1.
15058 2002-09-27 Akim Demaille <akim@epita.fr>
15060 Playing with Autoscan.
15062 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15063 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15064 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15065 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15068 2002-09-24 Akim Demaille <akim@epita.fr>
15070 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15071 (Frequently Asked Questions, Parser Stack Overflow): New.
15073 2002-09-13 Akim Demaille <akim@epita.fr>
15075 Playing with autoscan.
15077 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15078 * src/files.c (skeleton_find): Remove, unused.
15079 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15080 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15082 2002-09-13 Akim Demaille <akim@epita.fr>
15084 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15085 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15087 2002-09-13 Akim Demaille <akim@epita.fr>
15089 * configure.ac: Require 2.54.
15090 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15091 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15092 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15093 Remove, provided by Autoconf macros.
15095 2002-09-12 Akim Demaille <akim@epita.fr>
15097 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15099 2002-09-12 Akim Demaille <akim@epita.fr>
15101 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15102 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15103 Reported by Martin Mokrejs.
15105 2002-09-10 Akim Demaille <akim@epita.fr>
15107 * src/parse-gram.y: Associate a human readable string to each
15109 * tests/regression.at (Invalid inputs): Adjust.
15111 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15113 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15114 with an Autoconf-2.5x style configure.ac.
15116 2002-09-06 Paul Eggert <eggert@twinsun.com>
15118 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15119 exception applies only to yacc.c. This is a modification of a
15120 patch originally suggested by Akim Demaille.
15122 2002-09-06 Akim Demaille <akim@epita.fr>
15124 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15126 * data/yacc.c: here.
15128 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15130 (b4_ltype): Default to yy::Location from location.hh.
15132 2002-09-04 Jim Meyering <jim@meyering.net>
15134 * data/yacc.c: Guard the declaration of yytoknum also with
15135 `#ifdef YYPRINT', so it is declared only when used.
15137 2002-09-04 Akim Demaille <akim@epita.fr>
15139 * configure.in: Rename as...
15140 * configure.ac: this.
15143 2002-09-04 Akim Demaille <akim@epita.fr>
15145 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15146 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15147 translate maintainer only messages.
15149 2002-08-12 Paul Eggert <eggert@twinsun.com>
15153 * Makefile.am (SUBDIRS): Remove intl.
15154 (DISTCLEANFILES): Remove.
15155 * NEWS: Mention that GNU M4 is now required. Clarify what is
15156 meant by "larger grammars". Mention the pt_BR translation.
15157 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15158 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15159 Bump version from 0.11.2 to 0.11.5.
15160 (BISON_PREREQ_STAGE): Remove.
15161 (AM_GNU_GETTEXT): Use external gettext.
15162 (AC_OUTPUT): Remove intl/Makefile.
15164 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15166 * data/glr.c: Include string.h, for strlen.
15167 (yyreportParseError): Use size_t for yysize.
15168 (yy_yypstack): No longer nested inside yypstates, as nested
15169 functions are not portable. Do not assume size_t is the
15171 (yypstates): Do not assume that ptrdiff_t is the same width
15172 as int, and similarly for yyposn and YYINDEX.
15174 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15176 * lib/Makefile.am (INCLUDES): Do not include from the intl
15177 directory, which has been removed.
15178 * src/Makefile.am (INCLUDES): Likewise.
15180 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15181 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15184 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15185 * tests/Makefile.am (EXTRA_DIST): Likewise.
15187 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15188 Do not assume that bitset_windex is the same width as unsigned.
15190 * lib/abitset.c (abitset_unused_clear): Do not assume that
15191 bitset_word is the same width as int.
15192 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15193 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15194 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15195 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15196 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15198 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15199 portability to one's complement hosts!).
15200 * lib/ebitset.c (ebitset_op1): Likewise.
15201 * lib/lbitset.c (lbitset_op1): Likewise.
15203 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15204 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15205 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15206 Sync with fileutils.
15207 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15208 lib/gettext.h: Sync with diffutils.
15210 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15211 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15213 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15214 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15217 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15218 size_t; the old version tried to do this but casted improperly.
15219 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15220 (bitset_test): Now returns int, not unsigned long.
15222 * lib/bitset_stats.c: Include "gettext.h".
15224 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15225 name locals "index", as it generates unnecessary warnings on some
15226 hosts that have an "index" function.
15228 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15229 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15230 they need translation.
15231 * src/LR0.c (state_list_append, new_itemsets, get_state,
15232 append_states, generate_states): Likewise.
15233 * src/assoc.c (assoc_to_string): Likewise.
15234 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15235 * src/gram.c (grammar_dump): Likewise.
15236 * src/injections.c (injections_compute): Likewise.
15237 * src/lalr.c (lookaheads_print): Likewise.
15238 * src/relation.c (relation_transpose): Likewise.
15239 * src/scan-gram.l: Likewise.
15240 * src/tables.c (table_grow, pack_vector): Likewise.
15242 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15243 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15244 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15245 * m4/mbstate_t.m4: Sync with fileutils.
15246 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15248 * po/LINGUAS: Add pt_BR.
15249 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15250 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15252 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15254 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15256 * src/complain.c (strerror_r): Remove decl; not needed.
15257 (strerror): Use same pattern as ../lib/error.c.
15259 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15261 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15263 * src/main.c (main): Cast result of bindtextdomain and textdomain
15264 to void, to avoid a GCC warning when --disable-nls is in effect.
15266 * src/scan-gram.l: Use strings rather than escapes when possible,
15267 to minimize the number of warnings from xgettext.
15268 (handle_action_dollar, handle_action_at): Don't use isdigit,
15269 as it mishandles negative chars and it may not work as expected
15270 outside the C locale.
15272 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15273 this is a GCC extension and is not portable to other compilers.
15275 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15276 Do not include <ctype.h>; no longer needed.
15277 Do not include <malloc.h>; no longer needed (and generates
15278 warnings on OpenBSD 3.0).
15280 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15283 * tests/regression.at: Do not use 'cc -c input.c -o input';
15284 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15286 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15287 exit status as failure, not just exit status 1. Sun C exits
15288 with status 2 sometimes.
15290 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15291 Use it for the two large tests.
15293 2002-08-02 Akim Demaille <akim@epita.fr>
15295 * src/conflicts.c (conflicts_output): Don't output rules never
15296 reduced here, since anyway that computation doesn't work.
15297 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15298 (rule_useless_p, rule_never_reduced_p): New.
15299 (grammar_rules_partial_print): Use a filter instead of a range.
15300 Display the title only if needed.
15301 (grammar_rules_print): Adjust.
15302 (grammar_rules_never_reduced_report): New.
15303 * src/tables.c (action_row): Move the computation of rules never
15305 (token_actions): here.
15306 * src/main.c (main): Make the parser before making the report, so
15307 that rules never reduced are computed.
15308 Call grammar_rules_never_reduced_report.
15309 * src/print.c (print_results): Report rules never reduced.
15310 * tests/conflicts.at, tests/reduce.at: Adjust.
15312 2002-08-01 Akim Demaille <akim@epita.fr>
15314 Instead of attaching lookaheads and duplicating the rules being
15315 reduced by a state, attach the lookaheads to the reductions.
15317 * src/state.h (state_t): Remove the `lookaheads',
15318 `lookaheads_rule' member.
15319 (reductions_t): Add a `lookaheads' member.
15320 Use a regular array for the `rules'.
15321 * src/state.c (reductions_new): Initialize the lookaheads member
15323 (state_rule_lookaheads_print): Adjust.
15324 * src/state.h, src/state.c (state_reductions_find): New.
15325 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15326 (count_rr_conflicts): Adjust.
15327 * src/lalr.c (LArule): Remove.
15328 (add_lookback_edge): Adjust.
15329 (state_lookaheads_count): New.
15330 (states_lookaheads_initialize): Merge into...
15331 (initialize_LA): this.
15332 (lalr_free): Adjust.
15333 * src/main.c (main): Don't free nullable and derives too early: it
15334 is used by --verbose.
15335 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15337 2002-08-01 Akim Demaille <akim@epita.fr>
15339 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15341 (set_derives, free_derives): Rename as...
15342 (derives_compute, derives_free): this.
15343 Adjust all dependencies.
15344 * src/nullable.c (set_nullable, free_nullable): Rename as...
15345 (nullable_compute, nullable_free): these.
15346 (rule_list_t): Store rule_t *, not rule_number_t.
15347 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15348 pointers, instead of their numbers.
15349 * src/main.c (main): Call nullable_free, and derives_free earlier,
15350 as they were lo longer used.
15352 2002-08-01 Akim Demaille <akim@epita.fr>
15354 * lib/timevar.c (get_time): Include children time.
15355 * src/lalr.h (LA, LArule): Don't export them: used with the
15357 * src/lalr.c (LA, LArule): Static.
15358 * src/lalr.h, src/lalr.c (lalr_free): New.
15359 * src/main.c (main): Call it.
15360 * src/tables.c (pack_vector): Check whether loc is >= to the
15362 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15363 (tables_generate): do it, since that's also it which allocates
15365 Don't free LA and LArule, main does.
15367 2002-07-31 Akim Demaille <akim@epita.fr>
15369 Separate parser tables computation and output.
15371 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15372 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15373 (yydefgoto, yydefact, high): Move to...
15374 * src/tables.h, src/tables.c: here.
15375 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15376 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15377 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15378 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15379 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15380 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15381 (action_row, save_row, token_actions, save_column, default_goto)
15382 (goto_actions, sort_actions, matching_state, pack_vector)
15383 (table_ninf_remap, pack_table, prepare_actions): Move to...
15384 * src/tables.c: here.
15385 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15386 * src/output.c (token_actions, output_base, output_conflicts)
15387 (output_check): Merge into...
15388 (prepare_actions): this.
15389 (actions_output): Rename as...
15390 (user_actions_output): this.
15391 * src/main.c (main): Call tables_generate and tables_free.
15393 2002-07-31 Akim Demaille <akim@epita.fr>
15395 Steal GCC's --time-report support.
15397 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15398 stolen/adjusted from GCC.
15399 * m4/stage.m4: Remove time related checks.
15400 * m4/timevar.m4: New.
15401 * configure.in: Adjust.
15402 * src/system.h: Adjust to using timevar.h.
15403 * src/getargs.h, src/getargs.c: Support trace_time for
15405 * src/main.c (stage): Remove.
15406 (main): Replace `stage' invocations with timevar calls.
15407 * src/output.c: Insert pertinent timevar calls.
15409 2002-07-31 Akim Demaille <akim@epita.fr>
15411 Let --trace have arguments.
15413 * src/getargs.h (enum trace_e): New.
15414 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15415 (long_options, short_options): --trace/-T takes an optional
15417 Change all the uses of trace_flag to reflect the new flags.
15418 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15420 Strengthen `stage' portability.
15422 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15423 * configure.in: Use it.
15424 Don't check for malloc.h and sys/times.h.
15425 * src/system.h: Include them when appropriate.
15426 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15427 times and struct tms are available.
15429 2002-07-30 Akim Demaille <akim@epita.fr>
15431 In verbose parse error message, don't report `error' as an
15433 * tests/actions.at (Printers and Destructors): Adjust.
15434 * tests/calc.at (Calculator $1): Adjust.
15435 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15436 error message, do not report the parser accepts the error token in
15439 2002-07-30 Akim Demaille <akim@epita.fr>
15441 Normalize conflict related messages.
15443 * src/complain.h, src/complain.c (warn, complain): New.
15444 * src/conflicts.c (conflicts_print): Use them.
15445 (conflict_report_yacc): New, extracted from...
15446 (conflicts_print): here.
15447 * tests/conflicts.at, tests/existing.at: Adjust.
15449 2002-07-30 Akim Demaille <akim@epita.fr>
15451 Report rules which are never reduced by the parser: those hidden
15454 * src/LR0.c (save_reductions): Don't make the final state too
15455 different: save its reduction (accept) instead of having a state
15456 without any action (no shift or goto, no reduce).
15457 Note: the final state is now a ``regular'' state, i.e., the
15458 parsers now contain `reduce 0' as default reduction.
15459 Nevertheless, since they decide to `accept' when yystate =
15460 final_state, they still will not reduce rule 0.
15461 * src/print.c (print_actions, print_reduction): Adjust.
15462 * src/output.c (action_row): Track reduced rules.
15463 (token_actions): Report rules never reduced.
15464 * tests/conflicts.at, tests/regression.at: Adjust.
15466 2002-07-30 Akim Demaille <akim@epita.fr>
15468 `stage' was accidently included in a previous patch.
15469 Initiate its autoconfiscation.
15471 * configure.in: Look for malloc.h and sys/times.h.
15472 * src/main.c (stage): Adjust.
15473 Report only when trace_flag.
15475 2002-07-29 Akim Demaille <akim@epita.fr>
15477 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15479 (errs_t): symbol_t*, not symbol_number_t.
15480 (reductions_t): rule_t*, not rule_number_t.
15481 (FOR_EACH_SHIFT): New.
15482 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15483 * src/print.c, src/print_graph.c: Adjust.
15485 2002-07-29 Akim Demaille <akim@epita.fr>
15487 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15489 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15490 (endtoken, accept): these.
15491 * src/reader.c (reader): Set endtoken's default tag to "$end".
15492 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15493 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15496 2002-07-29 Akim Demaille <akim@epita.fr>
15498 * src/reduce.c (reduce_grammar): When the language is empty,
15499 complain about the start symbol, not the axiom.
15501 * tests/reduce.at (Empty Language): New.
15503 2002-07-26 Akim Demaille <akim@epita.fr>
15505 * src/reader.h, src/reader.c (gram_error): ... can't get
15506 yycontrol without making too strong assumptions on the parser
15508 * src/output.c (prepare_tokens): Use the real 0th value of
15509 token_translations instead of `0'.
15510 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15512 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15513 for the time being: %locations ought to provide it to yyerror.
15515 2002-07-25 Akim Demaille <akim@epita.fr>
15517 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15518 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15519 * tests/regression.at (Web2c Actions): Adjust.
15521 2002-07-25 Akim Demaille <akim@epita.fr>
15523 Stop storing rules from 1 to nrules + 1.
15525 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15526 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15527 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15528 Iterate from 0 to nrules.
15529 Use rule_number_as_item_number and item_number_as_rule_number.
15530 Adjust to `derive' now containing possibly 0.
15531 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15532 Handle the `- 1' part in rule numbers from/to item numbers.
15533 * src/conflicts.c (log_resolution): Fix the message which reversed
15535 * src/output.c (action_row): Initialize default_rule to -1.
15536 (token_actions): Adjust.
15537 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15539 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15541 2002-07-25 Akim Demaille <akim@epita.fr>
15543 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15544 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15545 (b4_c_knr_arg_decl): New.
15546 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15547 yyreport_parse_error.
15549 2002-07-25 Akim Demaille <akim@epita.fr>
15551 * data/yacc.c (yyreport_parse_error): New, extracted from...
15553 (yydestruct, yysymprint): Move above yyparse.
15556 2002-07-25 Akim Demaille <akim@epita.fr>
15558 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15560 (b4_sint_type, b4_uint_type): these.
15561 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15562 * tests/regression.at (Web2c Actions): Adjust.
15564 2002-07-25 Akim Demaille <akim@epita.fr>
15566 * src/gram.h (TIEM_NUMBER_MAX): New.
15567 (item_number_of_rule_number, rule_number_of_item_number): Rename
15569 (rule_number_as_item_number, item_number_as_rule_number): these.
15570 Adjust dependencies.
15571 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15572 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15573 (symbol_number_to_vector_number): New.
15574 (order): Of vector_number_t* type.
15575 (base_t, BASE_MAX, BASE_MIN): New.
15576 (froms, tos, width, pos, check): Of base_t type.
15577 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15578 (actrow): Of action_number_t type.
15579 (conflrow): Of unsigned int type.
15580 (table_ninf, base_ninf): New.
15581 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15582 (muscle_insert_int_table, muscle_insert_base_table)
15583 (muscle_insert_rule_number_table): New.
15584 (prepare_tokens): Output `toknum' as int_table.
15585 (action_row): Returns a rule_number_t.
15586 Use ACTION_MIN, not SHRT_MIN.
15587 (token_actions): yydefact is rule_number_t*.
15588 (table_ninf_remap): New.
15589 (pack_table): Use it for `base' and `table'.
15590 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15592 (YYPACT_NINF, YYTABLE_NINF): these.
15593 (yypact, yytable): Compute their types instead of hard-coded
15595 * tests/regression.at (Web2c Actions): Adjust.
15597 2002-07-19 Akim Demaille <akim@epita.fr>
15599 * src/scan-gram.l (id): Can start with an underscore.
15601 2002-07-16 Akim Demaille <akim@epita.fr>
15603 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15604 Adjust all former `associativity' dependencies.
15605 * src/symtab.c (symbol_new): Default associativity is `undef', not
15607 (symbol_check_alias_consistence): Adjust.
15609 2002-07-09 Akim Demaille <akim@epita.fr>
15611 * doc/bison.texinfo: Properly set the ``header'' part.
15612 Use @dircategory ``GNU programming tools'' as per Texinfo's
15616 2002-07-09 Akim Demaille <akim@epita.fr>
15618 * lib/quotearg.h: Protect against multiple inclusions.
15619 * src/location.h (location_t): Add a `file' member.
15620 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15621 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15622 `error_one_per_line' support.
15624 2002-07-09 Akim Demaille <akim@epita.fr>
15626 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15627 * src/reader.c (lineno): Remove.
15628 Adjust all dependencies.
15629 (get_merge_function): Take a location and use complain_at.
15630 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15631 * tests/regression.at (Invalid inputs, Mixing %token styles):
15634 2002-07-09 Akim Demaille <akim@epita.fr>
15636 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15637 recovery rule, and forbid extensions when --yacc.
15638 (gram_error): Use complain_at.
15639 * src/reader.c (reader): Exit if there were parse errors.
15641 2002-07-09 Akim Demaille <akim@epita.fr>
15643 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15644 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15645 Reported by R Blake <blakers@mac.com>.
15647 2002-07-09 Akim Demaille <akim@epita.fr>
15649 * data/yacc.c: Output the copyright notive in the header.
15651 2002-07-03 Akim Demaille <akim@epita.fr>
15653 * src/output.c (froms, tos): Are state_number_t.
15654 (save_column): sp, sp1, and sp2 are state_number_t.
15655 (prepare): Rename `final' as `final_state_number', `nnts' as
15656 `nterms_number', `nrules' as `rules_number', `nstates' as
15657 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15659 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15660 * data/lalr1.cc (nsym_): Remove, unused.
15662 2002-07-03 Akim Demaille <akim@epita.fr>
15664 * src/lalr.h, src/lalr.c (goto_number_t): New.
15665 * src/lalr.c (goto_list_t): New.
15667 * src/nullable.c (rule_list_t): New.
15669 * src/types.h: Remove.
15671 2002-07-03 Akim Demaille <akim@epita.fr>
15673 * src/closure.c (print_fderives): Use rule_rhs_print.
15674 * src/derives.c (print_derives): Use rule_rhs_print.
15675 (rule_list_t): New, replaces `shorts'.
15676 (set_derives): Add comments.
15677 * tests/sets.at (Nullable, Firsts): Adjust.
15679 2002-07-03 Akim Demaille <akim@epita.fr>
15681 * src/output.c (prepare_actions): Free `tally' and `width'.
15682 (prepare_actions): Allocate and free `order'.
15683 * src/symtab.c (symbols_free): Free `symbols'.
15684 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15685 * src/output.c (m4_invoke): Move to...
15686 * src/scan-skel.l: here.
15687 (<<EOF>>): Close yyout, and free its name.
15689 2002-07-03 Akim Demaille <akim@epita.fr>
15691 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15693 * src/LR0.c (new_state): Merge into...
15694 (state_list_append): this.
15695 (new_states): Merge into...
15696 (generate_states): here.
15697 (set_states): Don't ensure a proper `errs' state member here, do it...
15698 * src/conflicts.c (conflicts_solve): here.
15699 * src/state.h, src/state.c: Comment changes.
15700 (state_t): Rename member `shifts' as `transitions'.
15701 Adjust all dependencies.
15702 (errs_new): For consistency, also take the values as argument.
15703 (errs_dup): Remove.
15704 (state_errs_set): New.
15705 (state_reductions_set, state_transitions_set): Assert that no
15706 previous value was assigned.
15708 (states_free): Use it.
15709 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15710 temporary storage: use `errs' and `nerrs' as elsewhere.
15711 (set_conflicts): Allocate and free this `errs'.
15713 2002-07-02 Akim Demaille <akim@epita.fr>
15715 * lib/libiberty.h: New.
15716 * lib: Update the bitset implementation from upstream.
15717 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15718 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15719 * src/main.c: Adjust bitset stats calls.
15721 2002-07-01 Paul Eggert <eggert@twinsun.com>
15723 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15724 char, so that negative chars don't collide with $.
15726 2002-06-30 Akim Demaille <akim@epita.fr>
15728 Have the GLR tests be `warning' checked, and fix the warnings.
15730 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15731 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15732 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15733 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15734 (yyaddDeferredAction): static.
15735 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15736 (yyreportParseError): yyprefix is const.
15737 yytokenp is used only when verbose.
15738 (yy__GNUC__): Replace with __GNUC__.
15739 (yypdumpstack): yyi is size_t.
15740 (yypreference): Un-yy local variables and arguments, to avoid
15741 clashes with `yyr1'. Anyway, we are not in the user name space.
15742 (yytname_size): be an int, as is compared with ints.
15743 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15745 * tests/cxx-gram.at: Use quotation to protect $1.
15746 Use AT_COMPILE to enable warnings hunts.
15747 Prototype yylex and yyerror.
15749 Include `string.h', not `strings.h'.
15750 Produce and prototype stmtMerge only when used.
15751 yylex takes a location.
15753 2002-06-30 Akim Demaille <akim@epita.fr>
15755 We spend a lot of time in quotearg, in particular when --verbose.
15757 * src/symtab.c (symbol_get): Store a quoted version of the key.
15758 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15759 Adjust all callers.
15761 2002-06-30 Akim Demaille <akim@epita.fr>
15763 * src/state.h (reductions_t): Rename member `nreds' as num.
15764 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15765 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15767 2002-06-30 Akim Demaille <akim@epita.fr>
15769 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15770 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15771 (shifts_to): Rename as...
15772 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15773 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15774 (TRANSITION_IS_DISABLED, transitions_to): these.
15776 2002-06-30 Akim Demaille <akim@epita.fr>
15778 * src/print.c (print_shifts, print_gotos): Merge into...
15779 (print_transitions): this.
15780 (print_transitions, print_errs, print_reductions): Align the
15781 lookaheads columns.
15782 (print_core, print_transitions, print_errs, print_state,
15783 print_grammar): Output empty lines separator before, not after.
15784 (state_default_rule_compute): Rename as...
15785 (state_default_rule): this.
15786 * tests/conflicts.at (Defaulted Conflicted Reduction),
15787 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15788 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15790 2002-06-30 Akim Demaille <akim@epita.fr>
15792 Display items as we display rules.
15794 * src/gram.h, src/gram.c (rule_lhs_print): New.
15795 * src/gram.c (grammar_rules_partial_print): Use it.
15796 * src/print.c (print_core): Likewise.
15797 * tests/conflicts.at (Defaulted Conflicted Reduction),
15798 (Unresolved SR Conflicts): Adjust.
15799 (Unresolved SR Conflicts): Adjust and rename as...
15800 (Resolved SR Conflicts): this, as was meant.
15801 * tests/regression.at (Web2c Report): Adjust.
15803 2002-06-30 Akim Demaille <akim@epita.fr>
15805 * src/print.c (state_default_rule_compute): New, extracted from...
15806 (print_reductions): here.
15807 Pessimize, but clarify the code.
15808 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15810 2002-06-30 Akim Demaille <akim@epita.fr>
15812 * src/output.c (action_row): Let default_rule be always a rule
15815 2002-06-30 Akim Demaille <akim@epita.fr>
15817 * src/closure.c (print_firsts, print_fderives, closure):
15818 Use BITSET_EXECUTE.
15819 * src/lalr.c (lookaheads_print): Likewise.
15820 * src/state.c (state_rule_lookaheads_print): Likewise.
15821 * src/print_graph.c (print_core): Likewise.
15822 * src/print.c (print_reductions): Likewise.
15823 * src/output.c (action_row): Likewise.
15824 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15826 2002-06-30 Akim Demaille <akim@epita.fr>
15828 * src/print_graph.c: Use report_flag.
15830 2002-06-30 Akim Demaille <akim@epita.fr>
15832 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15834 * src/relation.h, src/relation.c (traverse, relation_digraph)
15835 (relation_print, relation_transpose): New.
15837 2002-06-30 Akim Demaille <akim@epita.fr>
15839 * src/state.h, src/state.c (shifts_to): New.
15840 * src/lalr.c (build_relations): Use it.
15842 2002-06-30 Akim Demaille <akim@epita.fr>
15844 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15845 (item_number_of_rule_number, rule_number_of_item_number): New.
15846 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15847 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15848 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15849 Propagate their use.
15850 Much remains to be done, in particular wrt `shorts' from types.h.
15852 2002-06-30 Akim Demaille <akim@epita.fr>
15854 * src/symtab.c (symbol_new): Initialize the `printer' member.
15856 2002-06-30 Akim Demaille <akim@epita.fr>
15858 * src/LR0.c (save_reductions): Remove, replaced by...
15859 * src/state.h, src/state.c (state_reductions_set): New.
15860 (reductions, errs): Rename as...
15861 (reductions_t, errs_t): these.
15862 Adjust all dependencies.
15864 2002-06-30 Akim Demaille <akim@epita.fr>
15866 * src/LR0.c (state_list_t, state_list_append): New.
15867 (first_state, last_state): Now symbol_list_t.
15868 (this_state): Remove.
15869 (new_itemsets, append_states, save_reductions): Take a state_t as
15871 (set_states, generate_states): Adjust.
15872 (save_shifts): Remove, replaced by...
15873 * src/state.h, src/state.c (state_shifts_set): New.
15874 (shifts): Rename as...
15876 Adjust all dependencies.
15877 * src/state.h (state_t): Remove the `next' member.
15879 2002-06-30 Akim Demaille <akim@epita.fr>
15881 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15884 2002-06-30 Akim Demaille <akim@epita.fr>
15886 Use hash.h for the state hash table.
15888 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15889 (allocate_storage): Use state_hash_new.
15890 (free_storage): Use state_hash_free.
15891 (new_state, get_state): Adjust.
15892 * src/lalr.h, src/lalr.c (states): Move to...
15893 * src/states.h (state_t): Remove the `link' member, no longer
15895 * src/states.h, src/states.c: here.
15896 (state_hash_new, state_hash_free, state_hash_lookup)
15897 (state_hash_insert, states_free): New.
15898 * src/states.c (state_table, state_compare, state_hash): New.
15899 * src/output.c (output_actions): Do not free states now, since we
15900 still need to know the final_state number in `prepare', called
15901 afterwards. Do it...
15902 * src/main.c (main): here: call states_free after `output'.
15904 2002-06-30 Akim Demaille <akim@epita.fr>
15906 * src/state.h, src/state.c (state_new): New, extracted from...
15907 * src/LR0.c (new_state): here.
15908 * src/state.h (STATE_ALLOC): Move to...
15909 * src/state.c: here.
15910 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15911 * src/state.h, src/state.c: here.
15913 2002-06-30 Akim Demaille <akim@epita.fr>
15915 * src/reader.c (gensym): Rename as...
15916 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15917 (getsym): Rename as...
15918 (symbol_get): this.
15920 2002-06-30 Akim Demaille <akim@epita.fr>
15922 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15923 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15924 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15925 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15927 2002-06-30 Akim Demaille <akim@epita.fr>
15929 Make the test suite pass with warnings checked.
15931 * tests/actions.at (Printers and Destructors): Improve.
15932 Avoid unsigned vs. signed issues.
15933 * tests/calc.at: Don't exercise the scanner here, do it...
15934 * tests/input.at (Torturing the Scanner): here.
15936 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15938 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15939 reorganize first lines parallel to yacc.c.
15941 2002-06-28 Akim Demaille <akim@epita.fr>
15943 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15944 (b4_token_enum, b4_token_defines): New, factored from...
15945 * data/lalr1.cc, data/yacc.c, glr.c: here.
15947 2002-06-28 Akim Demaille <akim@epita.fr>
15949 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15951 * src/output.c (merger_output): static.
15953 2002-06-28 Akim Demaille <akim@epita.fr>
15955 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15956 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15958 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15960 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15962 Accumulated changelog for new GLR parsing features.
15964 * src/conflicts.c (count_total_conflicts): Change name to
15965 conflicts_total_count.
15966 * src/conflicts.h: Ditto.
15967 * src/output.c (token_actions): Use the new name.
15968 (output_conflicts): Change conflp => conflict_list_heads, and
15969 confl => conflict_list for better readability.
15970 * data/glr.c: Use the new names.
15971 * NEWS: Add self to GLR announcement.
15973 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15975 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15978 * data/bison.glr: Change name to glr.c
15979 * data/glr.c: Renamed from bison.glr.
15980 * data/Makefile.am: Add glr.c
15984 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15985 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15987 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15989 * data/bison.glr: Be sure to restore the
15990 current #line when returning to the skeleton contents after having
15991 exposed the input file's #line.
15993 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15995 * data/bison.glr: Bring up to date with changes to bison.simple.
15997 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15999 * data/bison.glr: Correct definitions that use b4_prefix.
16000 Various reformatting.
16001 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16002 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16003 yytokenp argument; now part of stack.
16004 (yychar): Define to behave as documented.
16005 (yyclearin): Ditto.
16007 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16009 * src/reader.h: Add declaration for free_merger_functions.
16011 * src/reader.c (merge_functions): New variable.
16012 (get_merge_function): New function.
16013 (free_merger_functions): New function.
16014 (readgram): Check for %prec that is not followed by a symbol.
16015 Handle %dprec and %merge declarations.
16016 (packgram): Initialize dprec and merger fields in rules array.
16018 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16019 conflict_list_cnt, conflict_list_free): New variables.
16020 (table_grow): Also grow conflict_table.
16021 (prepare_rules): Output dprec and merger tables.
16022 (conflict_row): New function.
16023 (action_row): Output conflict lists for GLR parser. Don't use
16024 default reduction in conflicted states for GLR parser so that there
16025 are spaces for the conflict lists.
16026 (save_row): Also save conflict information.
16027 (token_actions): Allocate conflict list.
16028 (merger_output): New function.
16029 (pack_vector): Pack conflict table, too.
16030 (output_conflicts): New function to output yyconflp and yyconfl.
16031 (output_check): Allocate conflict_tos.
16032 (output_actions): Output conflict tables, also.
16033 (output_skeleton): Output b4_mergers definition.
16034 (prepare): Output b4_max_rhs_length definition.
16035 Use 'bison.glr' as default skeleton for GLR parsers.
16037 * src/gram.c (glr_parser): New flag.
16038 (grammar_free): Call free_merger_functions.
16040 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16041 all pairs of conflicting reductions, rather than just all tokens
16042 causing conflicts. Needed to size conflict tables.
16043 (conflicts_output): Modify call to count_rr_conflicts for new
16045 (conflicts_print): Ditto.
16046 (count_total_conflicts): New function.
16048 * src/reader.h (merger_list): New type.
16049 (merge_functions): New variable.
16051 * src/lex.h (tok_dprec, tok_merge): New token types.
16053 * src/gram.h (rule_s): Add dprec and merger fields.
16054 (glr_parser): New flag.
16056 * src/conflicts.h (count_total_conflicts): New function.
16058 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16060 * doc/bison.texinfo (Generalized LR Parsing): New section.
16061 (GLR Parsers): New section.
16062 (Language and Grammar): Mention GLR parsing.
16063 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16064 Correct typo ("tge" -> "the").
16066 * data/bison.glr: New skeleton for GLR parsing.
16068 * tests/cxx-gram.at: New tests for GLR parsing.
16070 * tests/testsuite.at: Include cxx-gram.at.
16072 * tests/Makefile.am: Add cxx-gram.at.
16074 * src/parse-gram.y:
16076 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16078 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16080 2002-06-27 Akim Demaille <akim@epita.fr>
16082 * src/options.h, src/options.c: Remove.
16083 * src/getargs.c (short_options, long_options): New.
16085 2002-06-27 Akim Demaille <akim@epita.fr>
16087 * data/bison.simple, data/bison.c++: Rename as...
16088 * data/yacc.c, data/lalr1.cc: these.
16089 * doc/bison.texinfo (Environment Variables): Remove.
16091 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16093 * src/getargs.c (report_argmatch): Initialize strtok().
16095 2002-06-20 Akim Demaille <akim@epita.fr>
16097 * data/bison.simple (b4_symbol_actions): New, replaces...
16098 (b4_symbol_destructor, b4_symbol_printer): these.
16099 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16100 user token numbers.
16102 2002-06-20 Akim Demaille <akim@epita.fr>
16104 * data/bison.simple (yydestructor): Rename as...
16105 (yydestruct): this.
16107 2002-06-20 Akim Demaille <akim@epita.fr>
16109 * src/symtab.h, src/symtab.c (symbol_type_set)
16110 (symbol_destructor_set, symbol_precedence_set): The location is
16112 Adjust all callers.
16114 2002-06-20 Akim Demaille <akim@epita.fr>
16116 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16118 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16120 * src/symtab.h, src/symtab.c (symbol_class_set)
16121 (symbol_user_token_number_set): Likewise.
16122 Adjust all callers.
16123 Promote complain_at.
16124 * tests/input.at (Type Clashes): Adjust.
16126 2002-06-20 Akim Demaille <akim@epita.fr>
16128 * data/bison.simple (YYLEX): Fix the declaration when
16131 2002-06-20 Akim Demaille <akim@epita.fr>
16133 * data/bison.simple (yysymprint): Don't print the token number,
16135 * tests/actions.at (Destructors): Rename as...
16136 (Printers and Destructors): this.
16137 Also exercise %printer.
16139 2002-06-20 Akim Demaille <akim@epita.fr>
16141 * data/bison.simple (YYDSYMPRINT): New.
16142 Use it to remove many of the #if YYDEBUG/if (yydebug).
16144 2002-06-20 Akim Demaille <akim@epita.fr>
16146 * src/symtab.h, src/symtab.c (symbol_t): printer and
16147 printer_location are new members.
16148 (symbol_printer_set): New.
16149 * src/parse-gram.y (PERCENT_PRINTER): New token.
16150 Handle its associated rule.
16151 * src/scan-gram.l: Adjust.
16152 (handle_destructor_at, handle_destructor_dollar): Rename as...
16153 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16154 * src/output.c (symbol_printers_output): New.
16155 (output_skeleton): Call it.
16156 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16157 since there are already many grammar files with a user `yyprint'.
16158 Replace the calls to YYPRINT to calls to yysymprint.
16159 * tests/calc.at: Adjust.
16160 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16161 taking advantage of parser very internal details (stack size!).
16163 2002-06-20 Akim Demaille <akim@epita.fr>
16165 * src/scan-gram.l: Complete the scanner with the missing patterns
16167 Use `quote' and `symbol_tag_get' where appropriate.
16169 2002-06-19 Akim Demaille <akim@epita.fr>
16171 * tests/actions.at (Destructors): Augment to test locations.
16172 * data/bison.simple (yydestructor): Pass it the current location
16173 if locations are enabled.
16174 Prototype only when __STDC__ or C++.
16175 Change the argument names to move into the yy name space: there is
16178 2002-06-19 Akim Demaille <akim@epita.fr>
16180 * data/bison.simple (b4_pure_if): New.
16181 Use it instead of #ifdef YYPURE.
16183 2002-06-19 Akim Demaille <akim@epita.fr>
16185 * data/bison.simple (b4_location_if): New.
16186 Use it instead of #ifdef YYLSP_NEEDED.
16188 2002-06-19 Akim Demaille <akim@epita.fr>
16190 Prepare @$ in %destructor, but currently don't bind it in the
16191 skeleton, as %location use is not cleaned up yet.
16193 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16194 (handle_action_at): New.
16195 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16196 a braced_code_t and a location as additional arguments.
16197 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16198 unquote one when outputting `b4_dollar_dollar'.
16200 * data/bison.simple (b4_eval): Remove.
16201 (b4_symbol_destructor): Adjust.
16202 * tests/input.at (Invalid @n): Adjust.
16204 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16206 * doc/bison.texinfo: Document ability to have multiple
16209 2002-06-18 Akim Demaille <akim@epita.fr>
16211 * src/files.c (compute_base_names): When computing the output file
16212 names from the input file name, strip the directory part.
16214 2002-06-18 Akim Demaille <akim@epita.fr>
16216 * data/bison.simple.new: Comment changes.
16217 Reported by Andreas Schwab.
16219 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16221 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16222 there are no `label `yyoverflowlab' defined but not used' warnings
16223 when yyoverflow is defined.
16225 2002-06-18 Akim Demaille <akim@epita.fr>
16227 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16229 (symbol_destructor_set): Adjust.
16230 * src/output.c (symbol_destructors_output): Output the destructor
16232 Output the symbol name.
16233 * data/bison.simple (b4_symbol_destructor): Adjust.
16235 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16236 and Akim Demaille <akim@epita.fr>
16238 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16239 what's left on the stack when the error recovery hits EOF.
16240 * tests/actions.at (Destructors): Complete to exercise this case.
16242 2002-06-17 Akim Demaille <akim@epita.fr>
16244 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16245 arguments is really empty, not only equal to `[]'.
16246 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16248 (symbol_destructor_set): New.
16249 * src/output.c (symbol_destructors_output): New.
16250 * src/reader.h (brace_code_t, current_braced_code): New.
16251 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16252 (handle_dollar): Rename as...
16253 (handle_action_dollar): this.
16254 (handle_destructor_dollar): New.
16255 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16256 (grammar_declaration): Use it.
16257 * data/bison.simple (yystos): Is always defined.
16258 (yydestructor): New.
16259 * tests/actions.at (Destructors): New.
16260 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16262 2002-06-17 Akim Demaille <akim@epita.fr>
16264 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16265 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16266 rule_length only when needed.
16267 * src/output.c (actions_output, token_definitions_output): Output
16269 * src/symtab.c: Don't access directly to the symbol tag, use
16271 * src/parse-gram.y: Use symbol_list_free.
16273 2002-06-17 Akim Demaille <akim@epita.fr>
16275 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16276 (symbol_list_prepend, get_type_name): Move to...
16277 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16278 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16279 Adjust all callers.
16280 (symbol_list_free): New.
16281 * src/scan-gram.l (handle_dollar): Takes a location.
16282 * tests/input.at (Invalid $n): Adjust.
16284 2002-06-17 Akim Demaille <akim@epita.fr>
16286 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16287 (symbol_list_prepend): New.
16288 * src/parse-gram.y (%union): `list' is a new member.
16289 (symbols.1): New, replaces...
16290 (terms_to_prec.1, nterms_to_type.1): these.
16291 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16292 Take a location as additional argument.
16293 Adjust all callers.
16295 2002-06-15 Akim Demaille <akim@epita.fr>
16297 * src/parse-gram.y: Move %token in the declaration section so that
16298 we don't depend upon CVS Bison.
16300 2002-06-15 Akim Demaille <akim@epita.fr>
16302 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16303 * src/print.c (print_core): Use it.
16305 2002-06-15 Akim Demaille <akim@epita.fr>
16307 * src/conflicts.c (log_resolution): Accept the rule involved in
16308 the sr conflicts instead of the lookahead number that points to
16310 (flush_reduce): Accept the current lookahead vector as argument,
16311 instead of the index in LA.
16312 (resolve_sr_conflict): Accept the current number of lookahead
16313 bitset to consider for the STATE, instead of the index in LA.
16314 (set_conflicts): Adjust.
16315 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16317 2002-06-15 Akim Demaille <akim@epita.fr>
16319 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16320 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16321 Adjust all dependencies.
16322 * src/lalr.c (initialize_lookaheads): Split into...
16323 (states_lookaheads_count, states_lookaheads_initialize): these.
16326 2002-06-15 Akim Demaille <akim@epita.fr>
16328 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16330 (grammar_rules_print): here.
16331 * src/reduce.c (reduce_output): Use it.
16332 * tests/reduce.at (Useless Rules, Reduced Automaton)
16333 (Underivable Rules): Adjust.
16335 2002-06-15 Akim Demaille <akim@epita.fr>
16337 Copy BYacc's nice way to report the grammar.
16339 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16341 Don't print the rules' location, it is confusing and useless.
16342 (rule_print): Use grammar_rhs_print.
16343 * src/print.c (print_grammar): Use grammar_rules_print.
16345 2002-06-15 Akim Demaille <akim@epita.fr>
16347 Complete and rationalize `useless thing' warnings.
16349 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16350 (symbol_tag_print): New.
16351 Use them everywhere in place of accessing directly the tag member.
16352 * src/gram.h, src/gram.c (rule_print): New.
16353 Use it where a rule used to be printed `by hand'.
16354 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16355 (reduce_grammar_tables): Report the useless rules.
16356 (reduce_print): Useless things are a warning, not an error.
16358 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16359 (Reduced Automaton, Underivable Rules): Adjust.
16360 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16361 * tests/conflicts.at (Unresolved SR Conflicts)
16362 (Solved SR Conflicts): Adjust.
16364 2002-06-15 Akim Demaille <akim@epita.fr>
16366 Let symbols have a location.
16368 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16370 Adjust all callers.
16371 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16372 Use location_t, not int.
16373 * src/symtab.c (symbol_check_defined): Take advantage of the
16375 * tests/regression.at (Invalid inputs): Adjust.
16377 2002-06-15 Akim Demaille <akim@epita.fr>
16379 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16380 (input): Don't try to initialize yylloc here, do it in the
16382 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16383 * src/gram.h (rule_t): Change line and action_line into location
16384 and action_location, of location_t type.
16385 Adjust all dependencies.
16386 * src/location.h, src/location.c (empty_location): New.
16387 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16388 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16389 (grammar_current_rule_symbol_append)
16390 (grammar_current_rule_action_append): Expect a location as argument.
16391 * src/reader.c (grammar_midrule_action): Adjust to attach an
16392 action's location as dummy symbol location.
16393 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16394 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16397 2002-06-14 Akim Demaille <akim@epita.fr>
16399 Grammar declarations may be found in the grammar section.
16401 * src/parse-gram.y (rules_or_grammar_declaration): New.
16402 (declarations): Each declaration may end with a semicolon, not
16404 (grammar_declaration): `"%union"'.
16405 (grammar): Branch to rules_or_grammar_declaration.
16407 2002-06-14 Akim Demaille <akim@epita.fr>
16409 * src/main.c (main): Invoke scanner_free.
16411 2002-06-14 Akim Demaille <akim@epita.fr>
16413 * src/output.c (m4_invoke): Extracted from...
16414 (output_skeleton): here.
16417 2002-06-14 Akim Demaille <akim@epita.fr>
16419 * src/parse-gram.y (directives, directive, gram)
16420 (grammar_directives, precedence_directives, precedence_directive):
16422 (declarations, declaration, grammar, grammar_declaration)
16423 (precedence_declaration, precedence_declarator): these.
16424 (symbol_declaration): New.
16426 2002-06-14 Akim Demaille <akim@epita.fr>
16428 * src/files.c (action_obstack): Remove, unused.
16429 (output_obstack): Remove it, and all its dependencies, as it is no
16431 * src/reader.c (epilogue_set): Build the epilogue in the
16433 * src/output.h, src/output.c (muscle_obstack): Move to...
16434 * src/muscle_tab.h, src/muscle_tab.h: here.
16435 (muscle_init): Initialize muscle_obstack.
16436 (muscle_free): New.
16437 * src/main.c (main): Call it.
16439 2002-06-14 Akim Demaille <akim@epita.fr>
16441 * src/location.h: New, extracted from...
16442 * src/reader.h: here.
16443 * src/Makefile.am (noinst_HEADERS): Merge into
16444 (bison_SOURCES): this.
16446 * src/parse-gram.y: Use location_t instead of Bison's.
16447 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16448 Use location_t instead of ints.
16450 2002-06-14 Akim Demaille <akim@epita.fr>
16452 * data/bison.simple, data/bison.c++: Be sure to restore the
16453 current #line when returning to the skeleton contents after having
16454 exposed the input file's #line.
16456 2002-06-12 Akim Demaille <akim@epita.fr>
16458 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16460 * tests/actions.at (Exotic Dollars): New.
16462 2002-06-12 Akim Demaille <akim@epita.fr>
16464 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16466 * tests/input.at (Torturing the Scanner): New.
16468 2002-06-11 Akim Demaille <akim@epita.fr>
16470 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16471 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16472 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16473 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16474 * src/reader.c (reader): Use it.
16476 2002-06-11 Akim Demaille <akim@epita.fr>
16478 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16479 Adjust all callers.
16480 (scanner_last_string_free): New.
16482 2002-06-11 Akim Demaille <akim@epita.fr>
16484 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16485 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16486 (last_string, YY_OBS_FREE): New.
16487 Use them when returning an ID.
16489 2002-06-11 Akim Demaille <akim@epita.fr>
16491 Have Bison grammars parsed by a Bison grammar.
16493 * src/reader.c, src/reader.h (prologue_augment): New.
16494 * src/reader.c (copy_definition): Remove.
16496 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16497 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16498 (grammar_current_rule_prec_set, grammar_current_rule_check)
16499 (grammar_current_rule_symbol_append)
16500 (grammar_current_rule_action_append): Export.
16501 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16502 (symbol_list_action_append): Remove.
16503 Hook the routines from reader.
16504 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16505 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16507 * src/reader.c (read_declarations): Remove, unused.
16509 * src/parse-gram.y: Handle the epilogue.
16510 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16511 (grammar_start_symbol_set): this.
16512 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16513 * src/reader.c (readgram): Remove, unused.
16514 (reader): Adjust to insert eoftoken and axiom where appropriate.
16516 * src/reader.c (copy_dollar): Replace with...
16517 * src/scan-gram.h (handle_dollar): this.
16518 * src/parse-gram.y: Remove `%thong'.
16520 * src/reader.c (copy_at): Replace with...
16521 * src/scan-gram.h (handle_at): this.
16523 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16526 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16529 * src/reader.h, src/reader.c (grammar_rule_end): New.
16531 * src/parse.y (current_type, current_class): New.
16532 Implement `%nterm', `%token' support.
16533 Merge `%term' into `%token'.
16534 (string_as_id): New.
16535 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16538 * src/parse-gram.y: Be sure to handle properly the beginning of
16541 * src/parse-gram.y: Handle %type.
16542 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16544 * src/parse-gram.y: More directives support.
16545 * src/options.c: No longer handle source directives.
16547 * src/parse-gram.y: Fix %output.
16549 * src/parse-gram.y: Handle %union.
16550 Use the prologue locations.
16551 * src/reader.c (parse_union_decl): Remove.
16553 * src/reader.h, src/reader.c (epilogue_set): New.
16554 * src/parse-gram.y: Use it.
16556 * data/bison.simple, data/bison.c++: b4_stype is now either not
16557 defined, then default to int, or to the contents of %union,
16558 without `union' itself.
16560 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16562 * src/output.c (actions_output): Don't output braces, as they are
16563 already handled by the scanner.
16565 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16566 characters to themselves.
16568 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16569 that the epilogue has a proper #line.
16571 * src/parse-gram.y: Handle precedence/associativity.
16573 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16575 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16576 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16577 at all to define terminals that cannot be emitted.
16579 * src/scan-gram.l: Escape M4 characters.
16581 * src/scan-gram.l: Working properly with escapes in user
16582 strings/characters.
16584 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16585 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16587 Use more modest sizes, as for the time being the parser does not
16588 release memory, and therefore the process swallows a huge amount
16591 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16592 stricter %token grammar.
16594 * src/symtab.h (associativity): Add `undef_assoc'.
16595 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16596 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16598 * tests/regression.at (Invalid %directive): Remove, as it is now
16600 (Invalid inputs): Adjust to the new error messages.
16601 (Token definitions): The new grammar doesn't allow too many
16604 * src/lex.h, src/lex.c: Remove.
16605 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16606 (copy_character, copy_string2, copy_string, copy_identifier)
16607 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16608 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16609 (parse_action): Remove.
16610 * po/POTFILES.in: Adjust.
16612 2002-06-11 Akim Demaille <akim@epita.fr>
16614 * src/reader.c (parse_action): Don't store directly into the
16615 rule's action member: return the action as a string.
16616 Don't require `rule_length' as an argument: compute it.
16617 (grammar_current_rule_symbol_append)
16618 (grammar_current_rule_action_append): New, eved out from
16620 Remove `action_flag', `rulelength', unused now.
16622 2002-06-11 Akim Demaille <akim@epita.fr>
16624 * src/reader.c (grammar_current_rule_prec_set).
16625 (grammar_current_rule_check): New, eved out from...
16627 Remove `xaction', `first_rhs': useless.
16628 * tests/input.at (Type clashes): New.
16629 * tests/existing.at (GNU Cim Grammar): Adjust.
16631 2002-06-11 Akim Demaille <akim@epita.fr>
16633 * src/reader.c (grammar_midrule_action): New, Eved out from
16636 2002-06-11 Akim Demaille <akim@epita.fr>
16638 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16640 (readgram): Use them as replacement of inlined code, crule and
16643 2002-06-11 Akim Demaille <akim@epita.fr>
16645 * src/reader.c (grammar_end, grammar_symbol_append): New.
16646 (readgram): Use them.
16647 Make the use of `p' as local as possible.
16649 2002-06-10 Akim Demaille <akim@epita.fr>
16651 GCJ's parser requires the tokens to be defined before the prologue.
16653 * data/bison.simple: Output the token definition before the user's
16655 * tests/regression.at (Braces parsing, Duplicate string)
16656 (Mixing %token styles): Check the output from bison.
16657 (Early token definitions): New.
16659 2002-06-10 Akim Demaille <akim@epita.fr>
16661 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16662 assigning twice the same user number to a token, so that we can
16664 * src/lex.c (lex): here.
16665 Also use `symbol_class_set' instead of hand written code.
16666 * src/reader.c (parse_assoc_decl): Likewise.
16668 2002-06-10 Akim Demaille <akim@epita.fr>
16670 * src/symtab.c, src/symtab.c (symbol_class_set)
16671 (symbol_user_token_number_set): New.
16672 * src/reader.c (parse_token_decl): Use them.
16673 Use a switch instead of ifs.
16674 Use a single argument.
16676 2002-06-10 Akim Demaille <akim@epita.fr>
16678 Remove `%thong' support as it is undocumented, unused, duplicates
16679 `%token's job, and creates useless e-mail traffic with people who
16680 want to know what it is, why it is undocumented, unused, and
16681 duplicates `%token's job.
16683 * src/reader.c (parse_thong_decl): Remove.
16684 * src/options.c (option_table): Remove "thong".
16685 * src/lex.h (tok_thong): Remove.
16687 2002-06-10 Akim Demaille <akim@epita.fr>
16689 * src/symtab.c, src/symtab.c (symbol_type_set)
16690 (symbol_precedence_set): New.
16691 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16692 (value_components_used): Remove, unused.
16694 2002-06-09 Akim Demaille <akim@epita.fr>
16696 Move symbols handling code out of the reader.
16698 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16699 (axiom): Move to...
16700 * src/symtab.h, src/symtab.c: here.
16702 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16703 * src/reader.c (startval): Rename as...
16704 * src/symtab.h, src/symtab.c (startsymbol): this.
16705 * src/reader.c: Adjust.
16707 * src/reader.c (symbol_check_defined, symbol_make_alias)
16708 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16709 (token_translations_init)
16711 * src/symtab.c: here.
16712 * src/reader.c (packsymbols): Move to...
16713 * src/symtab.h, src/symtab.c (symbols_pack): here.
16714 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16717 2002-06-03 Akim Demaille <akim@epita.fr>
16719 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16722 2002-06-03 Akim Demaille <akim@epita.fr>
16724 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16725 structs with non literals.
16726 * src/scan-skel.l: never-interactive.
16727 * src/conflicts.c (enum conflict_resolution_e): No trailing
16729 * src/getargs.c (usage): Split long literal strings.
16730 Reported by Hans Aberg.
16732 2002-05-28 Akim Demaille <akim@epita.fr>
16734 * data/bison.c++: Use C++ ostreams.
16735 (cdebug_): New member.
16737 2002-05-28 Akim Demaille <akim@epita.fr>
16739 * src/output.c (output_skeleton): Be sure to allocate enough room
16740 for `/' _and_ for `\0' in full_skeleton.
16742 2002-05-28 Akim Demaille <akim@epita.fr>
16744 * data/bison.c++: Catch up with bison.simple:
16745 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16746 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16747 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16748 and popping traces.
16750 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16752 * src/output.c (output_skeleton): Put an explicit path in front of
16753 the skeleton file name, rather than relying on the -I directory,
16754 to partially alleviate effects of having a skeleton file lying around
16755 in the current directory.
16757 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16759 * src/conflicts.c (log_resolution): Correct typo:
16760 obstack_printf should be obstack_fgrow1.
16762 2002-05-26 Akim Demaille <akim@epita.fr>
16764 * src/state.h (state_t): `solved_conflicts' is a new member.
16765 * src/LR0.c (new_state): Set it to 0.
16766 * src/conflicts.h, src/conflicts.c (print_conflicts)
16767 (free_conflicts, solve_conflicts): Rename as...
16768 (conflicts_print, conflicts_free, conflicts_solve): these.
16770 * src/conflicts.c (enum conflict_resolution_e)
16771 (solved_conflicts_obstack): New, used by...
16772 (log_resolution): this.
16773 Adjust to attach the conflict resolution to each state.
16774 Complete the description with the precedence/associativity
16776 (resolve_sr_conflict): Adjust.
16777 * src/print.c (print_state): Output its solved_conflicts.
16778 * tests/conflicts.at (Unresolved SR Conflicts)
16779 (Solved SR Conflicts): Exercise --report=all.
16781 2002-05-26 Akim Demaille <akim@epita.fr>
16783 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16784 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16785 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16786 (token_number_t, item_number_as_token_number)
16787 (token_number_as_item_number, muscle_insert_token_number_table):
16789 (symbol_number_t, item_number_as_symbol_number)
16790 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16791 these, since it is more appropriate.
16793 2002-05-26 Akim Demaille <akim@epita.fr>
16795 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16797 * data/bison.simple (yystos) [YYDEBUG]: New.
16798 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16800 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16802 2002-05-25 Akim Demaille <akim@epita.fr>
16804 * doc/bison.texinfo (Debugging): Split into...
16805 (Tracing): this new section, its former contents, and...
16806 (Understanding): this new section.
16807 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16809 (report_flag): this.
16810 Adjust all dependencies.
16811 (report_args, report_types, report_argmatch): New.
16812 (usage, getargs): Report/support -r, --report.
16814 (struct option_table_struct): Rename as..,
16815 (struct option_table_s): this.
16816 Rename the `set_flag' member to `flag' to match with getopt_long's
16818 * src/options.c (option_table): Split verbose into an entry for
16819 %verbose, and another for --verbose.
16820 Support --report/-r, so remove -r from the obsolete --raw.
16821 * src/print.c: Attach full item sets and lookaheads reports to
16822 report_flag instead of trace_flag.
16823 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16825 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16826 and Paul Eggert <eggert@twinsun.com>
16828 * data/bison.simple (yyparse): Correct error handling to conform to
16829 POSIX and yacc. Specifically, after syntax error is discovered,
16830 do not reduce further before shifting the error token.
16831 Clean up the code a bit by removing the labels yyerrdefault,
16832 yyerrhandle, yyerrpop.
16833 * NEWS: Document the above.
16835 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16837 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16838 type; it isn't always big enough, since it doesn't necessarily
16839 include non-terminals.
16840 (yytranslate): Expand definition of yy_token_number_type, so that
16841 the latter can be removed.
16842 (yy_token_number_type): Remove, only one use.
16843 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16844 don't use TokenNumberType as element type.
16846 * tests/regression.at: Modify expected output to agree with change
16847 to yyr1 and yytranslate.
16849 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16851 * src/reader.c (parse_action): Use copy_character instead of
16854 2002-05-13 Akim Demaille <akim@epita.fr>
16856 * tests/regression.at (Token definitions): Prototype yylex and
16859 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16861 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16862 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16864 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16866 2002-05-07 Akim Demaille <akim@epita.fr>
16868 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16869 avoid GCC warnings.
16871 2002-05-07 Akim Demaille <akim@epita.fr>
16875 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16876 over the RHS of each rule.
16877 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16878 * src/state.h (state_t): Member `nitems' is unsigned short.
16879 * src/LR0.c (get_state): Adjust.
16880 * src/reader.c (packgram): Likewise.
16881 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16883 (muscle_insert_int_table): Remove, unused.
16884 (prepare_rules): Remove `max'.
16886 2002-05-06 Akim Demaille <akim@epita.fr>
16888 * src/closure.c (print_firsts): Display of the symbol tags.
16889 (bitmatrix_print): Move to...
16890 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16892 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16894 2002-05-06 Akim Demaille <akim@epita.fr>
16896 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16899 2002-05-06 Akim Demaille <akim@epita.fr>
16901 * src/LR0.c (new_state, get_state): Instead of using the global
16902 `kernel_size' and `kernel_base', have two new arguments:
16903 `core_size' and `core'.
16906 2002-05-06 Akim Demaille <akim@epita.fr>
16908 * src/reader.c (packgram): No longer end `ritem' with a 0
16909 sentinel: it is not used.
16911 2002-05-05 Akim Demaille <akim@epita.fr>
16913 New experimental feature: display the lookaheads in the report and
16916 * src/print (print_core): When --trace-flag, display the rules
16918 * src/print_graph.c (print_core): Likewise.
16919 Swap the arguments.
16922 2002-05-05 Akim Demaille <akim@epita.fr>
16924 * tests/torture.at (Many lookaheads): New test.
16926 2002-05-05 Akim Demaille <akim@epita.fr>
16928 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16929 (GENERATE_MUSCLE_INSERT_TABLE): this.
16930 (output_int_table, output_unsigned_int_table, output_short_table)
16931 (output_token_number_table, output_item_number_table): Replace with...
16932 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16933 (muscle_insert_short_table, muscle_insert_token_number_table)
16934 (muscle_insert_item_number_table): these.
16935 Adjust all callers.
16936 (prepare_tokens): Don't free `translations', since...
16937 * src/reader.h, src/reader.c (grammar_free): do it.
16939 * src/gram.h, src/gram.c (grammar_free): here.
16940 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16943 2002-05-05 Akim Demaille <akim@epita.fr>
16945 * src/output.c (output_unsigned_int_table): New.
16946 (prepare_rules): `i' is unsigned.
16947 `prhs', `rline', `r2' are unsigned int.
16948 Rename muscle `rhs_number_max' as `rhs_max'.
16949 Output muscles `prhs_max', `rline_max', and `r2_max'.
16951 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16952 to compute types instead of constant types.
16953 * tests/regression.at (Web2c Actions): Adjust.
16955 2002-05-04 Akim Demaille <akim@epita.fr>
16957 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16958 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16959 Adjust dependencies.
16960 * src/output.c (token_definitions_output): Be sure not to output a
16961 `#define 'a'' when fed with `%token 'a' "a"'.
16962 * tests/regression.at (Token definitions): New.
16964 2002-05-03 Paul Eggert <eggert@twinsun.com>
16966 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16969 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16971 * Makefile.am (SUBDIRS): Remove intl.
16972 (EXTRA_DIST): Add config/config.rpath.
16974 2002-05-03 Akim Demaille <akim@epita.fr>
16976 * data/bison.simple (m4_if): Don't output empty enums.
16977 And actually, output valid enum definitions :(.
16979 2002-05-03 Akim Demaille <akim@epita.fr>
16981 * configure.bat: Remove, completely obsolete.
16982 * Makefile.am (EXTRA_DIST): Adjust.
16983 Don't distribute config.rpath...
16984 * config/Makefile.am (EXTRA_DIST): Do it.
16986 2002-05-03 Akim Demaille <akim@epita.fr>
16988 * configure.in (GETTEXT_VERSION): New.
16989 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16991 2002-05-03 Akim Demaille <akim@epita.fr>
16993 * data/bison.simple (b4_token_enum): New.
16994 (b4_token_defines): Use it to output tokens both as #define and
16996 Suggested by Paul Eggert.
16997 * src/output.c (token_definitions_output): Don't output spurious
17000 2002-05-03 Akim Demaille <akim@epita.fr>
17002 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17004 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17006 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17007 Update the stack class, give a try to deque as the default container.
17009 2002-05-02 Akim Demaille <akim@epita.fr>
17011 * data/bison.simple (yyparse): Do not implement @$ = @1.
17012 (YYLLOC_DEFAULT): Adjust to do it.
17013 * doc/bison.texinfo (Location Default Action): Fix.
17015 2002-05-02 Akim Demaille <akim@epita.fr>
17017 * src/reader.c (parse_braces): Merge into...
17018 (parse_action): this.
17020 2002-05-02 Akim Demaille <akim@epita.fr>
17022 * configure.in (ALL_LINGUAS): Remove.
17023 * po/LINGUAS, hr.po: New.
17025 2002-05-02 Akim Demaille <akim@epita.fr>
17027 Remove the so called hairy (semantic) parsers.
17029 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17030 * src/gram.h, src/gram.c (semantic_parser): Remove.
17031 (rule_t): Remove the guard and guard_line members.
17032 * src/lex.h (token_t): remove tok_guard.
17033 * src/options.c (option_table): Remove %guard and %semantic_parser
17035 * src/output.c, src/output.h (guards_output): Remove.
17037 (token_definitions_output): Don't output the `T'
17039 (output_skeleton): Don't output the guards.
17040 * src/files.c, src/files.c (attrsfile): Remove.
17041 * src/reader.c (symbol_list): Remove the guard and guard_line
17043 Adjust dependencies.
17044 (parse_guard): Remove.
17045 * data/bison.hairy: Remove.
17046 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17049 2002-05-02 Akim Demaille <akim@epita.fr>
17051 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17052 (parse_guard): Rename the formal argument `stack_offset' as
17053 `rule_length', which is more readable.
17055 (copy_at, copy_dollar): Instead of outputting the hard coded
17056 values of $$, $n and so forth, output invocation to b4_lhs_value,
17057 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17058 Note: this patch partially drops `semantic-parser' support: it
17059 always does `rule_length - n', where semantic parsers ought to
17061 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17062 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17064 2002-05-02 Akim Demaille <akim@epita.fr>
17066 * configure.in (AC_INIT): Bump to 1.49b.
17067 (AM_INIT_AUTOMAKE): Short invocation.
17069 2002-05-02 Akim Demaille <akim@epita.fr>
17073 2002-05-01 Akim Demaille <akim@epita.fr>
17075 * src/skeleton.h: Remove.
17077 2002-05-01 Akim Demaille <akim@epita.fr>
17079 * src/skeleton.h: Fix the #endif.
17080 Reported by Magnus Fromreide.
17082 2002-04-26 Paul Eggert <eggert@twinsun.com>
17084 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17085 Define if we define YYSTYPE and YYLTYPE, respectively.
17086 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17088 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17090 * src/scan-skel.l: Postprocess quadrigraphs.
17092 * src/reader.c (copy_character): New function, used to output
17093 single characters while replacing `[' and `]' with quadrigraphs, to
17094 avoid troubles with M4 quotes.
17095 (copy_comment): Output characters with copy_character.
17096 (read_additionnal_code): Likewise.
17097 (copy_string2): Likewise.
17098 (copy_definition): Likewise.
17100 * tests/calc.at: Exercise M4 quoting.
17102 2002-04-25 Akim Demaille <akim@epita.fr>
17104 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17105 between `!' and the command.
17106 Reported by Paul Eggert.
17108 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17110 * tests/calc.at: Exercise prologue splitting.
17112 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17113 `b4_post_prologue' instead of `b4_prologue'.
17115 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17117 (output): Free pre_prologue_obstack and post_prologue_obstack.
17118 * src/files.h, src/files.c (attrs_obstack): Remove.
17119 (pre_prologue_obstack, post_prologue_obstack): New.
17120 * src/reader.c (copy_definition): Add a parameter to specify the
17121 obstack to fill, instead of using attrs_obstack unconditionally.
17122 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17123 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17125 2002-04-23 Paul Eggert <eggert@twinsun.com>
17127 * data/bison.simple: Remove unnecessary commentary and white
17128 space differences from 1_29-branch.
17129 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17131 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17132 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17133 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17134 constructors or destructors.
17136 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17138 2002-04-23 Akim Demaille <akim@epita.fr>
17140 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17141 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17142 location with columns.
17143 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17144 All reported by Paul Eggert.
17146 2002-04-22 Akim Demaille <akim@epita.fr>
17148 * src/reduce.c (dump_grammar): Move to...
17149 * src/gram.h, src/gram.c (grammar_dump): here.
17150 Be sure to separate long item numbers.
17151 Don't read the members of a rule's prec if its nil.
17153 2002-04-22 Akim Demaille <akim@epita.fr>
17155 * src/output.c (table_size, table_grow): New.
17156 (MAXTABLE): Remove, replace uses with table_size.
17157 (pack_vector): Instead of dying when the table is too big, grow it.
17159 2002-04-22 Akim Demaille <akim@epita.fr>
17161 * data/bison.simple (yyr1): Its type is that of a token number.
17162 * data/bison.c++ (r1_): Likewise.
17163 * tests/regression.at (Web2c Actions): Adjust.
17165 2002-04-22 Akim Demaille <akim@epita.fr>
17167 * src/reader.c (token_translations_init): 256 is now the default
17168 value for the error token, i.e., it will be assigned another
17169 number if the user assigned 256 to one of her tokens.
17170 (reader): Don't force 256 to error.
17171 * doc/bison.texinfo (Symbols): Adjust.
17172 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17173 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17174 etc. instead of 10, 20, 30 (which was used to `jump' over error
17175 (256) and undefined (2)).
17177 2002-04-22 Akim Demaille <akim@epita.fr>
17179 Propagate more token_number_t.
17181 * src/gram.h (token_number_as_item_number)
17182 (item_number_as_token_number): New.
17183 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17184 Use it to create output_item_number_table and
17185 output_token_number_table.
17186 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17187 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17188 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17189 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17191 2002-04-22 Akim Demaille <akim@epita.fr>
17193 * src/output.h, src/output.c (get_lines_number): Remove.
17195 2002-04-19 Akim Demaille <akim@epita.fr>
17197 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17199 (Debugging): More details about enabling the debugging features.
17200 (Table of Symbols): Describe $$, $n, @$, and @n.
17201 Suggested by Tim Josling.
17203 2002-04-19 Akim Demaille <akim@epita.fr>
17205 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17207 2002-04-10 Akim Demaille <akim@epita.fr>
17209 * src/system.h: Rely on HAVE_LIMITS_H.
17210 Suggested by Paul Eggert.
17212 2002-04-09 Akim Demaille <akim@epita.fr>
17214 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17215 full stderr, and strip it according to the bison options, instead
17216 of composing the error message from different bits.
17217 This makes it easier to check for several error messages.
17218 Adjust all the invocations.
17219 Add an invocation exercising the error token.
17220 Add an invocation demonstrating a stupid error message.
17221 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17223 Error message are for stderr, not stdout.
17225 2002-04-09 Akim Demaille <akim@epita.fr>
17227 * src/gram.h, src/gram.c (error_token_number): Remove, use
17229 * src/reader.c (reader): Don't specify the user token number (2)
17230 for $undefined, as it uselessly prevents using it.
17231 * src/gram.h (token_number_t): Move to...
17232 * src/symtab.h: here.
17233 (state_t.number): Is a token_number_t.
17234 * src/print.c, src/reader.c: Use undeftoken->number instead of
17236 (Even though this 2 is not the same as above: the number of the
17237 undeftoken remains being 2, it is its user token number which
17239 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17240 `user_token_number_max'.
17241 Output `undef_token_number'.
17242 * data/bison.simple, data/bison.c++: Use them.
17243 Be sure to map invalid yylex return values to
17244 `undef_token_number'. This saves us from gratuitous SEGV.
17246 * tests/conflicts.at (Solved SR Conflicts)
17247 (Unresolved SR Conflicts): Adjust.
17248 * tests/regression.at (Web2c Actions): Adjust.
17250 2002-04-08 Akim Demaille <akim@epita.fr>
17252 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17254 Remove the duplicate `typedefs'.
17255 (RhsNumberType): Fix the declaration and various other typos.
17257 * data/bison.simple: Use __ofile__.
17258 * src/scan-skel.l: Handle __ofile__.
17260 2002-04-08 Akim Demaille <akim@epita.fr>
17262 * src/gram.h (item_number_t): New, the type of item numbers in
17263 RITEM. Note that it must be able to code symbol numbers as
17264 positive number, and the negation of rule numbers as negative
17266 Adjust all dependencies (pretty many).
17267 * src/reduce.c (rule): Remove this `short *' pointer: use
17269 * src/system.h (MINSHORT, MAXSHORT): Remove.
17270 Include `limits.h'.
17271 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17272 (shortcpy): Remove.
17273 (MAXTABLE): Move to...
17274 * src/output.c (MAXTABLE): here.
17275 (prepare_rules): Use output_int_table to output rhs.
17276 * data/bison.simple, data/bison.c++: Adjust.
17277 * tests/torture.at (Big triangle): Move the limit from 254 to
17279 * tests/regression.at (Web2c Actions): Ajust.
17281 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17282 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17283 passes, but produces negative #line number, once fixed, GCC is
17284 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17286 * src/state.h (state_h): Code input lines on ints, not shorts.
17288 2002-04-08 Akim Demaille <akim@epita.fr>
17290 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17291 and then the grammar.
17293 2002-04-08 Akim Demaille <akim@epita.fr>
17295 * src/system.h: No longer using strndup.
17297 2002-04-07 Akim Demaille <akim@epita.fr>
17299 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17300 * src/output.c (output_table_data): Return the longest number.
17301 (prepare_tokens): Output `token_number_max').
17302 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17304 Use them to define yy_token_number_type/TokenNumberType.
17305 Use this type for yytranslate.
17306 * tests/torture.at (Big triangle): Push the limit from 124 to
17308 * tests/regression.at (Web2c Actions): Adjust.
17310 2002-04-07 Akim Demaille <akim@epita.fr>
17312 * tests/torture.at (Big triangle): New.
17313 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17314 * tests/existing.at: here.
17316 2002-04-07 Akim Demaille <akim@epita.fr>
17318 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17320 Adjust dependencies.
17322 2002-04-07 Akim Demaille <akim@epita.fr>
17324 * src/reader.c: Normalize increments to prefix form.
17326 2002-04-07 Akim Demaille <akim@epita.fr>
17328 * src/reader.c, symtab.c: Remove debugging code.
17330 2002-04-07 Akim Demaille <akim@epita.fr>
17332 Rename all the `bucket's as `symbol_t'.
17334 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17335 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17336 * src/symtab.c, src/symtab.h (bucket): Rename as...
17338 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17339 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17340 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17341 (buckets_new, buckets_free, buckets_do): Rename as...
17342 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17343 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17344 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17345 (symbols_new, symbols_free, symbols_do): these.
17347 2002-04-07 Akim Demaille <akim@epita.fr>
17349 Use lib/hash for the symbol table.
17351 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17353 * src/lex.c (lex): Set the `number' member of new terminals.
17354 * src/reader.c (bucket_check_defined, bucket_make_alias)
17355 (bucket_check_alias_consistence, bucket_translation): New.
17356 (reader, grammar_free, readgram, token_translations_init)
17357 (packsymbols): Adjust.
17358 (reader): Number the predefined tokens.
17359 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17360 for predefined tokens.
17361 * src/symtab.h (bucket): Remove all the hash table related
17363 * src/symtab.c (symtab): Replace by...
17364 (bucket_table): this.
17365 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17366 (buckets_new, buckets_do): New.
17368 2002-04-07 Akim Demaille <akim@epita.fr>
17370 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17371 (start_symbol, max_user_token_number, semantic_parser)
17372 (error_token_number): Initialize.
17373 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17376 (errtoken, eoftoken, undeftoken, axiom): Extern.
17378 2002-04-07 Akim Demaille <akim@epita.fr>
17380 * src/gram.h (rule_s): prec and precsym are now pointers
17381 to the bucket giving the priority/associativity.
17382 Member `associativity' removed: useless.
17383 * src/reduce.c, src/conflicts.c: Adjust.
17385 2002-04-07 Akim Demaille <akim@epita.fr>
17387 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17388 Properly escape the symbols' TAG when outputting them.
17390 2002-04-07 Akim Demaille <akim@epita.fr>
17392 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17394 2002-04-07 Akim Demaille <akim@epita.fr>
17396 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17397 (LArule): this, which is an array to rule_t*.
17398 * src/print.c, src/conflicts.c: Adjust.
17400 2002-04-07 Akim Demaille <akim@epita.fr>
17402 * src/gram.h (rule_t): Rename `number' as `user_number'.
17403 `number' is a new member.
17404 Adjust dependencies.
17405 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17407 2002-04-07 Akim Demaille <akim@epita.fr>
17409 As a result of the previous patch, it is no longer needed
17410 to reorder ritem itself.
17412 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17414 2002-04-07 Akim Demaille <akim@epita.fr>
17416 Be sure never to walk through RITEMS, but use only data related to
17417 the rules themselves. RITEMS should be banished.
17419 * src/output.c (output_token_translations): Rename as...
17420 (prepare_tokens): this.
17421 In addition to `translate', prepare the muscles `tname' and
17422 `toknum', which were handled by...
17423 (output_rule_data): this.
17424 Remove, and move the remainder of its outputs into...
17425 (prepare_rules): this new routines, which also merges content from
17426 (output_gram): this.
17427 (prepare_rules): Be sure never to walk through RITEMS.
17428 (output_stos): Rename as...
17429 (prepare_stos): this.
17430 (output): Always invoke prepare_states, after all, just don't use it
17431 in the output if you don't need it.
17433 2002-04-07 Akim Demaille <akim@epita.fr>
17435 * src/LR0.c (new_state): Display `nstates' as the name of the
17436 newly created state.
17437 Adjust to initialize first_state and last_state if needed.
17438 Be sure to distinguish the initial from the final state.
17439 (new_states): Create the itemset of the initial state, and use
17441 * src/closure.c (closure): Now that the initial state has its
17442 items properly set, there is no need for a special case when
17443 creating `ruleset'.
17445 As a result, now the rule 0, reducing to $axiom, is visible in the
17446 outputs. Adjust the test suite.
17448 * tests/conflicts.at (Solved SR Conflicts)
17449 (Unresolved SR Conflicts): Adjust.
17450 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17451 * tests/conflicts.at (S/R in initial): New.
17453 2002-04-07 Akim Demaille <akim@epita.fr>
17455 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17456 the RHS of the rules.
17457 * src/output.c (output_gram): Likewise.
17459 2002-04-07 Akim Demaille <akim@epita.fr>
17461 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17463 Adjust all dependencies.
17464 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17465 `number' of the buckets too.
17466 * src/gram.h: Include `symtab.h'.
17467 (associativity): Move to...
17468 * src/symtab.h: here.
17469 No longer include `gram.h'.
17471 2002-04-07 Akim Demaille <akim@epita.fr>
17473 * src/gram.h, src/gram.c (rules_rhs_length): New.
17474 (ritem_longest_rhs): Use it.
17475 * src/gram.h (rule_t): `number' is a new member.
17476 * src/reader.c (packgram): Set it.
17477 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17478 the end of `rules', and count them out of `nrules'.
17479 (reduce_output, dump_grammar): Adjust.
17480 * src/print.c (print_grammar): It is no longer needed to check for
17481 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17482 * tests/reduce.at (Reduced Automaton): New test.
17484 2002-04-07 Akim Demaille <akim@epita.fr>
17486 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17487 lacking `+ 1' to nrules, Bison reported as useless a token if it
17488 was used solely to set the precedence of the last rule...
17490 2002-04-07 Akim Demaille <akim@epita.fr>
17492 * data/bison.c++, data/bison.simple: Don't output the current file
17493 name in #line, to avoid useless diffs between two identical
17494 outputs under different names.
17496 2002-04-07 Akim Demaille <akim@epita.fr>
17498 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17499 Normalize loops to using `< nrules + 1', not `<= nrules'.
17501 2002-04-07 Akim Demaille <akim@epita.fr>
17505 2002-04-07 Akim Demaille <akim@epita.fr>
17507 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17508 bucket.value as bucket.number.
17510 2002-04-07 Akim Demaille <akim@epita.fr>
17512 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17513 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17514 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17515 RHS, instead of being an index in RITEMS.
17517 2002-04-04 Paul Eggert <eggert@twinsun.com>
17519 * doc/bison.texinfo: Update copyright date.
17520 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17521 (Symbols): Warn about running Bison in one character set,
17522 but compiling and/or running in an incompatible one.
17523 Warn about character code 256, too.
17525 2002-04-03 Paul Eggert <eggert@twinsun.com>
17527 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17528 YYERROR_VERBOSE is nonzero, not whether it is defined.
17530 Merge changes from bison-1_29-branch.
17532 2002-03-20 Paul Eggert <eggert@twinsun.com>
17534 Merge fixes from Debian bison_1.34-1.diff.
17536 * configure.in (AC_PREREQ): 2.53.
17538 2002-03-20 Akim Demaille <akim@epita.fr>
17540 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17542 2002-03-19 Paul Eggert <eggert@twinsun.com>
17544 * src/bison.simple (YYCOPY): New macro.
17545 (YYSTACK_RELOCATE): Use it.
17546 Remove Type arg; no longer needed. All callers changed.
17547 (yymemcpy): Remove; no longer needed.
17549 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17550 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17552 2002-03-19 Akim Demaille <akim@epita.fr>
17554 Test and fix the #line outputs.
17556 * tests/atlocal.at (GCC): New.
17557 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17558 (Prologue synch line, %union synch line, Postprologue synch line)
17559 (Action synch line, Epilogue synch line): New tests.
17560 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17561 * data/bison.simple, data/bison.c++: Use it.
17563 2002-03-19 Akim Demaille <akim@epita.fr>
17565 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17566 (Solved SR Conflicts, %expect not enough, %expect right)
17567 (%expect too much): Move to...
17568 * tests/conflicts.at: this new file.
17570 2002-03-19 Akim Demaille <akim@epita.fr>
17572 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17573 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17574 that we can move to enums for instance.
17575 * src/output.c (token_definitions_output): Output a list of
17576 `token-name, token-number' instead of the #define.
17577 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17579 2002-03-14 Akim Demaille <akim@epita.fr>
17581 Use Gettext 0.11.1.
17583 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17585 * data/bison.c++: Make the user able to add members to the generated
17586 parser by subclassing.
17588 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17590 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17592 Reported by Nicolas Tisserand and Nicolas Burrus.
17594 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17596 * src/reader.c: Warn about lacking semi-colons, do not complain.
17598 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17600 * data/bison.c++: Remove a debug line.
17602 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17604 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17605 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17606 provide a default implementation.
17608 2002-03-04 Akim Demaille <akim@epita.fr>
17610 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17611 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17612 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17613 * tests/semantic.at (Parsing Guards): Similarly.
17614 * src/reader.at (readgram): Complain if the last rule is not ended
17617 2002-03-04 Akim Demaille <akim@epita.fr>
17619 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17620 * src/closure.c: here.
17621 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17623 * src/warshall.h, src/warshall.c: Remove.
17624 * tests/sets.at (Broken Closure): Adjust.
17626 2002-03-04 Akim Demaille <akim@epita.fr>
17628 * src/output.c (output_skeleton): tempdir is const.
17629 bytes_read is unused.
17631 2002-03-04 Akim Demaille <akim@epita.fr>
17633 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17634 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17636 From Michael Hayes.
17638 2002-03-04 Akim Demaille <akim@epita.fr>
17640 * src/closure.c (closure): `r' is unused.
17642 2002-03-04 Akim Demaille <akim@epita.fr>
17644 * tests/sets.at (Broken Closure): Add the ending `;'.
17645 * src/reader.at (readgram): Complain if a rule is not ended with a
17648 2002-03-04 Akim Demaille <akim@epita.fr>
17650 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17651 (count_sr_conflicts): Use bitset_count.
17652 * src/reduce.c (inaccessable_symbols): Ditto.
17653 (bits_size): Remove.
17654 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17656 2002-03-04 Akim Demaille <akim@epita.fr>
17658 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17659 * src/reduce.c: Remove the `bitset_zero's following the
17660 `bitset_create's, as now it is performed by the latter.
17662 2002-03-04 Akim Demaille <akim@epita.fr>
17664 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17665 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17666 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17667 latest sources from Michael.
17669 2002-03-04 Akim Demaille <akim@epita.fr>
17671 * src/output.c (output): Don't free the grammar.
17672 * src/reader.c (grammar_free): New.
17673 * src/main.c (main): Call it and don't free symtab here.
17675 2002-03-04 Akim Demaille <akim@epita.fr>
17677 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17679 Reported by Benoit Perrot.
17681 2002-03-04 Akim Demaille <akim@epita.fr>
17683 Use bitset operations when possible, not loops over bits.
17685 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17687 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17688 * src/reduce.c (useless_nonterminals): Formatting changes.
17689 * src/warshall.c (TC): Use bitset_or.
17691 2002-03-04 Akim Demaille <akim@epita.fr>
17693 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17694 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17697 2002-03-04 Akim Demaille <akim@epita.fr>
17699 * src/lalr.c (F): Now a bitset*.
17700 Adjust all dependencies.
17702 2002-03-04 Akim Demaille <akim@epita.fr>
17704 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17705 Adjust all dependencies.
17707 2002-03-04 Akim Demaille <akim@epita.fr>
17709 * src/L0.c, src/LR0.h (nstates): Be size_t.
17710 Adjust comparisons (signed vs unsigned).
17711 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17713 Adjust all dependencies.
17715 2002-03-04 Akim Demaille <akim@epita.fr>
17717 * src/closure.c (firsts): Now, also a bitset.
17718 Adjust all dependencies.
17719 (varsetsize): Remove, now unused.
17720 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17722 2002-03-04 Akim Demaille <akim@epita.fr>
17724 * src/print.c: Convert to use bitset.h, not hand coded iterations
17727 2002-03-04 Akim Demaille <akim@epita.fr>
17729 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17731 2002-03-04 Akim Demaille <akim@epita.fr>
17733 * src/closure.c (ruleset): Be a bitset.
17734 (rulesetsize): Remove.
17736 2002-03-04 Akim Demaille <akim@epita.fr>
17738 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17739 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17740 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17741 * src/closure.c (fderives): Be an array of bitsets.
17743 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17745 * data/bison.c++: Merge the two generated headers. Insert a copyright
17746 notice in each output file.
17748 2002-02-28 Akim Demaille <akim@epita.fr>
17750 * data/bison.c++: Copy the prologue of bison.simple to fetch
17751 useful M4 definitions, such as b4_header_guard.
17753 2002-02-25 Akim Demaille <akim@epita.fr>
17755 * src/getargs.c (version): Give the name of the authors, and use a
17756 translator friendly scheme for the bgr
17759 2002-02-25 Akim Demaille <akim@epita.fr>
17761 * src/output.c (header_output): Remove, now handled completely via
17764 2002-02-25 Akim Demaille <akim@epita.fr>
17766 * m4/m4.m4: New, from CVS Autoconf.
17767 * configure.in: Invoke it.
17768 * src/output.c (output_skeleton): Use its result instead of the
17771 2002-02-25 Akim Demaille <akim@epita.fr>
17773 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17775 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17776 * src/output.c (output_skeleton): Use mkstemp to create a real
17778 Move the filling of `skeleton' and its muscle to...
17780 (output): Move the definition of the prologue muscle to...
17782 * src/system.h (DEFAULT_TMPDIR): New.
17784 2002-02-14 Paul Eggert <eggert@twinsun.com>
17786 Remove the support for C++ namespace cleanliness; it was
17787 causing more problems than it was curing, since it didn't work
17788 properly on some nonstandard C++ compilers. This can wait
17789 for a proper C++ parser.
17791 * NEWS: Document this.
17792 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17793 of C++, as it's treated like C now.
17794 * src/bison.simple (YYSTD): Remove.
17795 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17796 Treat C++ just like Standard C instead of trying to support
17797 namespace cleanliness.
17799 2002-02-14 Akim Demaille <akim@epita.fr>
17801 * tests/regression.at (else): Adjust to Andreas' change.
17803 2002-02-14 Akim Demaille <akim@epita.fr>
17805 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17807 2002-02-13 Andreas Schwab <schwab@suse.de>
17809 * src/output.c (output_rule_data): Don't output NULL, it might
17810 not be defined yet.
17812 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17814 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17815 (Copyright notice): Update.
17817 2002-02-11 Akim Demaille <akim@epita.fr>
17819 * tests/regression.at (%nonassoc and eof): Don't include
17820 nonportable headers.
17822 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17824 * data/bison.c++: Correct error recovery. Make the user able to
17825 initialize the starting location.
17827 2002-02-07 Akim Demaille <akim@epita.fr>
17829 * tests/input.at: New.
17831 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17833 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17834 more consistent when naming methods and variables. Put preprocessor
17835 directives around tables only needed for debugging.
17837 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17839 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17841 (yy::b4_name::parse): Use print_.
17843 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17845 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17847 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17849 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17851 (yy::b4_name::parse): Build verbose error messages, and use error_.
17853 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17855 * data/bison.c++: Fix m4 quoting in comments.
17857 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17859 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17860 not expanded by m4.
17862 2002-02-05 Akim Demaille <akim@epita.fr>
17864 * data/bison.c++: Adjust to the M4 back end.
17865 More is certainly needed.
17867 2002-02-05 Akim Demaille <akim@epita.fr>
17869 Give a try to M4 as a back end.
17871 * lib/readpipe.c: New, from wdiff.
17872 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17874 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17875 specific values. Now it is m4 that performs the lookup.
17876 * src/parse-skel.y: Remove.
17877 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17878 * src/output.c (actions_output, guards_output)
17879 (token_definitions_output): No longer keeps track of the output
17880 line number, hence remove the second argument.
17881 (guards_output): Check against the guard member of a rule, not the
17884 (output_skeleton): Don't look for the skeleton location, let m4 do
17886 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17888 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17889 (prepare): Given that for the time being changesyntax is not
17890 usable in M4, rename the muscles using `-' to `_'.
17891 Define `defines_flag', `output_parser_name' and `output_header_name'.
17892 * src/output.h (actions_output, guards_output)
17893 (token_definitions_output): Adjust prototypes.
17894 * src/scan-skel.l: Instead of scanning the skeletons, it now
17895 processes the output of m4: `__oline__' and `#output'.
17896 * data/bison.simple: Adjust to be used by M4(sugar).
17897 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17899 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17900 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17901 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17902 shamelessly stolen from CVS Autoconf.
17904 2002-02-05 Akim Demaille <akim@epita.fr>
17906 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17907 * configure.in: Check for the declarations of free and malloc.
17908 * src/muscle_tab.c: Adjust.
17910 2002-02-05 Akim Demaille <akim@epita.fr>
17912 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17913 which have no values.
17915 2002-02-05 Akim Demaille <akim@epita.fr>
17917 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17920 2002-01-29 Paul Eggert <eggert@twinsun.com>
17922 * src/bison.simple (YYSIZE_T): Do not define merely because
17923 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17924 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17926 2002-01-27 Akim Demaille <akim@epita.fr>
17928 Fix `%nonassoc and eof'.
17930 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17931 which were not properly copied! Replace
17932 memcpy (res->errs, src->errs, src->nerrs);
17934 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17936 * tests/regression.at (%nonassoc and eof): Adjust to newest
17937 Autotest: `.' is not in the PATH.
17939 2002-01-27 Akim Demaille <akim@epita.fr>
17941 * tests/sets.at (AT_EXTRACT_SETS): New.
17942 (Nullable): Use it.
17945 2002-01-26 Akim Demaille <akim@epita.fr>
17947 * tests/actions.at, tests/calc.at, tests/headers.at,
17948 * tests/torture.at: Adjust to the newest Autotest which no longer
17949 forces `.' in the PATH.
17951 2002-01-25 Akim Demaille <akim@epita.fr>
17953 * tests/regression.at (%nonassoc and eof): New.
17954 Suggested by Robert Anisko.
17956 2002-01-24 Akim Demaille <akim@epita.fr>
17958 Bison dumps core when trying to complain about broken input files.
17959 Reported by Cris van Pelt.
17961 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17962 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17964 (Invalid inputs): Strengthen: exercise parse_percent_token.
17966 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17968 * src/Makefile.am: Add bison.c++.
17969 * src/bison.c++: New skeleton.
17971 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17975 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17977 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17979 2002-01-20 Marc Autret <marc@gnu.org>
17981 * src/files.c (compute_output_file_names): Fix
17983 2002-01-20 Marc Autret <marc@gnu.org>
17985 * tests/output.at: New test.
17986 * src/files.c (compute_base_names): Don't map extensions when
17987 the YACC flag is set, use defaults.
17988 Reported by Evgeny Stambulchik.
17990 2002-01-20 Marc Autret <marc@gnu.org>
17992 * src/system.h: Need to define __attribute__ away for non-GCC
17993 compilers as well (i.e., the vendor C compiler).
17994 Suggested by Albert Chin-A-Young.
17996 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17998 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17999 canonical definition.
18000 * src/system.h: Use the canonical definition for PARAMS (avoids
18001 a conflict with the macro from lib/hash.h).
18003 2002-01-11 Akim Demaille <akim@epita.fr>
18005 * configure.in: Use AC_FUNC_STRNLEN.
18006 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18008 2002-01-09 Akim Demaille <akim@epita.fr>
18010 * src/files.c, src/files.h (output_infix): New.
18011 (tab_extension): Remove.
18012 (compute_base_names): Compute the former, drop the latter.
18013 * src/output.c (prepare): Insert the muscles `output-infix', and
18015 * src/parse-skel.y (string, string.1): New.
18016 (section.header): Use it.
18017 (section.yacc): Remove.
18018 (prefix): Remove too.
18019 * src/scan-skel.l: Adjust.
18020 * src/bison.simple, src/bison.hairy: Adjust.
18022 2002-01-09 Akim Demaille <akim@epita.fr>
18024 * configure.in (WERROR_CFLAGS): Compute it.
18025 * src/Makefile.am (CFLAGS): Pass it.
18026 * tests/atlocal.in (CFLAGS): Idem.
18027 * src/files.c: Fix a few warnings.
18028 (get_extension_index): Remove, unused.
18030 2002-01-08 Akim Demaille <akim@epita.fr>
18032 * src/getargs.c (AS_FILE_NAME): New.
18033 (getargs): Use it to convert DOSish file names.
18034 * src/files.c (base_name): Rename as full_base_name to avoid
18035 clashes with `base_name ()'.
18036 (filename_split): New.
18037 (compute_base_names): N-th rewrite, using filename_split.
18039 2002-01-08 Akim Demaille <akim@epita.fr>
18041 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18042 New, stolen from the Fileutils 4.1.
18043 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18044 * configure.in: Check for the presence of memrchr, and of its
18047 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18049 * lib/hash.h (__P): Added definition for this macro.
18050 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18051 BUILT_SOURCES, to ensure they are generated first.
18052 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18053 %error-verbose to allow bootstrapping with bison 1.30x.
18055 2002-01-06 Akim Demaille <akim@epita.fr>
18057 * src/reader.c (parse_braces): Don't fetch the next char, the
18058 convention is to fetch on entry.
18059 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18060 'switch' without a following semicolon.
18061 * tests/regression.at (braces parsing): New.
18063 2002-01-06 Akim Demaille <akim@epita.fr>
18065 Bison is dead wrong in its RR conflict reports.
18067 * tests/torture.at (GNU Cim Grammar): New.
18068 * src/conflicts.c (count_rr_conflicts): Fix.
18070 2002-01-06 Akim Demaille <akim@epita.fr>
18072 Creating package.m4 from configure.ac causes too many problems.
18074 * tests/Makefile.am (package.m4): Create it by hand,
18075 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18077 2002-01-06 Akim Demaille <akim@epita.fr>
18079 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18082 2002-01-04 Paul Eggert <eggert@twinsun.com>
18084 * doc/bison.texinfo (Debugging):
18085 Remove YYSTDERR; it's no longer defined or used.
18086 Also, s/cstdio.h/cstdio/.
18088 2002-01-03 Akim Demaille <akim@epita.fr>
18090 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18092 2002-01-03 Akim Demaille <akim@epita.fr>
18094 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18095 tracing code to --trace, wait for a better --trace option, with
18098 2002-01-03 Akim Demaille <akim@epita.fr>
18100 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18101 The ISO C++ standard is extremely clear about it: stderr is
18102 considered a macro, not a regular symbol (see table 94 `Header
18103 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18104 Therefore std:: does not apply to it. It still does with fprintf.
18105 Also, s/cstdio.h/cstdio/.
18107 2002-01-03 Akim Demaille <akim@epita.fr>
18109 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18110 for non system headers.
18112 2002-01-02 Akim Demaille <akim@epita.fr>
18114 Equip the skeleton chain with location tracking, runtime trace,
18115 pure parser and scanner.
18117 * src/parse-skel.y: Request a pure parser, locations, and prefix
18119 (%union): Having several members with the same type does not help
18120 type mismatches, simplify.
18121 (YYPRINT, yyprint): New.
18122 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18123 (skel_error): this.
18125 * src/scan-skel.l: Adjust to these changes.
18126 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18127 (LOCATION_PRINT, skel_control_t): New.
18129 2001-12-30 Akim Demaille <akim@epita.fr>
18131 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18132 replace `gb' with BLANKS.
18133 * src/scan-skel.l: Adjust.
18135 2001-12-30 Akim Demaille <akim@epita.fr>
18137 * src/system.h: We don't need nor want bcopy.
18138 Throw away MS-DOS crap: we don't need getpid.
18139 * configure.in: We don't need strndup. It was even causing
18140 problems: because Flex includes the headers *before* us,
18141 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18143 * lib/xstrndup.c: New.
18144 * src/scan-skel.l: Use it.
18145 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18146 * src/parse-skel.y: Use %directives instead of #defines.
18148 2001-12-30 Akim Demaille <akim@epita.fr>
18150 * src/skeleton.h: New.
18151 * src/output.c (output_parser, output_master_parser): Remove, dead
18153 * src/output.h (get_lines_number, actions_output, guards_output)
18154 (token_definitions_output): Prototype them.
18155 * src/parse-skel.y: Add the license notice.
18156 Include output.h and skeleton.h.
18157 (process_skeleton): Returns void, and takes a single parameter.
18158 * src/scan-skel.l: Add the license notice.
18159 Include skeleton.h.
18160 Don't use %option yylineno: it seems that then Flex imagines
18161 REJECT has been used, and therefore it won't reallocate its
18162 buffers (which makes no other sense to me than a bug). It results
18163 in warnings for `unused: yy_flex_realloc'.
18165 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18167 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18168 (MUSCLE_INSERT_PREFIX): ...to there.
18169 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18170 (MUSCLE_INSERT_PREFIX): Move from here...
18172 * src/bison.hairy: Add a section directive. Put braces around muscle
18173 names. This parser skeleton is still broken, but Bison should not
18174 choke on a bad muscle 'syntax'.
18175 * src/bison.simple: Add a section directive. Put braces around muscle
18178 * src/files.h (strsuffix, stringappend): Add declarations.
18179 (tab_extension): Add declaration.
18180 (short_base_name): Add declaration.
18182 * src/files.c (strsuffix, stringappend): No longer static. These
18183 functions are used in the skeleton parser.
18184 (tab_extension): New.
18185 (compute_base_names): Use the computations done in this function
18186 to guess if the generated parsers should have '.tab' in their
18188 (short_base_name): No longer static.
18190 * src/output.c (output_skeleton): New.
18191 (output): Disable call to output_master_parser, and give a try to
18192 a new skeleton handling system.
18193 (guards_output, actions_output): No longer static.
18194 (token_definitions_output, get_lines_number): No longer static.
18196 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18198 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18201 * src/parse-skel.y: New file.
18202 * src/scan-skel.l: New file.
18204 2001-12-29 Akim Demaille <akim@epita.fr>
18206 %name-prefix is broken.
18208 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18209 Adjust all dependencies.
18210 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18213 Renaming yylval but not yylloc is not consistent. Now we do.
18215 * src/bison.simple: Prefix yylloc if used.
18216 * doc/bison.texinfo (Decl Summary): Document that.
18218 2001-12-29 Akim Demaille <akim@epita.fr>
18220 * doc/bison.texinfo: Promote `%long-directive' over
18222 Remove all references to fixed-output-files, yacc is enough.
18224 2001-12-29 Akim Demaille <akim@epita.fr>
18226 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18227 user prologue. These are defaults.
18228 * tests/actions.at (Mid-rule actions): Make sure the user can
18229 define YYDEBUG and YYERROR_VERBOSE.
18231 2001-12-29 Akim Demaille <akim@epita.fr>
18233 * src/output.c (header_output): Don't forget to export YYLTYPE and
18235 * tests/headers.at (export YYLTYPE): New, make sure it does.
18236 * tests/regression.at (%union and --defines, Invalid CPP headers):
18238 * tests/headers.at: here.
18240 2001-12-29 Akim Demaille <akim@epita.fr>
18242 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18244 2001-12-29 Akim Demaille <akim@epita.fr>
18246 * tests/actions.at (Mid-rule actions): Output on a single line
18247 instead of several.
18249 2001-12-29 Akim Demaille <akim@epita.fr>
18251 * doc/bison.texinfo: Formatting changes.
18253 2001-12-29 Akim Demaille <akim@epita.fr>
18255 Don't store the token defs in a muscle, just be ready to output it
18256 on command. Now possible via `symbols'. Fixes a memory leak.
18258 * src/output.c (token_definitions_output): New.
18259 (output_parser, header_output): Use it.
18260 * src/reader.c (symbols_save): Remove.
18262 2001-12-29 Akim Demaille <akim@epita.fr>
18264 * src/bison.simple: Do not provide a default for YYSTYPE and
18265 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18268 2001-12-29 Akim Demaille <akim@epita.fr>
18270 Mid-rule actions are simply... ignored!
18272 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18273 the empty-rule associated to the dummy symbol, not to the host
18275 * tests/actions.at (Mid-rule actions): New.
18277 2001-12-29 Akim Demaille <akim@epita.fr>
18281 * src/reader.c (reader): Free grammar.
18283 2001-12-29 Akim Demaille <akim@epita.fr>
18287 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18288 since it allocates it for each state, although only one is needed.
18289 (allocate_storage): Do it here.
18291 2001-12-29 Akim Demaille <akim@epita.fr>
18293 * src/options.h, src/options.c (create_long_option_table): Rename
18295 (long_option_table_new): this, with a clearer prototype.
18296 (percent_table): Remove, unused,
18297 * src/getargs.c (getargs): Adjust.
18299 2001-12-29 Akim Demaille <akim@epita.fr>
18301 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18302 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18305 2001-12-29 Akim Demaille <akim@epita.fr>
18307 * src/lalr.c (build_relations): Rename `states' as `states1'.
18308 Sorry, I don't understand exactly what it is, no better name...
18310 2001-12-29 Akim Demaille <akim@epita.fr>
18312 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18313 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18314 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18317 2001-12-29 Akim Demaille <akim@epita.fr>
18319 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18322 2001-12-29 Akim Demaille <akim@epita.fr>
18324 * src/reader.c, src/reader.h (user_toknums): Remove.
18325 Adjust all users to use symbols[i]->user_token_number.
18327 2001-12-29 Akim Demaille <akim@epita.fr>
18329 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18330 Adjust all users to use symbols[i]->prec or ->assoc.
18332 2001-12-29 Akim Demaille <akim@epita.fr>
18334 * src/reader.c, src/reader.h (tags): Remove.
18335 Adjust all users to use symbols[i]->tag.
18337 2001-12-29 Akim Demaille <akim@epita.fr>
18339 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18341 * src/reader.c (packsymbols): Fill this table.
18343 * src/conflicts.c (resolve_sr_conflict): Adjust.
18344 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18346 Use symbols[i]->tag instead of tags[i].
18348 2001-12-29 Akim Demaille <akim@epita.fr>
18350 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18351 In addition, put a comment in there, to replace...
18352 * tests/regression.at (%union and C comments): Remove.
18354 2001-12-29 Akim Demaille <akim@epita.fr>
18356 * tests/regression.at (Web2c Actions): Blindly move the actual
18357 output as expected output. The contents *seem* right to me, but I
18358 can't pretend reading perfectly parser tables... Nonetheless, all
18359 the other tests pass correctly, the table look OK, even though the
18360 presence of `$axiom' is to be noted: AFAICS it is useless (but
18363 2001-12-29 Akim Demaille <akim@epita.fr>
18365 * src/reader.c (readgram): Don't add the rule 0 if there were no
18366 rules read. In other words, add it _after_ having performed
18367 grammar sanity checks.
18368 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18370 2001-12-29 Akim Demaille <akim@epita.fr>
18372 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18373 visible, and some states have now a different number.
18375 2001-12-29 Akim Demaille <akim@epita.fr>
18377 * src/reader.c (readgram): Bind the initial rule's lineno to that
18379 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18380 (Solved SR Conflicts): Adjust rule 0's line number.
18382 2001-12-29 Akim Demaille <akim@epita.fr>
18384 Fix the `GAWK Grammar' failure.
18386 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18387 the reductions of the first state which was mistakenly confused
18388 with the final state because precisely final_state was initialized
18390 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18391 now noticed by Bison.
18392 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18393 have a reduction on $default.
18395 2001-12-29 Akim Demaille <akim@epita.fr>
18397 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18399 * src/closure.c (print_closure): Likewise.
18400 * src/derives.c (print_derives): Likewise.
18401 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18404 2001-12-29 Akim Demaille <akim@epita.fr>
18406 * src/lalr.c (lookaheads_print): New.
18407 (lalr): Call it when --trace-flag.
18408 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18411 2001-12-29 Akim Demaille <akim@epita.fr>
18413 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18414 when walking through ritem, even via rule->rhs.
18415 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18416 (useful_production, useless_nonterminals): Likewise.
18417 (reduce_grammar_tables): Likewise, plus update nritems.
18418 * src/nullable.c (set_nullable): Likewise.
18419 * src/lalr.c (build_relations): Likewise.
18420 * tests/sets.at (Nullable): Adjust.
18421 Fortunately, now, the $axiom is no longer nullable.
18423 2001-12-29 Akim Demaille <akim@epita.fr>
18425 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18427 * src/gram.c (ritem_longest_rhs): Likewise.
18428 * src/reduce.c (nonterminals_reduce): Likewise.
18429 * src/print_graph.c (print_graph): Likewise.
18430 * src/output.c (output_rule_data): Likewise.
18431 * src/nullable.c (set_nullable): Likewise.
18433 2001-12-29 Akim Demaille <akim@epita.fr>
18435 * src/output.c: Comment changes.
18437 2001-12-27 Paul Eggert <eggert@twinsun.com>
18439 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18440 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18441 Sparc, as they were causing more porting problems than the
18442 (minor) performance improvement was worth.
18444 Also, catch up with 1.31's YYSTD.
18446 2001-12-27 Akim Demaille <akim@epita.fr>
18448 * src/output.c (output_gram): Rely on nritems, not the
18449 0-sentinel. See below.
18450 Use -1 as separator, not 0.
18451 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18452 Rely on -1 as separator in yyrhs, instead of 0.
18453 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18454 twice `Now at end of input', therefore there are two lines less to
18457 2001-12-27 Akim Demaille <akim@epita.fr>
18459 * tests/regression.at (Unresolved SR Conflicts):
18460 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18463 2001-12-27 Akim Demaille <akim@epita.fr>
18465 * src/LR0.c (new_state): Recognize the final state by the fact it
18466 is reached by eoftoken.
18467 (insert_start_shifting_state, insert_eof_shifting_state)
18468 (insert_accepting_state, augment_automaton): Remove, since now
18469 these states are automatically computed from the initial state.
18470 (generate_states): Adjust.
18471 * src/print.c: When reporting a rule number to the user, substract
18472 1, so that the axiom rule is rule 0, and the first user rule is 1.
18473 * src/reduce.c: Likewise.
18474 * src/print_graph.c (print_core): For the time being, just as for
18475 the report, depend upon --trace-flags to dump the full set of
18477 * src/reader.c (readgram): Once the grammar read, insert the rule
18478 0: `$axiom: START-SYMBOL $'.
18479 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18480 number of the states has changed (the final state is no longer
18481 necessarily the last), catch up.
18483 2001-12-27 Akim Demaille <akim@epita.fr>
18485 Try to make the use of the eoftoken valid. Given that its value
18486 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18487 is used instead of > 0 where appropriate, (ii), depend upon nritems
18488 instead of the 0-sentinel.
18490 * src/gram.h, src/gram.c (nritems): New.
18491 Expected to be duplication of nitems, but for the time being...
18492 * src/reader.c (packgram): Assert nritems and nitems are equal.
18493 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18494 * src/closure.c (print_closure, print_fderives): Likewise.
18495 * src/gram.c (ritem_print): Likewise.
18496 * src/print.c (print_core, print_grammar): Likewise.
18497 * src/print_graph.c: Likewise.
18499 2001-12-27 Akim Demaille <akim@epita.fr>
18501 * src/main.c (main): If there are complains after grammar
18502 reductions, then output the report anyway if requested, then die.
18503 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18504 * src/reader.c (eoftoken): New.
18505 (parse_token_decl): If the token being defined has value `0', it
18507 (packsymbols): No longer hack `tags' to insert `$' by hand.
18508 Be sure to preserve the value of the eoftoken.
18509 (reader): Make sure eoftoken is defined.
18510 Initialize nsyms to 0: now eoftoken is created just like the others.
18511 * src/print.c (print_grammar): Don't special case the eof token.
18512 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18513 lie anyway, albeit pleasant.
18514 * tests/calc.at: Exercise error messages with eoftoken.
18515 Change the grammar so that empty input is invalid.
18516 Adjust expectations.
18517 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18519 2001-12-27 Akim Demaille <akim@epita.fr>
18521 * configure.in: Check the protos of strchr ans strspn.
18522 Replace strchr if needed.
18523 * src/system.h: Provide the protos of strchr, strspn and memchr if
18525 * lib/strchr.c: New.
18526 * src/reader.c (symbols_save): Use strchr.
18528 2001-12-27 Akim Demaille <akim@epita.fr>
18530 * src/print.c, src/print_graph.c (escape): New.
18531 Use it to quote the TAGS outputs.
18532 * src/print_graph.c (print_state): Now errors are in red, and
18533 reductions in green.
18534 Prefer high to wide: output the state number on a line of its own.
18536 2001-12-27 Akim Demaille <akim@epita.fr>
18538 * src/state.h, src/state.c (reductions_new): New.
18539 * src/LR0.c (set_state_table): Let all the states have a
18540 `reductions', even if reduced to 0.
18541 (save_reductions): Adjust.
18542 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18543 * src/print.c (print_reductions, print_actions): Adjust.
18544 * src/output.c (action_row): Adjust.
18546 2001-12-27 Akim Demaille <akim@epita.fr>
18548 * src/state.h, src/state.c (errs_new, errs_dup): New.
18549 * src/LR0.c (set_state_table): Let all the states have an errs,
18550 even if reduced to 0.
18551 * src/print.c (print_errs, print_reductions): Adjust.
18552 * src/output.c (output_actions, action_row): Adjust.
18553 * src/conflicts.c (resolve_sr_conflict): Adjust.
18555 2001-12-27 Akim Demaille <akim@epita.fr>
18557 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18559 2001-12-27 Akim Demaille <akim@epita.fr>
18561 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18562 * src/print.c: here.
18563 (lookaheadset, shiftset): New, used as additional storage by
18565 (print_results): Adjust.
18566 (print_shifts, print_gotos, print_errs): New, extracted from...
18567 (print_actions): here.
18568 * src/print_graph.c (print_actions): Remove dead code.
18570 2001-12-27 Akim Demaille <akim@epita.fr>
18572 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18575 2001-12-27 Akim Demaille <akim@epita.fr>
18577 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18578 (build_relations): Adjust.
18580 2001-12-27 Akim Demaille <akim@epita.fr>
18582 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18585 2001-12-27 Akim Demaille <akim@epita.fr>
18587 * src/reader.c (packgram): Catch nitems overflows.
18589 2001-12-27 Akim Demaille <akim@epita.fr>
18591 * src/files.c, src/files.h (guard_obstack): Remove.
18592 * src/output.c (output): Adjust.
18593 * src/reader.c (parse_braces): New, factoring...
18594 (copy_action, copy_guard): these two which are renamed as...
18595 (parse_action, parse_guard): these.
18596 As a voluntary consequence, using braces around guards is now
18599 2001-12-27 Akim Demaille <akim@epita.fr>
18601 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18602 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18604 (symbol_list_new): Adjust.
18605 (copy_action): action_line is the first line, not the last.
18606 (copy_guard): Just as for actions, store the `action' only, not
18607 the switch/case/break flesh.
18608 Don't parse the user action that might follow the guard, let...
18609 (readgram): do it, i.e., now, there can be an action after a
18611 In other words the guard is just explicitly optional.
18612 (packgram): Adjust.
18613 * src/output.c (guards_output): New.
18614 (output_parser): Call it when needed.
18615 (output): Also free the guard and attrs obstacks.
18616 * src/files.c, src/files.h (obstack_save): Remove.
18617 (output_files): Remove.
18618 As a result, if one needs the former `.act' file, using an
18619 appropriate skeleton which requires actions and guards is now
18621 * src/main.c (main): Adjust.
18622 * tests/semantic.at: New.
18623 * tests/regression.at: Use `input.y' as input file name.
18624 Avoid 8+3 problems by requiring input.c when the test needs the
18627 2001-12-27 Akim Demaille <akim@epita.fr>
18629 * src/reader.c (symbol_list_new): Be sure to initialize all the
18632 2001-12-27 Akim Demaille <akim@epita.fr>
18634 All the hacks using a final pseudo state are now useless.
18636 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18637 * src/lalr.c (nLA): New.
18638 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18639 instead of lookaheadsp from the pseudo state (nstate + 1).
18641 2001-12-27 Akim Demaille <akim@epita.fr>
18643 * src/output.c (action_row, token_actions): Use a state_t instead
18644 of a integer, and nlookaheads instead of the following state's
18647 2001-12-27 Akim Demaille <akim@epita.fr>
18649 * src/conflicts.c (log_resolution, flush_shift)
18650 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18651 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18652 (conflicts_print, print_reductions): Use a state_t instead of an
18653 integer when referring to a state.
18654 As much as possible, depend upon nlookaheads, instead of the
18655 `lookaheadsp' member of the following state (since lookaheads of
18656 successive states are successive, the difference between state n + 1
18657 and n served as the number of lookaheads for state n).
18658 * src/lalr.c (add_lookback_edge): Likewise.
18659 * src/print.c (print_core, print_actions, print_state)
18660 (print_results): Likewise.
18661 * src/print_graph.c (print_core, print_actions, print_state)
18662 (print_graph): Likewise.
18663 * src/conflicts.h: Adjust.
18665 2001-12-27 Akim Demaille <akim@epita.fr>
18667 * src/bison.hairy: Formatting/comment changes.
18669 Remove `register' indications.
18670 Add plenty of `static'.
18672 2001-12-27 Akim Demaille <akim@epita.fr>
18674 * src/output.c (prepare): Drop the muscle `ntbase' which
18675 duplicates ntokens.
18676 * src/bison.simple: Formatting/comment changes.
18677 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18678 is an undocumented synonym.
18680 2001-12-22 Akim Demaille <akim@epita.fr>
18682 * src/output.c (output_table_data): Change the prototype to use
18683 `int' for array ranges: some invocations do pass an int, not a
18685 Reported by Wayne Green.
18687 2001-12-22 Akim Demaille <akim@epita.fr>
18689 Some actions of web2c.y are improperly triggered.
18690 Reported by Mike Castle.
18692 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18693 * tests/regression.at (Web2c): Rename as...
18694 (Web2c Report): this.
18695 (Web2c Actions): New.
18697 2001-12-22 Akim Demaille <akim@epita.fr>
18699 Reductions in web2c.y are improperly reported.
18700 Reported by Mike Castle.
18702 * src/conflicts.c (print_reductions): Fix.
18703 * tests/regression.at (Web2c): New.
18705 2001-12-18 Akim Demaille <akim@epita.fr>
18707 Some host fail on `assert (!"foo")', which expands to
18708 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18709 Reported by Nelson Beebee.
18711 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18712 `#define it_succeeded 0' and `assert (it_succeeded)'.
18714 2001-12-17 Marc Autret <autret_m@epita.fr>
18716 * src/bison.simple: Don't hard code the skeleton line and filename.
18717 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18718 New line counter 'skeleton_line' (skeleton-line muscle).
18720 2001-12-17 Paul Eggert <eggert@twinsun.com>
18722 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18723 YYDEBUG must be defined to a nonzero value.
18725 * src/bison.simple (yytname): Do not assume that the user defines
18726 YYDEBUG to a properly parenthesized expression.
18728 2001-12-17 Akim Demaille <akim@epita.fr>
18730 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18731 nlookaheads is a new member.
18733 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18734 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18737 2001-12-17 Akim Demaille <akim@epita.fr>
18739 * src/files.h, src/files.c (open_files, close_files): Remove.
18740 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18742 * src/reader.c (reader): Do it.
18744 2001-12-17 Akim Demaille <akim@epita.fr>
18746 * src/conflicts.c (print_reductions): Formatting changes.
18748 2001-12-17 Akim Demaille <akim@epita.fr>
18750 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18751 (flush_reduce): New.
18752 (resolve_sr_conflict): Adjust.
18754 2001-12-17 Akim Demaille <akim@epita.fr>
18756 * src/output.c (output_obstack): Be static and rename as...
18757 (format_obstack): this, to avoid any confusion with files.c's
18759 * src/reader.h (muscle_obstack): Move to...
18760 * src/output.h: here, since it's defined in output.c.
18762 2001-12-17 Akim Demaille <akim@epita.fr>
18764 * src/output.c (action_row, save_column, default_goto)
18765 (sort_actions, matching_state, pack_vector): Better variable
18768 2001-12-17 Akim Demaille <akim@epita.fr>
18770 * src/output.c: Various formatting changes.
18772 2001-12-17 Akim Demaille <akim@epita.fr>
18774 * src/files.c (output_files): Free the output_obstack.
18775 * src/main.c (main): Call print and print_graph conditionally.
18776 * src/print.c (print): Work unconditionally.
18777 * src/print_graph.c (print_graph): Work unconditionally.
18778 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18780 2001-12-16 Marc Autret <autret_m@epita.fr>
18782 * src/output.c (actions_output): Fix. When we use %no-lines,
18783 there is one less line per action.
18785 2001-12-16 Marc Autret <autret_m@epita.fr>
18787 * src/bison.simple: Remove a useless #line directive.
18788 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18789 * src/output.c (get_lines_number): New.
18790 (output_parser): Adjust, now takes care about the lines of a
18792 Fix line numbering.
18793 (actions_output): Computes the number of lines taken by actions.
18794 (output_master_parser): Insert new skeleton which is the name of
18795 the output parser file name.
18797 2001-12-15 Marc Autret <autret_m@epita.fr>
18799 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18801 2001-12-15 Marc Autret <autret_m@epita.fr>
18803 * src/output.c (output_gram): Keep track of the hairy one.
18805 2001-12-15 Akim Demaille <akim@epita.fr>
18807 Make `make distcheck' work.
18809 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18810 system.h which uses libgettext.h.
18812 2001-12-15 Akim Demaille <akim@epita.fr>
18814 * src/nullable.c (set_nullable): Useless rules must be skipped,
18815 otherwise, since we range over their symbols, we might look at a
18816 nonterminal which no longer ``exists'', i.e., it is not counted in
18817 `nvars', hence we overflow our arrays.
18819 2001-12-15 Akim Demaille <akim@epita.fr>
18821 The header can also be produced directly, without any obstack!
18824 * src/files.c, src/files.h (defines_obstack): Remove.
18825 (compute_header_macro): Global.
18826 (defines_obstack_save): Remove.
18827 * src/reader.c (parse_union_decl): No longer output to
18828 defines_obstack: its content can be found in the `stype' muscle
18830 (output_token_translations): Merge into...
18831 (symbols_output): this.
18833 (symbols_save): this.
18835 * src/output.c (header_output): New.
18838 2001-12-15 Akim Demaille <akim@epita.fr>
18840 * src/reader.c (parse_union_decl): Instead of handling two obstack
18841 simultaneously, use one to define the `stype' muscle, and use the
18842 value of the latter to fill defines_obstack.
18843 (copy_comment): Remove.
18844 (copy_comment2): Work for a single obstack.
18846 (copy_comment): this.
18848 2001-12-15 Akim Demaille <akim@epita.fr>
18850 * src/lex.c, src/lex.h (xgetc): No longer static.
18851 * src/reader.c (parse_union_decl): Revamp.
18853 2001-12-15 Akim Demaille <akim@epita.fr>
18855 Still making progress in separating Bison into (i) input, (ii)
18856 process, (iii) output: now we can directly output the parser file
18857 without using table_obstack at all.
18859 * src/files.c, src/files.h (table_obstack): Bye bye.
18860 (parser_file_name): New.
18861 * src/files.c (compute_output_file_names): Compute it.
18862 * src/output.c (actions_output, output_parser)
18863 (output_master_parser): To a file instead of an obstack.
18865 2001-12-15 Akim Demaille <akim@epita.fr>
18867 Attach actions to rules, instead of pre-outputting them to
18870 * src/gram.h (rule_t): action and action_line are new members.
18871 * src/reader.c (symbol_list): Likewise.
18872 (copy_action): Save the actions within the rule.
18873 (packgram): Save them in rule_table.
18874 * src/output.c (actions_output): New.
18875 (output_parser): Use it on `%%actions'.
18876 (output_rule_data): Don't free rule_table.
18878 (prepare): Don't save the `action' muscle.
18879 * src/bison.simple: s/%%action/%%actions/.
18881 2001-12-15 Akim Demaille <akim@epita.fr>
18883 * src/reader.c (copy_action): When --yacc, don't append a `;'
18884 to the user action: let it fail if lacking.
18885 Suggested by Arnold Robbins and Tom Tromey.
18887 2001-12-14 Akim Demaille <akim@epita.fr>
18889 * src/lex.c (literalchar): Simply return the char you decoded, non
18890 longer mess around with obstacks and int pointers.
18891 Adjust all callers.
18893 2001-12-14 Akim Demaille <akim@epita.fr>
18895 * src/lex.c (literalchar): Don't escape the special characters,
18896 just decode them, and keep them as char (before, eol was output as
18897 the 2 char string `\n' etc.).
18898 * src/output.c (output_rule_data): Use quotearg to output the
18901 2001-12-13 Paul Eggert <eggert@twinsun.com>
18903 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18904 Do not infringe on the global user namespace when using C++.
18905 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18906 All uses of `fprintf' and `stderr' changed.
18908 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18910 2001-12-13 Akim Demaille <akim@epita.fr>
18912 The computation of nullable is broken: it doesn't handle empty
18915 * tests/torture.at (GNU AWK Grammar): New.
18916 * tests/sets.at (Nullable): New.
18917 * src/nullable.c (set_nullable): Instead of blindly looping over
18918 `ritems', loop over the rules, and then over their rhs's.
18920 Work around Autotest bugs.
18922 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18923 frame, because Autotest understand lines starting with a `+' as
18924 traces from the shell. Then, they are not processed properly.
18925 Admittedly an Autotest bug, but we don't have time to wait for
18926 Autotest to catch up.
18927 * tests/regression.at (Broken Closure): Adjust to the new table
18930 * tests/sets.at: here.
18932 2001-12-13 Akim Demaille <akim@epita.fr>
18934 * src/closure.c (closure): Use nrules instead of playing tricks
18935 with BITS_PER_WORD.
18937 2001-12-13 Akim Demaille <akim@epita.fr>
18939 * src/print.c (print_actions): Output the handling of `$' as the
18940 traces do: shifting the token EOF. Before EOF was treated as a
18942 * tests/regression.at: Adjust some tests.
18943 * src/print_graph.c (print_core): Complete the set of items via
18944 closure. The next-to-final and final states are still unsatisfying,
18945 but that's to be addressed elsewhere.
18946 No longer output the rule numbers, but do output the state number.
18947 A single loop for the shifts + gotos is enough, but picked a
18948 distinct color for each.
18949 (print_graph): Initialize and finalize closure.
18951 2001-12-13 Akim Demaille <akim@epita.fr>
18953 * src/reader.c (readgram): Remove dead code, an strip useless
18955 (get_type): Remove, unused.
18957 2001-12-12 Akim Demaille <akim@epita.fr>
18959 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18960 on that of lib/error.c.
18962 2001-12-12 Akim Demaille <akim@epita.fr>
18964 Some hosts don't like `/' in includes.
18966 * src/system.h: Include libgettext.h without qualifying the path.
18967 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18970 2001-12-11 Marc Autret <autret_m@epita.fr>
18972 * src/output.c (output_parser): Remove useless muscle.
18974 2001-12-11 Marc Autret <autret_m@epita.fr>
18976 * src/bison.simple: Remove #line just before %%epilogue. It
18977 is now handled in ...
18978 * src/reader.c (read_additionnal_code): Add the output of a
18979 #line for the epilogue.
18981 2001-12-10 Marc Autret <autret_m@epita.fr>
18983 * src/reader.c (copy_definition): Re-use CPP-outed code which
18984 replace precedent remove.
18985 * src/bison.simple: Remove #line before %%prologue because
18986 %%input-line is wrong at this time.
18988 2001-12-10 Marc Autret <autret_m@epita.fr>
18990 * src/reader.c (symbols_output): Clean up.
18991 * src/output.c (output_gram, output): Clean up.
18993 2001-12-10 Akim Demaille <akim@epita.fr>
18995 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18996 * src/LR0.c (set_state_table): here.
18997 * src/lalr.c (lalr): Call it.
18999 2001-12-10 Akim Demaille <akim@epita.fr>
19001 * src/state.h (shifts): Remove the `number' member: shifts are
19002 attached to state, hence no longer need to be labelled with a
19005 2001-12-10 Akim Demaille <akim@epita.fr>
19007 Now that states have a complete set of members, the linked list of
19008 shifts is useless: just fill directly the state's shifts member.
19010 * src/state.h (shifts): Remove the `next' member.
19011 * src/LR0.c (first_state, last_state): Remove.
19012 Adjust the callers.
19013 (augment_automaton): Don't look for the shifts that must be added
19014 a shift on EOF: it is those of the state we looked for! But now,
19015 since shifts are attached, it is no longer needed to looking
19016 merely by its id: its number.
19018 2001-12-10 Akim Demaille <akim@epita.fr>
19020 * src/LR0.c (augment_automaton): Better variable locality.
19021 Remove an impossible branch: if there is a state corresponding to
19022 the start symbol being shifted, then there is shift for the start
19023 symbol from the initial state.
19025 2001-12-10 Akim Demaille <akim@epita.fr>
19027 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19028 only when appropriate: when insert_start_shifting_state' is not
19030 * tests/regression.at (Rule Line Numbers): Adjust.
19032 2001-12-10 Akim Demaille <akim@epita.fr>
19034 * src/LR0.c (augment_automaton): Now that all states have shifts,
19035 merge the two cases addition shifts to the initial state.
19037 2001-12-10 Akim Demaille <akim@epita.fr>
19039 * src/lalr.c (set_state_table): Move to...
19041 * src/lalr.c (lalr): Don't call it...
19042 * src/LR0.c (generate_states): do it.
19043 * src/LR0.h (first_state): Remove, only the table is used.
19045 2001-12-10 Akim Demaille <akim@epita.fr>
19047 * src/LR0.h (first_shift, first_reduction): Remove.
19048 * src/lalr.c: Don't use first_shift: find shifts through the
19051 2001-12-10 Akim Demaille <akim@epita.fr>
19053 * src/LR0.c: Attach shifts to states as soon as they are
19055 * src/lalr.c (set_state_table): Instead of assigning shifts to
19056 state, just assert that the mapping was properly done.
19058 2001-12-10 Akim Demaille <akim@epita.fr>
19060 * src/LR0.c (insert_start_shift): Rename as...
19061 (insert_start_shifting_state): this.
19062 (insert_eof_shifting_state, insert_accepting_state): New.
19063 (augment_automaton): Adjust.
19064 Better locality of the variables.
19065 When looking if the start_symbol is shifted from the initial
19066 state, using `while (... symbol != start_symbol ...)' sounds
19067 better than `while (... symbol < start_symbol ...)': If fail
19068 to see how the order between symbols could be relevant!
19070 2001-12-10 Akim Demaille <akim@epita.fr>
19072 * src/getargs.h: Don't declare `spec_name_prefix' and
19073 `spec_file_prefix', declared by src/files.h.
19074 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19075 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19076 * src/output.c (prepare): Adjust.
19077 * src/reader.c (symbols_output): Likewise.
19078 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19080 2001-12-10 Akim Demaille <akim@epita.fr>
19082 * src/muscle_tab.c (muscle_init): NULL is a better default than
19085 2001-12-10 Akim Demaille <akim@epita.fr>
19087 * src/reader.c (reader): Calling symbols_output once is enough.
19089 2001-12-10 Akim Demaille <akim@epita.fr>
19091 Now that states have a complete set of members, the linked list of
19092 reductions is useless: just fill directly the state's reductions
19095 * src/state.h (struct reductions): Remove member `number' and
19097 * src/LR0.c (first_reduction, last_reduction): Remove.
19098 (save_reductions): Don't link the new reductions, store them in
19100 * src/lalr.c (set_state_table): No need to attach reductions to
19101 states, it's already done.
19102 * src/output.c (output_actions): No longer free the shifts, then
19103 the reductions, then the states: free all the states and their
19106 2001-12-10 Akim Demaille <akim@epita.fr>
19108 * src/options.c (OPTN, DRTV, BOTH): New.
19109 (option_table): Use them.
19111 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19112 the job of system.h.
19113 * src/options.c: Don't include stdio.h and xalloc.h for the same
19116 2001-12-10 Akim Demaille <akim@epita.fr>
19118 * src/output.c (output, prepare): Make sure the values of the
19119 muscles `action' and `prologue' are 0-terminated.
19121 2001-12-10 Akim Demaille <akim@epita.fr>
19123 Clean up GCC warnings.
19125 * src/reader.c (copy_action): `buf' is not used.
19126 (parse_skel_decl): Be static.
19127 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19128 * src/options.h (create_long_option_table): Have a real prototype.
19129 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19130 (hash_delete_at): Return const void *.
19131 Adjust casts to preserve the const.
19133 2001-12-10 Akim Demaille <akim@epita.fr>
19135 * configure.in: Require 2.52g.
19136 M4 is not needed, but AUTOM4TE is.
19137 * m4/m4.m4: Remove.
19138 * tests/Makefile.am: Adjust.
19140 2001-12-10 Akim Demaille <akim@epita.fr>
19142 One structure for states is enough, even though theoretically
19143 there are LR(0) states and LALR(1) states.
19145 * src/lalr.h (state_t): Remove.
19146 (state_table): Be state_t **, not state_t *.
19147 * src/state.h (core, CORE_ALLOC): Rename as...
19148 (state_t, STATE_ALLOC): this.
19149 Add the LALR(1) members: shifts, reductions, errs.
19150 * src/LR0.c (state_table): Rename as...
19151 (state_hash): this, to avoid name clashes with the global
19153 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19154 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19156 2001-12-10 Akim Demaille <akim@epita.fr>
19158 Bison dumps core on bash.y.
19159 Reported by Pascal Bart.
19161 * src/warshall.c (bitmatrix_print): New.
19163 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19164 j must be the outer loop.
19165 * tests/regression.at (Broken Closure): New.
19167 2001-12-05 Akim Demaille <akim@epita.fr>
19169 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19171 Reported by Peter Hamorsky.
19173 2001-12-05 Akim Demaille <akim@epita.fr>
19175 * src/conflicts.c (err_table): Remove.
19176 (resolve_sr_conflict): Adjust.
19177 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19179 (state_t.reductions, state_t.shifts): this.
19181 2001-12-05 Akim Demaille <akim@epita.fr>
19183 * src/reduce.c (reduce_grammar_tables): No longer disable the
19184 removal of useless rules via CPP but via `if (0)', so that the
19185 compiler still check the code is valid.
19186 For instance, it should have noticed `rline' no longer exists: use
19187 the `line' member of rule_t.
19188 * src/gram.c (dummy, rline): Remove, unused.
19190 2001-12-05 Akim Demaille <akim@epita.fr>
19192 * src/output.c (pack_vector): Use assert, not berror.
19193 * src/main.c (berror): Remove, unused.
19195 2001-12-05 Akim Demaille <akim@epita.fr>
19197 New experimental feature: if --verbose --trace output all the
19198 items of a state, not only its kernel.
19200 * src/print.c (print_core): If `trace_flag', then invoke closure
19201 before outputting the items of the state (print_core is no longer
19202 a correct name them).
19203 (print_results): Invoke new_closure/free_closure if needed.
19205 2001-12-05 Akim Demaille <akim@epita.fr>
19207 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19208 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19209 (nitemset): for consistency with the rest of the project.
19211 2001-12-05 Akim Demaille <akim@epita.fr>
19213 * src/closure.c (print_closure): Improve.
19214 (closure): Use it for printing input and output.
19216 2001-12-05 Akim Demaille <akim@epita.fr>
19218 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19219 indexed by nonterminals.
19221 2001-12-05 Akim Demaille <akim@epita.fr>
19223 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19225 * src/warshall.h: Remove accidental duplication of the content.
19227 2001-12-05 Akim Demaille <akim@epita.fr>
19229 * src/closure.c (set_fderives): De-obfuscate.
19231 2001-12-05 Akim Demaille <akim@epita.fr>
19233 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19235 2001-12-05 Akim Demaille <akim@epita.fr>
19237 * src/closure.c (set_firsts): De-obfuscate.
19239 2001-12-05 Akim Demaille <akim@epita.fr>
19241 * src/output.c (action_row): De-obfuscate
19242 using the good o' techniques: arrays not pointers, variable
19243 locality, BITISSET, RESETBIT etc.
19245 2001-12-05 Akim Demaille <akim@epita.fr>
19247 Pessimize the code to simplify it: from now on, all the states
19248 have a valid SHIFTS, which NSHIFTS is possibly 0.
19250 * src/LR0.c (shifts_new): Be global and move to..
19251 * src/state.c, src/state.h: here.
19252 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19253 * src/print_graph: Adjust.
19255 2001-12-05 Akim Demaille <akim@epita.fr>
19257 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19258 * src/conflicts.c: Use it.
19259 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19260 incorrectly ``simplified''.
19262 2001-12-05 Akim Demaille <akim@epita.fr>
19264 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19265 using the good o' techniques: arrays not pointers, variable
19266 locality, BITISSET, RESETBIT etc.
19268 2001-12-05 Akim Demaille <akim@epita.fr>
19270 * src/state.h (SHIFT_SYMBOL): New.
19271 * src/conflicts.c: Use it to deobfuscate.
19273 2001-12-05 Akim Demaille <akim@epita.fr>
19275 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19276 (print_reductions): De-obfuscate using the good o' techniques:
19277 arrays not pointers, variable locality, BITISSET.
19279 2001-12-05 Akim Demaille <akim@epita.fr>
19281 * src/conflicts.c (print_reductions): Arrays, not pointers.
19284 2001-12-05 Akim Demaille <akim@epita.fr>
19286 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19288 2001-12-05 Akim Demaille <akim@epita.fr>
19290 * src/conflicts.c (print_reductions): Improve variable locality.
19292 2001-12-05 Akim Demaille <akim@epita.fr>
19294 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19296 2001-12-05 Akim Demaille <akim@epita.fr>
19298 * src/conflicts.c (print_reductions): Improve variable locality.
19300 2001-12-05 Akim Demaille <akim@epita.fr>
19302 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19303 * src/lalr.c: Use them.
19305 2001-12-05 Akim Demaille <akim@epita.fr>
19307 * src/LR0.c (augment_automaton): Formatting changes.
19308 Better variable locality.
19310 2001-12-05 Akim Demaille <akim@epita.fr>
19312 * src/lalr.c (matrix_print): New.
19313 (transpose): Use it.
19314 Use arrays instead of pointers.
19316 2001-12-05 Akim Demaille <akim@epita.fr>
19318 * src/lalr.c (maxrhs): Move to...
19319 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19320 * src/lalr.c (build_relations): Adjust.
19322 2001-12-05 Akim Demaille <akim@epita.fr>
19324 * src/lalr.c (transpose): Free the memory allocated to the
19325 argument, as it is replaced by the results by the unique caller.
19326 (build_relations): Merely invoke transpose: it handles the memory
19328 Improve variable locality.
19329 Avoid variables used as mere abbreviations.
19330 (compute_lookaheads): Use arrays instead of pointers.
19332 2001-12-05 Akim Demaille <akim@epita.fr>
19334 * src/lalr.c (initialize_F): Improve variable locality.
19335 Avoid variables used as mere abbreviations.
19337 2001-12-05 Akim Demaille <akim@epita.fr>
19339 * src/derives.c (print_derives): Display the ruleno.
19340 * src/lalr.c (initialize_F, transpose): Better variable locality
19341 to improve readability.
19342 Avoid variables used as mere abbreviations.
19344 2001-12-05 Akim Demaille <akim@epita.fr>
19346 * src/lalr.c (traverse): Use arrays instead of pointers.
19348 2001-12-05 Akim Demaille <akim@epita.fr>
19350 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19351 the handling of squeue.
19352 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19354 2001-12-05 Akim Demaille <akim@epita.fr>
19356 Because useless nonterminals are now kept alive (instead of being
19357 `destroyed'), we now sometimes examine them, and store information
19358 related to them. Hence we need to know their number, and adjust
19359 memory allocations.
19361 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19363 * src/LR0.c (allocate_itemsets): The memory allocated to
19364 `symbol_count' was used for two different purpose: once to count
19365 the number of occurrences of each symbol, and later reassigned to
19366 `shift_symbol', containing the symbol that can be shifted from a
19368 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19370 (new_itemsets): Allocate `shift_symbol' here.
19371 (allocate_itemsets): symbol_count includes useless nonterminals.
19372 Make room for them.
19373 (free_storage): Use `free', not `XFREE', for pointers that cannot
19376 2001-12-05 Akim Demaille <akim@epita.fr>
19378 * src/nullable.c (set_nullable): Deobfuscate the handling of
19380 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19382 2001-12-05 Akim Demaille <akim@epita.fr>
19384 * src/gram.c, src/gram.h (ritem_print): New.
19385 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19386 (This useless function was defined only to work around VMS linkers
19387 that can't handle compilation units with variables only).
19388 * src/reduce.c (dump_grammar): Use it to trace the construction of
19391 2001-12-04 Paul Eggert <eggert@twinsun.com>
19393 * src/bison.simple (union yyalloc): Change member names
19394 to be the same as the stack names.
19395 (yyparse): yyptr is now union yyalloc *, not char *.
19396 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19397 and may generate better code on some machines.
19398 (yystpcpy): Use prototype if __STDC__ is defined, not just
19399 if __cplusplus is defined.
19401 2001-11-30 Akim Demaille <akim@epita.fr>
19403 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19404 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19405 Gettext doesn't compile cleanly, and dies with -Werror.
19406 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19407 Include WARNING_CFLAGS here.
19408 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19409 before being defined.
19411 2001-11-27 Paul Eggert <eggert@twinsun.com>
19413 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19414 First arg is int, not unsigned.
19415 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19416 (SIZE_MAX, UINT_MAX): New macros.
19417 (quotearg_n_options): Abort if N is negative.
19418 Avoid overflow check on hosts where size_t is 64 bits and int
19419 is 32 bits, as overflow is impossible there.
19420 Fix off-by-one typo that caused unnecessary reallocation.
19422 2001-11-29 Paul Eggert <eggert@twinsun.com>
19424 Name space cleanup in generated parser.
19426 * doc/bison.texinfo (Bison Parser): Discuss system headers
19427 and their effect on the user name space.
19429 * src/bison.simple:
19430 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19431 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19432 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19434 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19435 on user names when possible.
19437 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19438 Simplify test for whather <alloca.h> exists.
19440 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19442 (<stdio.h>): Include if YYDEBUG.
19444 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19445 ! defined (yyoverflow) && ! defined (yymemcpy).
19447 (yymemcpy, yyparse): Rename local variables as needed so that
19448 they all begin with 'yy'.
19450 (yystrlen, yystpcpy): New functions.
19452 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19455 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19456 instead of relying on string.h functions. Use YYSTACK_ALLOC
19457 and YYSTACK_FREE instead of malloc and free.
19459 2001-11-30 Akim Demaille <akim@epita.fr>
19461 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19462 before their first uses.
19463 (YYBISON, YYPURE): Move to the top of the output.
19465 2001-11-30 Akim Demaille <akim@epita.fr>
19467 * tests/reduce.at (Useless Nonterminals): Fix.
19469 2001-11-30 Akim Demaille <akim@epita.fr>
19471 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19472 if body instead of `;' to pacify GCC's warnings.
19474 2001-11-30 Akim Demaille <akim@epita.fr>
19476 Instead of mapping the LHS of unused rules to -1, keep the LHS
19477 valid, but flag the rules as invalid.
19479 * src/gram.h (rule_t): `useful' is a new member.
19480 * src/print.c (print_grammar): Adjust.
19481 * src/derives.c (set_derives): Likewise.
19482 * src/reader.c (packgram, reduce_output): Likewise.
19483 * src/reduce.c (reduce_grammar_tables): Likewise.
19484 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19486 2001-11-30 Akim Demaille <akim@epita.fr>
19488 * src/reduce.c (reduce_output): Formatting changes.
19489 * src/print.c (print_results, print_grammar): Likewise.
19490 * tests/regression.at (Rule Line Numbers)
19491 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19493 2001-11-30 Akim Demaille <akim@epita.fr>
19495 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19496 useless nonterminals, move them at the end of the symbol arrays.
19497 (reduce_output): Adjust.
19498 * tests/reduce.at (Useless Nonterminals): Adjust.
19500 2001-11-30 Akim Demaille <akim@epita.fr>
19502 * src/reduce.c: Various comment/formatting changes.
19503 (nonterminals_reduce): New, extracted from...
19504 (reduce_grammar_tables): here.
19505 (reduce_grammar): Call nonterminals_reduce.
19507 2001-11-29 Paul Eggert <eggert@twinsun.com>
19509 * src/bison.simple (YYSTACK_REALLOC): Remove.
19510 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19511 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19513 (union yyalloc): New type.
19514 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19515 an arbitrary restriction on hosts where size_t is wider than int.
19517 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19518 a parser stack overflow. Allocate just one block of memory for all
19519 three stacks, instead of allocating three blocks; this typically is
19520 faster and reduces fragmentation.
19522 Do not limit the number of items in the stack to a value that fits
19523 in 'int', as this is an arbitrary limit on hosts with 64-bit
19524 size_t and 32-bit int.
19526 2001-11-29 Marc Autret <autret_m@epita.fr>
19528 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19529 of defining YYERROR_VERBOSE.
19530 [AT_DATA]: $4 is now out of C declarations in the prologue.
19532 2001-11-28 Marc Autret <autret_m@epita.fr>
19534 * src/reader.c (parse_dquoted_param): New.
19535 (parse_skel_decl): Use it.
19536 * src/lex.h: Add its prototype.
19537 * src/lex.c (literalchar): Become not static.
19539 2001-11-28 Marc Autret <autret_m@epita.fr>
19541 * src/output.h: And put its extern declaration here.
19542 * src/output.c (error_verbose): Define here.
19543 (prepare): Echo name modification.
19544 * src/getargs.h: Clean its extern declaration.
19545 * src/getargs.c (error_verbose_flag): Remove.
19546 (getargs): Remove case 'e'.
19547 * src/options.c (option_table): 'error-verbose' is now seen as simple
19551 * src/reader.c (read_declarations): Remove case tok_include.
19552 (parse_include_decl): Remove.
19553 * src/lex.h (token_t): Remove tok_include.
19554 * src/options.c (option_table): 'include' is now a simple command line
19557 2001-11-28 Marc Autret <autret_m@epita.fr>
19559 * src/bison.simple: Adjust muscle names.
19560 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19561 * src/output.c (prepare): s/_/-/ for the muscles names.
19562 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19564 2001-11-28 Marc Autret <autret_m@epita.fr>
19566 * src/bison.simple: Fix debug.
19567 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19569 2001-11-28 Akim Demaille <akim@epita.fr>
19571 * src/LR0.c (shifts_new): New.
19572 (save_shifts, insert_start_shift, augment_automaton): Use it.
19574 2001-11-28 Akim Demaille <akim@epita.fr>
19576 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19579 2001-11-28 Akim Demaille <akim@epita.fr>
19581 * src/closure.c (closure): Instead of looping over word in array
19582 then bits in words, loop over bits in array.
19584 2001-11-28 Akim Demaille <akim@epita.fr>
19586 * src/closure.c (closure): No longer optimize the special case
19587 where all the bits of `ruleset[r]' are set to 0, to make the code
19590 2001-11-28 Akim Demaille <akim@epita.fr>
19592 * src/closure.c (closure): `r' and `c' are new variables, used to
19593 de-obfuscate accesses to RULESET and CORE.
19595 2001-11-28 Akim Demaille <akim@epita.fr>
19597 * src/reduce.c (reduce_print): Use ngettext.
19598 (dump_grammar): Improve the trace accuracy.
19600 2001-11-28 Akim Demaille <akim@epita.fr>
19602 * src/reduce.c (dump_grammar): Don't translate trace messages.
19604 2001-11-28 Akim Demaille <akim@epita.fr>
19606 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19607 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19608 as all tags are free'ed afterwards.
19609 From Enrico Scholz.
19611 2001-11-27 Paul Eggert <eggert@twinsun.com>
19613 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19614 use alloca when we didn't want to, and vice versa.
19616 2001-11-27 Marc Autret <autret_m@epita.fr>
19618 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19620 * src/output.c (prepare): Remove its update.
19622 2001-11-27 Marc Autret <autret_m@epita.fr>
19624 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19625 Use %error-verbose.
19627 2001-11-27 Marc Autret <autret_m@epita.fr>
19629 * src/bison.simple: Remove YYERROR_VERBOSE using.
19630 Use %%error_verbose.
19631 (yyparse): Likewise.
19632 * src/output.c (prepare): Give its final value.
19633 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19634 * src/getargs.h: Add its extern declaration.
19635 * src/getargs.c (error_verbose_flag): New int.
19636 (getargs): Update to catch new case.
19637 * src/options.c (option_table): 'error-verbose' is a new option.
19638 (shortopts): Update.
19640 2001-11-27 Akim Demaille <akim@epita.fr>
19642 * src/system.h: Use intl/libgettext.h.
19643 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19645 2001-11-27 Akim Demaille <akim@epita.fr>
19647 * tests/torture.at (Exploding the Stack Size with Malloc):
19648 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19650 2001-11-27 Akim Demaille <akim@epita.fr>
19652 * src/files.c: Include error.h.
19653 Reported by Hans Aberg.
19655 2001-11-26 Marc Autret <autret_m@epita.fr>
19657 * src/reader.c (parse_include_decl): New, not yet implemented.
19658 (read_declarations): Add case tok_include.
19659 * src/getargs.h (include): Add its extern definition.
19660 * src/getargs.c (include): New const char *.
19661 (getargs): Add case '-I'.
19662 * src/options.c (option_table): Add include as command line and
19664 * src/lex.h (token_t): Add tok_include.
19666 2001-11-26 Akim Demaille <akim@epita.fr>
19668 * src/reader.c (readgram): Make sure rules for mid-rule actions
19669 have a lineno equal to that of their host rule.
19670 Reported by Hans Aberg.
19671 * tests/regression.at (Rule Line Numbers): New.
19673 2001-11-26 Akim Demaille <akim@epita.fr>
19675 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19678 2001-11-26 Akim Demaille <akim@epita.fr>
19680 * src/complain.c, src/complain.h (error): Remove, provided by
19683 2001-11-26 Akim Demaille <akim@epita.fr>
19685 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19686 issue an error message.
19687 * tests/regression.at (Invalid %directive): New.
19688 Reported by Hans Aberg.
19690 2001-11-26 Akim Demaille <akim@epita.fr>
19692 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19693 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19695 2001-11-26 Akim Demaille <akim@epita.fr>
19697 * src/conflicts.c (conflicts_print): Don't complain at all when
19698 there are no reduce/reduce conflicts, and as many shift/reduce
19699 conflicts as expected.
19700 * tests/regression.at (%expect right): Adjust.
19702 2001-11-23 Akim Demaille <akim@epita.fr>
19704 * lib/alloca.c: Update, from fileutils.
19706 2001-11-23 Akim Demaille <akim@epita.fr>
19708 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19710 2001-11-23 Akim Demaille <akim@epita.fr>
19712 * src/system.h: Include alloca.h.
19713 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19715 2001-11-23 Akim Demaille <akim@epita.fr>
19717 * src/print_graph.c (print_actions): Remove `rule', unused.
19718 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19719 pacify GCC's signed < unsigned warnings.
19720 * src/closure.c (itemsetsize): Likewise.
19721 * src/reader.c (symbol_list_new): Static.
19723 2001-11-23 Akim Demaille <akim@epita.fr>
19725 Attaching lineno to buckets is stupid, since only one copy of each
19726 symbol is kept, only the line of the first occurrence is kept too.
19728 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19729 * src/reader.c (rline_allocated): Remove, unused.
19730 (symbol_list): Have a `line' member.
19731 (symbol_list_new): New.
19732 (readgram): Use it.
19733 * src/print.c (print_grammar): Output the rule line numbers.
19734 * tests/regression.at (Solved SR Conflicts)
19735 (Unresolved SR Conflicts): Adjust.
19736 Reported by Hans Aberg.
19738 2001-11-22 Marc Autret <autret_m@epita.fr>
19740 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19742 2001-11-22 Marc Autret <autret_m@epita.fr>
19744 * src/muscle_tab.c (muscle_init): Remove initialization of
19746 * src/output.c (output_master_parser): Do it here.
19748 2001-11-20 Akim Demaille <akim@epita.fr>
19751 * configure.in (ALL_LINGUAS): Adjust.
19752 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19753 longer contains strings to translate.
19755 2001-11-19 Akim Demaille <akim@epita.fr>
19757 * src/conflicts.c (conflicts_print): Add a missing \n.
19759 2001-11-19 Akim Demaille <akim@epita.fr>
19761 * src/nullable.c (nullable_print): New.
19762 (set_nullable): Call it when tracing.
19763 Better locality of variables.
19765 2001-11-19 Akim Demaille <akim@epita.fr>
19767 * src/print.c (print_actions): Better locality of variables.
19769 2001-11-19 Akim Demaille <akim@epita.fr>
19771 * src/derives.c (print_derives): Fix and enrich.
19772 * src/closure.c (print_fderives): Likewise.
19774 2001-11-19 Akim Demaille <akim@epita.fr>
19776 * src/closure.c (itemsetend): Remove, replaced with...
19777 (itemsetsize): new.
19779 2001-11-19 Akim Demaille <akim@epita.fr>
19781 * src/LR0.c (kernel_end): Remove, replaced with...
19782 (kernel_size): new.
19784 2001-11-19 Akim Demaille <akim@epita.fr>
19786 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19789 2001-11-19 Akim Demaille <akim@epita.fr>
19791 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19793 2001-11-19 Akim Demaille <akim@epita.fr>
19795 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19797 * src/LR0.c: Likewise.
19798 (allocate_itemsets): Use arrays instead of pointers to clarify.
19800 2001-11-19 Akim Demaille <akim@epita.fr>
19802 * src/getargs.c (statistics_flag): Replace with...
19804 (longopts): Accept --trace instead of --statistics.
19805 * src/getargs.h, src/options.c: Adjust.
19806 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19807 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19809 2001-11-19 Akim Demaille <akim@epita.fr>
19811 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19812 pointers to clarify the code.
19813 (save_reductions, save_shifts): Factor common parts of alternatives.
19815 2001-11-19 Akim Demaille <akim@epita.fr>
19817 * src/LR0.c (new_state, get_state): Complete TRACE code.
19818 * src/closure.c: Include `reader.h' to get `tags', needed by the
19820 Rename the conditional DEBUG as TRACE.
19821 Output consistently TRACEs to stderr, not stdout.
19822 * src/derives.c: Likewise.
19823 * src/reduce.c: (inaccessable_symbols): Using if is better style
19825 Use `#if TRACE' instead of `#if 0' for tracing code.
19827 2001-11-19 Akim Demaille <akim@epita.fr>
19829 * src/system.h (LIST_FREE, shortcpy): New.
19830 * src/LR0.c: Use them.
19831 * src/output.c (free_itemsets, free_reductions, free_shifts):
19832 Remove, replaced by LIST_FREE.
19834 2001-11-19 Akim Demaille <akim@epita.fr>
19836 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19837 (REDUCTIONS_ALLOC): New.
19838 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19841 2001-11-19 Akim Demaille <akim@epita.fr>
19843 * src/LR0.c (new_state): Complete trace code.
19844 * src/nullable.c (set_nullable): Don't translate traces.
19846 2001-11-19 Akim Demaille <akim@epita.fr>
19848 * src/print_graph.c (print_core): Better locality of variables.
19849 * src/print.c (print_core): Likewise.
19851 2001-11-19 Akim Demaille <akim@epita.fr>
19853 * src/vcg.c: You do the output, so you are responsible of the
19854 handling of VCG syntax, in particular: use quotearg.
19855 * src/print_graph.c: Don't.
19856 (print_actions): Don't output the actions as part of the nodes,
19857 since that's the job of the edges.
19858 (print_state): Don't output by hand: fill the node description,
19859 and ask for its output.
19861 2001-11-19 Akim Demaille <akim@epita.fr>
19863 * src/bison.simple (yyparse): When verbosely reporting an error,
19864 no longer put additional quotes around token names.
19865 * tests/calc.at: Adjust.
19867 2001-11-19 Akim Demaille <akim@epita.fr>
19869 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19870 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19871 * src/output.c: Adjust.
19873 2001-11-19 Akim Demaille <akim@epita.fr>
19875 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19877 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19879 2001-11-19 Akim Demaille <akim@epita.fr>
19881 * src/gram.h (rule_t): New.
19883 (rrhs, rlhs): Remove, part of state_t.
19884 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19885 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19886 * src/reader.c, src/reduce.c: Adjust.
19888 2001-11-19 Akim Demaille <akim@epita.fr>
19890 * src/reader.c (symbols_output): New, extracted from...
19891 (packsymbols): Here.
19894 2001-11-19 Akim Demaille <akim@epita.fr>
19896 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19897 (maxrhs): this new function.
19899 2001-11-19 Akim Demaille <akim@epita.fr>
19901 * src/lalr.c (F): New macro to access the variable F.
19904 2001-11-19 Akim Demaille <akim@epita.fr>
19906 * src/lalr.h (LA): New macro to access the variable LA.
19907 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19908 * src/lalr.c: Adjust.
19910 2001-11-19 Akim Demaille <akim@epita.fr>
19912 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19913 (set_state_table): handle the `lookaheads' members.
19915 2001-11-19 Akim Demaille <akim@epita.fr>
19917 * src/lalr.h (lookaheads): Removed array, whose contents is now
19919 (state_t): this structure.
19920 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19923 2001-11-19 Akim Demaille <akim@epita.fr>
19925 * src/lalr.h (consistent): Removed array, whose contents is now
19927 (state_t): this structure.
19928 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19931 2001-11-19 Akim Demaille <akim@epita.fr>
19933 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19934 contents are now members of...
19935 (state_t): this structure.
19936 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19939 2001-11-19 Akim Demaille <akim@epita.fr>
19941 * src/lalr.h (state_t): New.
19942 (state_table): Be a state_t * instead of a core **.
19943 (accessing_symbol): Remove, part of state_t.
19944 * src/lalr.c: Adjust.
19945 (set_accessing_symbol): Merge into...
19946 (set_state_table): this.
19947 * src/print_graph.c, src/conflicts.c: Adjust.
19949 2001-11-14 Akim Demaille <akim@epita.fr>
19951 * tests/calc.at, tests/output.at, tests/regression.at,
19952 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19953 now the tests are run in private dirs, therefore AC_CLEANUP and
19954 family can be simplified to 0-ary.
19955 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19956 use abs. path to find config.h.
19957 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19958 stderr, there can be way too much random noise.
19959 Instead pass -Werror to GCC and rely on the exit status.
19960 Reported by Wolfram Wagner.
19962 2001-11-14 Akim Demaille <akim@epita.fr>
19964 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19965 defined only if yyoverflow is defined, to avoid `warning: unused
19967 Reported by The Test Suite.
19969 2001-11-14 Akim Demaille <akim@epita.fr>
19971 * src/print.c: Include reduce.h.
19972 Reported by Hans Aberg.
19974 2001-11-14 Akim Demaille <akim@epita.fr>
19976 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19977 Revert a previous patch: these are really const.
19978 * src/conflicts.c (conflict_report): Additional useless pair of
19979 braces to pacify GCC's warnings for `if () if () {} else {}'.
19980 * src/lex.c (parse_percent_token): Replace equal_offset with
19983 Be sure to strdup `arg' when used, since there is no reason for
19984 token_buffer not to change.
19986 2001-11-14 Akim Demaille <akim@epita.fr>
19988 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19990 * src/main.c (main): Use them.
19991 Suggested by Hans Aberg.
19993 2001-11-12 Akim Demaille <akim@epita.fr>
19995 * src/system.h (ngettext): Now that we use ngettext, be sure to
19996 provide a default definition when NLS are not used.
19998 2001-11-12 Akim Demaille <akim@epita.fr>
20000 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20001 Use @kbd to denote user input.
20002 (Language and Grammar): ANSIfy the example.
20003 Adjust its layout for info/notinfo.
20004 (Location Tracking Calc): Output error messages to stderr.
20005 Output locations in a more GNUtically correct way.
20006 Fix a couple of Englishos.
20007 Adjust @group/@end group pairs.
20009 2001-11-12 Akim Demaille <akim@epita.fr>
20011 %expect was not functioning at all.
20013 * src/conflicts.c (expected_conflicts): Set to -1.
20014 (conflict_report): Use ngettext.
20015 (conflicts_print): Check %expect and make its violation an error.
20016 * doc/bison.texinfo (Expect Decl): Adjust.
20017 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20018 * tests/regression.at (%expect not enough, %expect right)
20019 (%expect too much): New.
20021 2001-11-12 Akim Demaille <akim@epita.fr>
20023 * tests/regression.at (Conflicts): Rename as...
20024 (Unresolved SR Conflicts): this.
20025 (Solved SR Conflicts): New.
20027 2001-11-12 Akim Demaille <akim@epita.fr>
20029 * src/reduce.c (print_results): Rename as...
20030 (reduce_output): This.
20031 Output to OUT, passed as argument, instead of output_obstack.
20032 (dump_grammar): Likewise.
20033 (reduce_free): New.
20035 (reduce_grammar): No longer call reduce_output, since...
20036 * src/print.c (print_results): do it.
20037 * src/main.c (main): Call reduce_free;
20039 2001-11-12 Akim Demaille <akim@epita.fr>
20041 * src/conflicts.c (print_reductions): Accept OUT as argument.
20042 Output to it, not to output_obstack.
20043 * src/print.c (print_actions): Adjust.
20045 2001-11-12 Akim Demaille <akim@epita.fr>
20047 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20048 the result instead of using...
20049 (src_total, rrc_total, src_count, rrc_count): Remove.
20050 (any_conflicts): Remove.
20051 (print_conflicts): Split into...
20052 (conflicts_print, conflicts_output): New.
20053 * src/conflicts.h: Adjust.
20054 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20055 * src/print.c (print_grammar): Issue `\n' between two rules.
20056 * tests/regression.at (Conflicts): New.
20057 Reported by Tom Lane.
20059 2001-11-12 Akim Demaille <akim@epita.fr>
20061 * tests/regression.at (Invalid input): Remove, duplicate with
20062 ``Invalid input: 1''.
20064 2001-11-12 Akim Demaille <akim@epita.fr>
20066 * tests/torture.at (AT_DATA_STACK_TORTURE)
20067 (Exploding the Stack Size with Alloca)
20068 (Exploding the Stack Size with Malloc): New.
20070 2001-11-12 Akim Demaille <akim@epita.fr>
20072 * src/bison.simple (YYSTACK_REALLOC): New.
20073 (yyparse) [!yyoverflow]: Use it and free the old stack.
20074 Reported by Per Allansson.
20076 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20078 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20079 define CPP macro, which substitute YYSTYPE by yystype.
20080 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20081 with yyltype/YYLTYPE. This allows inclusion of the generated
20082 header within the parser if the compiler, such as GGC, accepts
20083 multiple equivalent #defines.
20086 2001-11-05 Akim Demaille <akim@epita.fr>
20088 * src/reader.c (symbols_output): New, extracted from...
20089 (packsymbols): here.
20092 2001-11-05 Akim Demaille <akim@epita.fr>
20094 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20096 2001-11-05 Akim Demaille <akim@epita.fr>
20098 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20101 2001-11-05 Akim Demaille <akim@epita.fr>
20103 * src/options.h (struct option_table_struct): set_flags is void*.
20104 * src/options.c (longopts): Support `--output' and `%output'.
20106 * src/lex.h (tok_setopt): Remove, replaced with...
20107 (tok_intopt, tok_stropt): these new guys.
20108 * src/lex.c (getopt.h): Not needed.
20109 (token_buffer, unlexed_token_buffer): Not const.
20110 (percent_table): Promote `-' over `_' in directive names.
20111 Active `%name-prefix', `file-prefix', and `output'.
20112 (parse_percent_token): Accept possible arguments to directives.
20113 Promote `-' over `_' in directive names.
20115 2001-11-04 Akim Demaille <akim@epita.fr>
20117 * doc/bison.texinfo (Decl Summary): Split the list into
20118 `directives for grammars' and `directives for bison'.
20120 Add description of `%name-prefix', `file-prefix', and `output'.
20121 Promote `-' over `_' in directive names.
20122 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20123 Simplify the description of `--name-prefix'.
20124 Promote `-' over `_' in directive names.
20125 Promote `--output' over `--output-file'.
20126 Fix the description of `--defines'.
20127 * tests/output.at: Exercise %file-prefix and %output.
20129 2001-11-02 Akim Demaille <akim@epita.fr>
20131 * doc/refcard.tex: Update.
20133 2001-11-02 Akim Demaille <akim@epita.fr>
20135 * src/symtab.h (SUNDEF): New.
20136 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20137 stand for `uninitialized', instead of 0.
20138 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20139 * src/lex.c (lex): Adjust.
20141 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20143 Let yylex return it instead of a plain 0.
20144 Reported by Dick Streefland.
20146 2001-11-02 Akim Demaille <akim@epita.fr>
20148 * tests/regression.at (Mixing %token styles): New test.
20150 2001-11-02 Akim Demaille <akim@epita.fr>
20152 * src/reader.c (parse_thong_decl): Formatting changes.
20153 (token_translations_init): New, extracted from...
20154 (packsymbols): Here.
20157 2001-11-01 Akim Demaille <akim@epita.fr>
20159 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20160 Check that `9foo.y' produces correct cpp guards.
20161 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20165 2001-11-01 Akim Demaille <akim@epita.fr>
20167 * tests/regression.at (Invalid input: 2): New.
20168 * src/lex.c (unlexed_token_buffer): New.
20169 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20173 2001-11-01 Akim Demaille <akim@epita.fr>
20175 * tests/calc.at: Catch up with 1.30.
20176 * configure.in: Bump to 1.49a.
20177 Adjust to newer Autotest.
20179 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20181 * src/conflicts.c: Move global variables rrc_total and src_total ...
20182 (print_conflicts): here.
20183 * src/output.c (output): Free global variable user_toknums.
20184 * src/lex.c (token_obstack): Become static.
20186 2001-10-18 Akim Demaille <akim@epita.fr>
20188 * tests/atlocal.in (GCC): Add.
20189 * tests/calc.at: s/m4_match/m4_bmatch/.
20190 s/m4_patsubst/m4_bpatsubst/.
20191 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20192 * configure.in: AC_SUBST(GCC).
20194 2001-10-14 Marc Autret <autret_m@epita.fr>
20196 * src/options.c (create_long_option_table): Fix.
20198 2001-10-10 Akim Demaille <akim@epita.fr>
20200 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20202 2001-10-04 Akim Demaille <akim@epita.fr>
20204 * src/reader.c (parse_union_decl): Push the caracters in
20205 union_obstack, not attrs_obstack.
20207 2001-10-04 Akim Demaille <akim@epita.fr>
20209 Merge in the branch 1.29.
20211 * src/reader.c (packsymbols): Use a temporary obstack for
20212 `%%tokendef', since output_stack is already used elsewhere.
20214 2001-10-02 Akim Demaille <akim@epita.fr>
20218 2001-10-02 Akim Demaille <akim@epita.fr>
20222 2001-10-02 Akim Demaille <akim@epita.fr>
20224 * tests/regression.at (Invalid CPP headers): New.
20225 From Alexander Belopolsky.
20226 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20228 2001-10-02 Akim Demaille <akim@epita.fr>
20230 * tests/regression.at (Invalid input): New.
20231 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20234 2001-10-02 Akim Demaille <akim@epita.fr>
20236 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20238 2001-10-02 Akim Demaille <akim@epita.fr>
20240 * src/output.c (output_parser): Assert `skeleton'.
20241 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20245 2001-10-01 Marc Autret <autret_m@epita.fr>
20247 * src/lex.h: Echo modifications.
20248 * src/lex.c (unlex): Parameter is now token_t.
20251 2001-10-01 Marc Autret <autret_m@epita.fr>
20253 * src/main.c: Include lex.h.
20256 2001-09-29 Akim Demaille <akim@epita.fr>
20258 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20260 2001-09-28 Akim Demaille <akim@epita.fr>
20262 * tests/testsuite.at: Update to newer Autotest.
20263 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20265 2001-09-27 Akim Demaille <akim@epita.fr>
20267 Position independent wrapper.
20269 * tests/bison: Remove.
20270 * tests/bison.in: New.
20271 * configure.in: Adjust.
20273 2001-09-27 Paul Eggert <eggert@twinsun.com>
20275 Port quotearg fixes from tar 1.13.24.
20277 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20279 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20280 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20282 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20283 * m4/mbrtowc.m4: New file.
20284 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20285 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20287 2001-09-27 Akim Demaille <akim@epita.fr>
20291 2001-09-27 Akim Demaille <akim@epita.fr>
20295 2001-09-25 Akim Demaille <akim@epita.fr>
20297 * src/system.h: Include `xalloc.h'.
20298 Remove it from the C files.
20299 * src/files.c (output_files): Free the obstacks.
20300 * src/lex.c (init_lex): Rename as...
20303 * src/main.c (main): Use it.
20305 2001-09-24 Marc Autret <autret_m@epita.fr>
20307 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20308 to output informations in fout (FILE*).
20309 (open_graph, close_graph): Likewise.
20310 (output_graph, output_edge, output_node): Likewise.
20311 * src/vcg.h: Update function prototypes.
20312 * src/print_graph.c (print_graph): Open output graph file.
20313 (print_actions): Adjust.
20314 * src/files.h: Remove extern declaration.
20315 * src/files.c: Remove graph_obstack declaration.
20316 (open_files): Remove graph_obstack initialization.
20317 (output_files): Remove graph_obstack saving.
20319 2001-09-24 Marc Autret <autret_m@epita.fr>
20321 * src/files.c (compute_output_file_names): Fix.
20323 2001-09-24 Marc Autret <autret_m@epita.fr>,
20324 Akim Demaille <akim@epita.fr>
20326 * src/reader.c (reader): Remove call to free_symtab ().
20327 * src/main.c (main): Call it here.
20329 * src/conflicts.c (initialize_conflicts): Rename as...
20330 (solve_conflicts): this.
20331 * src/print.c (print_core, print_actions, print_state)
20332 (print_grammar): Dump to a file instead a `output_obstack'.
20333 (print_results): Dump `output_obstack', and then proceed with the
20335 * src/files.c (compute_output_file_names, close_files): New.
20336 (output_files): Adjust.
20337 * src/main.c (main): Adjust.
20339 2001-09-23 Marc Autret <autret_m@epita.fr>
20341 * src/files.c (compute_header_macro): Computes header macro name
20342 from spec_defines_file when given.
20344 2001-09-23 Marc Autret <autret_m@epita.fr>
20346 * src/files.c (output_files): Add default extensions.
20348 2001-09-22 Akim Demaille <akim@epita.fr>
20350 * src/conflicts.c (finalize_conflicts): Rename as...
20351 (free_conflicts): this.
20353 2001-09-22 Akim Demaille <akim@epita.fr>
20355 * src/gram.c (gram_free): Rename back as...
20357 (output_token_translations): Free `token_translations'.
20358 * src/symtab.c (free_symtab): Free the tag field.
20360 2001-09-22 Akim Demaille <akim@epita.fr>
20362 Remove `translations' as it is always set to true.
20364 * src/gram.h: Adjust.
20365 * src/reader.c (packsymbols, parse_token_decl): Adjust
20366 * src/print.c (print_grammar): Adjust.
20367 * src/output.c (output_token_translations): Adjust.
20368 * src/lex.c (lex): Adjust.
20369 * src/gram.c: Be sure the set pointers to NULL.
20370 (dummy): Rename as...
20373 2001-09-22 Akim Demaille <akim@epita.fr>
20375 * configure.in: Invoke AM_LIB_DMALLOC.
20376 * src/system.h: Use dmalloc.
20377 * src/LR0.c: Be sure to have pointers initialized to NULL.
20378 (allocate_itemsets): Allocate kernel_items only if needed.
20380 2001-09-22 Akim Demaille <akim@epita.fr>
20382 * configure.in: Bump to 1.29b.
20383 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20384 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20385 need xmalloc.c in calc.y.
20388 2001-09-21 Akim Demaille <akim@epita.fr>
20391 * Makefile.maint, config/config.guess, config/config.sub,
20392 * config/missing: Update from masters.
20393 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20395 * configure.in (ALL_LINGUAS): Add `tr'.
20397 2001-09-21 Akim Demaille <akim@epita.fr>
20399 * tests/Makefile.am (package.m4): Move to...
20400 ($(srcdir)/$(TESTSUITE)): here.
20402 2001-09-20 Akim Demaille <akim@epita.fr>
20404 * src/complain.c: No longer try to be standalone: use system.h.
20405 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20406 * src/complain.h: Likewise.
20407 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20408 Remove the unused variable `n'.
20409 From Albert Chin-A-Young.
20411 2001-09-18 Marc Autret <autret_m@epita.fr>
20413 * doc/bison.1: Update.
20414 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20416 (Option Cross Key): Update.
20419 2001-09-18 Marc Autret <autret_m@epita.fr>
20421 * tests/regression.at: New test (comment in %union).
20423 2001-09-18 Marc Autret <autret_m@epita.fr>
20425 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20427 Reported by Keith Browne.
20429 2001-09-18 Marc Autret <autret_m@epita.fr>
20431 * tests/output.at: Add tests for --defines and --graph.
20433 2001-09-18 Marc Autret <autret_m@epita.fr>
20435 * tests/output.at: Removes tests of %{header,src}_extension features.
20437 2001-09-18 Akim Demaille <akim@epita.fr>
20439 * tests/Makefile.am (package.m4): New.
20440 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20441 (_AT_CHECK_CALC_ERROR): Likewise.
20442 Factor the `, ' part of verbose error messages.
20444 2001-09-18 Marc Autret <autret_m@epita.fr>
20446 * src/getargs.c (longopts): Declare --defines and --graph as options
20447 with optional arguments.
20448 * src/files.h: Add extern declarations.
20449 * src/files.c (spec_graph_file, spec_defines_file): New.
20450 (output_files): Update.
20451 Remove CPP-outed code.
20453 2001-09-18 Marc Autret <autret_m@epita.fr>
20455 Turn off %{source,header}_extension feature.
20457 * src/files.c (compute_exts_from_gf): Update.
20458 (compute_exts_from_src): Update.
20459 (output_files): CPP-out useless code.
20460 * src/files.h: Remove {header,source}_extension extern declarations.
20461 * src/reader.c (parse_dquoted_param): CPP-out.
20462 (parse_header_extension_decl): Remove.
20463 (parse_source_extension_decl): Remove.
20464 (read_declarations): Remove cases tok_{hdrext,srcext}.
20465 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20466 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20468 2001-09-10 Akim Demaille <akim@epita.fr>
20470 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20471 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20472 (AT_CHECK_OUTPUT): this.
20473 Merely check ls' exit status, its output is useless.
20475 2001-09-10 Akim Demaille <akim@epita.fr>
20477 * tests/calc.at: Use m4_match.
20478 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20480 2001-09-10 Marc Autret <autret_m@epita.fr>,
20481 Akim Demaille <akim@epita.fr>
20483 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20485 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20487 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20488 * src/lex.h: Adjust prototype.
20489 (token_t): Add `tok_undef'.
20490 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20491 (parse_percent_token): Now returns token_t.
20492 Add default statement in switch.
20493 (lex): Separate `c' as an input variable, from the token_t result
20495 (unlexed): Is a token_t.
20497 2001-09-10 Akim Demaille <akim@epita.fr>
20499 * configure.in: Bump to 1.29a.
20501 2001-09-07 Akim Demaille <akim@epita.fr>
20505 2001-08-30 Akim Demaille <akim@epita.fr>
20507 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20508 * m4/atconfig.m4: Remove.
20509 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20510 * tests/bison: New.
20511 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20512 m4_if, m4_patsubst, and m4_regexp.
20513 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20514 `input' file instead of echo.
20516 2001-08-29 Akim Demaille <akim@epita.fr>
20520 2001-08-29 Akim Demaille <akim@epita.fr>
20524 2001-08-29 Paul Eggert <eggert@twinsun.com>
20526 * src/bison.simple (yyparse): Don't take the address of an
20527 item before the start of an array, as that doesn't conform to
20530 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20532 * doc/bison.texinfo (Location Tracking Calc): New node.
20534 2001-08-29 Paul Eggert <eggert@twinsun.com>
20536 * src/output.c (output): Do not define const, as this now
20537 causes more problems than it cures.
20539 2001-08-29 Akim Demaille <akim@epita.fr>
20541 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20543 Be sure to tag the `detailmenu'.
20545 2001-08-29 Akim Demaille <akim@epita.fr>
20547 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20548 download in a tmp dir.
20550 2001-08-28 Marc Autret <autret_m@epita.fr>
20552 * config/depcomp: New file.
20554 2001-08-28 Marc Autret <autret_m@epita.fr>
20556 * doc/bison.1 (mandoc): Adjust.
20557 From Juan Manuel Guerrero.
20559 2001-08-28 Marc Autret <autret_m@epita.fr>
20561 * src/print_graph.c (print_state): Fix.
20563 2001-08-27 Marc Autret <autret_m@epita.fr>
20565 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20567 Echo modifications to the functions prototypes.
20568 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20570 2001-08-27 Marc Autret <autret_m@epita.fr>
20572 * src/vcg.c: Include `xalloc.h'.
20573 (add_colorentry): New.
20574 (add_classname): New.
20575 (add_infoname): New.
20576 * src/vcg.h: Add new prototypes.
20578 2001-08-27 Akim Demaille <akim@epita.fr>
20580 * Makefile.maint: Sync. again with CVS Autoconf.
20582 2001-08-27 Akim Demaille <akim@epita.fr>
20584 * Makefile.maint: Formatting changes.
20585 (po-update, cvs-update, update): New targets.
20588 2001-08-27 Akim Demaille <akim@epita.fr>
20590 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20591 * Makefile.maint: Sync. with CVS Autoconf.
20593 2001-08-27 Marc Autret <autret_m@epita.fr>
20595 * src/vcg.h (struct infoname_s): New.
20596 (struct colorentry_s): New.
20597 (graph_s): New fields {vertical,horizontal}_order in structure.
20598 Add `infoname' field.
20599 Add `colorentry' field;
20600 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20601 (G_HORIZONTAL_ORDER): New.
20603 (G_COLORENTRY): New.
20604 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20605 Add output of `infoname'.
20606 Add output of `colorentry'.
20608 2001-08-27 Marc Autret <autret_m@epita.fr>
20610 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20611 This one shadowed a global parameter.
20613 2001-08-24 Marc Autret <autret_m@epita.fr>
20615 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20616 instead of `unsigned'.
20617 (print_state): Do not call obstack_object_size () in obstack_grow ()
20618 to avoid macro variables shadowing.
20620 2001-08-23 Marc Autret <autret_m@epita.fr>
20622 * src/lex.c (percent_table): Typo: s/naem/name/.
20624 Normalize new options declarations.
20626 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20628 * tests/suite.at: Exercise %header_extension and %source_extension.
20630 2001-08-16 Marc Autret <autret_m@epita.fr>
20632 * src/reader.c (parse_dquoted_param): New.
20633 (parse_header_extension_decl): Use it.
20634 (parse_source_extension_decl): Likewise.
20636 2001-08-16 Marc Autret <autret_m@epita.fr>
20638 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20639 (get_xxxx_str): Use assert () instead of complain ().
20640 Remove return invokations in default cases.
20641 (get_decision_str): Modify default behaviour. Remove second argument.
20642 Echo modifications on calls.
20643 (output_graph): Fix.
20645 2001-08-16 Marc Autret <autret_m@epita.fr>
20647 * src/getargs.c (usage): Update with ``-g, --graph''.
20649 2001-08-16 Marc Autret <autret_m@epita.fr>
20651 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20652 (Option Cross Key): Likewise.
20653 * doc/bison.1: Update.
20655 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20657 * src/output.c (output_master_parser): Don't finish action_obstack.
20658 (output_parser): Don't care about the muscle action, here.
20659 (prepare): Copy the action_obstack in the action muscle.
20660 (output): Free action_obstack.
20662 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20664 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20665 will contain `%union' declaration.
20666 (parse_union_decl): Delete #line directive output.
20667 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20668 informations about %union.
20669 (parse_union_decl): Copy the union_obstack in the muscle stype.
20670 * src/bison.simple: Add new #line directive.
20671 Add typdef %%stype YYSTYPE.
20673 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20675 * src/bison.simple: Add new `#line' directive.
20677 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20679 * src/bison.simple: New `#line' directive.
20680 * src/output.c (output_parser): Support new dynamic muscle input_line.
20682 2001-09-22 Marc Autret <autret_m@epita.fr>
20684 * src/output.c (output_master_parser): New.
20685 (output_parser): Be more re-entrant.
20687 2001-09-21 Marc Autret <autret_m@epita.fr>
20689 * src/reader.c (copy_definition, parse_union_decl): Update and use
20691 (copy_action): Likewise.
20692 Use obstack_1grow ().
20693 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20695 2001-09-21 Marc Autret <autret_m@epita.fr>
20697 * src/options.c (option_table): Adjust.
20698 * src/lex.c (parse_percent_token): Fix.
20700 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20702 * src/options.c (symtab.h): Include it, need by lex.h.
20704 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20706 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20707 is now an option_table_struct*.
20708 (option_strcmp): New function option_strcmp.
20709 (parse_percent_token): Call option_strcmp.
20710 * src/getargs.c (xalloc.h, options.h): Include it.
20711 (getargs): Call create_long_option_table.
20712 (getargs): Free longopts at the end of the function.
20713 (shortopts): Move in options.c.
20714 * src/options.c (create_long_option_table): New function. Convert
20715 information from option_table to option structure.
20716 * src/reader.c (options.h): Include it.
20718 * src/Makefile.am: Adjust.
20719 * src/options.c (option_table): Create from longopts and percent_table.
20720 * src/getargs.c (longopts): Delete.
20721 * src/lex.c (struct percent_table_struct): Delete.
20722 (percent_table): Delete.
20723 (options.h): Include it.
20724 * src/options.c: Create.
20725 * src/options.h: Create.
20726 Declare enum opt_access_e.
20727 Define struct option_table_struct.
20729 2001-09-20 Marc Autret <autret_m@epita.fr>
20731 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20734 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20736 * src/bison.simple: s/%%filename/%%skeleton.
20737 * src/muscle_tab.c (getargs.h): Include it.
20738 (muscle_init): Insert new muscle skeleton.
20740 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20742 * src/output.c (output_parser): Delete unused variable actions_dumped.
20744 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20746 * src/output.c (output): Delete call to reader_output_yylsp.
20747 * src/reader.c (reader): Likewise.
20748 * src/reader.h: Delete declaration of reader_output_yylsp.
20750 2001-09-02 Marc Autret <autret_m@epita.fr>
20752 * src/reader.c: Include muscle_tab.h.
20753 (parse_union_decl): Update.
20754 (parse_macro_decl): Rename parse_muscle_decl.
20755 Update to use renamed functions and variable.
20756 (read_declarations, copy_action, read_additionnal_code, : Updated
20757 with correct variables and functions names.
20758 (packsymbols, reader): Likewise.
20760 * src/reader.h (muscle_obstack): Extern declaration update.
20762 * src/output.c: Include muscle_tab.h
20763 In all functions using macro_insert, change by using muscle_insert ().
20764 (macro_obstack): Rename muscle_obstack.
20765 Echo modifications in the whole file.
20766 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20767 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20768 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20770 * src/muscle_tab.h: Update double inclusion macros.
20771 (macro_entry_s): Rename muscle_entry_s.
20774 * src/muscle_tab.c: Include muscle_tab.h.
20775 Rename macro_tabble to muscle_table.
20776 (mhash1, mhash2, mcmp): Use muscle_entry.
20777 (macro_init): Rename muscle_init. Update.
20778 (macro_insert): Rename muscle_insert. Update.
20779 (macro_find): Rename muscle_find. Update.
20781 * src/main.c: Include muscle_tab.h.
20782 (main): Call muscle_init ().
20783 * src/Makefile.am (bison_SOURCES): Echo modifications.
20785 2001-09-02 Marc Autret <autret_m@epita.fr>
20787 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20789 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20791 2001-09-02 Marc Autret <autret_m@epita.fr>
20793 * src/macrotab.c, src/macrotab.h: Remove.
20795 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20797 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20800 2001-09-01 Marc Autret <autret_m@epita.fr>
20802 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20803 to an explicit value to activate the feature. We do it here.
20805 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20807 * src/output.c (prepare): Delete the `filename' muscule insertion.
20808 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20809 (parse_union_decl): Likewise.
20810 * src/macrotab.c (macro_init): Initialize filename by infile.
20812 2001-08-31 Marc Autret <autret_m@epita.fr>
20814 * src/bison.simple (YYLSP_NEEDED): New definition.
20815 * src/output.c (prepare): Add macro insertion of `locations_flag'
20817 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20819 * src/output.c (prepare): Delete insertion of previous muscles,
20820 and insert the `prefix' muscles.
20821 * src/macrotab.c (macro_init): Likewise.
20822 (macro_init): Initialization prefix directive by `yy'.
20823 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20824 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20825 yylval, yydebug, yyerror, yynerrs and yyparse.
20826 New directive `#define' to substitute yydebug, ... with option
20829 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20831 * src/main.c (main): Standardize.
20832 * src/output.c (output_table_data, output_parser): Likewise.
20833 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20835 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20837 * src/reader.c (read_additionnal_code): Rename %%user_code to
20839 * src/output.c (output): Rename %%declarations to %%prologue.
20840 * src/bison.simple: Echo modifications.
20842 2001-08-31 Marc Autret <autret_m@epita.fr>
20844 * src/reader.c (readgram): CleanUp.
20845 (output_token_defines): Likewise.
20846 (packsymbols): Likewise.
20847 (reader): Likewise.
20848 * src/output.c (output): CPP-out useless code.
20850 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20852 * src/reader.c (reader): Delete obsolete call to function
20853 output_trailers and output_headers.
20854 * src/output.h: Remove obsolete functions prototypes of output_headers
20855 and output_trailers.
20857 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20859 * src/main.c: Include macrotab.h.
20860 * src/macrotab.h (macro_entry_s): Constify fields.
20861 Adjust functions prototypes.
20862 * src/macrotab.c (macro_insert): Constify key and value.
20863 (macro_find): Constify key.
20864 (macro_insert): Include 'xalloc.h'
20865 (macro_insert): Use XMALLOC.
20866 (macro_find): Constify return value.
20867 * src/output.c (output_table_data): Rename table to table_data.
20868 (output_parser): Constify macro_key, macro_value.
20870 2001-08-30 Marc Autret <autret_m@epita.fr>
20872 * src/reader.c (parse_skel_decl): New.
20873 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20874 * src/lex.h (token_t): New token `tok_skel'.
20875 * src/lex.c (percent_table): Add skeleton option entry.
20878 2001-08-29 Marc Autret <autret_m@epita.fr>
20880 * src/bison.simple: Add %%user_code directive at the end.
20881 * src/reader.c (read_additionnal_code): New.
20883 * src/output.c (output_program): Remove.
20886 2001-08-28 Marc Autret <autret_m@epita.fr>
20888 * src/output.c (output_actions): Clean up.
20889 (output_gram): CPP-out useless code.
20890 * src/reader.c (reader): Clean up, CPP-out useless code.
20892 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20894 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20896 * src/bison.simple: Add `%%definitions'.
20898 2001-08-28 Marc Autret <autret_m@epita.fr>
20900 * config/depcomp: New file.
20902 2001-08-27 Paul Eggert <eggert@twinsun.com>
20904 * src/bison.simple (yyparse): Don't take the address of an
20905 item before the start of an array, as that doesn't conform to
20908 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20910 * src/output.c (output): Remove the initialization of the macro
20911 obstack. It was done too late here.
20913 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20915 (reader): Initialize the macro obstack here, since we need it to grow
20916 '%define' directives.
20918 * src/reader.h: Declare the macro obstack as extern.
20920 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20922 * src/output.c (output_parser): Fix. Store single '%' characters in
20923 the output obstack instead of throwing them away.
20925 2001-08-27 Akim Demaille <akim@epita.fr>
20927 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20929 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20931 * lib/Makefile.am: Adjust.
20933 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20935 * src/bison.simple: Update and add '%%' directives.
20937 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20939 * src/reader.c (reader): Remove calls to 'output_headers' and
20940 'output_trailers'. Remove some C output.
20941 (readgram): Disable a piece of code that was writing a default
20942 definition for 'YYSTYPE'.
20943 (reader_output_yylsp): Remove.
20944 (packsymbols): Output token defintions to a macro.
20945 (copy_definition): Disable C output.
20947 * src/reader.c (parse_macro_decl): New function used to parse macro
20949 (copy_string2): Put the body of copy_string into this new function.
20950 Add a parameter to let the caller choose whether he wants to copy the
20951 string delimiters or not.
20952 (copy_string): Be a simple call to copy_string2 with the last argument
20954 (read_declarations): Add case for macro definition.
20955 (copy_identifier): New.
20956 (parse_macro_decl): Read macro identifiers using copy_identifier
20959 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20961 * src/output.c (prepare): Add prefixed names.
20962 (output_parser): Output semantic actions.
20963 (output_parser): Fix bug on '%%line' directives.
20965 * src/output.c (output_headers): Remove. The C code printed by this
20966 function should now be in the skeletons.
20967 (output_trailers): Remove.
20968 (output): Disable call to 'reader_output_yylsp'.
20969 (output_rule_data): Do not output tables to the table obstack.
20971 * src/output.c: Remove some C dedicated output.
20972 Improve the use of macro and output obstacks.
20973 (output_defines): Remove.
20975 * src/output.c (output_token_translations): Associate 'translate'
20976 table with a macro. No output to the table obstack.
20977 (output_gram): Same for 'rhs' and 'prhs'.
20978 (output_stos): Same for 'stos'.
20979 (output_rule_data): Same for 'r1' and 'r2'.
20980 (token_actions): Same for 'defact'.
20981 (goto_actions): Same for 'defgoto'.
20982 (output_base): Same for 'pact' and 'pgoto'.
20983 (output_table): Same for 'table'.
20984 (output_check): Same for 'check'.
20986 * src/output.c (output_table_data): New function.
20987 (output_short_table): Remove.
20988 (output_short_or_char_table): Remove.
20990 * src/output.c (output_parser): Replace most of the skeleton copy code
20991 with something new. Skeletons are now processed character by character
20992 rather than line by line, and Bison looks for '%%' macros. This is the
20993 first step in making Bison's output process (a lot) more flexible.
20994 (output_parser): Use the macro table.
20996 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20998 * src/main.c (main): Initialize the macro table.
21000 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21002 * src/lex.c (percent_table): Add tok_define.
21003 * src/lex.h: Add tok_define.
21005 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21007 * src/macrotab.c: New file.
21008 * src/macrotab.h: New file.
21009 * src/Makefile.am: Update.
21011 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21013 * lib/hash.c: New file.
21014 * lib/hash.h: New file.
21015 * lib/Makefile.am: Update.
21017 2001-08-15 Akim Demaille <akim@epita.fr>
21021 2001-08-15 Marc Autret <autret_m@epita.fr>
21023 * src/reader.c (readgram): Indent output macro YYSTYPE.
21024 (packsymbols): Likewise.
21025 (output_token_defines): Likewise.
21026 * src/files.c: Standardize.
21027 (compute_header_macro): New.
21028 (defines_obstack_save): New. Use compute_header_macro.
21029 (output_files): Update. Use defines_obstack_save.
21031 2001-08-15 Akim Demaille <akim@epita.fr>
21033 * doc/bison.texinfo (Table of Symbols): Document
21034 YYSTACK_USE_ALLOCA.
21036 2001-08-15 Akim Demaille <akim@epita.fr>
21038 * missing: Update from CVS Automake.
21039 * config/config.guess, config/config.sub, config/texinfo.tex:
21040 Update from gnu.org.
21042 2001-08-15 Akim Demaille <akim@epita.fr>
21044 * Makefile.maint: Sync with CVS Autoconf.
21046 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21048 * doc/bison.texinfo: Include GNU Free Documentation License from
21050 * doc/fdl.texi: Add to package.
21052 2001-08-14 Marc Autret <autret_m@epita.fr>
21054 Turn on %{source,header}_extension features.
21056 * src/lex.c (percent_table): Un-CPP out header_extension and
21058 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21059 (compute_exts_from_src): Remove conditions. It restores priorities
21062 2001-08-14 Marc Autret <autret_m@epita.fr>
21064 * src/files.c (compute_base_names): Add extensions computing when
21065 `--file-prefix' used.
21066 Standardize function calls.
21068 2001-08-13 Marc Autret <autret_m@epita.fr>
21070 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21071 defining it (defined but null disables alloca).
21073 2001-08-13 Marc Autret <autret_m@epita.fr>
21075 * src/bison.simple (_yy_memcpy): CPP reformat.
21077 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21079 * tests/atconfig.in (CPPFLAGS): Fix.
21081 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21083 * doc/bison.texinfo: Include GNU General Public License from
21085 * doc/gpl.texi: Add to package.
21087 2001-08-10 Marc Autret <autret_m@epita.fr>
21089 * src/print_graph.h: Fix.
21090 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21092 2001-08-10 Akim Demaille <akim@epita.fr>
21094 * src/system.h: Provide default declarations for stpcpy, strndup,
21097 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21099 * doc/bison.texinfo (Locations): Update @$ stuff.
21101 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21103 * src/bison.simple (YYLLOC_DEFAULT): Update.
21106 2001-08-08 Marc Autret <autret_m@epita.fr>
21108 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21109 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21110 Reported by Fabrice Bauzac.
21112 2001-08-08 Marc Autret <autret_m@epita.fr>
21114 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21115 * src/vcg.c (output_node): Fix.
21116 * src/vcg.h: Cleanup.
21117 * src/print_graph.c: Add comments.
21118 (node_output_size): New global variable. Simplify the formatting of
21119 the VCG graph output.
21120 (print_actions): Unused code is now used. It notifies the final state
21121 and no action states in the VCG graph. It also give the reduce actions.
21122 The `shift and goto' edges are red and the `go to state' edges are
21124 Get the current node name and node_obstack by argument.
21125 (node_obstack): New variable.
21126 (print_state): Manage node_obstack.
21127 (print_core): Use node_obstack given by argument.
21128 A node is not only computed here but in print_actions also.
21129 (print_graph): CPP out useless code instead of commenting it.
21131 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21133 * tests/atconfig.in (CPPFLAGS): Fix.
21135 2001-08-07 Akim Demaille <akim@epita.fr>
21137 * src/print_graph.c (quote): New.
21138 (print_core): Use it.
21140 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21142 * src/vcg.c (complain.h): Include it.
21143 Unepitaize `return' invocations.
21144 [NDEBUG] (main): Remove.
21145 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21146 * src/files.c (open_files): Initialize graph_obstack.
21147 * src/print_graph.c (print_actions): CPP out useless code.
21148 (print_core): Don't output the last `\n' in labels.
21150 * src/files.c (output_files): Output the VCG file.
21151 * src/main.c (main): Invoke print_graph ();
21153 2001-08-06 Marc Autret <autret_m@epita.fr>
21155 Automaton VCG graph output.
21156 Using option ``-g'' or long option ``--graph'', you can generate
21157 a gram_filename.vcg file containing a VCG description of the LALR (1)
21158 automaton of your grammar.
21160 * src/main.c: Call to print_graph() function.
21161 * src/getargs.h: Update.
21162 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21163 (graph_flag): New flag.
21164 (longopts): Update.
21165 (getargs): Add case `g'.
21166 * src/files.c (graph_obstack): New obstack struct.
21167 (open_files): Initialize new obstack.
21168 (output_files): Saves graph_obstack if required.
21169 * src/files.h (graph_obstack): New extern declaration.
21170 * src/Makefile.am: Add new source files.
21172 2001-08-06 Marc Autret <autret_m@epita.fr>
21174 * src/print_graph.c, src/print_graph.h (graph): New.
21175 * src/vcg.h: New file.
21176 * src/vcg.c: New file, VCG graph handling.
21178 2001-08-06 Marc Autret <autret_m@epita.fr>
21180 Add of %source_extension and %header_extension which specify
21181 the source or/and the header output file extension.
21183 * src/files.c (compute_base_names): Remove initialisation of
21184 src_extension and header_extension.
21185 (compute_exts_from_gf): Update.
21186 (compute_exts_from_src): Update.
21187 (output_files): Update.
21188 * src/reader.c (parse_header_extension_decl): New.
21189 (parse_source_extension_decl): New.
21190 (read_declarations): New case statements for the new tokens.
21191 * src/lex.c (percent_table): Add entries for %source_extension
21192 and %header_extension.
21193 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21195 2001-08-06 Marc Autret <autret_m@epita.fr>
21197 * configure.in: Bump to 1.28c.
21198 * doc/bison.texinfo: Texinfo thingies.
21200 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21202 * tests/atconfig.in (CPPFLAGS): Add.
21203 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21205 2001-08-03 Akim Demaille <akim@epita.fr>
21209 2001-08-03 Akim Demaille <akim@epita.fr>
21211 * tests/Makefile.am (check-local): Ship testsuite.
21212 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21213 Include `string.h'.
21215 2001-08-03 Akim Demaille <akim@epita.fr>
21217 * configure.in: Try using -Wformat when compiling.
21219 2001-08-03 Akim Demaille <akim@epita.fr>
21221 * configure.in: Bump to 1.28b.
21223 2001-08-03 Akim Demaille <akim@epita.fr>
21225 * src/complain.c: Adjust strerror_r portability issues.
21227 2001-08-03 Akim Demaille <akim@epita.fr>
21231 2001-08-03 Akim Demaille <akim@epita.fr>
21233 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21234 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21235 * src/getargs.c: Include complain.h.
21236 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21237 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21239 2001-08-03 Akim Demaille <akim@epita.fr>
21241 * src/reader.c (readgram): Display hidden chars in error messages.
21243 2001-08-03 Akim Demaille <akim@epita.fr>
21245 Update to gettext 0.10.39.
21247 2001-08-03 Akim Demaille <akim@epita.fr>
21249 * lib/strspn.c: New.
21251 2001-08-01 Marc Autret <autret_m@epita.fr>
21253 * doc/bison.texinfo: Update.
21254 * doc/bison.1 (mandoc): Update.
21255 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21256 * src/files.c: Support output files extensions computing.
21257 (src_extension): New static variable.
21258 (header_extension): New static variable.
21259 (tr): New function.
21260 (get_extension_index): New function, gets the index of an extension
21261 filename in a string.
21262 (compute_exts_from_gf): New function, computes extensions from the
21263 grammar file extension.
21264 (compute_exts_from_src): New functions, computes extensions from the
21265 C source file extension, file given by ``-o'' option.
21266 (compute_base_names): Update.
21267 (output_files): Update.
21269 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21271 * doc/bison.texi: Document @$.
21272 (Locations): New section.
21274 2001-07-18 Akim Demaille <akim@epita.fr>
21276 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21277 * config/prev-version.txt, config/move-if-change: New.
21278 * Makefile.am: Adjust.
21280 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21282 * src/bison.simple (yyparse): Suppress warning `comparaison
21283 between signed and unsigned'.
21285 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21287 * src/getargs.h (raw_flag): Remove.
21288 * src/getargs.c: Die on `-r'/`--raw'.
21289 * src/lex.c (parse_percent_token): Die on `%raw'.
21290 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21291 * tests/calc.at: Suppress test with option `--raw'.
21293 2001-07-14 Akim Demaille <akim@epita.fr>
21296 * configure.in: Require Autoconf 2.50.
21297 Update to gettext 0.10.38.
21299 2001-03-16 Akim Demaille <akim@epita.fr>
21301 * doc/bison.texinfo: ANSIfy the examples.
21303 2001-03-16 Akim Demaille <akim@epita.fr>
21305 * getargs.c (skeleton): New variable.
21306 (longopts): --skeleton is a new option.
21307 (shortopts, getargs): -S is a new option.
21308 * getargs.h: Declare skeleton.
21309 * output.c (output_parser): Use it.
21311 2001-03-16 Akim Demaille <akim@epita.fr>
21313 * m4/strerror_r.m4: New.
21314 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21315 * lib/error.h, lib/error.c: Update.
21317 2001-03-16 Akim Demaille <akim@epita.fr>
21319 * src/getargs.c (longopts): Clean up.
21321 2001-02-21 Akim Demaille <akim@epita.fr>
21323 * src/reader.c (gensym): `gensym_count' is your own.
21324 Use a static buf to create the symbol name, as token_buffer is no
21327 2001-02-08 Akim Demaille <akim@epita.fr>
21329 * src/conflicts.c (conflict_report): Be sure not to append to res
21330 between two calls, which could happen if both first sprintf were
21331 skipped, but not the first cp += strlen.
21333 2001-02-08 Akim Demaille <akim@epita.fr>
21335 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21336 New, from fileutils 4.0.37.
21337 * configure.in: Require Autoconf 2.49c. I took some time before
21338 making this decision. This is the only way out for portability
21339 issues in Bison, it would mean way too much duplicate effort to
21340 import in Bison features implemented in 2.49c since 2.13.
21341 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21343 2001-02-02 Akim Demaille <akim@epita.fr>
21345 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21346 * lib/xalloc.h, lib/xmalloc.c: Update.
21348 2001-01-19 Akim Demaille <akim@epita.fr>
21350 Get rid of the ad hoc handling of token_buffer in the scanner: use
21353 * src/lex.c (token_obstack): New.
21354 (init_lex): Initialize it. No longer call...
21355 (grow_token_buffer): this. Remove it.
21356 Adjust all the places which used it to use the obstack.
21358 2001-01-19 Akim Demaille <akim@epita.fr>
21360 * src/lex.h: Rename all the tokens:
21361 s/\bENDFILE\b/tok_eof/g;
21362 s/\bIDENTIFIER\b/tok_identifier/g;
21364 Let them be enums, not #define, to ease debugging.
21365 Adjust all the code.
21367 2001-01-18 Akim Demaille <akim@epita.fr>
21369 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21370 * src/lex.c (maxtoken, grow_token_buffer): Static.
21372 2001-01-18 Akim Demaille <akim@epita.fr>
21374 Since we now use obstacks, more % directives can be enabled.
21376 * src/lex.c (percent_table): Also accept `%yacc',
21377 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21379 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21380 instead of returning a token.
21381 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21382 * src/reader.c (read_declarations): Adjust.
21383 * src/files.c (open_files): Don't call `compute_base_names', don't
21384 compute `attrsfile' since they depend upon data which might be
21385 *in* the input file now.
21386 (output_files): Do it here.
21387 * src/output.c (output_headers): Document the fact that this patch
21388 introduces a guaranteed SEGV for semantic parsers.
21389 * doc/bison.texinfo: Document them.
21390 * tests/suite.at: Exercise these %options.
21392 2000-12-20 Akim Demaille <akim@epita.fr>
21394 Also handle the output file (--verbose) with obstacks.
21396 * files.c (foutput): Remove.
21397 (output_obstack): New.
21398 Adjust all dependencies.
21399 * src/conflicts.c: Return a string.
21400 * src/system.h (obstack_grow_string): Rename as...
21401 (obstack_sgrow): this. Be ready to work with non literals.
21402 (obstack_fgrow4): New.
21404 2000-12-20 Akim Demaille <akim@epita.fr>
21406 * src/files.c (open_files): Fix the computation of short_base_name
21407 in the case of `-o foo.tab.c'.
21409 2000-12-20 Akim Demaille <akim@epita.fr>
21411 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21412 (copy_dollar): Now that everything uses obstacks, get rid of the
21415 2000-12-20 Akim Demaille <akim@epita.fr>
21417 * src/files.c (open_files): Actually the `.output' file is based
21418 on the short_base_name, not base_name.
21419 * tests/suite.at (Checking output file names): Adjust.
21421 2000-12-20 Akim Demaille <akim@epita.fr>
21423 * src/bison.s1: Remove, we now use directly...
21424 * src/bison.simple: this.
21425 * src/Makefile.am: Use pkgdata instead of data.
21427 2000-12-20 Akim Demaille <akim@epita.fr>
21429 * src/files.c (guard_obstack): New.
21430 (open_files): Initialize it.
21431 (output_files): Dump it...
21432 * src/files.h: Export it.
21433 * src/reader.c (copy_guard): Use it.
21435 2000-12-19 Akim Demaille <akim@epita.fr>
21437 * src/files.c (outfile, defsfile, actfile): Removed as global
21439 (open_files): Don't compute them.
21440 (output_files): Adjust.
21441 (base_name, short_base_name): Be global.
21442 Adjust dependencies.
21444 2000-12-19 Akim Demaille <akim@epita.fr>
21446 * src/files.c (strsuffix): New.
21447 (stringappend): Be just like strcat but allocate.
21448 (base_names): Eve out from open_files.
21449 Try to simplify the rather hairy computation of base_name and
21451 (open_files): Use it.
21452 * tests/suite.at (Checking output file names): New test.
21454 2000-12-19 Akim Demaille <akim@epita.fr>
21456 * src/system.h (obstack_grow_literal_string): Rename as...
21457 (obstack_grow_string): this.
21458 * src/output.c (output_parser): Recognize `%% actions' instead of
21460 * src/bison.s1: s/$/%% actions/.
21461 * src/bison.hairy: Likewise.
21463 2000-12-19 Akim Demaille <akim@epita.fr>
21465 * src/output.c (output_parser): Compute the `#line' lines when
21467 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21468 Suggested by Hans Aberg.
21470 2000-12-19 Akim Demaille <akim@epita.fr>
21472 Let the handling of the skeleton files be local to the procedures
21475 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21477 (fparser, open_extra_files): Remove.
21478 (open_files, output_files): Don't take care of fparser.
21479 * src/files.h: Adjust.
21480 * src/output.c (output_parser): Open and close the file to the
21482 * src/reader.c (read_declarations): When %semantic_parser, open
21485 2000-12-19 Akim Demaille <akim@epita.fr>
21487 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21488 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21490 2000-12-19 Akim Demaille <akim@epita.fr>
21492 * src/files.c (open_files): Yipee! We no longer need all the code
21493 looking for `/tmp' since we have no tmp file.
21495 2000-12-19 Akim Demaille <akim@epita.fr>
21497 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21499 * src/files.c (open_files): Less dependency on MSDOS etc.
21501 2000-12-14 Akim Demaille <akim@epita.fr>
21503 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21504 Provide a default definition.
21505 Use it when executing the default @ action.
21506 * src/reader.c (reader_output_yylsp): No longer include
21507 `timestamp' and `text' in the default YYLTYPE.
21509 2000-12-12 Akim Demaille <akim@epita.fr>
21511 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21512 (copy_guard): Quote the file names.
21513 Reported by Laurent Mascherpa.
21515 2000-12-12 Akim Demaille <akim@epita.fr>
21517 * src/output.c (output_headers, output_program, output): Be sure
21518 to escape special characters when outputting filenames.
21519 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21520 (output_headers): Don't depend on them, Use ACTSTR.
21522 2000-11-17 Akim Demaille <akim@epita.fr>
21524 * lib/obstack.h: Formatting changes.
21525 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21526 prevents type checking.
21527 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21528 cast the value to (void *): assigning a `foo *' to a `void *'
21530 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21531 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21534 2000-11-17 Akim Demaille <akim@epita.fr>
21536 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21538 (suite.m4, regression.m4, calc.m4): these.
21539 * tests/atgeneral.m4: Update from CVS Autoconf.
21541 2000-11-17 Akim Demaille <akim@epita.fr>
21543 * tests/regression.m4 (%union and --defines): New test,
21544 demonstrating a current bug in the obstack implementation.
21546 2000-11-17 Akim Demaille <akim@epita.fr>
21548 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21550 Use them to declare the variables which are global or local to
21553 2000-11-17 Akim Demaille <akim@epita.fr>
21555 * acconfig.h: Remove, no longer used.
21557 2000-11-07 Akim Demaille <akim@epita.fr>
21559 * src: s/Copyright (C)/Copyright/g.
21561 2000-11-07 Akim Demaille <akim@epita.fr>
21563 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21565 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21567 2000-11-07 Akim Demaille <akim@epita.fr>
21569 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21570 Merge in a single CPP if/else.
21572 2000-11-07 Akim Demaille <akim@epita.fr>
21574 * src/output.c (output): Remove useless variables.
21575 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21576 argument `data' for consistency with the prototypes.
21577 Qualify it `const'.
21578 (obstack_copy, obstack_copy0): Rename the second argument as
21579 `address' for consistency. Qualify it `const'.
21580 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21581 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21582 `const' their input argument (`data' or `address').
21583 Adjust the corresponding macros to include `const' in casts.
21585 2000-11-03 Akim Demaille <akim@epita.fr>
21587 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21588 s/PFILE1/BISON_HAIRY/.
21589 Adjust dependencies.
21591 2000-11-03 Akim Demaille <akim@epita.fr>
21593 For some reason, this was not applied.
21595 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21596 `unlink': it's no longer used.
21598 2000-11-03 Akim Demaille <akim@epita.fr>
21600 * src/files.c (skeleton_find): New function, eved out of...
21601 (open_files, open_extra_files): here.
21603 2000-11-03 Akim Demaille <akim@epita.fr>
21605 Don't use `atexit'.
21607 * src/files.c (obstack_save): New function.
21608 (done): Rename as...
21609 (output_files): this.
21610 Use `obstack_save'.
21611 * src/main.c (main): Don't use `atexit' to register `done', since
21612 it no longer has to remove tmp files, just call `output_files'
21613 when there are no errors.
21615 2000-11-02 Akim Demaille <akim@epita.fr>
21617 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21618 `unlink': it's no longer used.
21619 * src/files.h: Formatting changes.
21621 2000-11-02 Akim Demaille <akim@epita.fr>
21623 Remove the last uses of mktemp and unlink/delete.
21625 * src/files.c (fdefines, ftable): Removed.
21626 (defines_ostack, table_obstack): New.
21627 Adjust dependencies of the former into uses of the latter.
21628 * src/output.c (output_short_or_char_table, output_short_table):
21629 Convert to using obstacks.
21630 * src/reader.c (copy_comment2): Accept one FILE * and two
21632 (output_token_defines, reader_output_yylsp): Use obstacks.
21633 * src/system.h (obstack_fgrow3): New.
21634 * po/POTFILES.in: Adjust.
21636 2000-11-01 Akim Demaille <akim@epita.fr>
21638 Change each use of `fattrs' into a use of `attrs_obstack'.
21640 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21641 * src/files.c (fattrs): Remove.
21642 (attrs_obstack): New.
21643 Adjust all dependencies.
21644 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21646 2000-11-01 Akim Demaille <akim@epita.fr>
21648 Introduce obstacks.
21649 Change each use of `faction' into a use of `action_obstack'.
21651 * lib/obstack.h, lib/obstack.c: New files.
21652 * src/files.c (faction): Remove.
21653 (action_obstack): New.
21654 Adjust all dependencies.
21656 2000-10-20 Akim Demaille <akim@epita.fr>
21658 * lib/quote.h (PARAMS): New macro. Use it.
21660 2000-10-16 Akim Demaille <akim@epita.fr>
21662 * src/output.c (output_short_or_char_table): New function.
21663 (output_short_table, output_token_translations): Use it.
21664 (goto_actions): Use output_short_table.
21666 2000-10-16 Akim Demaille <akim@epita.fr>
21668 * src/symtab.c (bucket_new): New function.
21671 * src/output.c (output_short_table): New argument to display the
21672 comment associated with the table.
21673 Adjust dependencies.
21674 (output_gram): Use it.
21675 (output_rule_data): Nicer output layout for YYTNAME.
21677 2000-10-16 Akim Demaille <akim@epita.fr>
21679 * src/lex.c (read_typename): New function.
21681 * src/reader.c (copy_dollar): Likewise.
21683 2000-10-16 Akim Demaille <akim@epita.fr>
21685 * src/reader.c (copy_comment2): Expect the input stream to be on
21686 the `/' which is suspected to open a comment, instead of being
21687 called after `//' or `/*' was read.
21688 (copy_comment, copy_definition, parse_union_decl, copy_action)
21689 (copy_guard): Adjust.
21691 2000-10-16 Akim Demaille <akim@epita.fr>
21693 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21694 `read_signed_integer'.
21696 2000-10-16 Akim Demaille <akim@epita.fr>
21698 * src/reader.c (copy_dollar): New function.
21699 (copy_guard, copy_action): Use it.
21701 2000-10-16 Akim Demaille <akim@epita.fr>
21703 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21704 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21705 New files, from Fileutils 4.0.27.
21706 * src/main.c (printable_version): Remove.
21707 * src/lex.c, src/reader.c: Use `quote'.
21709 2000-10-04 Akim Demaille <akim@epita.fr>
21711 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21713 2000-10-04 Akim Demaille <akim@epita.fr>
21715 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21717 2000-10-04 Akim Demaille <akim@epita.fr>
21719 When a literal string is used to define two different tokens,
21720 `bison -v' segfaults.
21721 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21723 * tests/regression.m4: New file.
21724 Include the core of the sample provided by Piotr Gackiewicz.
21725 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21728 2000-10-04 Akim Demaille <akim@epita.fr>
21730 * src/reader.c (parse_expect_decl): Keep `count' within the size
21734 2000-10-02 Paul Eggert <eggert@twinsun.com>
21736 * bison.s1 (yyparse): Assign the default value
21737 unconditionally, to avoid a GCC warning and make the parser a
21740 2000-10-02 Akim Demaille <akim@epita.fr>
21742 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21745 2000-10-02 Akim Demaille <akim@epita.fr>
21747 * src/derives.c, src/print.c, src/reduce.c: To ease the
21748 translation, move some `\n' out of the translated strings.
21750 2000-10-02 Akim Demaille <akim@epita.fr>
21752 The location tracking mechanism is precious for parse error
21753 messages. Nevertheless, it is enabled only when `@n' is used in
21754 the grammar, which is a different issue (you can use it in error
21755 message, but not in the grammar per se). Therefore, there should
21756 be another means to enable it.
21758 * src/getargs.c (getargs): Support `--locations'.
21759 (usage): Report it.
21760 * src/getargs.h (locationsflag): Export it.
21761 * src/lex.c (percent_table): Support `%locations'.
21762 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21763 with `locationsflag'.
21764 * doc/bison.texinfo: Document `--locations' and `%locations'.
21766 * tests/calc.m4: Test it.
21768 For regularity of the names, replace each
21769 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21770 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21771 In addition replace each `flag' with `_flag'.
21773 2000-10-02 Akim Demaille <akim@epita.fr>
21775 Also test parse error messages, including with YYERROR_VERBOSE.
21777 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21779 Use it to check the computations.
21780 Use it to check `nonassoc' is honored.
21781 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21782 `--yyerror-verbose'.
21783 (_AT_CHECK_CALC): Adjust to this option.
21784 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21786 2000-10-02 Akim Demaille <akim@epita.fr>
21788 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21789 the latter demonstrates a flaw in the handling of non debugging
21790 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21791 was used in order to simplify:
21807 unfortunately this leads to a CPP conflict when
21808 `--name-prefix=foo' is used since it produces `#define yydebug
21811 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21812 (YYDPRINTF): New macro.
21814 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21816 Also test `--verbose', `--defines' and `--name-prefix'.
21818 2000-10-02 Akim Demaille <akim@epita.fr>
21820 Improve the readability of the produced parsers.
21822 * src/bison.s1: Formatting changes.
21823 Improve the comment related to the `$' mark.
21824 (yydefault): Don't fall through to `yyresume': `goto' there.
21825 * src/output.c (output_parser): When the `$' is met, skip the end
21827 New variable, `number_of_dollar_signs', to check there's exactly
21828 one `$' in the parser skeleton.
21830 2000-10-02 Akim Demaille <akim@epita.fr>
21832 * lib/xstrdup.c: New file, from the fileutils.
21833 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21834 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21835 instead of strlen + xmalloc + strcpy.
21836 * src/symtab.c (copys): Remove, use xstrdup instead.
21838 2000-10-02 Akim Demaille <akim@epita.fr>
21840 * src/gram.h (associativity): New enum type which replaces the
21841 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21842 `right_assoc', `left_assoc' and `non_assoc'.
21843 Adjust all dependencies.
21844 * src/reader.c: Formatting changes.
21845 (LTYPESTR): Don't define it, use it as a literal in
21846 `reader_output_yylsp'.
21847 * src/symtab.h (symbol_class): New enum type which replaces the
21848 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21849 `sunknown', `stoken and `snterm'.
21851 2000-10-02 Akim Demaille <akim@epita.fr>
21853 * src/getargs.c (fixed_outfiles): Rename as...
21854 (yaccflag): for consistency and accuracy.
21855 Adjust dependencies.
21857 2000-10-02 Akim Demaille <akim@epita.fr>
21859 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21860 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21861 difficult and introduced a lot of core dump. It turns out that
21862 Bison used an implementation of `xmalloc' based on `calloc', and
21863 at various places it does depend upon the initialization to 0. I
21864 have not tried to isolate the pertinent places, and all the former
21865 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21866 someone should address this issue.
21868 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21869 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21871 Adjust dependencies.
21872 * src/warshall.h: New file.
21875 2000-10-02 Akim Demaille <akim@epita.fr>
21877 Various anti-`extern in *.c' changes.
21879 * src/system.h: Include `assert.h'.
21881 2000-10-02 Akim Demaille <akim@epita.fr>
21883 * src/state.h (nstates, final_state, first_state, first_shift)
21884 (first_reduction): Move their exportation from here...
21885 * src/LR0.h: to here.
21886 Adjust dependencies.
21887 * src/getargs.c (statisticsflag): New variable.
21888 Add support for `--statistics'.
21889 Adjust dependencies.
21891 Remove a lot of now useless `extern' statements in most files.
21893 2000-10-02 Akim Demaille <akim@epita.fr>
21895 * src/LR0.h: New file.
21898 2000-10-02 Akim Demaille <akim@epita.fr>
21900 * src/print.h: New file.
21902 * src/print.c: Formatting and ordering changes.
21903 (verbose, terse): Replace with...
21904 (print_results): this new function.
21905 Adjust dependencies.
21907 2000-10-02 Akim Demaille <akim@epita.fr>
21909 * src/conflicts.c (conflict_report): New function.
21910 (conflict_log, verbose_conflict_log): Replace with...
21911 (print_conflicts): this function.
21912 Adjust dependencies.
21913 * src/conflicts.h: New file.
21914 Propagate its inclusion.
21916 2000-10-02 Akim Demaille <akim@epita.fr>
21918 * src/nullable.h: New file.
21919 Propagate its inclusion.
21920 * src/nullable.c: Formatting changes.
21922 2000-10-02 Akim Demaille <akim@epita.fr>
21924 * src/reduce.h: New file.
21925 Propagate its inclusion.
21926 * src/reduce.c: Topological sort and other formatting changes.
21927 (bool, TRUE, FALSE): Move their definition to...
21928 * src/system.h: here.
21930 2000-10-02 Akim Demaille <akim@epita.fr>
21932 * src/files.c: Formatting changes.
21933 (tryopen, tryclose, openfiles): Rename as...
21934 (xfopen, xfclose, open_files): this.
21935 (stringappend): static.
21936 * src/files.h: Complete the list of exported symbols.
21939 2000-10-02 Akim Demaille <akim@epita.fr>
21941 * src/reader.h: New file.
21942 Propagate its use instead of tedious list of `extern' and
21944 * src/reader.c: Formatting changes, topological sort,
21947 2000-10-02 Akim Demaille <akim@epita.fr>
21949 * src/lex.h: Prototype `lex.c' exported functions.
21950 * src/reader.c: Adjust.
21951 * src/lex.c: Formatting changes.
21952 (safegetc): Rename as...
21955 2000-10-02 Akim Demaille <akim@epita.fr>
21957 * src/lalr.h: New file.
21958 Propagate its inclusion instead of prototypes and `extern'.
21959 * src/lalr.c: Formatting changes, topological sorting etc.
21961 2000-10-02 Akim Demaille <akim@epita.fr>
21963 * src/output.c (token_actions): Introduce a temporary array,
21964 YYDEFACT, that makes it possible for this function to use
21965 output_short_table.
21967 2000-10-02 Akim Demaille <akim@epita.fr>
21969 `user_toknums' is output as a `short[]' in `output.c', while it is
21970 defined as a `int[]' in `reader.c'. For consistency with the
21971 other output tables, `user_toknums' is now defined as a table of
21974 * src/reader.c (user_toknums): Be a short table instead of an int
21976 Adjust dependencies.
21978 Factor the short table outputs.
21980 * src/output.c (output_short_table): New function.
21981 * src/output.c (output_gram, output_stos, output_rule_data)
21982 (output_base, output_table, output_check): Use it.
21984 2000-10-02 Akim Demaille <akim@epita.fr>
21986 * src/output.c (output): Topological sort of the functions, in
21987 order to get rid of the `static' prototypes.
21988 No longer use `register'.
21989 * src/output.h: New file.
21990 Propagate its inclusion in files explicitly prototyping functions
21993 2000-09-21 Akim Demaille <akim@epita.fr>
21995 * src/atgeneral.m4: Update from Autoconf.
21997 2000-09-21 Akim Demaille <akim@epita.fr>
21999 * src/closure.h: New file.
22000 * src/closure.c: Formatting changes, topological sort over the
22001 functions, use of closure.h.
22002 (initialize_closure, finalize_closure): Rename as...
22003 (new_closure, free_closure): these. Adjust dependencies.
22004 * src/LR0.c: Formatting changes, topological sort, use of
22006 (initialize_states): Rename as...
22007 (new_states): this.
22008 * src/Makefile.am (noinst_HEADERS): Adjust.
22010 2000-09-20 Akim Demaille <akim@epita.fr>
22012 * src/acconfig.h: Don't protect config.h against multiple
22014 Don't define PARAMS.
22015 * src/system.h: Define PARAMS.
22016 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22017 purpose of config.h. system.h must not try to fix wrong
22018 definitions in config.h.
22020 2000-09-20 Akim Demaille <akim@epita.fr>
22022 * src/derives.h: New file.
22023 * src/main.c, src/derives.h: Use it.
22024 Formatting changes.
22025 * src/Makefile.am (noinst_HEADERS): Adjust.
22027 2000-09-20 Akim Demaille <akim@epita.fr>
22029 * tests/atgeneral.m4: Update from Autoconf.
22030 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22031 (AT_CHECK_CALC): New macros.
22032 Use these macros to test bison with options `', `--raw',
22033 `--debug', `--yacc', `--yacc --debug'.
22035 2000-09-19 Akim Demaille <akim@epita.fr>
22037 * src/output.c: Formatting changes.
22038 * src/machine.h: Remove, leaving its contents in...
22039 * src/system.h: here.
22041 Adjust all dependencies on stdio.h and machine.h.
22042 * src/getargs.h: New file.
22043 Let all `extern' declarations about getargs.c be replaced with
22044 inclusion of `getargs.h'.
22045 * src/Makefile.am (noinst_HEADERS): Adjust.
22047 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22049 (yyerror): Returns void, not int.
22050 * doc/bison.texinfo: Formatting changes.
22052 2000-09-19 Akim Demaille <akim@epita.fr>
22054 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22057 2000-09-18 Akim Demaille <akim@epita.fr>
22059 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22060 * src/Makefile.am (INCLUDES): Don't.
22061 Be ready to fetch headers in lib/.
22063 2000-09-18 Akim Demaille <akim@epita.fr>
22065 * doc/bison.texinfo: Update the copyright.
22066 ANSIfy and GNUify the examples.
22067 Remove the old menu.
22069 2000-09-18 Akim Demaille <akim@epita.fr>
22071 First set of tests: use the `calc' example from the documentation.
22073 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22074 is defined only when YYDEBUG is.
22075 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22076 * src/files.c (tryopen, tryclose): Formatting changes.
22077 Move to the top and be static.
22078 * src/reader.c (read_signed_integer): Likewise.
22079 * tests/calc.m4: New file.
22080 * Makefile.am, suite.m4: Adjust.
22081 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22083 2000-09-18 Akim Demaille <akim@epita.fr>
22085 Add support for an Autotest test suite for Bison.
22087 * m4/m4.m4, m4/atconfig.m4: New files.
22088 * m4/Makefile.am (EXTRA_DIST): Adjust.
22089 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22091 * src/getargs.c: Display a more standard --version message.
22092 * src/reader.c (reader): Formatting changes.
22093 No longer depend upon VERSION_STRING.
22094 * configure.in: No longer use `dnl'.
22095 Set up the test suite and the new directory `tests/.
22096 (VERSION_STRING): Remove.
22098 2000-04-14 Akim Demaille <akim@epita.fr>
22100 * src/reader.c (copy_comment2): New function, same as former
22101 `copy_comment', but outputs into two FILE *.
22102 (copy_comment): Use it.
22103 (parse_union_decl): Use it.
22104 (get_type, parse_start_decl): Use the same `invalid' message.
22105 (parse_start_decl, parse_union_decl): Use the same `multiple'
22107 (parse_union_decl, copy_guard, copy_action): Use the same
22108 `unmatched' message.
22109 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22111 2000-03-31 Akim Demaille <akim@epita.fr>
22113 * src/files.c (tryopen, tryclose): Move to the top.
22116 2000-03-31 Akim Demaille <akim@epita.fr>
22118 * src/main.c (main): Don't call `done', exit does it.
22120 2000-03-31 Akim Demaille <akim@epita.fr>
22122 * allocate.c: s/return (foo)/return foo/.
22123 * lalr.c: Likewise.
22125 * output.c: Likewise.
22126 * reader.c: Likewise.
22127 * symtab.c: Likewise.
22128 * vmsgetargs.c: Likewise.
22130 2000-03-31 Akim Demaille <akim@epita.fr>
22132 Clean up the error reporting functions.
22134 * src/report.c: New file.
22135 * src/report.h: Likewise.
22136 * src/Makefile.am: Adjust.
22137 * m4/error.m4: New file.
22138 * m4/Makefile.am: Adjust.
22139 * configure.in (jm_PREREQ_ERROR): Call it.
22140 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22142 (fatal, fatals): Remove. All callers use complain.c::fatal.
22143 (warn, warni, warns, warnss, warnss): Remove. All callers use
22144 complain.c::complain.
22145 (toomany): Remove, use fatal instead.
22146 * src/files.c (done): No argument, use complain_message_count.
22147 * src/main.c (main): Register `done' to `atexit'.
22149 * src/getargs.c (usage): More `fputs', less `fprintf'.
22151 2000-03-28 Akim Demaille <akim@epita.fr>
22153 * lib/: New directory.
22154 * Makefile.am (SUBDIRS): Adjust.
22155 * configure.in: Adjust.
22156 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22158 * src/alloca.c: Moved to lib/.
22159 * src/getopt.c: Likewise.
22160 * src/getopt1.c: Likewise.
22161 * src/getopt.h: Likewise.
22162 * src/ansi2knr.c: Likewise.
22163 * src/ansi2knr.1: Likewise.
22164 * src/Makefile.am: Adjust.
22165 * lib/Makefile.am: New file.
22167 2000-03-28 Akim Demaille <akim@epita.fr>
22169 * src/getargs.c (usage): Refresh the help message.
22171 2000-03-17 Akim Demaille <akim@epita.fr>
22173 * src/getopt1.c: Updated from textutils 2.0e
22174 * src/getopt.c: Likewise.
22175 * src/getopt.h: Likewise.
22177 2000-03-17 Akim Demaille <akim@epita.fr>
22179 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22180 the file name, not the whole `#line LINE FILE'.
22182 2000-03-17 Akim Demaille <akim@epita.fr>
22184 On syntax errors, report the token on which we choked.
22186 * src/bison.s1 (yyparse): In the label yyerrlab, when
22187 YYERROR_VERBOSE, add yychar in msg.
22189 2000-03-17 Akim Demaille <akim@epita.fr>
22191 * src/reader.c (copy_at): New function.
22192 (copy_guard): Use it.
22193 (copy_action): Use it.
22195 2000-03-17 Akim Demaille <akim@epita.fr>
22197 Be kind to translators, save some useless translations.
22199 * src/main.c (banner): New function.
22200 (fatal_banner): Use it.
22201 (warn_banner): Use it.
22203 2000-03-17 Akim Demaille <akim@epita.fr>
22205 * src/reader.c (copy_definition): Use copy_string and
22206 copy_comment. Removed now unused `match', `ended',
22208 (copy_comment, copy_string): Moved, to be visible from
22211 2000-03-17 Akim Demaille <akim@epita.fr>
22213 * src/reader.c (copy_string): Declare `static inline'. No
22214 problems with inline, since it is checked by configure.
22215 (copy_comment): Likewise.
22217 2000-03-17 Akim Demaille <akim@epita.fr>
22219 * src/reader.c (packsymbols): Formatting changes.
22221 2000-03-17 Akim Demaille <akim@epita.fr>
22223 * src/reader.c (copy_comment): New function, factored out from:
22224 (copy_action): Use it. Removed now unused `match', `ended',
22226 (copy_guard): Likewise.
22228 2000-03-17 Akim Demaille <akim@epita.fr>
22230 * src/reader.c (copy_string): New function, factored out from:
22231 (copy_action): Use it.
22232 (copy_guard): Likewise.
22234 2000-03-17 Akim Demaille <akim@epita.fr>
22236 Change the handling of @s so that they behave exactly like $s.
22237 There is now a pseudo variable @$ (readble and writable), location
22238 of the lhs of the rule (by default ranging from the location of
22239 the first symbol of the rhs, to the location of the last symbol,
22240 or, if the rhs is empty, YYLLOC).
22242 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22244 (yyparse): When providing a default semantic action, provide a
22245 default location action.
22246 (after the $): No longer change `*YYLSP', just stack YYLOC the
22247 same way you stack YYVAL.
22248 * src/reader.c (read_declarations): Use warns.
22249 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22250 (copy_action, case '@'): Likewise.
22251 Use a standard error message, to save useless work from
22254 2000-03-17 Akim Demaille <akim@epita.fr>
22256 * src/bison.s1: Formatting and cosmetics changes.
22257 * src/reader.c: Likewise.
22258 Update the Copyright notice.
22260 2000-03-17 Akim Demaille <akim@epita.fr>
22262 * src/bison.s1 (#line): All set to `#line' only, since the
22263 Makefile now handles them.
22265 2000-03-16 Akim Demaille <akim@epita.fr>
22267 * src/output.c (output_rule_data): Output the documentation of
22268 some of the tables.
22269 (Copyright notice): Update.
22270 Formatting changes.
22272 2000-03-16 Akim Demaille <akim@epita.fr>
22274 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22275 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22276 One `#if YYDEBUG' remains, since it uses variables which are
22277 defined only if `YYDEBUG != 0'.
22279 2000-03-16 Akim Demaille <akim@epita.fr>
22281 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22282 and related variables so that the similarities are highlighted.
22284 2000-03-16 Akim Demaille <akim@epita.fr>
22286 * src/bison.s1: Properly indent CPP directives.
22288 2000-03-16 Akim Demaille <akim@epita.fr>
22290 * src/bison.s1: Properly indent the `alloca' CPP section.
22292 2000-03-16 Akim Demaille <akim@epita.fr>
22294 Do not hard code values of directories in `configure.in'.
22295 Update the `configure' tool chain.
22297 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22299 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22300 (AC_OUTPUT): Add m4/Makefile.
22301 Bump to bison 1.28a, 1.29 has never been released.
22302 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22303 handled via src/Makefile.am.
22304 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22305 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22307 * Makefile.am (SUBDIRS): Add m4.
22308 (ACLOCAL_AM_FLAGS): New variable.
22309 (AUTOMAKE_OPTIONS): Add check-news.
22310 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22311 the proper line number and file name.
22312 (DEFS): Propagate the location of bison library files and of the
22314 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22316 * acinclude.m4: Remove, replaced by the directory m4.
22317 * m4/Makefile.am (EXTRA_DIST): New variable.
22318 * m4/gettext.m4: New file, from the fileutils.
22319 * m4/lcmessage.m4: Likewise
22320 * m4/progtest.m4: Likewise.
22321 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22323 2000-03-10 Akim Demaille <akim@epita.fr>
22326 Formatting changes of various comments.
22327 Respect the GNU coding standards at various places.
22328 Don't use `_()' when no translation is needed.
22330 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22333 OS/2 honors TMPDIR environment variable.
22335 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22337 * doc/bison.texinfo: Tweaked spelling and grammar.
22339 Removed reference to price of printed copy.
22340 Mention BISON_SIMPLE and BISON_HAIRY.
22342 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22344 * configure.in, NEWS:
22345 Bison 1.29 released.
22347 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22349 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22350 Added reference card.
22352 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22354 * po/ru.po: Added Russian translation.
22356 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22358 * configure.in: Added Russian translation.
22360 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22362 * configure.in, NEWS, README:
22363 Released version 1.28.
22365 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22368 Squashed redefinition warning on some systems.
22370 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22371 Have configure build version string instead of relying on ANSI string
22374 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22376 * po/POTFILES.in: Got rid of version.c.
22378 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22380 * acconfig.h, configure.in:
22381 Have configure build version string instead of relying on ANSI string
22384 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22387 Dropped mention of `+' for long-named options.
22389 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22391 * src/files.c: Added <unistd.h> for unlink().
22393 * src/Makefile.am, src/system.h:
22396 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22398 * README: Added a FAQ list.
22400 * configure.in, acconfig.h:
22403 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22405 * doc/FAQ, doc/Makefile.am:
22408 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22410 * src/alloc.h, src/symtab.h, src/version.c:
22411 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22413 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22415 * src/.cvsignore, src/Makefile.am:
22416 Reorganized: sources in `src', documentation in `doc'.
22418 * src/lex.c (literalchar):
22419 fixed the code for escaping double quotes (thanks
22422 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22424 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22425 Adjusted paths to reflect directory reorganization.
22427 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22429 * doc/.cvsignore, doc/Makefile.am:
22430 Reorganized: sources in `src', documentation in `doc'.
22432 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22435 Updated AC_INIT file to reflect directory reorganization.
22437 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22438 Reorganized: sources in `src', documentation in `doc'.
22440 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22443 Don't declare calloc() and realloc() if not necessary.
22445 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22447 * configure.in, acconfig.h, acinclude.m4:
22448 Don't declare calloc() and realloc() if not necessary.
22450 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22452 * po/.cvsignore: Added i18n support.
22454 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22456 * acconfig.h, configure.in, Makefile.am:
22457 Added i18n support.
22459 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22461 * src/bison.s1: Fixed #line numbers.
22463 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22465 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22466 Added PO files from Translation Project.
22468 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22471 Added support for non-ANSI compilers (ansi2knr).
22473 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22475 * configure.in: Bumped version number to 1.27.
22478 Added `bison.simple' to list of files removed by `make distclean'.
22480 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22482 * src/files.c, src/files.h:
22483 Defined locations of parser files in config.h instead of Makefile.
22485 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22487 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22488 Defined locations of parser files in config.h instead of Makefile.
22490 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22493 Removed inappropriate use of $< macro.
22495 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22497 * po/Makefile.in.in, po/POTFILES.in:
22498 Add `po' directory skeleton.
22500 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22502 * README: Document help-bison list.
22504 * configure.in: Add check for mkstemp().
22506 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22508 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22509 Hush a few compiler warnings.
22512 Add tryclose(), which verifies that fclose was successful.
22513 Hush a couple of compiler warnings.
22515 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22517 * Makefile.am, OChangeLog:
22518 ChangeLog is now automatically generated. Include the old version as
22521 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22523 * 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:
22524 Update FSF address.
22526 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22528 * doc/bison.texinfo: Fix formatting glitch.
22530 * doc/bison.texinfo: Update FSF address.
22532 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22534 * acconfig.h: Update FSF address.
22536 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22539 Don't define PACKAGE here, since config.h defines it.
22541 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22543 * src/reader.c: Update copyright date.
22546 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22547 favor of output directly to stderr (avoids buffer overruns).
22549 * src/reader.c: Some checks for premature EOF.
22551 * 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:
22552 Use prototypes if the compiler understands them.
22554 * src/files.c: Honor TMPDIR on Unix hosts.
22555 Use prototypes if the compiler understands them.
22558 Fix a couple of buffer overrun bugs.
22559 Use prototypes if the compiler understands them.
22561 * src/system.h: Include unistd.h and ctype.h.
22562 Use #ifdef instead of #if for NLS symbols.
22564 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22566 * doc/bison.texinfo:
22567 Delete comment "consider using @set for edition number, etc..." since
22568 we now are doing so.
22570 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22573 Use prototypes if the compiler understands them.
22575 * NEWS: Document 1.26 highlights.
22577 * Makefile.am: Require Automake 1.3 or later.
22580 Use prototypes if the compiler understands them.
22582 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22585 Use VERSION symbol from automake for version number.
22587 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22589 * acconfig.h, configure.in, version.cin:
22590 Use VERSION symbol from automake for version number.
22592 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22595 Distribute original version of simple parser (bison.s1), not built
22596 version (bison.simple).
22598 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22600 * doc/bison.texinfo: Add info dir entry.
22602 * doc/bison.texinfo:
22603 Let automake put version number into documentation.
22605 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22607 * src/bison.cld, src/build.com, src/vmshlp.mar:
22608 Add non-RCS files from /gd/gnu/bison.
22610 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22613 Document the BISON_HAIRY and BISON_SIMPLE variables.
22615 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22617 * src/version.c: Build version.c automatically.
22620 Fix token numbering (used to start at 258, not 257).
22622 * src/system.h: Include config.h.
22624 * src/getargs.c: Update bug report address.
22626 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22627 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22629 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22632 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22634 * configure.in, version.cin:
22635 Build version.c automatically.
22637 * AUTHORS: Add AUTHORS file.
22639 * README: Update bug report address.
22642 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22644 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22645 Add automake stuff.
22647 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22649 * doc/bison.texinfo: Clean up some formatting.
22651 1998-05-05 Richard Stallman <rms@gnu.org>
22653 * doc/bison.texinfo:
22654 Explain better why to make a pure parser.
22656 1998-01-05 Richard Stallman <rms@gnu.org>
22658 * src/files.c (openfiles):
22659 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22660 find a temporary directory, if possible. Do not unlink files while
22663 1997-08-25 Richard Stallman <rms@gnu.org>
22665 * src/reader.c (stack_offset;):
22666 Change some warni to warns.
22668 * src/lex.c (literalchar): Use warns, not warni.
22670 1997-06-28 Richard Stallman <rms@gnu.org>
22672 * src/bison.s1: Add a Bison version comment.
22674 * src/main.c (fatal, warn, berror):
22677 1997-06-28 Richard Stallman <rms@gnu.org>
22679 * Makefile.in (bison_version): New variable.
22680 (dist): Use that variable.
22681 (bison.s1): Substitute the Bison version into bison.simple.
22683 * bison.simple: Add a Bison version comment.
22685 1997-06-18 Richard Stallman <rms@gnu.org>
22687 * src/main.c (fatal, warn, berror):
22688 Make error messages standard.
22689 (toomany): Improve error message text.
22691 * 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:
22692 new.h renamed to alloc.h.
22694 1997-06-18 Richard Stallman <rms@gnu.org>
22696 * Makefile.in: new.h renamed to alloc.h.
22698 1997-05-24 Richard Stallman <rms@gnu.org>
22700 * src/lex.c (literalchar):
22701 Fix the code for escaping \, " and '.
22703 (lex): Avoid trouble when there are many chars
22704 to discard in a char literal with just several chars in it.
22706 1997-05-17 Richard Stallman <rms@gnu.org>
22709 Use malloc, if using alloca is troublesome.
22710 (YYSTACK_USE_ALLOCA): New flag macro.
22711 Define it for some systems and compilers.
22712 (YYSTACK_ALLOC): New macro.
22713 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22714 If it was malloc'd, free 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-04-23 Richard Stallman <rms@gnu.org>
22729 (alloca) [__hpux]: Always define as __builtin_alloca.
22731 1997-04-23 Richard Stallman <rms@gnu.org>
22734 (alloca) [__hpux]: Always define as __builtin_alloca.
22736 1997-04-22 Richard Stallman <rms@gnu.org>
22739 [__hpux]: Include alloca.h (right for HPUX 10)
22740 instead of declaring alloca (right for HPUX 9).
22742 * src/bison.s1 (__yy_memcpy):
22743 Declare arg `count' as unsigned int.
22744 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
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 * bison.simple (__yy_memcpy):
22753 Declare arg `count' as unsigned int.
22754 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22756 1997-01-03 Richard Stallman <rms@gnu.org>
22758 * src/allocate.c: [__STDC__ or _MSC_VER]:
22759 Declare calloc and realloc to return void *.
22761 1997-01-02 Richard Stallman <rms@gnu.org>
22764 [_MSC_VER]: Include stdlib.h and process.h.
22765 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22767 * src/main.c (main): Return FAILURE as a value.
22768 (printable_version): Declare arg as int, not char.
22770 1997-01-02 Richard Stallman <rms@gnu.org>
22772 * Makefile.in (dist):
22773 Explicitly check for symlinks, and copy them.
22775 1996-12-19 Richard Stallman <rms@gnu.org>
22778 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22780 1996-12-18 Paul Eggert <eggert@gnu.org>
22782 * src/bison.s1 (yyparse):
22783 If __GNUC__ and YYPARSE_PARAM are both defined,
22784 declare yyparse to have a void * argument.
22786 1996-12-18 Paul Eggert <eggert@gnu.org>
22788 * bison.simple (yyparse):
22789 If __GNUC__ and YYPARSE_PARAM are both defined,
22790 declare yyparse to have a void * argument.
22792 1996-12-17 Richard Stallman <rms@gnu.org>
22794 * src/reduce.c (nbits): Add some casts.
22796 1996-08-12 Richard Stallman <rms@gnu.org>
22798 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22800 1996-08-12 Richard Stallman <rms@gnu.org>
22802 * bison.simple: Test _MSDOS as well as _MSDOS_.
22804 1996-07-31 Richard Stallman <rms@gnu.org>
22807 [__sun && __i386]: Include alloca.h.
22809 1996-07-31 Richard Stallman <rms@gnu.org>
22812 [__sun && __i386]: Include alloca.h.
22814 1996-07-30 Richard Stallman <rms@gnu.org>
22816 * src/bison.s1: Comment change.
22818 * src/bison.s1: Test _MSDOS_, not MSDOS.
22820 1996-07-30 Richard Stallman <rms@gnu.org>
22822 * bison.simple: Comment change.
22824 * bison.simple: Test _MSDOS_, not MSDOS.
22826 1996-06-01 Richard Stallman <rms@gnu.org>
22828 * 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:
22829 Insert `_' macro around many string constants.
22832 Insert `_' macro around many string constants.
22834 (main): Call setlocale, bindtextdomain and textdomain.
22836 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22837 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22838 [ENABLE_NLS]: Include libintl.h.
22839 [ENABLE_NLS] (gettext): Define.
22840 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22841 (N_, PACKAGE, LOCALEDIR): New macros.
22843 1996-06-01 Richard Stallman <rms@gnu.org>
22845 * POTFILES.in: New file.
22847 * Makefile.in (allocate.o):
22848 Define target explicitly.
22850 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22851 (LDFLAGS): Set to @LDFLAGS@.
22852 (configure): Run autoconf only if preceding `cd' succeeds.
22853 (bison.s1): Redirect output to temporary file then move the
22854 temporary to the target, rather than redirecting directly to bison.s1.
22855 (clean): Remove config.status and config.log.
22856 (distclean): Don't remove config.status here.
22858 1996-05-12 Richard Stallman <rms@gnu.org>
22861 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22863 1996-05-12 Richard Stallman <rms@gnu.org>
22866 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22868 1996-05-11 Richard Stallman <rms@gnu.org>
22870 * src/bison.s1 (__yy_memcpy):
22871 Really reorder the args, as was supposedly done on Feb 14 1995.
22872 (yyparse): Calls changed accordingly.
22874 1996-05-11 Richard Stallman <rms@gnu.org>
22876 * Makefile.in (dist): Don't use $(srcdir).
22878 * bison.simple (__yy_memcpy):
22879 Really reorder the args, as was supposedly done on Feb 14 1995.
22880 (yyparse): Calls changed accordingly.
22882 1996-01-27 Richard Stallman <rms@gnu.org>
22884 * src/output.c (output_rule_data):
22885 Test YYERROR_VERBOSE in the conditional
22886 around the definition of ttyname.
22888 1995-12-29 Richard Stallman <rms@gnu.org>
22891 Fix line numbers in #line commands.
22893 1995-12-29 Richard Stallman <rms@gnu.org>
22896 Fix line numbers in #line commands.
22898 1995-12-27 Richard Stallman <rms@gnu.org>
22900 * src/bison.s1 (YYPARSE_PARAM_DECL):
22901 In C++, make it always null.
22902 (YYPARSE_PARAM_ARG): New macro.
22903 (yyparse): Use YYPARSE_PARAM_ARG.
22905 1995-12-27 Richard Stallman <rms@gnu.org>
22907 * bison.simple (YYPARSE_PARAM_DECL):
22908 In C++, make it always null.
22909 (YYPARSE_PARAM_ARG): New macro.
22910 (yyparse): Use YYPARSE_PARAM_ARG.
22912 1995-11-29 Richard Stallman <rms@gnu.org>
22914 * doc/bison.texinfo:
22915 Describe literal string tokens, %raw, %no_lines, %token_table.
22917 1995-11-29 Daniel Hagerty <hag@gnu.org>
22919 * doc/bison.texinfo: Fixed update date
22921 1995-10-16 Richard Stallman <rms@gnu.org>
22923 * src/version.c: Version 1.25.
22925 1995-10-16 Richard Stallman <rms@gnu.org>
22927 * NEWS: *** empty log message ***
22929 1995-10-16 Richard Stallman <rms@gnu.org>
22931 * doc/bison.1, doc/bison.rnh:
22934 1995-10-15 Richard Stallman <rms@gnu.org>
22936 * src/vmsgetargs.c, src/getargs.c:
22937 Added -n, -k, and -raw switches.
22938 (noparserflag, toknumflag, rawtoknumflag): New variables.
22940 * src/symtab.h (SALIAS):
22941 New #define for adding aliases to %token.
22942 (struct bucket): Added `alias' field.
22944 * src/reduce.c (reduce_grammar):
22945 Revise error message.
22946 (print_notices): Remove final `.' from error message.
22948 * src/reader.c (reader_output_yylsp):
22950 (readgram): Use `#if 0' around code that accepted %command
22951 inside grammar rules: The documentation doesn't allow it,
22952 and it will fail since the %command processors scan for the next %.
22953 (parse_token_decl): Extended the %token
22954 declaration to allow a multi-character symbol as an alias.
22955 (parse_thong_decl): New function.
22956 (read_declarations): Added %thong declarations.
22957 (read_declarations): Handle NOOP to deal with allowing
22958 % declarations as another means to specify the flags.
22959 (readgram): Allow %prec prior to semantics embedded in a rule.
22960 (skip_to_char, read_declarations, copy_definition)
22961 (parse_token_decl, parse_start_decl, parse_type_decl)
22962 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22963 (get_type_name, copy_guard, copy_action, readgram)
22964 (get_type, packsymbols): Revised most error messages.
22965 Changed `fatal' to `warnxxx' to avoid aborting for error.
22966 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22967 (read_declarations): Improve the error message for
22968 an invalid character. Do not abort.
22969 (read_declarations, copy_guard, copy_action): Use
22970 printable_version to avoid unprintable characters in printed output.
22971 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22972 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22973 Allow the type of a non-terminal can be given
22974 more than once, as long as all specifications give the same type.
22977 (output_headers, output_trailers, output, output_gram)
22978 (output_rule_data): Implement noparserflag variable.
22979 Implement toknumflag variable.
22980 (output): Call reader_output_yylsp to output LTYPESTR.
22982 * src/main.c (main):
22983 If reader sees an error, don't process the grammar.
22984 (fatals): Updated to not use VARARGS1.
22985 (printable_version, int_to_string, warn, warni, warns, warnss)
22986 (warnsss): New error reporting functions. Avoid abort for error.
22989 Added THONG and NOOP for alias processing.
22990 Added SETOPT for the new code that allows setting options with %flags.
22993 Include getopt.h. Add some extern decls.
22994 (safegetc): New function to deal with EOF gracefully.
22995 (literalchar); new function to deal with reading \ escapes.
22996 (lex): Use literalchar.
22997 (lex): Implemented "..." tokens.
22998 (literalchar, lex, parse_percent_token): Made tokenbuffer
22999 always contain the token. This includes growing the token
23000 buffer while reading an integer.
23001 (parse_percent_token): Replaced if-else statement with percent_table.
23002 (parse_percent_token): Added % declarations as another
23003 way to specify the flags -n, -l, and -r. Also added hooks for
23004 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23005 major changes to files.c.
23006 (lex) Retain in the incoming stream a character following
23008 (skip_white_space, lex): Revised most error messages
23009 and changed fatal to warn to avoid aborting.
23010 (percent_table): Added %thong declarations.
23012 * src/gram.h: Comment changes.
23014 * src/files.c (openfiles, open_extra_files, done):
23016 and actfile file. Handle noparserflag. Both for -n switch.
23018 * src/conflicts.c (resolve_sr_conflict):
23019 Remove use of alloca.
23021 1995-06-01 Jim Meyering <meyering@gnu.org>
23023 * doc/bison.texinfo: *** empty log message ***
23025 1995-05-06 Richard Stallman <rms@gnu.org>
23027 * src/bison.s1: Comment change.
23029 1995-05-06 Richard Stallman <rms@gnu.org>
23031 * bison.simple: Comment change.
23033 1995-05-03 Richard Stallman <rms@gnu.org>
23035 * src/version.c: Version now 1.24.
23037 * src/bison.s1: Change distribution terms.
23039 * src/version.c: Version now 1.23.
23041 1995-05-03 Richard Stallman <rms@gnu.org>
23043 * doc/bison.texinfo:
23044 Rewrite "Conditions for Using Bison".
23045 Update version to 1.24.
23047 1995-05-03 Richard Stallman <rms@gnu.org>
23049 * bison.simple: Change distribution terms.
23051 1995-02-23 Richard Stallman <rms@gnu.org>
23053 * src/files.c: Test __VMS_POSIX as well as VMS.
23055 1995-02-14 Jim Meyering <meyering@gnu.org>
23057 * src/bison.s1 (__yy_memcpy):
23058 Renamed from __yy_bcopy to avoid
23059 confusion. Reverse FROM and TO arguments to be consistent with
23062 1995-02-14 Jim Meyering <meyering@gnu.org>
23064 * bison.simple (__yy_memcpy):
23065 Renamed from __yy_bcopy to avoid
23066 confusion. Reverse FROM and TO arguments to be consistent with
23069 1994-11-10 David J. MacKenzie <djm@gnu.org>
23075 * Makefile.in (DISTFILES): Include NEWS.
23077 * Makefile.in (DISTFILES):
23078 Include install-sh, not install.sh.
23080 * configure.in: Update to Autoconf v2 macro names.
23082 1994-10-05 David J. MacKenzie <djm@gnu.org>
23084 * Makefile.in: fix typo
23086 * Makefile.in (prefix, exec_prefix):
23087 Let configure set them.
23089 1994-09-28 David J. MacKenzie <djm@gnu.org>
23091 * Makefile.in: Set datadir to $(prefix)/share.
23093 1994-09-15 Richard Stallman <rms@gnu.org>
23096 Update copyright notice and GPL version.
23098 1994-09-15 Richard Stallman <rms@gnu.org>
23101 Update copyright notice and GPL version.
23103 1994-07-12 Richard Stallman <rms@gnu.org>
23105 * src/reduce.c, src/reader.c:
23108 1994-05-05 David J. MacKenzie <djm@gnu.org>
23110 * Makefile.in: entered into RCS
23112 1994-03-26 Richard Stallman <rms@gnu.org>
23114 * src/bison.s1: entered into RCS
23116 1994-03-26 Richard Stallman <rms@gnu.org>
23118 * bison.simple: entered into RCS
23120 1994-03-25 Richard Stallman <rms@gnu.org>
23122 * src/main.c: entered into RCS
23124 1994-03-24 Richard Stallman <rms@gnu.org>
23126 * src/conflicts.c: entered into RCS
23128 1994-01-02 Richard Stallman <rms@gnu.org>
23130 * Makefile.in: *** empty log message ***
23132 1993-11-21 Richard Stallman <rms@gnu.org>
23134 * src/bison.s1: *** empty log message ***
23136 1993-11-21 Richard Stallman <rms@gnu.org>
23138 * doc/bison.texinfo: entered into RCS
23140 * doc/bison.texinfo: *** empty log message ***
23142 1993-11-21 Richard Stallman <rms@gnu.org>
23144 * bison.simple: *** empty log message ***
23146 1993-10-25 David J. MacKenzie <djm@gnu.org>
23148 * doc/bison.texinfo: *** empty log message ***
23150 1993-10-19 Richard Stallman <rms@gnu.org>
23152 * src/bison.s1: *** empty log message ***
23154 1993-10-19 Richard Stallman <rms@gnu.org>
23156 * bison.simple: *** empty log message ***
23158 1993-10-14 Richard Stallman <rms@gnu.org>
23160 * src/bison.s1: *** empty log message ***
23162 1993-10-14 Richard Stallman <rms@gnu.org>
23164 * bison.simple: *** empty log message ***
23166 1993-09-14 David J. MacKenzie <djm@gnu.org>
23168 * doc/bison.texinfo: *** empty log message ***
23170 1993-09-13 Noah Friedman <friedman@gnu.org>
23172 * Makefile.in: *** empty log message ***
23174 1993-09-10 Richard Stallman <rms@gnu.org>
23176 * src/conflicts.c: *** empty log message ***
23178 * src/system.h: entered into RCS
23180 1993-09-10 Richard Stallman <rms@gnu.org>
23182 * doc/bison.1: entered into RCS
23184 1993-09-06 Noah Friedman <friedman@gnu.org>
23186 * src/version.c: entered into RCS
23188 1993-09-06 Noah Friedman <friedman@gnu.org>
23190 * Makefile.in: *** empty log message ***
23192 1993-07-30 David J. MacKenzie <djm@gnu.org>
23194 * Makefile.in: *** empty log message ***
23196 1993-07-24 Richard Stallman <rms@gnu.org>
23198 * src/bison.s1: *** empty log message ***
23200 1993-07-24 Richard Stallman <rms@gnu.org>
23202 * bison.simple: *** empty log message ***
23204 1993-07-08 David J. MacKenzie <djm@gnu.org>
23206 * Makefile.in: *** empty log message ***
23208 1993-07-04 Richard Stallman <rms@gnu.org>
23210 * src/bison.s1: *** empty log message ***
23212 1993-07-04 Richard Stallman <rms@gnu.org>
23214 * bison.simple: *** empty log message ***
23216 1993-06-26 David J. MacKenzie <djm@gnu.org>
23218 * src/getargs.c: entered into RCS
23220 1993-06-26 David J. MacKenzie <djm@gnu.org>
23222 * doc/bison.texinfo: *** empty log message ***
23224 * doc/bison.1: New file.
23226 1993-06-25 Richard Stallman <rms@gnu.org>
23228 * src/getargs.c: New file.
23230 1993-06-16 Richard Stallman <rms@gnu.org>
23232 * src/bison.s1: *** empty log message ***
23234 1993-06-16 Richard Stallman <rms@gnu.org>
23236 * bison.simple: *** empty log message ***
23238 1993-06-03 Richard Stallman <rms@gnu.org>
23240 * src/bison.s1: New file.
23242 1993-06-03 Richard Stallman <rms@gnu.org>
23244 * doc/bison.texinfo: *** empty log message ***
23246 1993-06-03 Richard Stallman <rms@gnu.org>
23248 * bison.simple: New file.
23250 1993-05-19 Richard Stallman <rms@gnu.org>
23252 * doc/bison.texinfo: New file.
23254 1993-05-07 Noah Friedman <friedman@gnu.org>
23256 * Makefile.in: *** empty log message ***
23258 1993-04-28 Noah Friedman <friedman@gnu.org>
23260 * src/reader.c: *** empty log message ***
23262 1993-04-23 Noah Friedman <friedman@gnu.org>
23264 * src/alloc.h: entered into RCS
23266 1993-04-20 David J. MacKenzie <djm@gnu.org>
23268 * src/version.c: *** empty log message ***
23270 * src/files.c, src/allocate.c:
23273 * src/reader.c: *** empty log message ***
23275 * src/lex.c: entered into RCS
23277 * src/conflicts.c: New file.
23279 * src/symtab.c: entered into RCS
23281 * src/alloc.h: New file.
23283 * src/LR0.c: entered into RCS
23285 1993-04-18 Noah Friedman <friedman@gnu.org>
23287 * src/reader.c: New file.
23289 * src/version.c: *** empty log message ***
23291 1993-04-18 Noah Friedman <friedman@gnu.org>
23293 * Makefile.in: *** empty log message ***
23295 1993-04-17 Noah Friedman <friedman@gnu.org>
23297 * Makefile.in: *** empty log message ***
23299 1993-04-15 Richard Stallman <rms@gnu.org>
23301 * src/main.c, src/files.c:
23304 1993-04-15 Noah Friedman <friedman@gnu.org>
23306 * configure.in: entered into RCS
23308 * configure.in: *** empty log message ***
23310 * configure.in: New file.
23312 1993-04-14 Richard Stallman <rms@gnu.org>
23314 * Makefile.in: New file.
23316 1993-04-13 Richard Stallman <rms@gnu.org>
23318 * src/version.c: New file.
23320 1993-03-25 Richard Stallman <rms@gnu.org>
23322 * src/output.c: entered into RCS
23324 1992-09-25 Richard Stallman <rms@gnu.org>
23326 * configure.bat: entered into RCS
23328 1992-06-22 Richard Stallman <rms@gnu.org>
23330 * src/vmsgetargs.c: entered into RCS
23332 1992-06-22 Richard Stallman <rms@gnu.org>
23334 * doc/bison.rnh: entered into RCS
23336 1992-04-20 David J. MacKenzie <djm@gnu.org>
23338 * README: entered into RCS
23340 1992-01-22 Richard Stallman <rms@gnu.org>
23342 * src/machine.h: entered into RCS
23344 1991-12-21 Richard Stallman <rms@gnu.org>
23346 * src/lalr.c, src/closure.c:
23349 1991-12-20 Richard Stallman <rms@gnu.org>
23351 * src/state.h: entered into RCS
23353 1991-12-18 Richard Stallman <rms@gnu.org>
23355 * src/print.c, src/nullable.c, src/derives.c:
23358 1991-11-03 David J. MacKenzie <djm@gnu.org>
23360 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23363 1988-09-09 Richard Stallman <rms@gnu.org>
23365 * src/bison.hairy: entered into RCS
23367 1987-12-16 Richard Stallman <rms@gnu.org>
23369 * REFERENCES: entered into RCS
23374 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23375 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23376 2008, 2009, 2010 Free Software Foundation, Inc.
23378 Copying and distribution of this file, with or without
23379 modification, are permitted provided the copyright notice and this
23380 notice are preserved.