]> git.saurik.com Git - bison.git/blob - ChangeLog
maint: re-anchor all .gitignore entries.
[bison.git] / ChangeLog
1 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
2
3 maint: re-anchor all .gitignore entries.
4 * bootstrap: Copy from gnulib's latest for the fix to
5 automatically anchor entries it constructs.
6 * gnulib: Update to latest just so it has the same bootstrap.
7 * .gitignore, build-aux/.gitignore, doc/.gitignore:
8 * lib/.gitignore, m4/.gitignore, po/.gitignore:
9 * runtime-po/.gitignore: Re-anchor all entries.
10
11 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
12
13 Fix portability problem on OpenBSD 4.7.
14
15 Jim Meyering reported this in
16 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
17 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
18 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
19 for quite some time.
20 * src/parse-gram.c, src/parse-gram.h: Regenerate.
21 * tests/regression.at: Tamper with the renamed witness.
22
23 Adjust to recent changes to gnulib bootstrap.
24
25 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
26 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
27 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
28 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
29 anymore and don't know of anybody else who does. If someone needs
30 these files, they can resurrect them.
31 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
32 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
33 Omit leading '/', since bootstrap omits it.
34 Adjust file names to match current contents better.
35 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
36 installed just for us.
37 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
38 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
39 needed somehow. Don't have time to look into why.
40 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
41 the GNU malloc behavior, where malloc (0) != NULL unless we're
42 out of storage? If not, we can omit malloc-gnu; but for now I left
43 it in to be safe.
44 (vc_ignore): Remove.
45 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
46 uses that convention.
47
48 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
49
50 Version 2.4.3.
51 * NEWS (2.4.3): Set date.
52
53 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
54
55 maint: add gettext version to release announcements.
56 Suggested by Paul Hilfinger at
57 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
58 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
59 * cfg.mk (bootstrap-tools): Add gettext.
60
61 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
62
63 doc: fix -W and %expect documentation some.
64 * NEWS (2.4.3): Mention that there are documentation fixes.
65 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
66 turns conflicts into errors not warnings.
67 (Shift/Reduce): Likewise.
68 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
69
70 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
71
72 -Werror: fix for rules useless in parser after conflicts.
73 * NEWS (2.4.3): Document fix.
74 * src/complain.c (error_message): Extend to handle incomplete
75 error messages so warn and warn_at can be used in more cases.
76 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
77 -Werror is always obeyed.
78 * src/reduce.c (reduce_print): Use warn so that the "warnings
79 being treated as errors" message is printed consistently before
80 the first warning message. This makes testing easier.
81 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
82 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
83 --warnings=error when warnings appear in bison's stderr.
84
85 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
86
87 maint: enable gnits only at stable releases.
88 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
89 version string should disable gnits. Explain in comments.
90
91 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
92
93 i18n: update.
94 * po/POTFILES.in: Add src/graphviz.c.
95
96 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
97
98 i18n: fix for gnulib.
99 * po/POTFILES.in: Add remaining gnulib files that have
100 translatable strings.
101
102 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
103
104 maint: use announce-gen's new --mail-headers.
105 * HACKING (Announce): Update instructions.
106 * cfg.mk (announcement_Cc_): Define.
107 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
108 required by latest gnulib.
109 * gnulib: Update to latest.
110
111 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
112
113 tests: handle Valgrind that complains about >&-.
114 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
115 (Output files: -dv >&-): Skip test group if running
116 maintainer-check-valgrind.
117
118 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
119
120 Update from GFDL GFDL 1.2 to 1.3.
121 * doc/bison.texinfo: Update GFDL version number.
122 * doc/fdl.texi: Update to version 1.3, taken from:
123 http://www.gnu.org/licenses/fdl.texi
124
125 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
126
127 Do not use date ranges in copyright notices.
128 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
129
130 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
131 * TODO, bootstrap, bootstrap.conf:
132 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
133 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
134 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
135 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
136 * data/lalr1.java, data/location.cc:
137 * data/xslt/bison.xsl:
138 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
139 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
140 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
141 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
142 * djgpp/subpipe.c, djgpp/subpipe.h:
143 * djgpp/testsuite.sed, doc/bison.texinfo:
144 * doc/refcard.tex, etc/README, etc/bench.pl.in:
145 * examples/calc++/Makefile.am, examples/extexi:
146 * lib/abitset.c, lib/abitset.h:
147 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
148 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
149 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
150 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
151 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
152 * lib/libiberty.h, lib/main.c, lib/timevar.c:
153 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
154 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
155 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
156 * src/AnnotationList.c, src/AnnotationList.h:
157 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
158 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
159 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
160 * src/complain.h, src/conflicts.c, src/conflicts.h:
161 * src/derives.c, src/derives.h, src/files.c, src/files.h:
162 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
163 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
164 * src/ielr.h, src/lalr.c, src/lalr.h:
165 * src/location.c, src/location.h, src/main.c:
166 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
167 * src/named-ref.h, src/nullable.c, src/nullable.h:
168 * src/output.c, src/output.h, src/parse-gram.y:
169 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
170 * src/print_graph.c, src/print_graph.h, src/reader.c:
171 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
172 * src/relation.h, src/scan-code.h, src/scan-code.l:
173 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
174 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
175 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
176 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
177 * tests/actions.at, tests/atlocal.in, tests/c++.at:
178 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
179 * tests/existing.at, tests/glr-regression.at:
180 * tests/headers.at, tests/input.at, tests/java.at:
181 * tests/local.at, tests/named-refs.at:
182 * tests/output.at, tests/push.at, tests/reduce.at:
183 * tests/regression.at, tests/sets.at, tests/skeletons.at:
184 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
185 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
186 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
187 * etc/Makefile.am:
188 Don't use date ranges in copyright notices.
189
190 2010-05-11 Akim Demaille <demaille@gostai.com>
191
192 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
193 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
194 header file to the implementation file, after the user %code
195 sections.
196 * NEWS (2.5): Document this.
197
198 2010-05-07 Akim Demaille <demaille@gostai.com>
199
200 c++: use YYRHSLOC.
201 * data/lalr1.cc (YYRHSLOC): New.
202 (YYLLOC_DEFAULT): Use it.
203 * data/glr.cc: If location_type was user defined, do not include
204 location.hh, and do not produce location.hh and position.hh.
205 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
206 Check that glr.cc supports user defined location_type.
207 * NEWS: Document this.
208
209 2010-05-10 Akim Demaille <demaille@gostai.com>
210
211 doc: fix lalr1.cc documentation.
212 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
213 (C++ Bison Interface): Fix lalr1.cc skeleton name.
214 (C++ Parser Interface): Fix semantic_type and location_type names.
215 Document yy::parser::token.
216 Reported by Jerry Quinn.
217
218 2010-05-04 Akim Demaille <demaille@gostai.com>
219
220 lalr1.cc: don't generate location.hh when location_type is defined
221 * data/bison.m4 (b4_percent_define_use): New.
222 (b4_percent_define_get): Use it.
223 Accept a default value.
224 * data/c++.m4: Do not provide a default value for the %define
225 variable location_type, rather, use b4_percent_define_get with a
226 default argument where its value is needed.
227 * data/lalr1.cc: Do not load location.cc (which outputs both
228 location.hh and position.hh) if the user defined location_type.
229 Do not include location.hh either.
230 * data/glr.cc: Likewise.
231
232 2010-05-04 Akim Demaille <demaille@gostai.com>
233
234 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
235 * tests/calc.at (Span): Instead of begin/end, as in the built-in
236 location class, use first and last.
237 Define YYLLOC_DEFAULT to adjust to these changes.
238 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
239 location_type changes.
240
241 2010-05-04 Akim Demaille <demaille@gostai.com>
242
243 tests: enhance AT_SYNCLINES_COMPILE.
244 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
245 into...
246 (AT_SYNCLINES_COMPILE): here.
247 Add more distcc patterns.
248
249 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
250
251 tests: fix maintainer-xml-check.
252 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
253 Update output to include comments now produced by --graph.
254 (xsl:template match="automaton"): As for --graph, name the
255 digraph after the grammar file.
256 * src/print-xml.c (escape_bufs): Enlarge array.
257 (print_xml): Add bug-report and url attributes to
258 bison-xml-report element.
259
260 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
261
262 In DOT output, convert from "/*" comments to "//" comments.
263 This handles the possibility that a "*/" might appear in
264 variable portions of those comments at some point in the future.
265 * src/graphviz.c (start_graph): Implement.
266
267 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
268
269 Document that undefined %prec identifier warnings will remain.
270 * NEWS (2.4.3): Here.
271 (2.4.2): Here.
272
273 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
274
275 Revert 2009-12-30 change for undefined %prec token complaints.
276 That is, keep them as warnings because that should be sufficient
277 to satisfy POSIX without creating backward compatibility issues.
278 Suggested by Richard Stallman at
279 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
280 * NEWS (2.5): Remove mention of complaint.
281 * src/reader.c (grammar_rule_check): Convert complaint back to
282 warning.
283 * tests/input.at (%prec's token must be defined): Update.
284
285 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
286
287 build: don't require src/bison during bootstrap.
288 Suggested by Eric Blake at
289 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
290 * bootstrap.conf (bootstrap_epilogue): New function to make sure
291 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
292
293 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
294
295 i18n: fix untranslatable string.
296 Reported by Goran Uddeborg at
297 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
298 * src/muscle-tab.c (muscle_percent_define_insert): Here.
299
300 2010-04-13 Akim Demaille <demaille@gostai.com>
301
302 tests: calc: minor refactoring.
303 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
304
305 2010-04-13 Akim Demaille <demaille@gostai.com>
306
307 tests: calc: simplify location management.
308 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
309 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
310 define the appropriate AT_LOC accessors.
311 * tests/calc.at: Use AT_LOC accessors.
312
313 2010-04-13 Akim Demaille <demaille@gostai.com>
314
315 test location_type.
316 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
317 Define AT_LOCATION_TYPE_IF.
318 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
319 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
320 used, provide a user location type and use it.
321 (Simple LALR1 C++ Calculator): Add a test case for location_type.
322
323 2010-04-13 Akim Demaille <demaille@gostai.com>
324
325 tests: check fclose's return value.
326 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
327
328 2010-04-13 Akim Demaille <demaille@gostai.com>
329
330 tests: don't depend on the actual location type.
331 * tests/calc.at: Use yy::parser::location_type rather than
332 yy::location, since the former is always right, and might point to
333 another type than the latter.
334
335 2010-04-13 Akim Demaille <demaille@gostai.com>
336
337 formatting changes.
338 * tests/calc.at: Formatting changes.
339
340 2010-04-13 Akim Demaille <demaille@gostai.com>
341
342 lalr1.cc: remove useless forward declaration.
343 * data/lalr1.cc: Include location.hh before stack.hh.
344 Remove the useless forward declarations of position and location.
345 Reported by Chris Morley.
346 * data/glr.cc: Likewise.
347
348 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
349
350 * NEWS (2.4.3): Mention fix for Sun Studio C++.
351
352 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
353
354 tests: fix for newer Sun Studio C++.
355 Reported by Dagobert Michelsen at
356 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
357 * THANKS (Dagobert Michelsen): Add.
358 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
359 Autoconf macro for handling the restrict keyword.
360 * gnulib: Update to latest, which no longer overrides that macro
361 from Autoconf.
362
363 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
364
365 portability: fix pointer arithmetic to conform to C standard.
366 Reported by Tys Lefering at
367 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
368 This fix is already implemented in glr.c and does not apply to
369 lalr1.java.
370 * data/lalr1.cc (yy::parser::parse): Increase size of
371 yyerror_range and adjust subscripting so you don't have to
372 subtract one from the beginning of the array.
373 * data/yacc.c (b4_declare_parser_state_variables,
374 yyparse, yypush_parse): Likewise.
375
376 2010-04-05 Akim Demaille <demaille@gostai.com>
377
378 remove useless include.
379 * src/graphviz.h: Don't include stdbool.h.
380
381 2010-04-05 Akim Demaille <demaille@gostai.com>
382
383 graph: sign the output file.
384 * src/graphviz.c (start_graph): Issue comments about Bison.
385 Suggested by Tys Lefering.
386
387 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
388
389 portability: fix test suite for GCC 4.5's new #error message.
390 Reported by Tys Lefering at
391 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
392 * NEWS (2.4.3): Mention.
393 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
394
395 2010-03-30 Akim Demaille <demaille@gostai.com>
396
397 fix comments.
398 * src/graphviz.h: Add missing license notice.
399 Document.
400
401 2010-03-25 Akim Demaille <demaille@gostai.com>
402
403 tests: fix 250: parse.error=verbose overflow.
404 * tests/regression.at (parse.error=verbose overflow): Avoid the
405 double inclusion of stdlib.h as it triggers hard errors.
406
407 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
408
409 portability: fix for BSD make.
410 Reported by Johan van Selst at
411 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
412 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
413 this dependency list as in package.m4's target rule.
414
415 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
416
417 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
418 Reported by Johan van Selst at
419 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
420 * NEWS (2.4.3): New.
421 * THANKS (Johan van Selst): Add.
422 * gnulib: Update to latest.
423
424 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
425
426 maint: update for changes to gnulib's announce-gen.
427 * HACKING (Announce): RELEASE_TYPE=major must now be written
428 RELEASE_TYPE=stable.
429
430 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 Version 2.4.2.
433 * NEWS (2.4.2): Set version and date. For the recent test suite
434 portability fixes, don't be so optimistic about their success
435 given the lack of feedback on the affected platforms.
436
437 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
438
439 tests: fix maintainer-xml-check for recent changes.
440 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
441 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
442 output file whose name conflicts with a previous output file
443 is now never generated.
444
445 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
446
447 portability: fix several issues with M4 subprocess.
448
449 M4's output pipe was not being drained upon fatal errors during
450 scan_skel. As a result, broken-pipe messages from M4 were seen
451 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
452 failure in the test suite. The problem was that, on platforms
453 where the default disposition for SIGPIPE is ignore instead of
454 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
455 then reported it. However, there's some sort of race condition,
456 because the new test group occasionally succeeded.
457 Reported by Albert Chin at
458 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
459
460 There were also problems with the test suite livelocking on
461 Tru64 5.1b. Reported by Didier Godefroy at
462 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
463 Switching to create_pipe_bidi suggested by Akim Demaille.
464
465 To attempt to solve both of these problems, switch to gnulib's
466 create_pipe_bidi and register M4 process as a slave. Along the
467 way, clean up file name conflict handling, which was affected by
468 the broken-pipe problem before the switch.
469 * NEWS (2.4.2): Document.
470 * THANKS (Didier Godefroy): Add.
471 * bootstrap.conf (gnulib_modules): Add pipe.
472 * gnulib: Update to latest to make sure we have all the latest
473 fixes.
474 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
475 subpipe.c.
476 * po/POTFILES.in (lib/subpipe.c): Remove.
477 * src/files.c (compute_output_file_names): Update invocations
478 of output_file_name_check.
479 (output_file_name_check): In the case that the grammar file
480 would be overwritten, use complain instead of fatal, but replace
481 the output file name with /dev/null. Use the /dev/null solution
482 for the case of two conflicting output files as well because it
483 seems safer in case Bison one day tries to open both files at
484 the same time.
485 * src/files.h (output_file_name_check): Update prototype.
486 * src/output.c (output_skeleton): Use create_pipe_bidi and
487 wait_subprocess. Assert that scan_skel completely drains the
488 pipe.
489 * src/scan-skel.l (at_directive_perform): Update
490 output_file_name_check invocation.
491 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
492 grammar file actually isn't overwritten.
493 (Conflicting output files: -o foo.y): Update expected output.
494 * tests/skeletons.at (Fatal errors but M4 continues producing
495 output): New test group.
496
497 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
498
499 Update POTFILES.
500 * HACKING (Release Procedure): Add reminder about keeping
501 POTFILES files up-to-date.
502 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
503
504 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
505
506 Code cleanup.
507 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
508 which is already defined in atconfig.
509
510 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
511
512 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
513
514 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
515
516 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
517 * HACKING (Release Procedure): Update notes on copyright years.
518 * Makefile.am (update-package-copyright-year): New target rule.
519 * build-aux/update-package-copyright-year: New file.
520 * cfg.mk (update-copyright): Add update-package-copyright-year
521 as a dependency.
522
523 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
524
525 * bootstrap: Import improvements from latest gnulib.
526
527 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
528
529 build: require Automake 1.11.1 to avoid a security flaw.
530 * HACKING (Release Procedure): Don't document Automake security
531 flaw here.
532 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
533 why here.
534
535 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
536
537 gnulib: update to latest.
538
539 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
540
541 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
542
543 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
544
545 Thank the developer of the initial push parser implementation.
546 This unfortunate oversight is several years old.
547 * THANKS (Odd Arild Olsen): Add.
548
549 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
550
551 Fix some comments concerning LR(0) versus LALR(1).
552
553 Stop equating LR(0) with nondeterminism and LALR(1) with
554 determinism. That is, if all states are consistent, then LR(0)
555 tables are deterministic. On the other hand, LALR(1) tables
556 might be nondeterministic before conflict resolution, and GLR
557 permits LALR(1) tables to remain nondeterministic.
558 * src/LR0.c, src/LR0.h: Here.
559 * src/lalr.c, src/lalr.h: Here.
560 * src/main.c (main): Here.
561 * src/state.c, src/state.h: Here.
562
563 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
564 parser tables.
565
566 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
567
568 maint: run "make update-copyright"
569
570 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
571
572 POSIX: complain if %prec's token was not defined.
573 * NEWS (2.5): Document.
574 * src/reader.c (grammar_rule_check): Convert warning to
575 complaint.
576 * tests/input.at (%prec's token must be defined): Update.
577
578 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
579
580 POSIX: warn if %prec's token was not defined.
581 Reported by Florian Krohm at
582 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
583 * NEWS (2.4.2): Document.
584 * src/reader.c (grammar_rule_check): Implement.
585 (grammar_current_rule_prec_set): Add comments explaining that we
586 here assume a %prec identifier is a token, but we still manage
587 to support POSIX.
588 * tests/input.at (%prec's token must be defined): New test
589 group.
590
591 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
592
593 * HACKING (Release Procedure): Recommend a secure automake.
594
595 2008-12-11 Akim Demaille <demaille@gostai.com>
596
597 Propagate i18n changes into glr.c.
598 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
599 building the error message format dynamically.
600 * data/lalr1.java: Formatting changes.
601
602 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
603
604 Port small part of master's 11707b2b so future ports are easier.
605 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
606
607 2008-12-11 Akim Demaille <demaille@gostai.com>
608
609 Simplify the i18n of the error messages.
610 * data/lalr1.cc: Comment changes.
611
612 2008-11-11 Akim Demaille <demaille@gostai.com>
613
614 Prefer M4 to CPP.
615 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
616 YYERROR_VERBOSE.
617
618 2008-11-11 Akim Demaille <demaille@gostai.com>
619
620 Support i18n of the parse error messages.
621 * TODO (lalr1.cc/I18n): Remove.
622 * data/lalr1.cc (yysyntax_error_): Support the translation of the
623 error messages, as done in yacc.c.
624 Stay within the yy* pseudo namespace.
625
626 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
627
628 Port small part of master's 8901f32e so future ports are easier.
629 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
630 argument, but name it in the function definition only when
631 verbose error messages are enabled and it'll thus be used.
632 (yy::parser::parse): Update use of yysyntax_error_.
633
634 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
635
636 portability: `<' and `>' are not always defined on addresses.
637 Specifically, don't sort objects by their memory addresses when
638 they're not allocated in the same array or other object. Though
639 I haven't found a test case where that fails on my platform, C
640 says the behavior is undefined.
641 * src/AnnotationList.c (AnnotationList__insertInto): Remove
642 FIXME. Use new id field of InadequacyList nodes rather than
643 their memory addresses when sorting.
644 (AnnotationList__compute_from_inadequacies): Add
645 inadequacy_list_node_count argument to pass to
646 InadequacyList__new_conflict.
647 * src/AnnotationList.h
648 (AnnotationList__compute_from_inadequacies): Update prototype
649 and documentation for new argument.
650 * src/InadequacyList.c (InadequacyList__new_conflict): Add
651 node_count argument and use it to assign a unique ID.
652 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
653 (InadequacyList): Add id field.
654 (InadequacyList__new_conflict): Update prototype and
655 documentation for new argument.
656 * src/ielr.c (ielr_compute_annotation_lists): Update
657 AnnotationList__compute_from_inadequacies invocation.
658
659 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
660
661 Fix handling of yychar manipulation in user semantic actions.
662 The problem was that yacc.c didn't always update the yychar
663 translation afterwards. However, other skeletons appear to be
664 fine. glr.c appears to already translate yychar before every
665 use. lalr1.cc does not define yychar and does not document its
666 replacement, yyla, for users. It does provide yyclearin, but
667 that does not manipulate yyla and thus requires no translation
668 update. In lalr1.java, yychar is out of scope during semantic
669 actions.
670 * NEWS (2.5): Document.
671 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
672 yytoken here.
673 (yyparse, yypush_parse): Instead, translate before every use of
674 yytoken, and add comments explaining this approach.
675 * tests/actions.at (Destroying lookahead assigned by semantic
676 action): New test group checking that translation happens before
677 lookahead destructor calls at parser return. Previously,
678 incorrect destructors were called.
679 * tests/conflicts.at (%error-verbose and consistent
680 errors): New test group checking that translation happens at
681 syntax error detection before the associated verbose error
682 message and the associated lookahead destructor calls. While
683 the destructor call is fixed by this patch, the verbose error
684 message is currently incorrect due to another bug (see
685 comments in test group), so this is an expected failure for now.
686
687 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
688
689 YYFAIL: warn about uses and remove from lalr1.java.
690 * NEWS (2.5): Document.
691 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
692 and make it private. Update all uses.
693 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
694
695 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
696
697 YYFAIL: deprecate.
698 * NEWS (2.4.2): Document deprecation and the phase-out plan.
699 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
700 deprecation.
701 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
702 YYFAIL from GCC cpp's -Wunused-macros.
703 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
704 documentation.
705 (LocalWords): Remove YYFAIL.
706
707 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
708
709 Code cleanup.
710 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
711 function, which is no longer used.
712
713 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
714
715 Add gcc's -Wundef to test suite and fix another warning from it.
716 * NEWS (2.4.2): Update description of -Wundef fix.
717 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
718 (WARN_CFLAGS_TEST): New substitution.
719 * data/glr.c: Avoid warning about __STRICT_ANSI__.
720 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
721 WARN_CFLAGS.
722 (NO_WERROR_CFLAGS): Likewise.
723 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
724
725 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
726
727 * data/yacc.c: Reformat m4 a little.
728
729 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
730
731 Document gcc -Wundef fix.
732 * NEWS (2.4.2): Here.
733 * THANKS (Jonathan Nieder): Add.
734
735 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
736
737 Simplify y.tab.c when location tracking is disabled.
738 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
739 tracking is not enabled. Instead, unconditionally define
740 YY_LOCATION_PRINT as a no-op for backward compatibility.
741
742 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
743
744 Avoid warnings from gcc -Wundef y.tab.c.
745 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
746 defined before using them.
747 * data/lalr1.cc: Likewise.
748 * data/yacc.c: Likewise.
749
750 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
751
752 autoconf: update to latest for fix of M4 detection.
753 Reported by Eric Blake.
754 * submodules/autoconf: Update.
755
756 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
757
758 portability: use -DGNULIB_POSIXCHECK.
759 Reported by Eric Blake. See discussions at
760 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
761 and
762 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
763 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
764 * bootstrap.conf (gnulib_modules): Add all the printf modules
765 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
766 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
767 (excluded_files): Remove m4/printf-posix.m4.
768 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
769 lib/libbison.a so gnulib libraries can be linked.
770
771 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
772
773 Enable assertion output and --disable-assert for configure.
774 * bootstrap.conf (gnulib_modules): Add assert module.
775 * src/system.h (aver): Define as assert, and summarize the
776 discussion on this issue.
777
778 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
779
780 Expand GLR acronym in summary of Bison.
781 Based on discussion with Akim Demaille starting at
782 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
783 * doc/bison.texinfo (Introduction): Here.
784 * src/getargs.c (usage): Here.
785
786 2009-10-03 Alex Rozenman <rozenman@gmail.com>
787
788 Document named references.
789 * doc/bison.texinfo (Actions): Add new example and xref to
790 Using Named References node.
791 (Using Named References): New node.
792
793 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
794
795 cleanup.
796 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
797 of char*.
798 (Sbitset__isEmpty): Use Sbitset instead of char*.
799 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
800 instead of char. This helps to avoid casting errors.
801 (Sbitset__or): Use Sbitset instead of char*.
802
803 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
804
805 portability: don't assume 8-bit bytes.
806 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
807 * src/Sbitset.h (Sbitset__nbytes): Here.
808 (Sbitset__byteAddress): Here.
809 (Sbitset__bit_mask): Here.
810 (Sbitset__last_byte_mask): Here.
811 (Sbitset__ones): Here.
812 (SBITSET__FOR_EACH): Here.
813
814 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
815
816 portability: use va_start and va_end in the same function.
817 * src/complain.c (error_message): Move va_end from here...
818 (ERROR_MESSAGE): ... to here.
819
820 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
821
822 * data/bison.m4: Update comments for rename to muscle-tab.h.
823
824 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
825
826 Rename muscle_tab.* to muscle-tab.* for consistency with master.
827 * src/Makefile.am (bison_SOURCES): Update.
828 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
829 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
830 src/tables.c: Update include.
831 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
832 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
833 include.
834
835 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
836
837 Minor code cleanup.
838 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
839 replace all uses with UNIQSTR_CONCAT.
840 * src/uniqstr.c (uniqstr_vsprintf): New function.
841 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
842 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
843 macros.
844
845 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
846
847 Minor code cleanup.
848 * src/parse-gram.y: Clean up sorting of declarations.
849 Use types to simplify %printer declarations where possible.
850 Provide %printer for BRACKETED_ID and symbol.prec.
851 * src/symtab.c: Whitespace change.
852
853 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
854
855 tests: skip tests of file names that platform does not support.
856 Reported by Michael Raskin at
857 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
858 * THANKS (Michael Raskin): Add.
859 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
860 to fail at least for file names containing ":" or "\".
861
862 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
863
864 yysyntax_error: avoid duplicate lookahead collection.
865 Except when memory reallocation is required, this change
866 eliminates the need to invoke yysyntax_error twice and thus to
867 repeat the collection of lookaheads. It also prepares for
868 future extensions that will make those repetitions more
869 expensive and that will require additional memory management in
870 yysyntax_error. Finally, it fixes an obscure bug already
871 exercised in the test suite.
872 * data/yacc.c (yysyntax_error): Add arguments for message
873 buffer variables stored in the parser. Instead of size, return
874 status similar to yyparse status but indicating success of
875 message creation. Other than the actual reallocation of the
876 message buffer, import and clean up memory management code
877 from...
878 (yyparse, yypush_parse): ... here.
879 * tests/regression.at (%error-verbose overflow): No longer an
880 expected failure.
881
882 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
883
884 yysyntax_error: test memory management more.
885 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
886 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
887 New test group.
888 (%error-verbose overflow): New test group that reveals an
889 obscure bug. Expected fail for now.
890
891 2008-12-11 Akim Demaille <demaille@gostai.com>
892
893 Pass the token type to yysyntax_error.
894 * data/yacc.c (yysyntax_error): Take the transated token instead
895 of the raw number.
896 Adjust callers.
897
898 2008-12-11 Akim Demaille <demaille@gostai.com>
899
900 Simplify the i18n of the error messages.
901 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
902 of building dynamically the format string.
903
904 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
905
906 Remove dead code.
907 * src/symtab.c (symbol_pack): Here because every symbol's number
908 is always defined by this time.
909
910 2009-10-03 Alex Rozenman <rozenman@gmail.com>
911
912 Add additional space after periods in NEWS.
913 * NEWS (2.5): here.
914
915 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
916
917 Use the correct conversion specifier for size_t.
918 Reported by Jim Meyering.
919 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
920 because Sbitset__Index is size_t.
921 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
922
923 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
924
925 tests: don't abuse AT_BISON_CHECK.
926 * tests/regression.at (parse-gram.y: LALR = IELR): Move
927 additional shell commands outside of AT_BISON_CHECK.
928
929 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
930
931 tests: check that parse-gram.y's IELR and LALR are identical.
932 * tests/atlocal.in (abs_top_srcdir): New shell variable.
933 * tests/regression.at (parse-gram.y: LALR = IELR): New test
934 group.
935
936 2009-09-16 Akim Demaille <demaille@gostai.com>
937
938 doc: comment changes.
939 * doc/bison.texinfo: Comment changes.
940
941 2009-09-16 Akim Demaille <demaille@gostai.com>
942
943 doc: spell checking.
944 * doc/bison.texinfo: here.
945
946 2009-09-19 Alex Rozenman <rozenman@gmail.com>
947
948 Keep sub-messages aligned. Fix strings for translation.
949 * src/location.h (location_print): Add return value.
950 * src/location.c (location_print): Return number of printed
951 characters.
952 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
953 new functions.
954 * src/complain.cpp (indent_ptr): New static variable.
955 (error_message, complain_at_indent, warn_at_indent): Implement
956 the alignment mechanism.
957 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
958 for translations. Use new alignment mechanism.
959 * tests/named-ref.at: Adjust test-cases.
960 * NEWS (2.5): Add an announcement about named references.
961
962 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
963
964 tests: clean up push.at test group titles.
965 * tests/push.at: Remove "Push Parsing: " from test group titles
966 because these are already under the banner "Push Parsing Tests".
967
968 2009-09-12 Alex Rozenman <rozenman@gmail.com>
969
970 Provide an additional sub-message for clarity.
971 Add "symbol not found in production" error message when
972 an "invalid reference" is detected in named references
973 resolution.
974 * src/scan-code.l: Update "invalid reference" case.
975 * tests/named-ref.at: Adjust test-cases.
976
977 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
978
979 Clean up yacc.c a little.
980 * data/yacc.c: Clean up M4 for readability, and make output
981 whitespace more consistent. For the main parse function
982 comment, instead of saying "yyparse or yypush_parse", say either
983 "yyparse" or "yypush_parse" depending on which it actually is.
984
985 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
986
987 Complain about unused %define variables and %code qualifiers.
988 * NEWS (2.5): Document.
989 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
990 * doc/bison.texinfo (Decl Summary): Document complaint, and
991 improve %define documentation a little otherwise.
992 * tests/input.at (Reject unused %code qualifiers): Update.
993 (%define errors): Update.
994 (%define, --define, --force-define): Update.
995 (%define backward compatibility): Update.
996 (Unused %define api.pure): Update.
997 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
998
999 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1000
1001 Use aver not assert.
1002 * src/output.c: Don't include assert.h.
1003 (output_skeleton): Use aver not assert.
1004 * src/system.h (aver): In documentation of why, add links to
1005 Paul Eggert's explanations in the mailing lists.
1006
1007 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1008
1009 Use "Unresolved reference" error message when no symbols were found
1010 in a symbolic reference resolution. Remove .expr and -expr from
1011 the shown reference when the reference is unresolved.
1012 * src/scan-code.l: Change the error message, adjust location columns,
1013 rename variable "exact_mode" to "explicit_bracketing".
1014 * tests/named-ref.at: Adjust existing tests and add a new one.
1015
1016 2009-09-03 Akim Demaille <demaille@gostai.com>
1017
1018 * NEWS (2.4.2): Add "Internationalization" item.
1019
1020 2009-09-03 Akim Demaille <demaille@gostai.com>
1021
1022 bootstrap: fix/improve find_tool.
1023 * bootstrap (find_tool): Improve error messages.
1024 Fix typo about find_tool_names.
1025
1026 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1027
1028 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1029 See
1030 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1031 * src/scan-code.h (code_props_rule_action_init): Rename
1032 named_ref arg to name so it doesn't shadow named_ref type. This
1033 makes it consistent with the function definition in scan-code.l
1034 anyway.
1035
1036 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1037
1038 %define: accept unquoted values.
1039 * NEWS (2.5): Group all %define changes together, and document
1040 this one. Remove quotes in IELR and canonical LR entry.
1041 * doc/bison.texinfo: Remove quotes in most examples throughout.
1042 (Decl Summary): Update %define documentation.
1043 (Table of Symbols): Likewise.
1044 * src/ielr.c (LrType): Update documentation.
1045 * src/parse-gram.y (content.opt): Add production for ID.
1046 * tests/calc.at: Remove quotes in most tests.
1047 * tests/existing.at: Likewise.
1048 * tests/input.at: Likewise.
1049 * tests/local.at: Likewise.
1050 * tests/push.at: Likewise.
1051 * tests/reduce.at: Likewise.
1052 * tests/torture.at: Likewise.
1053
1054 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1055
1056 %define lr.type: make values lowercase IDs.
1057 That is, "LALR" => "lalr", "IELR" => "ielr", and
1058 "canonical LR" => "canonical-lr".
1059 * NEWS (2.5): Update documentation.
1060 * doc/bison.texinfo (Decl Summary): Likewise.
1061 * src/ielr.c (ielr): Use new values.
1062 * src/ielr.h (ielr): Update documentation.
1063 * src/reader.c (prepare_percent_define_front_end_variables): Use
1064 and validate new values.
1065 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1066 grammars.
1067 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1068
1069 2009-08-27 Eric Blake <ebb9@byu.net>
1070
1071 scan-gram: avoid portability trap with ctype usage.
1072 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1073 Avoid compiler warning.
1074
1075 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1076
1077 tests: use perl for printing special sequences to files.
1078 And skip tests if perl is not available. This is better than
1079 playing tricks with shell portability. Suggested by Akim
1080 Demaille.
1081 * tests/input.at (Bad character literals): Use it here for
1082 omitting final newlines.
1083 (Bad escapes in literals): Use it here for special characters.
1084
1085 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1086
1087 tests: show a use of %define lr.default-reductions "consistent"
1088 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1089 prevents the omission of expected tokens for %error-verbose.
1090
1091 2009-08-26 Akim Demaille <demaille@gostai.com>
1092
1093 tests: portability fix.
1094 * tests/input.at (Bad escapes in literals): Don't expect "echo
1095 '\0'" to output \ then 0.
1096
1097 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1098
1099 Actually handle the yytable zero value correctly this time.
1100 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1101 mention zero values in the YYTABLE comments.
1102 * data/glr.c (yytable_value_is_error): Don't check for zero
1103 value.
1104 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1105 * data/yacc.c (yytable_value_is_error): Likewise.
1106 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1107 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1108 * src/tables.h: In header comments, explain why it's useless to
1109 check for a zero value in yytable.
1110
1111 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1112
1113 More fixes related to last two patches.
1114 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1115 defined.
1116 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1117 yytable comments: zero indicates syntax error not default
1118 action.
1119 * data/glr.c (yyis_pact_ninf): Rename to...
1120 (yypact_value_is_default): ... this.
1121 (yyisDefaultedState): Update for rename.
1122 (yyis_table_ninf): Rename to...
1123 (yytable_value_is_error): ... this, and check for value zero
1124 besides just YYTABLE_NINF.
1125 (yygetLRActions): Check for default value from yypact. It
1126 appears that this check is always performed before this function
1127 is invoked, and so adding the check here is probably redundant.
1128 However, the code may evolve after this subtlety is forgotten.
1129 Also, update for rename to yytable_value_is_error. Because that
1130 macro now checks for zero, a different but equivalent branch of
1131 the if-then-else here is evaluated.
1132 (yyreportSyntaxError): Update for rename to
1133 yytable_value_is_error. The zero condition was mishandled
1134 before.
1135 (yyrecoverSyntaxError): Update for renames. No behavioral
1136 changes.
1137 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1138 New function.
1139 (yy_table_value_is_error_): New function.
1140 (parse): Use new functions where possible. No behavioral
1141 changes.
1142 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1143 The zero condition was mishandled before.
1144 * data/yacc.c (yyis_pact_ninf): Rename to...
1145 (yypact_value_is_default): ... this.
1146 (yyis_table_ninf): Rename to...
1147 (yytable_value_is_error): ... this, and check for value zero
1148 besides just YYTABLE_NINF.
1149 (yysyntax_error): Update for rename to yytable_value_is_error.
1150 The zero condition was mishandled before.
1151 (yyparse): Update for renames. No behavioral changes.
1152 * src/tables.h: Improve comments about yypact, yytable, etc.
1153 more. Most importantly, say yytable value of zero means syntax
1154 error not default action.
1155
1156 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1157
1158 Fix %error-verbose for conflicts resolved by %nonassoc.
1159 * NEWS (2.5): Document.
1160 * data/glr.c (yyreportSyntaxError): Fix this by checking
1161 yyis_table_ninf.
1162 * data/yacc.c (yysyntax_error): Likewise.
1163 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1164 yytable_ninf_.
1165 * data/lalr1.java (yysyntax_error): Likewise.
1166 * tests/conflicts.at (%nonassoc and eof): Update expected output
1167 and remove FIXME.
1168
1169 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1170
1171 Some code and documentation improvements.
1172 * data/c.m4 (b4_table_value_equals): New macro to capture
1173 some repeated code.
1174 * data/glr.c (yyis_pact_ninf): Use it here.
1175 (yyis_table_ninf): Likewise.
1176 (yyreportSyntaxError): Improve internal comments.
1177 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1178 Use it everywhere possible.
1179 (yyis_table_ninf): Likewise.
1180 (yysyntax_error): Improve internal comments.
1181 * data/lalr1.cc (yysyntax_error_): Likewise.
1182 * data/lalr1.java (yysyntax_error): Likewise.
1183 * src/tables.h: Improve comments about yypact, yytable, etc.
1184
1185 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
1186
1187 Use locale when quoting.
1188 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1189 quote rather than implementing quoting here.
1190
1191 2009-08-20 Eric Blake <ebb9@byu.net>
1192
1193 Make previous patch more robust.
1194 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1195 argmatch.h.
1196 (output_skeleton): Use it.
1197 Suggested by Akim Demaille.
1198
1199 Import latest m4/m4.m4.
1200 * submodules/autoconf: Update to autoconf 2.64.
1201 * configure.ac (M4_GNU_OPTION): New define.
1202 * src/output.c (output_skeleton): Use it to resolve FIXME.
1203 * NEWS: Mention this.
1204
1205 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
1206
1207 Fix complaints about escape sequences.
1208 Discussed starting at
1209 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1210 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1211 For a \0 and similar escape sequences meaning the null
1212 character, report an invalid escape sequence instead of an
1213 invalid null character because the latter does not actually
1214 appear in the user's input.
1215 In all escape sequence complaints, don't escape the initial
1216 backslash, and don't quote when the sequence appears at the end
1217 of the complaint line unless there's whitespace that quotearg
1218 won't escape.
1219 Consistently say "invalid" not "unrecognized".
1220 Consistently prefer "empty character literal" over "extra
1221 characters in character literal" warning for invalid escape
1222 sequences; that is, consistently discard those sequences.
1223 * tests/input.at (Bad escapes in literals): New.
1224
1225 2009-08-19 Akim Demaille <demaille@gostai.com>
1226
1227 doc: fixes.
1228 * doc/bison.texinfo: Fix minor Texinfo errors.
1229
1230 2009-08-19 Akim Demaille <demaille@gostai.com>
1231
1232 doc: %initial-action to initialize yylloc.
1233 Reported by Bill Allombert.
1234 * doc/bison.texinfo: Set fill-column to 76.
1235 (Location Type): Document the use of %initial-action to initialize
1236 yylloc.
1237
1238 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
1239
1240 maint: update for gnulib's recent update-copyright changes
1241 * gnulib: Update.
1242 * .x-update-copyright (COPYING): Add as it's no longer implied
1243 when .x-update-copyright is present.
1244 * cfg.mk (update-copyright-local): Remove, now ignored.
1245 (update-copyright): Declare update-b4-copyright as a dependency.
1246
1247 2009-08-17 Akim Demaille <demaille@gostai.com>
1248
1249 build: require gettext 0.17.
1250
1251 Suggested by Bruno Haible.
1252 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1253 * configure.ac: require gettext 0.17 to ensure compatibility with
1254 gnulib.
1255
1256 2009-08-17 Akim Demaille <demaille@gostai.com>
1257
1258 build: lower gettext requirements.
1259
1260 Bison was uselessly requiring the formatstring macros from
1261 gettext, which resulted in mo files not being installed on systems
1262 that perfectly supported Bison mo files. Lower the requirement.
1263 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1264
1265 * configure.ac: Require need-ngettext instead of
1266 need-formatstring-macros.
1267 Reported by Martin Jabocs.
1268 Suggested by Bruno Haible.
1269 * INSTALL: Restructure.
1270 (Internationalization): New.
1271
1272 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
1273
1274 maint: fix use of copyright year intervals.
1275 * gnulib: Update.
1276 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1277 as now recommended in gnulib/NEWS.
1278 * build-aux/update-b4-copyright: Fix.
1279 * cfg.mk (update-copyright-env): Configure update-copyright.
1280
1281 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1282
1283 Make it easier to write deterministic tests.
1284 Continues Akim's work from his 2009-06-10 commits.
1285 * src/reader.c (check_and_convert_grammar): Don't add any
1286 symbols after the first symbols_do invocation.
1287 * src/symtab.c (symbols_sorted): New static global.
1288 (user_token_number_redeclaration): Update comments.
1289 (symbol_from_uniqstr): If a new symbol is being created, assert
1290 that symbols_sorted hasn't been allocated yet.
1291 (symbols_free): Free symbols_sorted.
1292 (symbols_cmp, symbols_cmp_qsort): New functions.
1293 (symbols_do): Sort symbol_table into symbols_sorted on first
1294 invocation.
1295 * tests/input.at (Numbered tokens): Recombine tests now that the
1296 output should be deterministic across multiple numbers.
1297
1298 2009-08-12 Akim Demaille <demaille@gostai.com>
1299
1300 distcheck: fix.
1301
1302 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1303
1304 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1305
1306 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1307
1308 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1309
1310 Miscellaneous code readability improvements.
1311
1312 * src/reader.c (reader): Move %define front-end variable
1313 defaults and checking into...
1314 (prepare_percent_define_front_end_variables): ... this new
1315 function.
1316
1317 * src/scan-gram.l (INITIAL): For consistency with string
1318 literals, don't store open quote on character literal. It's
1319 discarded before returning anyway.
1320 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1321 Make length test more readable, and make the character stored
1322 for an empty literal more obvious while consistent with the
1323 previous behavior.
1324
1325 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1326 USER_NUMBER_HAS_STRING_ALIAS throughout.
1327 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1328 that is repeated in symtab.h. Improve argument names to make it
1329 clear which side of the symbol-string alias pair is which.
1330 (symbol_check_alias_consistency): Improve local variable names
1331 for the same purpose.
1332 * src/symtab.h (struct symbol): Make comments about aliases
1333 clearer.
1334 (symbol_make_alias): Improve comments and argument name.
1335 * src/output.c (token_definitions_output): Update for rename to
1336 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1337
1338 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1339
1340 Convert "misleading reference" messages to warnings.
1341 * src/scan-code.l: New function 'show_sub_messages', more
1342 factoring.
1343 * tests/named-ref.at: Adjust tests.
1344
1345 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1346
1347 maint: run "make update-copyright"
1348
1349 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1350
1351 maint: make update-b4-copyright easier to use
1352 * build-aux/update-b4-copyright: In warnings, report line
1353 numbers rather than character positions.
1354 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1355 that update-copyright runs it.
1356 * gnulib: Update.
1357
1358 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1359
1360 maint: clean up update-b4-copyright code
1361 * build-aux/update-b4-copyright: Do not accept 2-digit
1362 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1363 Don't accept a `[' in a b4_copyright argument.
1364 Format code more consistently.
1365 Don't assume b4*copyright never occurs.
1366
1367 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1368
1369 maint: automate b4_copyright updates.
1370 * Makefile.am (update-b4-copyright): New target rule.
1371 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
1372 * build-aux/update-b4-copyright: New.
1373 * data/yacc.c: Remove stray characters around b4_copyright
1374 invocations.
1375
1376 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1377
1378 maint: automate annual package-wide copyright-year update.
1379 * .x-update-copyright: New.
1380 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1381 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1382 update-copyright. Remove gnumakefile, which is implied by
1383 maintainer-makefile.
1384 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1385 * gnulib: Update.
1386 * maint.mk: Remove, now copied from gnulib.
1387 * examples/extexi: Add missing "(C)" in copyright statement so
1388 update-copyright can recognize it.
1389 * src/LR0.h: Likewise.
1390 * src/print.h: Likewise.
1391 * src/print_graph.h: Likewise.
1392 * src/gram.c: Add missing comma in copyright statement.
1393 * src/gram.h: Likewise.
1394
1395 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1396
1397 Fix "make distcheck".
1398 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1399 of just calc.stamp.
1400
1401 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1402
1403 Pacify "gcc -Wunused" for the input function from Flex.
1404 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1405 and later.
1406 * src/scan-code.l: Add "%option noinput", which I cannot find in
1407 the Flex manual, but which Flex has supported since at least as
1408 far back as 2.5.4. However, if any of our developers still use
1409 Flex 2.5.4, they'll need to stop configuring with
1410 --enable-gcc-warnings because "%option noinput" didn't work
1411 correctly until Flex 2.5.6.
1412 * src/scan-gram.l: Likewise.
1413 * src/scan-skel.l: Likewise.
1414
1415 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1416
1417 Fix --enable-gcc-warnings problems.
1418 * src/reader.c: Adjust variable names.
1419 * src/scan-code.l: Fix prototypes and adjust names.
1420 * src/named-ref.c: Remove redundant "if".
1421
1422 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1423
1424 Fix a --enable-gcc-warnings problem.
1425 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1426 variable.
1427
1428 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1429
1430 Fix some memory leaks.
1431 * src/named-ref.c: Add a pointer check (named_ref_free).
1432 * src/scan-code.l: New function (variant_table_free). Called in
1433 code_scanner_free.
1434 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1435
1436 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1437
1438 Warn about character literals not of length one.
1439 * NEWS (2.5): Document.
1440 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1441 the length.
1442 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1443 * tests/input.at (Bad character literals): New test group.
1444
1445 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1446
1447 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1448
1449 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1450
1451 Some M4 cleanup in the testsuite.
1452 Suggested by Eric Blake at
1453 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1454 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1455 complicate the code by distinguishing between a missing value
1456 and an empty string value for an optional argument. This fix is
1457 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1458 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1459 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1460 arguments are not needed because of the following changes.
1461 Fix stale comments.
1462 Bison developers should use GNU M4 and should not use
1463 POSIXLY_CORRECT when building the test suite, so do not
1464 complicate the code by avoiding $10 and above.
1465 Do not quote an empty string value for an optional argument, and
1466 do not distinguish between a missing value and an empty string
1467 value.
1468
1469 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1470
1471 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1472
1473 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 Revert unnecessary column realignment in --help output.
1476 Reported by Akim Demaille at
1477 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1478 * src/getargs.c (usage): Here.
1479
1480 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1481
1482 Alphabetical order in src/Makefile.am.
1483 * src/Makefile.am: Adjust.
1484
1485 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1486
1487 Style changes and factoring.
1488 * src/named-ref.h: Add comments.
1489 * src/parse-gram.y: Readability and style changes.
1490 * src/reader.c: Factoring: assign_named_ref function.
1491 * src/scan-code.l: Factoring and style changes. Rename
1492 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1493 Use "unsigned" type for variant index. Improve readablity.
1494 * src/scan-gram.l: Change error messages and add comments.
1495 * src/symlist.h: symbol_list_null: New function decl.
1496 * src/symlist.c: symbol_list_null: Implement here.
1497 * tests/named-refs.at: Adjust for new error messages.
1498
1499 2009-06-29 Eric Blake <ebb9@byu.net>
1500
1501 scan-code: avoid compiler warnings
1502 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1503
1504 2009-06-29 Akim Demaille <demaille@gostai.com>
1505
1506 build: avoid concurrent extraction of calc++.
1507 * examples/calc++/Makefile.am (calc.stamp): New.
1508 Depend on it to create the sources of calc++ so that concurrent
1509 builds don't launch several "extexi" in parallel.
1510 Not only this is inefficient, this also builds incorrect sources
1511 with several extractions mixed together.
1512
1513 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1514
1515 Implement support for named symbol references.
1516 * src/parse-gram.y: Add new syntax (named_ref.opt).
1517 * src/reader.c: Store named refs in symbol lists.
1518 * src/reader.h: New argument for symbol_append and
1519 action_append functions.
1520 * src/scan-code.h: Add new field (named_ref) into
1521 code_props data structure. Keeps named ref of midrule
1522 actions.
1523 * src/scan-code.l: Support for named refs in semantic
1524 action code. New function 'parse_named_ref'.
1525 * src/scan-gram.l: Support bracketed id.
1526 * src/symlist.c: Store named refs in symbol lists.
1527 * src/symlist.h: New field in symbol list: named_ref.
1528 * src/named-ref.h: New file, a struct for named_ref.
1529 * src/named-ref.cp: New file, named_ref_new function.
1530 * src/local.mk: Add two new files.
1531 * tests/testsuite.at: Include new test group:
1532 * tests/named-refs.at: this new file.
1533
1534 2009-06-25 Akim Demaille <demaille@gostai.com>
1535
1536 hash: check insertion for memory exhaustion.
1537 * src/uniqstr.c (uniqstr_new): New.
1538
1539 2009-06-11 Akim Demaille <demaille@gostai.com>
1540
1541 style changes.
1542 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1543 * src/print-xml.c: Style changes.
1544 * tests/conflicts.at: Comment changes.
1545
1546 2009-06-11 Akim Demaille <demaille@gostai.com>
1547
1548 xml: beware of user strings used to give a %prec to rules.
1549 * tests/conflicts.at (%prec with user strings): New.
1550 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1551 XML output.
1552
1553 2009-06-11 Akim Demaille <demaille@gostai.com>
1554
1555 hash: check insertion for memory exhaustion.
1556 * src/muscle-tab.c (muscle_insert, muscle_grow)
1557 * src/state.c (state_hash_insert): Check the return value of
1558 hash_insert.
1559
1560 2009-06-10 Akim Demaille <demaille@gostai.com>
1561
1562 deterministic test suite.
1563 Some consistency checks on symbols are performed after all the
1564 symbols were read, by an iteration over the symbol table. This
1565 traversal is nondeterministic, which can be a problem for test
1566 cases.
1567 Avoid this.
1568 Addresses another form of nondeterminism reported by Joel E. Denny.
1569 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1570
1571 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1572 test in two.
1573 Use different file names for the three tests to make the
1574 maintenance easier.
1575
1576 2009-06-10 Akim Demaille <demaille@gostai.com>
1577
1578 deterministic user-token-number redeclaration errors.
1579 Address nondeterminism reported by Joel E. Denny.
1580 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1581
1582 * src/uniqstr.h: Comment changes.
1583 * src/location.h (boundary_cmp, location_cmp): New.
1584 * src/symtab.c (user_token_number_redeclaration): New.
1585 (symbol_translation): Use it.
1586 * tests/input.at (Numbered tokens): Adjust the expected output.
1587
1588 2009-05-25 Akim Demaille <demaille@gostai.com>
1589
1590 gnulib: update.
1591 * gnulib: Update to latest.
1592 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1593 * m4/.gitignore: Regen.
1594 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1595 Call xalloc_die on hash_insert failures.
1596 Requested by the new __warn_unused_result__ attribute of
1597 hash_insert.
1598
1599 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1600
1601 Convert multiple variable definition warnings to complaints.
1602 * NEWS (2.5): Add a new entry for that change.
1603 * doc/bison.texinfo (Decl Summary): Update %define entry.
1604 (Bison Options): Update -D/--define/-F/--force-define entry.
1605 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1606 * src/muscle_tab.h (muscle_percent_define_insert): Update
1607 comments.
1608 * tests/input.at (`%define errors'): Update.
1609 (`%define, --define, --force-define'): Update.
1610
1611 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 -F/--force-define and relative %define/-D/--define priorities.
1614 * NEWS (2.5): Add documentation to -D/--define entry.
1615 * build-aux/cross-options.pl: Hard-code association of
1616 --force-define with %define.
1617 * doc/bison.texinfo (Decl Summary): In %define entry,
1618 cross-reference command-line options.
1619 (Bison Options): Add documentation to -D/--define entry.
1620 (Option Cross Key): Widen column for --force-define row.
1621 * src/getargs.c (usage): Document -F/--force-define. Realign
1622 options in output.
1623 (short_options, long_options, getargs): Parse -F/--force-define,
1624 and update muscle_percent_define_insert invocation.
1625 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1626 (muscle_percent_define_insert): Add argument with that type.
1627 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1628 -F/--force-define behavior and priorities.
1629 * src/parse-gram.y (prologue_declaration): Update
1630 muscle_percent_define_insert invocations.
1631 * tests/input.at (`%define, --define'): Rename to...
1632 (`%define, --define, --force-define'): ... this and extend.
1633
1634 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1635
1636 Update some comments to make sense for -D.
1637 * data/bison.m4 (b4_check_user_names): In header comments, say
1638 "user occurrence" instead of "grammar occurrence".
1639 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1640 (muscle_percent_code_grow): Likewise just for consistency.
1641
1642 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1643
1644 * data/c++.m4: Update copyright year.
1645
1646 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1647
1648 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1649
1650 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1651
1652 Handle a trailing `:' in a user-supplied C++ namespace better.
1653 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1654 among the closing braces here. This fix might make the
1655 generated code easier to debug, but otherwise it should be
1656 insignificant because a trailing `:' is a C++ error already.
1657
1658 2009-05-19 Akim Demaille <demaille@gostai.com>
1659
1660 remove useless variable.
1661 * src/getargs.c (skeleton_arg): Remove now useless variable.
1662 Should help the compiler see that this printf-like call is sane.
1663
1664 2009-05-11 Akim Demaille <demaille@gostai.com>
1665
1666 doc: use C++ headers.
1667 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1668 headers.
1669
1670 2009-05-05 Akim Demaille <demaille@gostai.com>
1671
1672 fix hexadecimal token number support.
1673 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1674
1675 2009-05-05 Akim Demaille <demaille@gostai.com>
1676
1677 tests: check token numbers.
1678 * tests/input.at (Numbered tokens): New.
1679
1680 2009-05-04 Akim Demaille <demaille@gostai.com>
1681
1682 bison: catch bad symbol names.
1683 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1684 * tests/input.at: Adjust.
1685
1686 2009-05-04 Akim Demaille <demaille@gostai.com>
1687
1688 space changes.
1689 * src/scan-gram.l: Untabify to be robust to zealous editors.
1690
1691 2009-05-04 Akim Demaille <demaille@gostai.com>
1692
1693 identifiers: dashes are letters.
1694 Dashes can now start identifiers (symbols and directives).
1695
1696 * src/scan-gram.l ({letter}): Add dash.
1697 ({id}): Remove it.
1698 * tests/input.at (Symbols): Adjust.
1699 Remove stray comment.
1700 * tests/regression.at (Invalid inputs): Adjust error message.
1701 * doc/bison.texinfo (Symbols): Update.
1702
1703 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1704
1705 Declare %code to be a permanent feature.
1706 * NEWS (2.4.2): Here.
1707 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1708 experimental.
1709 (Decl Summary): Likewise.
1710
1711 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1712
1713 Convert underscores to dashes in some %define variable names.
1714 For now, just api.push-pull and lr.keep-unreachable-states.
1715 Maintain old names for backward compatibility.
1716 * NEWS (2.5): Document.
1717 * data/c.m4 (b4_identification): Update comment.
1718 * data/yacc.c: Update access.
1719 * doc/bison.texinfo: Update.
1720 * etc/bench.pl.in (bench_grammar): Update use.
1721 * src/files.c (tr): Move to...
1722 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1723 think of a better place to expose it. My logic is that, for all
1724 uses of tr so far, command-line arguments can be involved, and
1725 getargs.h is already included.
1726 * src/main.c (main): Update access.
1727 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1728 variable names to new variable names before assigning value.
1729 * src/reader.c (reader): Update setting default.
1730 * tests/calc.at: Update uses.
1731 * tests/conflicts.at (Unreachable States After Conflict
1732 Resolution): Update use.
1733 * tests/input.at (%define enum variables): Update use.
1734 (%define backward compatibility): New test group.
1735 * tests/push.at: Update uses.
1736 * tests/reduce.at: Update uses.
1737 * tests/torture.at: Update uses.
1738
1739 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1740
1741 Set all front-end %define defaults in one place.
1742 * src/main.c (main): Move lr.keep_unreachable_states default...
1743 * src/reader.c (reader): ... to here.
1744
1745 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1746
1747 Rename lr.default_reductions to lr.default-reductions.
1748 * NEWS (2.5): Here.
1749 * doc/bison.texinfo: Here.
1750 * src/lalr.c (initialize_LA): Here.
1751 * src/print.c (print_reductions): Here.
1752 * src/reader.c (reader): Here.
1753 * src/tables.c (action_row): Here.
1754 * tests/input.at (%define enum variables): Here.
1755 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1756
1757 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 Pacify ./configure --enable-gcc-warnings.
1760 * tests/input.at (Symbols): Prototype yyerror and yylex.
1761
1762 2009-04-21 Akim Demaille <demaille@gostai.com>
1763
1764 tests: check the use of dashes and periods in symbols.
1765 * tests/input.at (Symbol): New test group.
1766
1767 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1768
1769 Document how `%define "var" "value"' is not M4-friendly.
1770 * src/parse-gram.y (variable): In comments here.
1771
1772 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1773
1774 Add copyright updates missed during previous cherry pick.
1775 * src/output.c: Here.
1776 * src/parse-gram.y: Here.
1777 * src/scan-gram.l: Here.
1778
1779 2009-04-20 Akim Demaille <demaille@gostai.com>
1780
1781 variables: accept dashes.
1782 * src/scan-gram.l ({id}): Also accept dashes after the initial
1783 letter.
1784 ({directive}): Use {id}.
1785 * src/parse-gram.y: Comment and formatting changes.
1786 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1787 symbols.
1788 * src/complain.h, src/complain.c (yacc_at): New.
1789 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1790 symbol names.
1791 * src/output.c (token_definitions_output): Do not #define token
1792 names with dashes.
1793
1794 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1795
1796 Clean up recent patches a little.
1797 Reported by Akim Demaille.
1798 * doc/bison.texinfo (Understanding): Fix typos.
1799 * src/print.c (print_reductions): Don't use negated variable.
1800
1801 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1802
1803 List accepted values for a %define enum variable with an invalid value.
1804 Suggested by Akim Demaille at
1805 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1806 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1807 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1808 * tests/input.at (%define lr.default_reductions invalid values): Merge
1809 into...
1810 (%define enum variables): ... here, and update output.
1811
1812 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1813
1814 Rename "default rule" to "default reduction".
1815 This includes changing variable names in code, changing
1816 comments, and renaming %define lr.default_rules to %define
1817 lr.default_reductions.
1818 * NEWS (2.5): Update IELR documentation.
1819 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1820 Adjust YYDEFACT and yydefact_ documentation.
1821 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1822 and lr.type documentation. Make some other wording
1823 improvements.
1824 (Glossary): Adjust cross-references and Default Reduction
1825 definition.
1826 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1827 Remove a confusing comment pointed out by Akim Demaille.
1828 (initialize_LA): Adjust code.
1829 * src/print-xml.c (print_reductions): Adjust code.
1830 * src/print.c (print_reductions): Adjust code.
1831 * src/reader.c (reader): Adjust code.
1832 * src/tables.c (action_row): Adjust code.
1833 (token_actions): Adjust code.
1834 * src/tables.h: Adjust YYDEFACT documentation.
1835 * tests/input.at (%define lr.default_rules invalid values):
1836 Rename test group to...
1837 (%define lr.default_reductions invalid values): ... this, and
1838 update grammar file and expected output.
1839 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1840 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1841
1842 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1843
1844 Document %define lr.type and lr.default_rules.
1845 * NEWS (2.5): Add an entry.
1846 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1847 besides just LALR(1) and GLR(1).
1848 * doc/bison.texinfo (Introduction): Likewise.
1849 (Language and Grammar): Bison is no longer limited to LALR(1)
1850 restrictions.
1851 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1852 when trying to distinguish from GLR. Talk about LR(1) grammars
1853 rather than LALR(1) grammars.
1854 (Decl Summary): In %define api.push_pull entry, say it applies
1855 to deterministic parsers in C rather than LALR(1) parsers in C.
1856 Add lr.default_rules entry.
1857 Add lr.type entry.
1858 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1859 restrictions.
1860 (Generalized LR Parsing): Same changes as for the previous GLR
1861 section.
1862 (Memory Management): Say deterministic rather than LALR(1).
1863 (Understanding): Correct some bison output.
1864 Index discussion of "accepting state".
1865 Say deterministic rather than LALR(1).
1866 (Bison Options): In --yacc entry, say deterministic rather than
1867 LALR(1).
1868 In --report, --graph, and --xml entries, just don't mention
1869 LALR(1).
1870 (C++ Parsers): Say deterministic rather than LALR(1).
1871 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1872 (Glossary): Add Accepting State, Consistent State, Default Rule,
1873 and IELR(1) definitions.
1874 In Generalized LR (GLR) definition, make same changes as in
1875 previous GLR sections.
1876 In LALR(1) definition, say Bison uses LALR(1) by default rather
1877 than implying Bison is limited to LALR(1).
1878 (LocalWords): Add IELR.
1879
1880 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1881
1882 Finish implementing %define lr.type.
1883 Its value can be "LALR", "IELR", or "canonical LR".
1884 * lib/timevar.def (TV_IELR_PHASE1): New var.
1885 (TV_IELR_PHASE2): New var.
1886 (TV_IELR_PHASE3): New var.
1887 (TV_IELR_PHASE4): New var.
1888 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1889 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1890 Sbitset.h, ielr.h, and ielr.c.
1891 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1892 trace_types): Add trace_ielr.
1893 * src/lalr.h, src/lalr.c (ngotos): Export it.
1894 (F): Rename to...
1895 (goto_follows): ... this, update all uses, and export it.
1896 (set_goto_map): Export it.
1897 (map_goto): Export it.
1898 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1899 handled in ielr.
1900 (initialize_LA): Export it. Move lookback allocation to...
1901 (lalr): ... here because, for canonical LR, initialize_LA must
1902 be invoked but lookback and much of the rest of LALR isn't
1903 needed.
1904 * main.c (main): Instead of lalr, invoke ielr, which invokes
1905 lalr.
1906 * src/reader.c (reader): Default lr.type to "LALR".
1907 Default lr.default_rules to "accepting" if lr.type is "canonical
1908 LR". Leave the default as "all" otherwise.
1909 Check for a valid lr.type value.
1910 * src/state.h, src/state.c (struct state_list): Add state_list
1911 member.
1912 (state_new): Initialize state_list member to NULL.
1913 (state_new_isocore): New function, exported.
1914 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1915 exercises all values of lr.type.
1916 (GNU AWK Grammar): Rename test group to...
1917 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1918 AT_TEST_EXISTING_GRAMMAR.
1919 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1920 (GNU pic Grammar): Rename test group to...
1921 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1922 AT_TEST_EXISTING_GRAMMAR.
1923 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1924 all values of lr.type.
1925 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1926 (Lane Split): Likewise.
1927 (Complex Lane Split): Likewise.
1928 (Split During Added Lookahead Propagation): Likewise.
1929
1930 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1931
1932 Add new files for IELR and canonical LR implementation.
1933 * src/AnnotationList.c: New.
1934 * src/AnnotationList.h: New.
1935 * src/InadequacyList.c: New.
1936 * src/InadequacyList.h: New.
1937 * src/Sbitset.c: New.
1938 * src/Sbitset.h: New.
1939 * src/ielr.c: New.
1940 * src/ielr.h: New.
1941
1942 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1943
1944 Implement %define lr.default_rules.
1945 Its value describes the states that are permitted to contain
1946 default rules: "all", "consistent", or "accepting".
1947 * src/reader.c (reader): Default lr.default_rules to "all".
1948 Check for a valid lr.default_rules value.
1949 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1950 is "accepting", then only mark the accepting state as
1951 consistent.
1952 (initialize_LA): Tell state_lookahead_tokens_count whether
1953 lr.default_rules is "accepting".
1954 * src/tables.c (action_row): If lr.default_rules is not "all",
1955 then disable default rules in inconsistent states.
1956 * src/print.c (print_reductions): Use this opportunity to
1957 perform some assertions about whether lr.default_rules was
1958 obeyed correctly.
1959 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1960 helps with checking the parser tables for a grammar.
1961 * tests/input.at (%define lr.default_rules invalid values): New
1962 test group.
1963 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1964 AT_TEST_TABLES_AND_PARSE.
1965 (`no %define lr.default_rules'): New test group generated by
1966 AT_TEST_LR_DEFAULT_RULES.
1967 (`%define lr.default_rules "all"'): Likewise.
1968 (`%define lr.default_rules "consistent"'): Likewise.
1969 (`%define lr.default_rules "accepting"'): Likewise.
1970
1971 2009-04-20 Akim Demaille <demaille@gostai.com>
1972
1973 Consistently refer to Yacc, not YACC.
1974 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1975
1976 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1977
1978 Pacify make maintainer-check-posix.
1979 * tests/input.at (%define, --define): Move bison command-line
1980 options before grammar file name.
1981
1982 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1983
1984 Document semicolon warnings.
1985 * NEWS (2.5): Here.
1986
1987 2008-12-08 Akim Demaille <demaille@gostai.com>
1988
1989 Fix portability issue in the test suite.
1990 * tests/local.at (AT_MATCHES_CHECK): New.
1991 Based on Perl instead of Sed. Sed has too many portability
1992 pitfalls, not ever Sed is GNU Sed.
1993 * tests/actions.at (Fix user actions without a trailing semicolon):
1994 Use it.
1995
1996 2008-12-07 Di-an Jan <dianj@freeshell.org>
1997
1998 Implement the FIXME that ends an user action with a semicolon
1999 if it seems necessary.
2000 * src/scan-code.l (flex rules section): Flag cpp directive from
2001 any `#' to the first unescaped end-of-line. Semicolon is not
2002 needed after `;', `{', '}', or cpp directives and is needed after
2003 any other token (whitespaces and comments have no effect).
2004 * tests/actions.at (Fix user actions without a trailing semicolon):
2005 New test.
2006 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2007 to make user actions complete statements.
2008 Adjust column numbers in error messages.
2009 * tests/regression.at (Fix user actions without a trailing semicolon):
2010 Remove. Covered by new test.
2011
2012 2009-04-14 Akim Demaille <demaille@gostai.com>
2013
2014 doc: minor fixes.
2015 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2016 (Table of Symbols): Remove duplicate entry for %debug.
2017
2018 2009-04-10 Eric Blake <ebb9@byu.net>
2019
2020 submodules: update to latest
2021 * submodules/autoconf: Use latest upstream Autoconf.
2022
2023 2009-04-06 Eric Blake <ebb9@byu.net>
2024
2025 Work around autoconf 2.63b bug in testsuite.
2026 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2027 autoconf bug related to # in test.
2028
2029 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2030
2031 * NEWS (2.5): Describe new -D/--define feature.
2032
2033 2008-11-10 Akim Demaille <demaille@gostai.com>
2034
2035 --trace=muscles
2036 * src/getargs.h, src/getargs.c (trace_muscle): New.
2037 (trace_types, trace_args): Support it.
2038 * src/output.c (output_skeleton): Use it.
2039
2040 2008-11-10 Akim Demaille <demaille@gostai.com>
2041
2042 muscles_output.
2043 * src/output.c (muscles_output): New, extracted from...
2044 (output_skeleton): here.
2045 Adjust.
2046
2047 2008-11-21 Akim Demaille <demaille@gostai.com>
2048
2049 Display the changes in cross-options.texi.
2050 * build-aux/cross-options.pl ($sep): New, to separate items.
2051 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2052 the changes.
2053
2054 2008-11-20 Di-an Jan <dianj@freeshell.org>
2055
2056 Improves options in the manual.
2057 * doc/bison.texinfo (-g, -x): Add space before argument.
2058 (Option Cross Key): Implement FIXME: listing directives also.
2059 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2060 (Short Option): Special case -d. Put arguments inside @option.
2061 (Bison Directive): Add column, automatically extracted from
2062 src/scan-gram.l (actual name passed as the first argument)
2063 with special case for %define.
2064 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2065 to build-aux/cross-options.pl.
2066 * src/getargs.c (usage): Document limitations of cross-options.pl.
2067 * src/scan-gram.l: Likewise.
2068
2069 2009-02-25 Akim Demaille <demaille@gostai.com>
2070
2071 Copyright years.
2072 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2073
2074 2008-12-08 Akim Demaille <demaille@gostai.com>
2075
2076 Install autoconf as a submodule to get m4sugar.
2077 * .gitmodules: Add submodules/autoconf.
2078 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2079 submodules/autoconf.
2080
2081 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 Simplify last patch slightly.
2084 * src/getargs.c (getargs): Here.
2085
2086 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2087
2088 Fix last warning from --enable-gcc-warnings.
2089 * src/getargs.c (getargs): Don't assign const address to non-const
2090 pointer.
2091
2092 2008-11-17 Di-an Jan <dianj@freeshell.org>
2093
2094 Handle --enable-gcc-warnings.
2095 * src/getargs.c (command_line_location): Set parameters to void.
2096
2097 2008-11-11 Akim Demaille <demaille@gostai.com>
2098
2099 AT_FULL_COMPILE.
2100 * tests/actions.at, tests/regression.at: Use it.
2101
2102 2008-11-07 Akim Demaille <demaille@gostai.com>
2103
2104 Pass command line location to skeleton_arg and language_argmatch.
2105 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2106 The location argument is now mandatory.
2107 Adjust all dependencies.
2108 (getargs): Use command_line_location.
2109
2110 2008-11-07 Akim Demaille <demaille@gostai.com>
2111
2112 -D, --define.
2113 * src/getargs.c (usage): Document -D.
2114 Fix help string for --locations.
2115 (command_line_location): New.
2116 (short_options, long_options, getargs): Support -D, --define.
2117 (getargs): Move -d support at the right place.
2118 * doc/bison.texinfo (Bison Options): Update.
2119 * tests/input.at (%define, --define): New.
2120
2121 2008-11-07 Akim Demaille <demaille@gostai.com>
2122
2123 Initialize the muscle table before parsing the command line.
2124 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2125 (getargs): Define file_name.
2126 * src/main.c (main): Initialize muscle_tab before calling
2127 getargs.
2128 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2129 its value is not available yet.
2130
2131 2008-11-09 Akim Demaille <demaille@gostai.com>
2132
2133 Require the generation of parse-gram.output.
2134 * src/Makefile.am (YACC): Pass --report=all.
2135
2136 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2137
2138 * NEWS (2.5): New stub.
2139
2140 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2141
2142 Fix options documentation.
2143 * build-aux/cross-options.pl: As in --help output, write optional
2144 arguments as [=ARG] not =[ARG].
2145 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2146
2147 2008-11-07 Akim Demaille <demaille@gostai.com>
2148
2149 Fix --help.
2150 * src/getargs.c (usage): Fix help string for -W.
2151
2152 2008-11-07 Akim Demaille <demaille@gostai.com>
2153
2154 Handle more general types of option arguments.
2155 * build-aux/cross-options.pl: The argument ends at the first
2156 space, not the first non-symbol character.
2157 Use @var for each word appearing the argument description.
2158
2159 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2160
2161 Remove spurious initial empty lines.
2162 * data/location.cc: End the @output lines with an @.
2163
2164 2008-11-04 Akim Demaille <demaille@gostai.com>
2165
2166 Remove spurious initial empty lines.
2167 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2168 * data/yacc.c: End the @output lines with an @.
2169
2170 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2171
2172 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2173 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2174 requirements for a correct m4 are stricter.
2175 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2176 * configure.ac: Update to use AC_PROG_GNU_M4.
2177 Reported by Eric Blake.
2178
2179 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2180
2181 Help with updating web manual.
2182 * HACKING: Incorporate instructions from gnulib/doc/README.
2183 * bootstrap.conf (gnulib_modules): Add gendocs.
2184
2185 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2186
2187 Fix strange %define locations for default values.
2188 Reported by Akim Demaille at
2189 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2190 and discussed again starting at
2191 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2192 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2193 because location information is bogus.
2194 Use angle brackets to delimit fake file name because square brackets
2195 look like underexpanded m4. Choose a better fake file name.
2196 Use negative line numbers.
2197 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2198 * src/location.c (location_print): If line for a boundary is negative,
2199 only print that boundary's file name.
2200 * src/location.h: Document that.
2201 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2202 defaults): Update output.
2203
2204 2008-11-07 Akim Demaille <demaille@gostai.com>
2205
2206 Locations without columns for command line arguments.
2207 * src/location.c (location_print): Don't display negative columns.
2208 * src/location.h: Document this.
2209
2210 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2211
2212 Add reminder about uploading public key to keys.gnupg.net.
2213 * HACKING (Release Procedure): Here.
2214
2215 2009-03-31 Akim Demaille <demaille@gostai.com>
2216
2217 bootstrap: --help to stdout.
2218 * bootstrap (usage): Don't send --help to stderr.
2219 Use a here doc instead of a long string.
2220
2221 2009-03-31 Akim Demaille <demaille@gostai.com>
2222
2223 bootstrap: README-hacking no longer exists
2224 * bootstrap (checkout_only_file): Set to HACKING.
2225
2226 2009-03-26 Akim Demaille <demaille@gostai.com>
2227
2228 doc: merge HACKING and README-hacking.
2229 Two files is confusing.
2230 Reported by Alexandre Duret-Lutz.
2231
2232 * README-hacking: Merge into...
2233 * HACKING (Working from the repository): here.
2234
2235 2009-03-26 Akim Demaille <demaille@gostai.com>
2236
2237 doc: update README-hacking.
2238 * README-hacking: We now use git and git submodules.
2239 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2240
2241 2009-03-26 Akim Demaille <demaille@gostai.com>
2242
2243 lalr1.cc: avoid GCC 4.3 warnings.
2244 GCC 4.3 now warns about "a || b && c" and asks for explicit
2245 parentheses.
2246 Reported by Alexandre Duret-Lutz.
2247 * data/location.cc: Update copyright years.
2248 (Position::operator==): Use parens to make precedence explicit.
2249 Compare lines and columns first, as they are more likely to be
2250 different, and they are faster to compare.
2251
2252 2009-03-26 Akim Demaille <demaille@gostai.com>
2253
2254 gnulib: update.
2255 * gnulib: Update to latest.
2256 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2257 use +=.
2258
2259 2009-01-08 Akim Demaille <demaille@gostai.com>
2260
2261 Fix grep portability issues.
2262 Grep on Solaris does not support -q.
2263 Reported by Summum Bonum.
2264
2265 * NEWS: Add a stub for 2.4.2.
2266 * THANKS: Add Summum Bonum.
2267 * tests/atlocal.in (EGREP): New.
2268 (CC, CXX, XSLTPROC): Make it possible to override them via
2269 envvars.
2270 * tests/java.at: Use $EGREP instead of egrep.
2271 Use AT_CHECK's ignore instead of grep's -q.
2272
2273 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2274
2275 Version 2.4.1.
2276 * NEWS: Set version and date.
2277 * lib/Makefile.am: Update copyright year.
2278 * tests/atlocal.in: Update copyright year.
2279
2280 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2281
2282 Semicolon feature removal is not about future language support.
2283 * NEWS: The semicolon feature is no longer active for newer languages,
2284 so don't claim that it causes trouble for them.
2285
2286 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2287
2288 * gnulib: Update submodule to HEAD.
2289
2290 2008-12-09 Akim Demaille <demaille@gostai.com>
2291
2292 Update data/README.
2293 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2294
2295 2008-12-05 Eric Blake <ebb9@byu.net>
2296
2297 Build testsuite with newer autoconf.
2298 * tests/output.at (m4_expand): Don't override in newer autoconf,
2299 where the underlying implementation changed.
2300 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2301 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2302 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2303 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2304 since some of them contain unbalanced ')'.
2305
2306 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2307
2308 * NEWS: Clarify a little.
2309
2310 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2311
2312 * NEWS: Update for recent changes.
2313
2314 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2315
2316 Fix unexpanded macros in GLR defines file.
2317 Reported by Csaba Raduly at
2318 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2319 * THANKS (Csaba Raduly): Add.
2320 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2321 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2322 lexer in a separate module that includes the defines file.
2323 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
2324 source.
2325 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2326 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2327 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2328 (AT_DATA_SOURCE_PROLOGUE): New.
2329 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2330 (AT_DATA_SOURCE): New.
2331 (AT_FULL_COMPILE): New, copied from master branch and extended to
2332 support an additional source file.
2333
2334 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2335
2336 Don't let maintainer-*-check targets force a version update.
2337 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2338 handled.
2339
2340 2008-11-17 Di-an Jan <dianj@freeshell.org>
2341
2342 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2343 Align menus. Adjust word wrapping. Use node names for menu names.
2344 (Examples): Don't abbreviate node names.
2345 (LocalWords): Remove abbreviations.
2346 (Copying): Make description a sentence.
2347 (Java Action Features): Remove period to match the rest of menu.
2348
2349 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2350
2351 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2352 * configure.ac: Adjust usage.
2353 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2354 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2355 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2356
2357 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 Don't add a semicolon to actions for %skeleton or %language.
2360 It breaks Java test cases as reported by Akim Demaille.
2361 * src/scan-code.l: Implement.
2362
2363 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 Clean up %skeleton and %language priority implementation.
2366 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2367 remove static qualifier because others will soon need to see it.
2368 (language_prio): Likewise.
2369 (getargs): Use command_line_prio rather than 0.
2370 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2371 enum fields.
2372 (skeleton_prio): Extern it.
2373 (language_prio): Extern it.
2374 * src/parse-gram.y: Use grammar_prio rather than 1.
2375
2376 2008-11-04 Akim Demaille <demaille@gostai.com>
2377
2378 * NEWS: Mention the trailing semicolon in action.
2379
2380 2008-11-04 Akim Demaille <demaille@gostai.com>
2381
2382 Reformat NEWS.
2383 * NEWS: Use more outline-mode markup.
2384 Suggested by Jim Meyering.
2385
2386 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2387
2388 Fix user actions without a trailing semicolon.
2389 Reported by Sergei Steshenko at
2390 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2391 * THANKS (Sergei Steshenko): Add.
2392 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2393 * tests/regression.at (Fix user actions without a trailing semicolon):
2394 New test case.
2395
2396 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2397
2398 Initiate further development.
2399 * NEWS: Create an empty section for new entries.
2400 * gnulib: Update submodule to HEAD.
2401
2402 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2403
2404 * NEWS: Version 2.4.
2405
2406 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2407
2408 Prepare for next release.
2409 * NEWS: Briefly mention changes since 2.3b.
2410 * README: Say GNU m4 1.4.6, which we've been requiring in release
2411 announcements already, not 1.4.3, which breaks the build.
2412
2413 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2414
2415 Say %language is experimental.
2416 We're thinking of extending it's effect on output file naming. See the
2417 thread at
2418 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2419 * NEWS: Say it's experimental.
2420 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2421 recommend it over %skeleton for now.
2422 (Bison Options): Likewise.
2423 (C++ Bison Interface): Use %skeleton not %language.
2424 (Calc++ Parser): Use %skeleton not %language.
2425 * src/getargs.c (usage): Say it's experimental.
2426
2427 2008-11-01 Di-an Jan <dianj@freeshell.org>
2428 Paolo Bonzini <bonzini@gnu.org>
2429
2430 Support all Java parser class modifiers.
2431 * data/java.m4 (b4_percent_define_get3): New.
2432 (b4_final_if, b4_strictfp_if): New.
2433 * data/lalr1.java (final, strictfp, extends, implements): Support.
2434 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2435 documentation.
2436 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2437 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2438 (AT_CHECK_JAVA_GREP): New.
2439 (Java parser class modifiers): New test.
2440 (Java parser class extends and implements): New test.
2441
2442 Model exception propagation better with throws and lex_throws.
2443 * data/java.m4 (b4_list2): New.
2444 (throws): Change default.
2445 * data/lalr1.java (yyaction): Add throws.
2446 (parse): Add lex_throws in addition to throws.
2447 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2448 * tests/java.at (Java throws specifications): New test.
2449
2450 Improve documentation for Java parsers.
2451 * doc/bison.texinfo (Java Parsers): Add subsections.
2452 Don't quote first argument of %define.
2453 (Java Bison Interface): Document output files. Move documentation
2454 of parser class and merge into Java Parser Interface. Document
2455 features that error out. Document directives with no effect.
2456 Move note about Javadoc higher.
2457 (Java Semantic Values): Explicitly mention stype.
2458 Document that generic types cannot be used.
2459 (Java Location Values): Use @deftypeivar. Document constructors.
2460 Correct return value for toString.
2461 (Java Parser Interface): List undocumented constants/fields.
2462 Move documentation of fields added by %parse-param closer to list
2463 of members. Document that token names are added as fields.
2464 Document constructors accurately. Remove error method.
2465 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2466 Interface. Describe %code lexer and yylex accutately.
2467 Remove documentation that does not match the code.
2468 (Java Action Features): New.
2469 (Java Differences): Add reference. Add item on semantic values.
2470 Add note about @{ ... @}. Clarify %% epilogue placement.
2471 (Java Declarations Summary): New.
2472
2473 Fix Java skeleton.
2474 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2475 (b4_remove_comma): Quote test argument.
2476 (b4_identification): Remove "bison" field.
2477 * tests/java.at (Java parser class and package names): New test.
2478 (Java %parse-param and %lex-param): New test.
2479 (Java stype, position_class and location_class): New test.
2480
2481 2008-10-31 Di-an Jan <dianj@freeshell.org>
2482
2483 * data/lalr1.jave: Update copyright years.
2484 (YYParser): Correct name of "generated from" file in Javadoc:
2485 use b4_file_name instead of @ofile@.
2486 (Location constructor): Correct Javadoc parameter name.
2487 (yylloc): Add missing opening m4 quote after b4_location_if.
2488 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2489 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2490 (YYParser constructor): Correct Javadoc parameter name.
2491
2492 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2493
2494 Always put auxiliary code files in the same dir as other output files.
2495 * src/files.c (compute_file_name_parts): When the user specifies
2496 --output but not --file-prefix, extract the directory prefix from the
2497 file prefix not from the grammar file name. This affects the location
2498 of files like location.hh generated by the C++ skeleton. The includes
2499 in the other output files require this fix.
2500 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2501 for expected output files.
2502 (Output files): Add a test for the above.
2503
2504 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2505
2506 * gnulib: Update submodule to HEAD.
2507
2508 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2509
2510 Update copyright year.
2511 * src/files.c: Here.
2512
2513 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2514
2515 Don't overwrite the input file.
2516 * src/files.c (output_file_name_check): Fatal error if using input file
2517 for output.
2518 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2519 argument.
2520 (Conflicting output files): Add test.
2521
2522 2008-10-28 Akim Demaille <demaille@gostai.com>
2523
2524 Space changes.
2525 * data/lalr1.cc: Formatting changes.
2526
2527 2008-10-28 Akim Demaille <demaille@gostai.com>
2528
2529 Don't define debugging functions when !YYDEBUG.
2530 * data/lalr1.cc (debug_stream, set_debug_stream)
2531 (debug_level_type, debug_level, set_debug_level): Don't
2532 declare them when YYDEBUG is not defined.
2533 The implementation are already YYDEBUG-aware.
2534
2535 2008-10-28 Akim Demaille <demaille@gostai.com>
2536
2537 Prefer "continue" for empty loop bodies.
2538 * etc/bench.pl.in: Use "continue" instead of {}.
2539
2540 2008-10-28 Akim Demaille <demaille@gostai.com>
2541
2542 Space and comments changes.
2543 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2544 * data/c.m4, data/lalr1.cc: Space changes.
2545
2546 2008-10-28 Akim Demaille <demaille@gostai.com>
2547
2548 Make gnulib a submodule.
2549 * gnulib: New.
2550 * .gitmodules (gnulib): New.
2551
2552 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 Fix yyerror_range for user-defined location type in C++. Reported by
2555 Georg Sauthoff at
2556 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2557 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2558 * THANKS (Georg Sauthoff): Add.
2559
2560 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2561
2562 Update several administrative files mainly to facilitate releasing.
2563 * HACKING (Administrivia): Make the git-merge-changelog notes more
2564 helpful.
2565 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2566 (Release Procedure): Update for git and add numerous details that were
2567 previously missing.
2568 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2569 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2570 that announcements don't claim we bootstrapped with whatever bison
2571 happened to be in PATH. Add flex as a bootstrap tool.
2572 * Makefile.maint: Remove, previously replaced by maint.mk.
2573 * Makefile.cfg: Remove, and migrate settings to...
2574 * cfg.mk: ... here for the sake of `make announcement'.
2575 * bootstrap.conf (gnulib_modules): Add announce-gen.
2576 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2577 Berry.
2578
2579 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2580
2581 Small but important bugfixes for the Java skeleton.
2582 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2583 (yy_symbol_print): Call toString on yyvaluep.
2584
2585 2008-08-29 Akim Demaille <demaille@gostai.com>
2586
2587 Clarify UPDATED use.
2588 * doc/bison.texinfo: It refers to the last edition of this file,
2589 not to the release date of Bison.
2590 Reported by Joel E. Denny.
2591
2592 2008-08-29 Akim Demaille <demaille@gostai.com>
2593
2594 * README: Update FAQ pointer.
2595 Reported by Joel E. Denny.
2596
2597 2008-08-27 Eric Blake <ebb9@byu.net>
2598
2599 Resync m4sugar from autoconf.
2600 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2601 (m4_init): Adjust to latest m4.git changes.
2602 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2603 effects.
2604 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2605 (_m4_list_cmp): Reduce side effects.
2606
2607 2008-08-27 Akim Demaille <demaille@gostai.com>
2608
2609 Check yyerrok in calc.at.
2610 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2611 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2612 expected.
2613
2614 2008-08-27 Akim Demaille <demaille@gostai.com>
2615
2616 Support yyerrok in lalr1.cc.
2617 YYBACKUP is still to import back into lalr1.cc.
2618 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2619
2620 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2621
2622 For maintainer-check*, don't recompile for a $(VERSION) update.
2623 * cfg.mk: New file.
2624 (_is-dist-target): Override the one in GNUmakefile.
2625 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2626
2627 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2628
2629 Update for recent change to gnulib.
2630 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2631 string.h now.
2632
2633 2008-08-15 Eric Blake <ebb9@byu.net>
2634
2635 Remaining m4sugar merge from autoconf.
2636 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2637 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2638 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2639 * src/output.c (output_skeleton): Tell m4 how to find it.
2640
2641 Partial m4sugar merge from autoconf: m4_map.
2642 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2643 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2644 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2645 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2646 for empty list.
2647 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2648 Likewise.
2649 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2650 declares it.
2651
2652 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2653
2654 Keep .version and PACKAGE_VERSION in sync.
2655 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2656 dependency, and add comments justifying this in more detail. Discussed
2657 starting at
2658 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2659
2660 2008-08-06 Eric Blake <ebb9@byu.net>
2661
2662 Partial m4sugar merge from autoconf: m4_shiftn.
2663 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2664 (m4_shift2, m4_shift3): New macros.
2665 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2666 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2667 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2668 * data/java.m4 (b4_remove_comma): Likewise.
2669
2670 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2671 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2672 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2673 (m4_init): Consolidate wrapped text into single m4_wrap.
2674 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2675 in wrapped text.
2676
2677 2008-08-05 Eric Blake <ebb9@byu.net>
2678
2679 Partial m4sugar merge from autoconf: builtins, version.m4.
2680 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2681 (m4_prepend): Remove, as it is unused and inherently quadratic,
2682 whereas m4_append is linear in newer m4.
2683 (m4_mkstemp): New builtin.
2684 (m4_symbols): Make rename conditional.
2685 (m4_version_prereq): Ensure fatal error if used in bison, which
2686 intentionally lacks version.m4.
2687
2688 Fix comments in m4sugar.
2689 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2690
2691 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2692
2693 Update for recent .gitignore fix in Gnulib.
2694 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2695 anchored .gitignore entries.
2696
2697 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2698
2699 Set gnu or gnits strictness.
2700 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2701 development and gnits strictness for releases. Based on Eric Blake's
2702 suggestion at
2703 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2704
2705 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2706
2707 * NEWS: Clarify documentation of %language.
2708
2709 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2710
2711 Support usage of git-merge-changelog.
2712 * .gitattributes: New.
2713 * HACKING: Document usage of git-merge-changelog.
2714 * bootstrap: Install git-merge-changelog entries in .git/config
2715 if appropriate.
2716
2717 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2718
2719 Remove remaining dependence on CVS Id keyword.
2720 * ChangeLog: For the sake of people still using CVS, don't use dollars
2721 when mentioning Id.
2722 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2723 unusual anyway.
2724 * data/xslt/xml2dot.xsl: Likewise.
2725 * data/xslt/xml2text.xsl: Likewise.
2726 * data/xslt/xml2xhtml.xsl: Likewise.
2727 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2728 * doc/Makefile.am (neutralize): Remove, no longer needed.
2729 (.x.1): Don't use neutralize.
2730 (edit): Don't substitute for ID.
2731 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2732
2733 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 Fix dependence on computed configure variables.
2736 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2737 $(top_srcdir)/configure.ac so that changes to computed variables, such
2738 as PACKAGE_VERSION, are seen.
2739 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2740
2741 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2742
2743 Update copyright dates for recent changes.
2744 * Makefile.am: Here.
2745 * src/Makefile.am: Here.
2746 * src/reduce.c: Here.
2747 * tests/reduce.at: Here.
2748
2749 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2750
2751 Use git-version-gen for version names between releases.
2752 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2753 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2754 * .prev-version: New.
2755 * .version.in: Remove.
2756 * ChangeLog: Remove the Id previously used for capturing the CVS
2757 revision.
2758 * GNUmakefile: Remove, now copied from Gnulib.
2759 * Makefile.am: Add code suggested by comments in
2760 build-aux/git-version-gen.
2761 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2762 .prev-version, and .version.
2763 * NEWS (2.3b+): Rename to...
2764 (?.?): ... this because we're dropping the "+" version naming scheme,
2765 but, in general, we still can't be sure of our next release name.
2766 * bootstrap: Add a quick hack to remove from .gitignore the
2767 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2768 entry. This should really be fixed in gnulib instead.
2769 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2770 * configure.ac (AC_INIT): Set version name by invoking
2771 build-aux/git-version-gen.
2772 (AC_CONFIG_FILES): Remove .version, now generated by
2773 build-aux/git-version-gen.
2774 * maint.mk: New, copied from coreutils.
2775 * doc/.cvsignore (bison.1): Add.
2776 * doc/.gitignore (/bison.1): Add.
2777 * doc/bison.1: Remove, generated.
2778 * src/.cvsignore (revision.c): Remove.
2779 * src/.gitignore (/revision.c): Remove.
2780 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2781 (BUILT_SOURCES): Remove revision.c.
2782 (revision.c): Remove.
2783 * src/getargs.c (version): Don't print revision after the VERSION.
2784 * src/revision.h: Remove.
2785
2786 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2787
2788 Fix untranslatable composition of sentences. Reported by Goran
2789 Uddeborg at
2790 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2791 * THANKS (Goran Uddeborg): Add.
2792 * src/reduce.c (reduce_print): Report the number of nonterminals and
2793 rules useless in the grammar in separate sentences.
2794 * tests/reduce.at (Useless Rules): Update output.
2795 (Reduced Automaton): Likewise.
2796 (Underivable Rules): Likewise.
2797 (Empty Language): Likewise.
2798
2799 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2800
2801 Fix some .gitignore and .cvsignore problems.
2802 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2803 (insert_vc_ignore): ... this new function, which prepends `/' to all
2804 .gitignore entries before passing them to insert_sorted_if_absent.
2805 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2806 .cvsignore files are maintained even though Bison developers run
2807 bootstrap while using Git.
2808 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2809 unneeded by Bison.
2810 (gnulib): Add.
2811 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2812 unneeded. Reported by Eric Blake.
2813 * lib/.gitignore (/*~): Add.
2814 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2815 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2816 Blake.
2817 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2818
2819 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2820
2821 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2822 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2823 * bootstrap.conf (gnulib_modules): Add unsetenv.
2824 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2825 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2826 (/setenv.m4): Add.
2827 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2828 the first argument because it may become position-dependent, and unset
2829 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2830 Add comments explaining these issues in more detail.
2831
2832 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 Add .gitignore everywhere based on .cvsignore.
2835 * .gitignore: New.
2836 * build-aux/.gitignore: New.
2837 * data/.gitignore: New.
2838 * doc/.gitignore: New.
2839 * etc/.gitignore: New.
2840 * examples/.gitignore: New.
2841 * examples/calc++/.gitignore: New.
2842 * lib/.gitignore: New.
2843 * m4/.gitignore: New.
2844 * po/.gitignore: New.
2845 * runtime-po/.gitignore: New.
2846 * src/.gitignore: New.
2847 * tests/.gitignore: New.
2848
2849 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 * NEWS (2.3b+): New section, empty for now.
2852 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2853
2854 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2855
2856 * NEWS (2.3b): Update release date since there has been a delay in
2857 getting the announcements and tarballs out.
2858
2859 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2860
2861 * NEWS: Version 2.3b.
2862 * configure.ac (AC_INIT): Likewise.
2863 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2864
2865 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2866
2867 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2868 been doing it for years.
2869 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2870 (Release Procedure): Add FIXME about make alpha being unmaintained.
2871
2872 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2873
2874 * data/yacc.c: Reformat m4 a little for readability.
2875 * src/lalr.c (build_relations): Correct comment.
2876
2877 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2878
2879 DJGPP specific issue.
2880 * djgpp/config.sed: Fixes required to run configure scripts generated
2881 by autoconf 2.62.
2882
2883 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2884
2885 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2886 coordinator@translationproject.org.
2887
2888 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2889
2890 * THANKS: Add Eric Blake.
2891
2892 2008-04-23 Eric Blake <ebb9@byu.net>
2893
2894 Revert prior patch, by working around autoconf regression.
2895 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2896 ("Output file name: ("): Uncomment test.
2897 ("Output file name: )"): Likewise.
2898 Based on an idea from Noah Misch.
2899
2900 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2901
2902 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2903 2.61. Reported by Juan Manuel Guerrero at
2904 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2905 * tests/output.at ("Output file name: ("): Comment out test case for
2906 now.
2907 ("Output file name: )"): Likewise.
2908
2909 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2910
2911 * GNUmakefile: Update git-version-gen invocation so make dist
2912 succeeds.
2913
2914 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2915
2916 Update to the current gnulib CVS repository, and fix trigraph handling
2917 in Bison.
2918 * bootstrap: Update gnulib CVS repository URL.
2919 (symlink_to_dir): Encapsulate the code that guarantees the destination
2920 directory exists into...
2921 (check_dst_dir): ... this new function, and...
2922 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2923 fail when copying files into lib/uniwidth/.
2924 * src/output.c (prepare_symbols): When writing yytname muscles, where
2925 symbol names will be encoded in C-string literals, tell quotearg to
2926 escape trigraphs. This used to be the default in gnulib.
2927 * tests/regression.at (Token definitions): Because of the change in
2928 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2929 escapes trigraphs in symbol names. Thus, yytname no longer has
2930 trigraphs unnecessarily doubly escaped. Update test case output.
2931 Extend test case to be sure Bison's own error messages will no longer
2932 have trigraphs in symbol names unnecessarily escaped once.
2933
2934 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2935
2936 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2937 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2938 * .cvsignore: Add .version.
2939 * .version.in: New.
2940 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2941 * configure.ac (AC_CONFIG_FILES): Add .version.
2942 * build-aux/.cvsignore: Add git-version-gen.
2943
2944 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2945
2946 * NEWS (2.3a+): Mention that -g now takes an argument.
2947 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2948 consistency. Update the -g and -x entries now that they take
2949 arguments. Use brackets to indicate optional arguments.
2950 * src/getargs.c (usage): Explain the relationship between arguments of
2951 long and short options more completely. Document --defines and -d
2952 separately since the former takes an argument but, for POSIX Yacc, the
2953 latter does not.
2954 (short_options): Let -W take an optional argument like --warnings.
2955 (getargs): Sort cases.
2956
2957 2008-02-28 Akim Demaille <demaille@gostai.com>
2958
2959 * doc/bison.texinfo: Fix a few typos.
2960
2961 2008-02-28 Akim Demaille <akim@epita.fr>
2962
2963 * doc/bison.texinfo (Bison Options): Document -W.
2964 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2965
2966 2008-02-28 Akim Demaille <akim@epita.fr>
2967
2968 * src/getargs.c (short_options): Split and sort for readability.
2969 -g and -x take optional arguments, just like their long options.
2970 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2971 understand.
2972 Fix the handling of $opt which resulted in all the argument to be
2973 considered as optional.
2974
2975 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2976
2977 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2978 say its interface is experimental.
2979 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2980 Java.
2981 (Bison Options): In the -L and --language entry, mention Java.
2982 (Java Bison Interface): Say the interface is experimental.
2983 * src/getargs.c (usage): Mention -L and --language.
2984
2985 * NEWS (2.3a+): Say the push parsing interface is experimental.
2986 * doc/bison.texinfo (Push Decl): Likewise.
2987 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2988 (Push Parser Function): Likewise.
2989 (Pull Parser Function): Likewise.
2990 (Parser Create Function): Likewise.
2991 (Parser Delete Function): Likewise.
2992 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2993 yypull_parse, and yypush_parse entries.
2994
2995 * NEWS (2.3a+): Mention XML support, and say the schema is
2996 experimental.
2997 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2998 * src/getargs.c (usage): Say the XML schema is experimental.
2999
3000 * NEWS (2.3a+): Say option instead of flag.
3001
3002 2008-02-21 Wojciech Polak <polak@gnu.org>
3003
3004 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3005 text.
3006
3007 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3008
3009 Fix impure push parser compile error reported by Bob Rossi at
3010 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3011 * data/yacc.c: Clean up whitespace in the output a little.
3012 (yypstate_allocated): Define for impure push parsers regardless of
3013 whether the pull interface is also requested.
3014 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3015 check impure push parsers without the pull interface.
3016
3017 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3018 yyerror takes arguments specified by %parse-param while yypstate_new
3019 does not.
3020 * doc/bison.texinfo (Parser Create Function): Document that
3021 yypstate_new returns 0 for multiple impure parser instances.
3022 * tests/push.at (Push Parsing: Multiple impure instances): Update
3023 expected stderr output.
3024
3025 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3026
3027 * runtime-po/POTFILES.in (push.c): Remove.
3028
3029 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3030
3031 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3032 * data/push.c: Rename to...
3033 * data/yacc.c: ... this, overwriting it.
3034 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3035 `%push-pull-parser' -> `%define api.push_pull "both"'.
3036 Remove old yacc.c tests, and update push.c tests to yacc.c.
3037
3038 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3039
3040 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3041 `"%code top" blocks' instead of `%code "top" blocks'.
3042 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3043 Clean up whitespace in the output a little.
3044
3045 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3046
3047 Fix documentation problems reported by Tim Josling at
3048 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3049 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3050 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3051 integers. Explain the effect of literal string aliases on error
3052 messages. Copy token 0 documentation from the C++ skeleton
3053 documentation.
3054
3055 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3056
3057 Accept a token number in a %left, %right, or %nonassoc for POSIX
3058 conformance. Reported by Tim Josling at
3059 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3060 * NEWS (2.3a+): Mention.
3061 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3062 and code numbers are treated by precedence declarations.
3063 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3064 of symbols.1.
3065 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3066 of symbol.
3067 (symbol.prec): New, just like symbol but allows INT.
3068 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3069 longer holds.
3070 * tests/regression.at (Token number in precedence declaration): New
3071 test case.
3072
3073 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3074
3075 DJGPP specific issues.
3076 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3077 be changed. Copyright timestamp adjusted.
3078 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3079 be changed. Copyright timestamp adjusted.
3080 * djgpp/config.site: Copyright timestamp adjusted.
3081 * djgpp/config_h.sed: Copyright timestamp adjusted.
3082 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3083 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3084 filename translation list.
3085 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3086 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3087 files shall be created. Before trying to use the temp dir where the
3088 environment variable points to check that the dir really exists. If
3089 not default to the cwd as temp dir. Copyright timestamp adjusted.
3090 * djgpp/subpipe.h: Copyright timestamp adjusted.
3091 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3092
3093 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3094
3095 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3096
3097 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3098
3099 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3100 Problem reported by Claudio Saavedra in
3101 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3102
3103 2008-01-05 Wojciech Polak <polak@gnu.org>
3104
3105 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3106 document's title with the input grammar file name.
3107
3108 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3109
3110 Automate regression testing of the XML/XSLT implementation. Discussed
3111 starting at
3112 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3113 * configure.ac (XSLTPROC): New substitution.
3114 * Makefile.am (maintainer-xml-check): New phony target invoking...
3115 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3116 invoking make maintainer-check with BISON_TEST_XML=1.
3117 * tests/atlocal.in (XSLTPROC): New.
3118 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3119 not to report reachable memory when Bison is expected to have a
3120 non-zero exit status and (2) to compare XML/XSLT output with --graph
3121 and --report=all output for every working grammar when
3122 BISON_TEST_XML=1.
3123 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3124 (AT_BISON_CHECK_XML): New.
3125 (AT_QUELL_VALGRIND): New.
3126 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3127 (AT_CHECK): ... don't redefine this since this was the old way to
3128 quell Valgrind.
3129 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3130 AT_BISON_CHECK invocations.
3131 * tests/c++.at: Likewise.
3132 * tests/calc.at: Likewise.
3133 * tests/conflicts.at: Likewise.
3134 * tests/cxx-type.at: Likewise.
3135 * tests/existing.at: Likewise.
3136 * tests/glr-regression.at: Likewise.
3137 * tests/headers.at: Likewise.
3138 * tests/input.at: Likewise.
3139 * tests/java.at: Likewise.
3140 * tests/output.at: Likewise.
3141 * tests/push.at: Likewise.
3142 * tests/reduce.at: Likewise.
3143 * tests/regression.at: Likewise.
3144 * tests/sets.at: Likewise.
3145 * tests/skeletons.at: Likewise.
3146 * tests/synclines.at: Likewise.
3147 * tests/torture.at: Likewise.
3148 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3149 tends to hang xsltproc.
3150 (Big horizontal): Likewise.
3151
3152 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3153
3154 In XML output, remove redundant class attribute on symbol element.
3155 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3156 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3157 look up a symbol to determine whether it's a nonterminal or terminal.
3158 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3159 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3160
3161 Add prec/assoc information to XML output.
3162 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3163 %prec, add a percent_prec attribute.
3164 * src/print-xml.c (print_grammar): For each terminal that has a
3165 precedence or associativity, add a prec or assoc attribute.
3166 (xml_indent): New.
3167 (xml_puts): Use xml_indent.
3168 (xml_printf): Use xml_indent.
3169 * src/print-xml.h (xml_indent): Prototype.
3170
3171 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3172 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3173
3174 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3175
3176 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3177 (bison:ruleByNumber): ... this for clarity.
3178 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3179 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3180 (xsl:template match="reduction"): Update.
3181 (xsl:template match="item"): Update.
3182 (xsl:template match="reduction"): Update.
3183
3184 In the XML output, don't print the list of rules where symbols appear.
3185 Compute it in XSLT instead. Discussed at
3186 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3187 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3188 (bison:ruleByRhs): New.
3189 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3190 bison:ruleByRhs.
3191 (xsl:template match="terminal/rule"): Remove.
3192 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3193 bison:ruleByRhs.
3194 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3195 Remove.
3196 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3197 bison:ruleByRhs and mode="number-link" for rule template.
3198 (xsl:template match="terminal/rule"): Remove.
3199 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3200 bison:ruleByRhs and mode="number-link" for rule template.
3201 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3202 Rewrite as...
3203 (xsl:template match="rule" mode="number-link"): ... this.
3204 * src/print-xml.c (print_grammar): Don't print the list of rules.
3205
3206 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3207
3208 Don't let --report affect XML output; always print all information.
3209 Discussed at
3210 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3211 * src/conflicts.c (log_resolution): Implement.
3212 * src/print-xml.c (print_core): Implement.
3213 (print_state): Implement.
3214 (print_xml): Implement.
3215
3216 * NEWS (2.3a+): Fix quotes.
3217 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3218 don't let %verbose clear the list specified by --report.
3219
3220 2007-11-26 Akim Demaille <akim@epita.fr>
3221
3222 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3223
3224 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3225
3226 In the XML output, list useless and unused symbols and rules with the
3227 useful ones and add a "usefulness" attribute. Discussed starting at
3228 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3229 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3230 (grammar_rules_print_xml): Print all rules instead of just those
3231 useful in the grammar, and add a "usefulness" attribute.
3232 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3233 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3234 (print_grammar): Print all nonterminals instead of just useful ones,
3235 and add a "usefulness" attribute to nonterminals and terminals.
3236 (print_xml): Don't print a separate "reductions" or
3237 "rules-useless-in-parser" element.
3238 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3239 (reduce_xml): Remove.
3240 (reduce_token_unused_in_grammar): New.
3241 (reduce_nonterminal_useless_in_grammar): New.
3242 * src/reduce.h (reduce_xml): Remove prototype.
3243 (reduce_token_unused_in_grammar): Add prototype.
3244 (reduce_nonterminal_useless_in_grammar): Add prototype.
3245 * data/xslt/xml2text.xsl: Update for XML changes.
3246 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3247 * tests/reduce.at (Useless Terminals): Update output.
3248 (Useless Rules): Update output.
3249 (Reduced Automaton): Update output.
3250
3251 Say "Terminals unused in grammar" instead of "Unused terminals".
3252 * NEWS (2.3a+): Update.
3253 * doc/bison.texinfo (Understanding): Update example output.
3254 * src/reduce.c (reduce_output): Implement.
3255 * data/xslt/xml2text.xsl: Implement.
3256 * data/xslt/xml2xhtml.xsl: Implement.
3257
3258 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3259
3260 Accept --report-file=FILE to override the default `.output' filename.
3261 * NEWS (2.3a+): Mention.
3262 * doc/bison.texinfo (Bison Options): Add an entry.
3263 * src/files.c (compute_output_file_names): Don't override
3264 spec_verbose_file if already set.
3265 * src/getargs.c (usage): Document --report-file.
3266 (REPORT_FILE_OPTION): New anonymous enum member.
3267 (long_options): Add entry for it.
3268 (getargs): Add case for it setting spec_verbose_file.
3269
3270 * build-aux/cross-options.pl: Don't record a short option just because
3271 there's an arg.
3272 * doc/.cvsignore: Add yacc.1.
3273
3274 2007-11-14 Akim Demaille <akim@epita.fr>
3275
3276 * doc/yacc.1.in: New.
3277 * configure.ac, doc/Makefile.am: Adjust.
3278 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3279 config.h symbol.
3280 Use AC_SUBST for assignments too.
3281 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3282
3283 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3284
3285 * src/gram.c: Remove comments that duplicate comments in gram.h.
3286
3287 When reporting useless rules and nonterminals, say "useless in grammar"
3288 instead of "useless", and say "useless in parser" instead of "never
3289 reduced". Discussed starting at
3290 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3291 * NEWS (2.3a+): Mention this change.
3292 * data/xslt/xml2text.xsl: Update output text and expected input XML
3293 element names to match changes below.
3294 * data/xslt/xml2xhtml.xsl: Likewise.
3295 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3296 Contents: "Rules useless in parser due to conflicts".
3297 * doc/bison.texinfo (Decl Summary): Reword a little.
3298 (Understanding): Update example output for changes below.
3299 * src/gram.c: (rule_useful_p): Rename to...
3300 (rule_useful_in_grammar_p): ... this.
3301 (rule_useless_p): Rename to...
3302 (rule_useless_in_grammar_p): ... this.
3303 (rule_never_reduced_p): Rename to...
3304 (rule_useless_in_parser_p): ... this.
3305 (grammar_rules_print): Update for renames.
3306 (grammar_rules_print_xml): Update for renames.
3307 (grammar_rules_never_reduced_report): Rename to...
3308 (grammar_rules_useless_report): ... this since it is used for either
3309 kind of useless rule.
3310 * src/gram.h: Reword comments and update function names in prototypes.
3311 * src/main.c (main): Say "rule useless in parser due to conflicts".
3312 * src/print-xml.c (print_rules_never_reduced): Rename to...
3313 (print_rules_useless_in_parser): ... this, and rename output XML
3314 element "rules-never-reduced" to "rules-useless-in-parser".
3315 (print_xml): Update for rename.
3316 * src/print.c (print_results): Say "Rules useless in parser due to
3317 conflicts".
3318 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3319 (nonterminals_reduce): Say "nonterminal useless in grammar".
3320 (reduce_output): Say "Nonterminals useless in grammar".
3321 Say "Rules useless in grammar".
3322 (reduce_xml): Rename output XML element "useless" to
3323 "useless-in-grammar".
3324 (reduce_print): Don't report the count of grammatically useless rules
3325 as "rules never reduced" just because %yacc is specified.
3326 In the correct report of this count, say nonterminal(s) and rule(s)
3327 "useless in grammar".
3328 * tests/conflicts.at (S/R in initial): Update expected output.
3329 (Defaulted Conflicted Reduction): Likewise.
3330 (Unreachable States After Conflict Resolution): Likewise.
3331 * tests/existing.at (GNU pic Grammar): Likewise.
3332 * tests/reduce.at (Useless Nonterminals): Likewise.
3333 (Useless Rules): Likewise.
3334 (Reduced Automaton): Likewise.
3335 (Underivable Rules): Likewise.
3336 (Empty Language): Likewise.
3337
3338 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3339
3340 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3341 here document and before the EOF so that BSD's implementation of Bourne
3342 shell doesn't parse the delimiter as part of the here document.
3343 * doc/.cvsignore: Add cross-options.texi.
3344 * src/getargs.c (usage): Add a blank line after the warning categories.
3345
3346 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3347
3348 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3349
3350 2007-11-05 Akim Demaille <akim@epita.fr>
3351
3352 Remove Id: from bison.1.
3353 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3354 (perl -0777 -pi -e 's/\.PP\nId): New.
3355 (.x.1): Use it to ignore the version control revision.
3356
3357 2007-11-05 Akim Demaille <demaille@gostai.com>
3358
3359 * build-aux/Makefile.am: Ship cross-options.pl.
3360 * doc/Makefile.am: Always refer to cross-options.texi with
3361 $(srcdir).
3362 (MAINTAINERCLEANFILES): Add it.
3363
3364 2007-11-04 Akim Demaille <demaille@gostai.com>
3365
3366 Generate the long/short option cross-table.
3367 * build-aux/cross-options.pl: New.
3368 * doc/Makefile.am (cross-options.texi): New.
3369 * doc/bison.texinfo: Use it.
3370
3371 2007-11-04 Akim Demaille <demaille@gostai.com>
3372
3373 Generate bison.1 using help2man.
3374 * doc/common.x, doc/bison.x: New.
3375 * doc/Makefile.am (bison.1, .x.1): New.
3376 The code is taken from autoconf-2.61/man/Makefile.am.
3377 * configure.ac: Look for help2man.
3378
3379 2007-11-04 Akim Demaille <demaille@gostai.com>
3380
3381 Complete --help.
3382 * src/getargs.c (usage): Document -W, make it clear that -d,
3383 -g and -x have optional arguments.
3384
3385 2007-11-04 Akim Demaille <demaille@gostai.com>
3386
3387 Find sha1sum when named gsha1sum.
3388 * bootstrap (find_tool): New.
3389 ($SHA1SUM): New.
3390
3391 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3392
3393 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3394 at
3395 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3396 * NEWS (2.3a+): Mention.
3397 * data/bison.m4 (b4_pure_if): Don't define it here.
3398 * data/c.m4 (b4_identification): Depend on individual skeletons to
3399 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3400 values of the %define variables api.pure or api.push_pull. Define
3401 YYPURE, YYPUSH, and YYPULL accordingly.
3402 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3403 glr.cc has already defined b4_pure_flag.
3404 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3405 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3406 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3407 * doc/bison.texinfo (Pure Decl): Update.
3408 (Push Decl): Update.
3409 (Decl Summary): Add api.pure to %define entry.
3410 In %pure-parser entry, say it's deprecated and reference %define.
3411 (Pure Calling): Update.
3412 (Error Reporting): Update.
3413 (C++ Scanner Interface): Update.
3414 (How Can I Reset the Parser): Update.
3415 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3416 reference %define.
3417 * src/getargs.c (pure_parser): Remove global variable.
3418 * src/getargs.h (pure_parser): Remove extern.
3419 * src/output.c (prepare): Don't define pure_flag muscle.
3420 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3421 wrapper around `%define api.pure'.
3422 * tests/calc.at (Simple LALR Calculator): Update.
3423 (Simple GLR Calculator): Update.
3424 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3425 Update.
3426 (GLR: Resolve ambiguity, pure, locations): Update.
3427 (GLR: Merge conflicting parses, pure, no locations): Update.
3428 (GLR: Merge conflicting parses, pure, locations): Update.
3429 * tests/glr-regression.at (Uninitialized location when reporting
3430 ambiguity): Update
3431 * tests/input.at (Unused %define api.pure): New test case.
3432 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3433 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3434 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3435
3436 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3437
3438 %define push_pull -> %define api.push_pull. Discussed starting at
3439 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3440 * data/push.c: Expect the new name.
3441 * data/yacc.c: Likewise.
3442 * doc/bison.texinfo (Push Decl): Update.
3443 (Decl Summary): Update %define entry.
3444 (Push Parser Function): Update.
3445 (Pull Parser Function): Update.
3446 (Parser Create Function): Update.
3447 (Parser Delete Function): Update.
3448 * tests/calc.at (Simple LALR Calculator): Update.
3449 * tests/input.at (%define enum variables): Update.
3450 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3451 (Push Parsing: Multiple impure instances): Update.
3452 (Push Parsing: Unsupported Skeletons): Update.
3453 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3454 (Exploding the Stack Size with Malloc): Update.
3455
3456 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3457 other entries some.
3458
3459 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3460
3461 For the XML output's terminal element, rename @number to @token-number,
3462 and add @symbol-number. In the nonterminal element, rename @number to
3463 @symbol-number. Discussed starting at
3464 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3465 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3466 renames.
3467 (xsl:template match="nonterminal"): Likewise.
3468 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3469 (xsl:template match="nonterminal"): Likewise.
3470 * src/print-xml.c (print_grammar): Implement.
3471
3472 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3473
3474 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3475 2007-10-11 change, the child elements here are items not rules.
3476 (xsl:template match="item"): New.
3477 (xsl:template match="rule"): Update for new reduced itemset.
3478 (xsl:template match="point"): Remove.
3479 (xsl:template match="empty"): For consistency with --graph, don't
3480 output "/* empty */".
3481 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3482 line-wrap, don't pass a negative value as first-line-length since this
3483 won't work with the following changes.
3484 (xsl:template name="line-wrap"): Simplify slightly.
3485 (xsl:template name="ws-search"): Eliminate recursion.
3486 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3487 set next to an item whose dot is not at the end of the RHS even if it
3488 happens to be associated with the same rule.
3489
3490 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3491
3492 Add %define lr.keep_unreachable_states.
3493 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3494 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3495 * src/main.c (main): Implement it.
3496 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3497 Extend to test it, and fix a typo.
3498
3499 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3500
3501 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3502 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3503 the example .output text.
3504 * tests/regression.at (Extra lookahead sets in report): Improve wording
3505 of comments.
3506
3507 2007-10-17 Wojciech Polak <polak@gnu.org>
3508
3509 * src/print-xml.c (print_grammar): Renamed
3510 <terminal> and <nonterminal> attributes:
3511 "type" to "number" and "symbol" to "name".
3512 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3513 Use new attribute names.
3514 (xsl:template match="nonterminal"): Likewise.
3515 * data/xslt/xml2xhtml.xsl: Likewise.
3516
3517 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3518
3519 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3520 (Option Cross Key): Likewise.
3521
3522 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3523 next to an item whose dot is not at the end of the RHS even if it
3524 happens to be associated with the same rule.
3525 * src/print.c (print_core): Likewise.
3526 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3527 (Resolved SR Conflicts): Update output.
3528 * tests/regression.at (Extra lookahead sets in report): New test case.
3529
3530 2007-10-11 Wojciech Polak <polak@gnu.org>
3531
3532 * src/print-xml.c (print_core): Remove item set
3533 redundancy.
3534 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3535 Improve processing time. Suggested by Joel E. Denny.
3536 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3537 Write xsl:param "required" attribute as comment.
3538 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3539 (xsl:template match="rule"): Support new reduced itemset.
3540 (xsl:template match="point"): Remove.
3541 * data/xslt/xml2xhtml.xsl: Likewise.
3542
3543 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3544
3545 * src/getargs.c (version): Update copyright year.
3546
3547 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3548
3549 Make xml2dot.xsl and --graph produce the same output.
3550 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3551 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3552 escaped later.
3553 (xsl:template name="output-node"): Use the new escape template instead
3554 of the string-replace template directly.
3555 (xsl:template name="output-edge"): Likewise.
3556 (xsl:template name="escape"): New, escapes backslashes and newlines in
3557 addition to quotation marks.
3558 * src/graphviz.c (start_graph, output_node, output_edge): Add
3559 whitespace to output for legibility.
3560
3561 Make xml2text.xsl and --report produce the same output, and remove the
3562 XML "conflicts" element since a conflict summary is easily extracted
3563 from the automaton.
3564 * data/xslt/bison.xsl: New.
3565 (xsl:template match="state" mode="bison:count-conflicts): New.
3566 * data/xslt/xml2text.xsl: Import bison.xsl.
3567 (xsl:template match="bison-xml-report"): Instead of styling the
3568 "conflicts" element, style the "automaton" element with mode
3569 "conflicts". Unlike the former, the latter lists S/R and R/R
3570 conflicts for a state on the same line.
3571 (xsl:template match="conflicts"): Remove.
3572 (xsl:template match="conflict"): Remove.
3573 (xsl:template match="terminal"): Line-wrap the list of rules in which
3574 the terminal is used.
3575 (xsl:template match="nonterminal"): Likewise for nonterminals.
3576 (xsl:template match="automaton" mode="conflicts"): New.
3577 (xsl:template match="state" mode="conflicts"): New.
3578 (xsl:template name="line-wrap"): New.
3579 (xsl:template name="ws-search"): New.
3580 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3581 (xsl:template match="bison-xml-report"): Instead of styling the
3582 "conflicts" element, style the "automaton" element with mode
3583 "conflicts."
3584 (xsl:template match="conflicts"): Remove.
3585 (xsl:template match="conflict"): Remove.
3586 (xsl:template match="automaton" mode="conflicts"): New.
3587 (xsl:template match="state" mode="conflicts): New.
3588 * src/conflicts.c (conflicts_output_xml): Remove.
3589 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3590 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3591 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3592 the corresponding XSLT is easier. Also, never wrap between a word and
3593 the comma that follows it.
3594
3595 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3596
3597 Improve C++ namespace support. Discussed starting at
3598 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3599 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3600 b4_namespace_close): New macros that interpret the %define variable
3601 "namespace" so its value can contain "::" to indicate nested
3602 namespaces.
3603 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3604 the above macros.
3605 * data/lalr1.cc (b4_namespace): Likewise.
3606 * data/location.cc (b4_namespace): Likewise.
3607 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3608 inside a new table in the general %define entry. Document `%define
3609 namespace' there as well. Point the %name-prefix entry to it since it
3610 explains it more completely in the case of C++.
3611 (C++ Bison Interface): Mention `%define namespace' instead of
3612 %name-prefix.
3613 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3614 entry suffices.
3615 * tests/c++.at (Relative namespace references): New test case.
3616 (Absolute namespace references): New test case.
3617 (Syntactically invalid namespace references): New test case.
3618 * tests/input.at (C++ namespace reference errors): New test case.
3619
3620 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3621
3622 Add syncline support and location accessor to internal %define
3623 interfaces.
3624 * data/bison.m4 (b4_percent_define_get_loc): New.
3625 (b4_percent_define_get_syncline): New.
3626 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3627 (b4_percent_define_default): Record defining location as line 1 rather
3628 than 0 for the sake of synchronizing #line's, and define
3629 b4_percent_define_syncline(VARIABLE).
3630 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3631 * src/muscle_tab.c (muscle_syncline_grow): New.
3632 (muscle_code_grow): Use muscle_syncline_grow.
3633 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3634 define b4_percent_define_syncline(VARIABLE).
3635 (muscle_percent_define_get_loc): New.
3636 (muscle_percent_define_get_syncline): New.
3637 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3638 remove some unused variables.
3639 (muscle_percent_define_default): Record defining location as line 1
3640 rather than 0 for the sake of synchronizing #line's, and define
3641 b4_percent_define_syncline(VARIABLE).
3642 (muscle_percent_define_check_values): Use
3643 muscle_percent_define_get_loc.
3644 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3645 (muscle_percent_define_get_syncline): Prototype.
3646 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3647 defaults): Update output for location change.
3648 (Complaining during macro argument expansion): Extend to test
3649 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3650
3651 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3652
3653 Fix some error-reporting macro bugs.
3654 * data/bison.m4 (b4_cat): New.
3655 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3656 to stdout so they don't become arguments to other macros. Update
3657 comments and add examples.
3658 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3659 add examples.
3660 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3661 after printing the error directive so that M4 doesn't report subsequent
3662 problems that are induced by this problem.
3663 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3664 instead of just in them. Recognize @\n in both places. Both expand to
3665 the empty string. Needed by b4_cat.
3666 * tests/skeletons.at (Complaining during macro argument expansion):
3667 New test case.
3668 (Fatal errors make M4 exit immediately): New test case.
3669
3670 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3671
3672 Implement --print-datadir.
3673 * src/getargs.c (usage): Mention.
3674 (PRINT_DATADIR_OPTION): New anonymous enum member.
3675 (long_options): Add entry for it.
3676 (getargs): Add case for it calling compute_pkgdatadir.
3677 * src/output.c (output_skeleton): Encapsulate data directory
3678 computation from here...
3679 (prepare): ... and from here...
3680 (compute_pkgdatadir): ... into this new function.
3681 * src/output.h (compute_pkgdatadir): Prototype.
3682
3683 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3684
3685 * src/print-xml.c (escape_bufs): New static global variable
3686 replacing...
3687 (xml_escape_n): ... the static local variable buf here.
3688 (print_xml): Free memory for escape_bufs.
3689 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3690
3691 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Replace `%push-parser' and `%push-pull-parser' with
3694 `%define push_pull "push"' and `%define push_pull "both"'.
3695 `%define push_pull "pull"' is the default.
3696 * doc/bison.texinfo (Push Decl, Push Parser Function,
3697 Pull Parser Function, Parser Create Function, Parser Delete Function):
3698 Update declarations.
3699 (Decl Summary, Table of Symbols): Replace %push-parser and
3700 %push-pull-parser entries with a %define push_pull entry.
3701 * data/bison.m4 (b4_percent_define_check_values): New macro.
3702 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3703 definitions...
3704 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3705 definitions...
3706 * data/push.c: ... to here and compute them from the value of the
3707 %define variable push_pull.
3708 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3709 parsing requests here...
3710 * data/yacc.c: ... hack this to switch to push.c any time
3711 b4_use_push_pull_flag or the %define variable push_pull is set. This
3712 will go away when we mv push.c yacc.c.
3713 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3714 push parsing is not supported since unused %define variables are
3715 reported anyway.
3716 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3717 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3718 comments for consistency with b4_percent_define_check_values.
3719 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3720 muscles.
3721 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3722 Remove.
3723 (prologue_declaration): Remove %push-parser and %push-pull-parser
3724 rules.
3725 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3726 * tests/calc.at: Update declarations.
3727 * tests/input.at (%define enum variables): New test case.
3728 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3729 declaration.
3730 (Push Parsing: Multiple impure instances): Update declaration.
3731 (Push Parsing: Unsupported Skeletons): New test case.
3732 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3733 declaration.
3734 (Exploding the Stack Size with Malloc): Update declaration.
3735
3736 2007-09-24 Wojciech Polak <polak@gnu.org>
3737
3738 Add XSLT transformations.
3739
3740 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3741 * data/xslt/xml2text.xsl: Transform XML into plain text.
3742 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3743 * data/Makefile.am (xsltdir): New variable.
3744 (dist_xslt_DATA): Add xslt/*.xsl files.
3745
3746 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3747
3748 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3749 Problem reported by Wojciech Polak.
3750 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3751 (xml_printf): Undo change I made on 21 September; that is,
3752 indent 2 spaces, not 1.
3753
3754 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3755
3756 Pacify ./configure --enable-gcc-warnings.
3757 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3758 `char const *' instead of `char *'.
3759 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3760 local variable `sep'.
3761
3762 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3763
3764 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3765 elsewhere.
3766 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3767 (xml_printf): Indent just 1 space for level.
3768 (e_char, xlate_char): Remove.
3769 (xml_escape_string): Rewrite to avoid undefined behavior (used
3770 storage that was freed from the stack).
3771 (xml_escape_n): Don't bother checking for subscript error.
3772
3773 2007-09-21 Wojciech Polak <polak@gnu.org>
3774
3775 Add Bison XML Automaton Report.
3776
3777 Add support for an -x option to generate an XML report.
3778 It is not documented yet.
3779 * src/print-xml.c: New file.
3780 * src/print-xml.h: Likewise.
3781 * lib/timevar.def (TV_XML): New var.
3782 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3783 * src/conflicts.c: Include print-xml.h.
3784 (solved_conflicts_xml_obstack): New var.
3785 (log_resolution, conflicts_solve, conflicts_free):
3786 Add support for XML report.
3787 (conflicts_output_val): New function.
3788 * src/conflicts.h (conflicts_output_val): New decl.
3789 * src/files.c (spec_xml_file): New var.
3790 (compute_output_file_names, output_file_names_free): Add XML support.
3791 * src/files.h (spec_xml_file): New decl.
3792 * src/getargs.c (xml_flag): New var.
3793 (usage, short_options, long_options, getargs): Add XML support.
3794 * src/getargs.h (xml_flag): New decl.
3795 * src/gram.c: Include print-xml.h.
3796 (rule_lhs_print_xml, rule_rhs_print_xml):
3797 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3798 New functions.
3799 * src/gram.h: Declare external ones.
3800 * src/main.c: Include print-xml.h.
3801 (main): Add XML support.
3802 * src/reduce.c: Include print-xml.h.
3803 (reduce_xml): New function.
3804 * src/reduce.h: Declare it.
3805 * src/state.c: Include print-xml.h.
3806 (state_new): Add XML support.
3807 (state_rule_lookahead_tokens_print_xml): New function.
3808 * src/state.h: Declare it.
3809 (struct state): New member solved_conflicts_xml.
3810 * src/symtab.c (symbol_class_get_string): New function.
3811 * src/symtab.h: Declare it.
3812
3813 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3814
3815 * GNUmakefile: Switch to coreutils's version.
3816 * bootstrap: Likewise.
3817 * Makefile.cfg: Adjust to new GNUmakefile.
3818 * README-hacking: Likewise.
3819
3820 Import from gnulib:
3821
3822 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3823 Bruno Haible <bruno@clisp.org>
3824
3825 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3826 and is a script that invokes bison. Tighten the code. Add comments.
3827
3828 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3829
3830 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3831 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3832 * doc/bison.texinfo (Decl Summary): Fix.
3833 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3834 * tests/input.at (Boolean %define variables): Update output.
3835 * tests/skeletons.at (%define boolean variables: invalid skeleton
3836 defaults): Rename to...
3837 (%define Boolean variables: invalid skeleton defaults): ... this and
3838 update output.
3839
3840 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3841
3842 In impure push mode, don't allow more than one yypstate to be allocated
3843 since multiple impure parsers would corrupt yynerrs.
3844 * data/push.c (yypstate_allocated): New static global variable
3845 initialized to 0.
3846 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3847 exhaustion if yypstate_allocated is 1, but still return 2.
3848 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3849 already 1. Otherwise, set it to 1.
3850 (yypstate_delete): Set it to 0.
3851 * tests/push.at (Push Parsing: Multiple impure instances): New test
3852 case.
3853
3854 2007-08-17 Bob Rossi <bob@brasko.net>
3855
3856 * doc/bison.texinfo (Push Decl): Document the push parser.
3857 (Table of Symbols): Ditto.
3858 (Pure Decl): Ditto.
3859 (Decl Summary): Ditto.
3860 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3861 Parser Create Function, Parser Delete Function):
3862 Add new push parser symbols.
3863 (Table of Symbols): Document push-parser, push-pull-parser,
3864 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3865
3866 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3867
3868 Update to GPLv3.
3869 * doc/gpl-3.0.texi: New file.
3870 * doc/gpl.texi: Remove.
3871 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3872 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3873 * README-hacking, TODO, bootstrap, bootstrap.conf:
3874 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3875 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3876 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3877 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3878 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3879 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3880 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3881 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3882 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3883 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3884 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3885 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3886 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3887 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3888 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3889 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3890 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3891 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3892 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3893 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3894 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3895 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3896 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3897 * src/complain.c, src/complain.h, src/conflicts.c:
3898 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3899 * src/files.h, src/flex-scanner.h, src/getargs.c:
3900 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3901 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3902 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3903 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3904 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3905 * src/print.c, src/print.h, src/print_graph.c:
3906 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3907 * src/reduce.h, src/relation.c, src/relation.h:
3908 * src/revision.h, src/scan-code.h, src/scan-code.l:
3909 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3910 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3911 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3912 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3913 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3914 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3915 * tests/existing.at, tests/glr-regression.at:
3916 * tests/headers.at, tests/input.at, tests/java.at:
3917 * tests/local.at, tests/output.at, tests/push.at:
3918 * tests/reduce.at, tests/regression.at, tests/sets.at:
3919 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3920 * tests/torture.at:
3921 Update to GPLv3.
3922
3923 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3924
3925 Get rid of broken %no-parser, -n, and --no-parser implementation and
3926 documentation.
3927 * TODO: Don't mention them.
3928 * doc/bison.1: Likewise.
3929 * doc/bison.texinfo (Decl Summary): Likewise.
3930 (Bison Options): Likewise.
3931 (Option Cross Key): Likewise.
3932 * src/getargs.c (no_parser_flag): Remove global variable.
3933 (usage): Don't print description of -n and --no-parser.
3934 (long_options): Remove --no-parser entry here.
3935 (getargs): Remove -n case in the switch here.
3936 * src/getargs.h (no_parser_flag): Remove extern.
3937 * tests/regression.at (Web2c Actions): Remove comment that mentions
3938 --no-parser.
3939
3940 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3941
3942 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3943 name user variables starting with `yy'. Just pass NULL instead of a
3944 dummy local &yylval to yypush_parse.
3945 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3946 starting with `yy'.
3947
3948 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3949
3950 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3951 true since it's then always used regardless of whether yyoverflow is
3952 defined. Reported by Christian Burger at
3953 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3954 * THANKS: Add Christian Burger.
3955
3956 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3957 node names: say "Decl Summary" not "Bison Declaration Summary".
3958
3959 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3960
3961 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3962 determine whether this function has already complained about an invalid
3963 value for a %define boolean variable, don't check whether Bison has
3964 ever examined the value. As written, the check was a tautology.
3965 Instead, record and check for this complaint using a separate muscle.
3966
3967 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3968
3969 Fix push parsing memory leak reported by Brandon Lucia at
3970 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3971 * THANKS: Add Brandon Lucia.
3972 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3973 but the parse never completed and thus freed it.
3974 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3975 * tests/testsuite.at: Include push.at.
3976 * test/push.at: New.
3977 (Push Parsing: Memory Leak for Early Deletion): New test case.
3978
3979 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3980
3981 Improve handling of multiple S/R conflicts in the same state and of S/R
3982 conflicts involving multiple reductions.
3983 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3984 set for a state here or Bison will abort if it is reassigned on a
3985 later conflicted reduction in the same state.
3986 Similarly, don't finalize and assign the solved conflicts report here
3987 or it will be lost if it is reassigned on a later conflicted reduction
3988 in the same state.
3989 (set_conflicts): Instead, assign them both here after all S/R conflicts
3990 in the state have been fully examined.
3991 * src/print.c (shift_set): Rename to...
3992 (no_reduce_set): ... this.
3993 (print_reductions): Update for rename, and add %nonassoc error action
3994 tokens to no_reduce_set so that, when printing the first remaining
3995 reduction on an error action token, the reduction is enclosed in
3996 brackets.
3997 (print_results): Update for rename.
3998 * tests/conflicts.at (Solved conflicts report for multiple reductions
3999 in a state): New test case.
4000 (%nonassoc error actions for multiple reductions in a state): New test
4001 case.
4002
4003 * src/main.c (main): Don't depend on C99 features.
4004
4005 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4006
4007 * build-aux/.cvsignore: Add compile.
4008 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4009 uniwidth.
4010
4011 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4012
4013 * bootstrap (slurp): Create target directories that don't exist.
4014 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4015
4016 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4017
4018 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4019 than item number.
4020 * closure.c (closure): Likewise.
4021 * state.h (reductions): Comment sorting of rules.
4022 (state): Comment sorting of items.
4023
4024 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4025
4026 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4027 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4028 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4029 definition in order to avoid Gnulib headers since we don't use config.h
4030 here.
4031 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4032 rather than AT_DATA so that config.h is included.
4033
4034 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4035
4036 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4037 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4038 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4039 and so that YYFPRINTF is guaranteed to be defined here.
4040
4041 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4042
4043 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4044 with...
4045 (muscle_percent_define_check_values): ... this more helpful function.
4046 Again, it's not used yet, but it will be.
4047 * src/muscle_tab.h: Likewise.
4048
4049 Improve some comments in parser table construction.
4050 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4051 (generate_states): Don't mention ruleset, which is internal to closure.
4052 * src/closure.c (closure): Explain sorting of core and itemset, which
4053 is required for this function to behave correctly.
4054 * src/closure.h (closure): Mention sorting.
4055
4056 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4057
4058 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4059 move the check for disabled transitions to an aver since conflict
4060 resolution hasn't happened yet.
4061
4062 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4063 labels a state as inconsistent just because it has error transitions.
4064 The original form of this check appeared in revision 1.1 of lalr.c,
4065 which was committed on 1991-12-21. Now (at least), changing the
4066 consistency label on such a state appears to have no useful effect in
4067 any of the places it is examined, which I enumerate below. The key
4068 point to understanding each item in this enumeration is that a state
4069 with an error transition is labelled consistent in the first place only
4070 if it has no rules, so the check cannot matter for states that have
4071 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4072 to try to identify its conflicts, and a state must have *rules* to have
4073 conflicts. (2) Labelling a state as inconsistent will affect how
4074 action_row sets the default *rule* for the state. (3) Labelling a
4075 state as inconsistent will cause build_relations to add lookback edges
4076 to *rules* in that state.
4077 * src/state.h (struct state): Word the comment for member consistent
4078 more carefully.
4079
4080 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4081
4082 Don't depend on C99 features.
4083 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4084 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4085 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4086 * src/state.c (state_mark_reachable_states): Fix for-loop.
4087 (state_remove_unreachable_states): Fix for-loop.
4088
4089 Don't widen struct state with member reachable just to temporarily
4090 record reachability. Instead, use a local bitset.
4091 * src/state.h (struct state): Remove member.
4092 * src/state.c (state_new): Don't initialize it.
4093 (state_mark_reachable_states): Rename to...
4094 (state_record_reachable_states): ... this, and use bitset.
4095 (state_remove_unreachable_states): Use bitset.
4096
4097 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4098
4099 * src/Makefile.am (yacc): Quote target action commands properly so
4100 that the yacc script isn't corrupt. Reported by Hans Aberg at
4101 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4102
4103 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4104 the case of pure parsers. Reported by Frans Englich at
4105 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4106 * THANKS: Add Frans Englich.
4107
4108 * NEWS (2.3a+): In the %code entry, reference section `Bison
4109 Declaration Summary' from the manual now since the %code summary has
4110 moved there.
4111 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4112 in the rules section must be terminated by semicolons.
4113
4114 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4115
4116 Extend the front-end API for %define variables to more completely
4117 mirror the back-end. This will be useful in the future.
4118 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4119 Update comments to mention the new front-end counterparts of these
4120 macros.
4121 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4122 for muscle_string_decode and muscle_location_decode.
4123 (muscle_string_decode): New static function.
4124 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4125 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4126 functions.
4127 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4128 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4129 implementation more closely.
4130 (muscle_percent_define_invalid_value): New function.
4131 * src/muscle_tab.h (muscle_percent_define_get,
4132 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4133 Prototype.
4134
4135 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4136
4137 * NEWS (2.3a+): Mention yesterday's state-removal change.
4138 (2.3a): Remove the %language entry, which was added after 2.3a.
4139 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4140 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4141 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4142 tests/existing.at: Update copyright date.
4143
4144 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4145
4146 If conflict resolution makes states unreachable, remove those states,
4147 report rules that are then unused, and don't report conflicts in those
4148 states.
4149 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4150 New global function.
4151 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4152 function.
4153 * src/main.c (main): After conflict resolution, remove the unreachable
4154 states and update all data structures that reference states by number.
4155 * src/state.c (state_new): Initialize each state's reachable member to
4156 false.
4157 (state_mark_reachable_states): New static function.
4158 (state_remove_unreachable_states): New global function.
4159 * src/state.h (struct state): Add member bool reachable.
4160 (state_remove_unreachable_states): Prototype.
4161 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4162 New test case.
4163 * tests/existing.at (GNU pic Grammar): Update test case output now that
4164 an unused rule is discovered.
4165
4166 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4167
4168 Minor code cleanup in parser table construction.
4169 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4170 (new_itemsets, save_reductions): Update for rename to nitemset.
4171 * src/closure.c (nritemset): Rename to...
4172 (nitemset): ... this since the "r" appears to meaningless and isn't
4173 used in the comments.
4174 (closure): Update for rename.
4175 * src/closure.h (nritemset): Update extern to...
4176 (nitemset): ... this.
4177 * src/lalr.c (LA): Fix a typo in comments.
4178 * src/print.c (print_core): Update for rename to nitemset.
4179 * src/print_graph.c (print_graph): Likewise.
4180 * src/state.h: Fix some typos in header comments.
4181
4182 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4183
4184 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4185 still sticks to ASCII. Sorry!
4186
4187 * README-hacking: New file, taken mostly from coreutils, with changes
4188 for Bison. Contains much of the contents of:
4189 * README-cvs: Remove.
4190 * bootstrap: Sync from gnulib.
4191 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4192 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4193
4194 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4197 Setzer.
4198 (Java Differences): Fix some typos.
4199 * THANKS: Add Sebastian Setzer.
4200
4201 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4202
4203 * data/java.m4 (b4_single_class_if): Remove.
4204 (b4_abstract_if): Look at "%define abstract".
4205 (b4_lexer_if): New.
4206 (b4_union_name): Rename...
4207 (b4_yystype): ... to this. Map to "%define stype".
4208 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4209 b4_maybe_throws): Fix quoting.
4210 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4211 * data/lalr1.java (Lexer interface): Always define.
4212 (Lexer interface within parser class): Remove.
4213 (YYLexer class): New, used when "%code lexer" is present.
4214 (constructor): When "%code lexer" is used, pass %lex-param
4215 to the lexer constructor.
4216 (yylex, yyparse): Remove %lex-param from method invocations
4217 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4218
4219 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4220 abstract". Rename "%define union_name" to "%define stype".
4221 Rename method names according to previous patch.
4222 (Java Scanner Interface): Describe "%code lexer" instead of
4223 "%pure-parser" and "%define single_class".
4224 (Java Differences): Mention "%code lexer".
4225
4226 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4227 Include scanner here, using macros from tests/local.at.
4228 (AT_DATA_CALC_Y): Remove final argument.
4229 (_AT_CHECK_JAVA_CALC): Likewise.
4230 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4231 of %locations and %error-verbose.
4232 (main): Test with and without %lex-param.
4233 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4234 (AT_BISON_OPTION_POPDEFS): Pop it.
4235
4236 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4237
4238 DJGPP spefic issue. Inhibit the use of disallowed characters for
4239 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4240 and concern testsuite case 46.
4241 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4242 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4243 * djgpp/config.bat: Inhibit the use of disallowed characters.
4244
4245 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4246
4247 Miscellaneous %define and %code cleanup.
4248 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4249 values are interpreted.
4250 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4251 documentation a little more.
4252 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4253 muscle_percent_define_insert, muscle_percent_code_grow): New
4254 functions/macros.
4255 * src/muscle_tab.h (muscle_percent_define_insert,
4256 muscle_percent_code_grow): Prototype.
4257 * src/parse-gram.y (prologue_declaration): Use
4258 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4259 %define and %code directives.
4260
4261 Make it easy to share %define boolean variables between the front-end
4262 and back-end. Though not used yet, this will be useful in the future.
4263 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4264 Bison uses of names rather than just skeleton uses of names.
4265 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4266 b4_percent_define_skeleton_variables(VARIABLE) to
4267 b4_percent_define_bison_variables(VARIABLE).
4268 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4269 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4270 b4_percent_code_bison_qualifiers(QUALIFIER).
4271 (b4_check_user_names_wrap): Update for renames.
4272 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4273 muscle_percent_define_default): New functions mimicking
4274 b4_percent_define_flag_if and b4_percent_define_default.
4275
4276 For %define variables, report locations for invalid values and
4277 redefinitions.
4278 * data/bison.m4 (b4_percent_define_flag_if): Read
4279 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4280 value for VARIABLE.
4281 (b4_percent_define_default): Save a special location in
4282 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4283 must later be reported as invalid.
4284 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4285 functions.
4286 (muscle_percent_define_insert): Record the location of VARIABLE in
4287 muscle percent_define_loc(VARIABLE), and use it to report the previous
4288 location for a redefinition.
4289 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4290 (muscle_percent_define_default): Update like b4_percent_define_default.
4291 (muscle_grow_user_name_list): Rename to...
4292 (muscle_user_name_list_grow): ... this for consistency and use
4293 muscle_location_grow.
4294 * src/muscle_tab.h (muscle_location_grow): Prototype.
4295 * tests/input.at (%define errors): Update expected output.
4296 * tests/skeletons.at (%define boolean variables: invalid skeleton
4297 defaults): New test case.
4298
4299 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4300
4301 * src/print.c (lookahead_set, state_default_rule): Remove.
4302 (print_reductions): Replace state_default_rule invocation with
4303 equivalent use of yydefact, which was computed in token_actions in
4304 tables.c.
4305 (print_results): Don't allocate lookahead_set.
4306
4307 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4308
4309 * data/lalr1.java: Prefix all private members with yy.
4310
4311 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4312
4313 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4314 Sebastien Fricker at
4315 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4316 * THANKS: Add Sebastien Fricker.
4317 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4318 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4319 accept a variable number of arguments.
4320
4321 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4322
4323 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4324
4325 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4326
4327 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4328 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4329 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4330
4331 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4332
4333 Undo my 2007-02-07 change, switching back to the c-strcase module
4334 introduced in the 2007-02-03 change. Bruno Haible reported that
4335 the 2007-02-07 change would be dangerous in Turkish if we add a
4336 language whose name contains "i", since "i" is not lowercase "I"
4337 in Turkish.
4338 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4339 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4340 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4341 * m4/.cvsignore: Remove strcase.m4.
4342 * src/getargs.c: Revert 2007-02-07 change, as follows.
4343 Include c-strcase.h.
4344 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4345
4346 2007-02-11 Bruno Haible <bruno@clisp.org>
4347
4348 Enable the Java related testsuite tests when the only Java compiler
4349 found is a gcj < 4.3. Discussed at
4350 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4351 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4352
4353 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 * data/Makefile.am: Update copyright date.
4356 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4357 yypstate_new returns NULL.
4358 (yypstate_new): Return NULL if malloc does.
4359 * src/reader.c (packgram): Move translation of rule actions from the
4360 beginning of packgram to...
4361 (check_and_convert_grammar): ... here right before packgram is invoked
4362 so it's easier to write more complete comments, and remove redundant
4363 code.
4364
4365 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4366
4367 As in semantic actions, make @$ in %initial-action, %destructor, and
4368 %printer imply %locations.
4369 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4370 scanning @$.
4371 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4372 (@$ in %initial-action implies %locations,
4373 @$ in %destructor implies %locations,
4374 @$ in %printer implies %locations): ... these new test cases.
4375
4376 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4377
4378 Undo most of the 2007-02-03 change, switching to the strcase module
4379 now that gnulib strcase has been fixed.
4380 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4381 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4382 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4383 * m4/.cvsignore: Add strcase.m4.
4384 * src/getargs.c: Revert 2007-02-03 change, as follows.
4385 Don't include c-strcase.h.
4386 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4387 strcasecmp has "unspecified behavior" outside the POSIX locale,
4388 but it works fine in practice if at least one argument is ASCII,
4389 as is the case in Bison.
4390
4391 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4392
4393 * tests/java.at: Skip tests if only one of javac/java is present.
4394 Reported by Joel E. Denny.
4395 * tests/atlocal.in: Adjust copyright years.
4396
4397 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4398
4399 * data/lalr1.java (Stack): Work around old verifiers that disallow
4400 access to the private fields of an inner class, from the outer class.
4401 We can make Stack's fields public because user code doesn't have access
4402 to the instance of Stack used by parse(). Reported by Paul Eggert.
4403
4404 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4405
4406 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4407 the right spot for these files?
4408 * bootstrap.conf (gnulib_modules): Add c-strcase.
4409 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4410 c-strncasecmp.c.
4411 * src/getargs.c: Include c-strcase.h.
4412 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4413 to avoid unspecified behavior.
4414
4415 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4416
4417 * doc/bison.texinfo (Decl Summary): Correct typo.
4418
4419 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4420
4421 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4422 Complain if the value does not match empty, "true" or "false".
4423 * data/c++.m4: Adjust default definitions of %define variables.
4424 * data/java.m4: Adjust default definitions of %define variables.
4425 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4426 to above behavior.
4427 * tests/input.at (Boolean %define variables): Test new behavior.
4428
4429 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4430
4431 * NEWS: Mention java.
4432 * TODO: Remove things that are done.
4433 * bootstrap.conf: Add javacomp-script and javaexec-script.
4434 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4435
4436 * data/Makefile.am: Add new files.
4437 * data/java-skel.m4: New.
4438 * data/java.m4: New.
4439 * data/lalr1.java: New.
4440
4441 * doc/bison.texinfo: Put "A Complete C++ Example" under
4442 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4443 under Other Languages.
4444
4445 * src/getargs.c (valid_languages): Add Java.
4446 * src/getargs.h (struct bison_language): Update size of string fields.
4447
4448 * tests/Makefile.am: Add java.at.
4449 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4450 * tests/java.at: New.
4451 * tests/testsuite.at: Include it.
4452
4453 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4454
4455 Clean up.
4456 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4457 at_directive_argv arguments so these no longer have to be global
4458 variables. Also, update the implementation for the following changes.
4459 (fail_for_at_directive_too_many_args,
4460 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4461 (at_directive_name): Remove as at_directive_argv[0] will be used for
4462 this now.
4463 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4464 for the directive name.
4465 (at_directive_argc, at_directive_argv): Make these local within
4466 skel_lex instead of global.
4467 (INITIAL): Update directive start action for above changes.
4468 (SC_AT_DIRECTIVE_ARG): Rename to...
4469 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4470 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4471 (scan_skel): Move yylex_destroy to...
4472 (skel_scanner_free): ... here.
4473 * tests/skeletons.at (installed skeleton file name): Rename to...
4474 (installed skeleton file names): ... this.
4475
4476 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4477
4478 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4479 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4480 Summary" not "Directives".
4481 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4482 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4483 since the former is now the more complete one.
4484 (Prologue Alternatives): Likewise and do the same for %defines.
4485 (Table of Symbols): Add summary of %code, add summary of %define, and
4486 move full %code documentation to...
4487 (Decl Summary): ... here for consistency with other entries in these
4488 sections.
4489 Move %define entry in order to keep this list alphabetized.
4490 Reword %define entry a little to put less emphasis on the skeleton
4491 concept, which most users shouldn't have to think about.
4492
4493 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4494
4495 Adjust to recent gnulib changes.
4496 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4497 Add string.h, string_.h, unistd_.h, wchar_.h.
4498 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4499 * src/system.h: Don't include <stpcpy.h>; this is now done by
4500 <string.h>.
4501
4502 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4503
4504 Simplify implementation of unqualified %code, implement macros for
4505 uniform treatment of boolean %define flags. Document %define.
4506 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4507 b4_percent_code_ifdef): New.
4508 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4509 * data/c++.m4: Define default value for global_tokens_and_yystype.
4510 * data/glr.cc: Likewise.
4511 * data/location.cc: Use b4_percent_define_flag_if.
4512
4513 * doc/bison.texinfo (Decl Summary): Document %define.
4514
4515 * src/parse-gram.y (Unqualified %code): Change muscle name to
4516 b4_percent_code().
4517 (content.opt): Default to empty.
4518
4519 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Implement support for relative and absolute skeleton file names.
4522 Discussed starting at
4523 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4524 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4525 (Bison Options): Document in --skeleton entry.
4526 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4527 full_skeleton can't necessarily hold all of pkgdatadir.
4528 If the specified skeleton file name contains a `/', don't prepend
4529 pkgdatadir.
4530 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4531 file name contains a `/', prepend the grammar file directory.
4532 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4533 * skeletons.at: New file.
4534 (relative skeleton file names): New test case.
4535 (installed skeleton file names): New test case.
4536 * tests/testsuite.at: Include skeletons.at.
4537
4538 * bootstrap: Update copyright to 2007.
4539
4540 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4541
4542 * bootstrap: Remove occurrences of .#bootmp from the files.
4543
4544 2007-01-17 Akim Demaille <akim@epita.fr>
4545
4546 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4547 nonterminals.
4548 Use per-type %printer.
4549
4550 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4551
4552 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4553 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4554 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4555 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4556 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4557 tests/glr-regression.at, tests/input.at, tests/local.at,
4558 tests/output.at, tests/torture.at: Update copyright to 2007.
4559
4560 2007-01-16 Akim Demaille <akim@epita.fr>
4561
4562 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4563 error code.
4564 (Calc++ Scanner): Exit with failure if we can't open the input
4565 file.
4566 Accept "-" standing for stdin.
4567 (Calc++ Top Level): Print the result only if the parsing was
4568 successful.
4569
4570 2007-01-16 Akim Demaille <akim@epita.fr>
4571
4572 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4573
4574 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4575 and Joel E. Denny <jdenny@ces.clemson.edu>
4576
4577 Clean up %define and %code implementation in M4 some. Most
4578 importantly, rename all related macros to be in the b4_percent_define
4579 and b4_percent_code namespaces. Also, complete support for `.' in
4580 %define variable names and %code qualifiers.
4581 * data/bison.m4 (b4_check_user_names): Check for special
4582 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4583 m4_foreach loops.
4584 (b4_get_percent_define, b4_get_percent_code): Rename to...
4585 (b4_percent_define_get, b4_percent_code_get): ... these.
4586 Extend documentation with examples.
4587 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4588 b4_percent_define_skeleton_variables and
4589 b4_percent_code_skeleton_qualifiers.
4590 Expect any value for the %define variable `foo' to be stored in the
4591 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4592 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4593 expect any unqualified %code blocks to be stored in a macro named
4594 `b4_percent_code_unqualified'.
4595 Use m4_indir so that %define variable names and %code qualifiers can
4596 contain `.', which is allowed by the grammar parser.
4597 (b4_percent_define_default): New macro to set a default value for a
4598 %define variable.
4599 (m4_wrap): Update wrapped code, and fix some underquoting.
4600 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4601 Expect grammar uses of %define variables and %code qualifiers to be
4602 defined in b4_percent_define_user_variables and
4603 b4_percent_code_user_qualifiers.
4604 * data/c++.m4: Use b4_percent_define_default rather than
4605 m4_define_default. Fix some underquoting. Skeleton usage of %define
4606 variable define_location_comparison now implies skeleton usage of
4607 %define variable filename_type.
4608 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4609 data/push.c, data/yacc.c: Update macro names.
4610 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4611 muscle names.
4612
4613 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4614
4615 DJGPP specific issues.
4616
4617 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4618 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4619
4620 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4621
4622 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4623 run parsers in all tests so that Valgrind is invoked during
4624 maintainer-check-valgrind.
4625 (Duplicate representation of merged trees): Free all semantic values.
4626 (Duplicated user destructor for lookahead): Likewise.
4627
4628 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4629
4630 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4631 command-line prefix.
4632 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4633 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4634 miss Valgrind messages.
4635 (Exploding the Stack Size with Malloc): Likewise.
4636
4637 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4640 locals. Reported by Juan Manuel Guerrero at
4641 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4642 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4643 Fix some indentation also.
4644 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4645 explaining this issue.
4646
4647 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4648 and Joel E. Denny <jdenny@ces.clemson.edu>
4649
4650 Simplify union and prologue handling, and escape union and lex/parse
4651 params with digraphs.
4652 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4653 values to the empty string since these are no longer guaranteed
4654 initialized by the front-end.
4655 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4656 braces around b4_user_stype since this is no longer done by the
4657 front-end.
4658 * src/files.c, src/files.h (pre_prologue_obstack,
4659 post_prologue_obstack): Remove.
4660 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4661 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4662 with digraphs. This fixes lex params and parse params.
4663 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4664 * src/output.c (prepare): Remove muscle insertion of the prologues.
4665 (output): Remove freeing of pre_prologue_obstack and
4666 post_prologue_obstack.
4667 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4668 than prologue_augment for prologue parsing so you don't need prologue
4669 obstacks.
4670 (grammar_declaration): For %union RHS, use `braceless' instead of
4671 "{...}" so that braces are already stripped and code is escaped with
4672 digraphs.
4673 * src/reader.c (prologue_augment): Remove.
4674 (reader): Remove initialization of pre_prologue_obstack and
4675 post_prologue_obstack.
4676 * src/reader.h (prologue_augment): Remove.
4677
4678 * data/c.m4: Remove stray parenthesis.
4679
4680 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4681
4682 Remove quotes from variables names in %define directives and from
4683 qualifiers in %code directives, and restrict the characters that are
4684 allowed in them to M4-friendly ones. For %define, continue to support
4685 the quoted form as a deprecated feature. Discussed starting at
4686 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4687 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4688 %code.
4689 * doc/bison.texinfo (Prologue Alternatives): Update.
4690 (Decl Summary): In %defines entry, update mention of `%code requires'
4691 and `%code provides'.
4692 (C++ Location Values): Update %define uses.
4693 (Calc++ Parser Interface): Likewise.
4694 (Calc++ Parser): Likewise, and update `%code requires' uses.
4695 (Table of Symbols): Update %code documentation.
4696 * src/parse-gram.y (prologue_declaration): For %define variables, use
4697 `variable' instead of `STRING'.
4698 (grammar_declaration): For %code qualifiers, use `ID' instead of
4699 `STRING'.
4700 (variable): New nonterminal that takes an `ID' or a `STRING'.
4701 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4702 and %define uses.
4703 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4704 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4705 (%define errors): Update %define uses.
4706
4707 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4708
4709 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4710 instead of muscle_insert for %define values so that M4-special
4711 characters are replaced with digraphs.
4712 * tests/input.at (%define errors): Extend to check weird values.
4713
4714 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4715
4716 Instead of having skeletons declare all valid %define variables and
4717 %code qualifiers, provide macros that retrieve the associated values
4718 and build these lists automatically. Thus Bison will now warn when a
4719 variable or qualifier is not used by the skeleton in the current
4720 invocation regardless of whether it might sometimes be used by that
4721 skeleton in other invocations. Also, move all %define value macros to
4722 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4723 form, which is replaced by %code.
4724 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4725 (b4_check_user_names): ... this, and change the series of valid name
4726 arguments to a single list argument for names used in the skeleton
4727 similar to the existing list argument for names used in the grammar.
4728 Warn instead of complaining.
4729 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4730 values and %code code, to format %code code properly, and to build
4731 lists of all %define variables and %code qualifiers used in the
4732 skeleton: b4_skeleton_percent_define_variables and
4733 b4_skeleton_percent_code_qualifiers.
4734 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4735 Remove, and...
4736 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4737 the skeleton names lists can finish building first. In place of
4738 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4739 expect the lists b4_user_percent_define_variables and
4740 b4_user_percent_code_qualifiers.
4741 * data/c++.m4: Where setting default values for b4_parser_class_name,
4742 b4_location_type, b4_filename_type, b4_namespace, and
4743 b4_define_location_comparison, update their names to the
4744 b4_percent_define_ namespace.
4745 * data/glr.c: Don't use b4_check_percent_define_variables and
4746 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4747 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4748 (b4_parser_class_name, b4_namespace): Define these using
4749 b4_get_percent_define for parser_class_name and namespace.
4750 * data/location.cc: Use b4_get_percent_define.
4751 * data/push.c: Don't use b4_check_percent_define_variables and
4752 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4753 * data/yacc.c: Likewise, and don't call m4_exit in
4754 b4_use_push_for_pull_if or m4_wrap code will never execute.
4755 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4756 Rename to...
4757 (muscle_grow_user_name_list): ... this for consistency with the
4758 terminology used in bison.m4.
4759 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4760 %define variable names, and rename muscle used_percent_define_variables
4761 to user_percent_define_variables.
4762 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4763 user_percent_code_qualifiers.
4764 (content): Remove.
4765 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4766 {CODE} form is no longer accepted.
4767 * tests/input.at (Reject bad %code qualifiers): Rename to...
4768 (Reject unused %code qualifiers): ... this, and update test output.
4769 (%define error): Update test output.
4770
4771 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4772
4773 Check for unrecognized %define variables similar to checking for
4774 unrecognized %code qualifiers. Check for redefined %define variables.
4775 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4776 generalizes...
4777 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4778 (b4_check_percent_define_variables): New, also wraps it.
4779 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4780 variables using b4_check_percent_define_variables.
4781 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4782 all those exercised in the test suite and all those listed in the
4783 `Default values' section of c++.m4. Are there others?
4784 * data/push.c, data/yacc.c: Declare no valid %define variables.
4785 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4786 similar to muscle_find, but it works even when the muscle stores a
4787 const value.
4788 (muscle_grow_used_name_list): New function for constructing the used
4789 name list muscles that b4_check_for_unrecognized_names requires.
4790 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4791 %define'd more than once. Define the b4_used_percent_define_variables
4792 muscle with muscle_grow_used_name_list.
4793 (grammar_declaration): Abbreviate %code code with
4794 muscle_grow_used_name_list.
4795 * tests/input.at (%define errors): New.
4796
4797 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 Provide warn_at, complain_at, and fatal_at function callbacks to the
4800 skeletons, and use this for %code qualifier complaints.
4801 * data/bison.m4 (b4_error_at): New, invoked by...
4802 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4803 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4804 @fatal_at(...@) directives.
4805 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4806 qualifiers in b4_used_percent_code_qualifiers and to use
4807 b4_complain_at.
4808 * src/location.c, src/location.h (boundary_set_from_string): New global
4809 function.
4810 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4811 function.
4812 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4813 to b4_used_percent_code_qualifiers.
4814 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4815 function.
4816 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4817 (lineno): Rename to...
4818 (out_lineno): ... this so I don't misunderstand it again.
4819 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4820 here; these newlines are in the input but not the output file.
4821 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4822 (at_directive_perform): ... this new static function, and add handling
4823 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4824 directives.
4825 * tests/input.at (Reject bad %code qualifiers): Update test output with
4826 locations and extend.
4827
4828 * tests/output.at (Output file name: [, Output file name: ]): Remove
4829 bogus comment about these tests failing.
4830
4831 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 Clean up b4_check_percent_code_qualifiers a little.
4834 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4835 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4836 documentation and add examples.
4837 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4838 qualifiers here.
4839
4840 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4841
4842 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4843 unreliable -- especially when they're hidden inside another macro.
4844 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4845 data/c.m4: Remove m4_divert(-1).
4846 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4847 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4848 m4_divert_push(0) and m4_divert_pop(0).
4849 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4850 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4851 pushed and popped by m4sugar, should be first on the stack.
4852
4853 Provide warn, complain, and fatal function callbacks to the skeletons.
4854 This provides more flexibility than m4_fatal, improves the error
4855 message format, and captures messages for translation. Discussed
4856 starting at
4857 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4858 * data/bison.m4 (b4_error): New, invoked by...
4859 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4860 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4861 directives. Because these M4 macros might be called when the current
4862 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4863 the previous removal of uses of m4_divert, which caused trouble.
4864 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4865 m4_fatal to report unrecognized %code qualifiers.
4866 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4867 push parser requests.
4868 * data/glr.c: Use b4_complain instead of m4_fatal to report
4869 non-deterministic push parser requests.
4870 Update @output usage to @output(...@) form.
4871 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4872 report missing %defines. Update @output usage to @output(...@) form.
4873 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4874 @output(...@) form.
4875 * src/main.c (main): Invoke skel_scanner_free.
4876 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4877 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4878 obstack_for_string from flex-scanner.h.
4879 (YY_DECL): Use to declare skel_lex static.
4880 (decode_at_digraphs): Remove; now handled in the new
4881 SC_AT_DIRECTIVE_ARG start condition.
4882 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4883 functions.
4884 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4885 at_directive_argv): New static globals.
4886 (INITIAL): Use fail_for_invalid_at.
4887 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4888 recognize the start of a generalized `@directive(...@)' form and
4889 start...
4890 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4891 directive args (using the new obstack_for_string), to decode the
4892 contained @ diagraphs, and to perform the directive. It recognizes
4893 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4894 @output(...@).
4895 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4896 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4897 `@,'.
4898 (scan_skel): Initialize obstack_for_string on the first call.
4899 (skel_scanner_free): New function to free obstack_for_string.
4900 * tests/input.at (Reject bad %code qualifiers): Update test output.
4901
4902 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4903
4904 Consolidate the 4 prologue alternative directives (%code, %requires,
4905 %provides, and %code-top) into a single %code directive with an
4906 optional qualifier field. Discussed at
4907 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4908 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4909 alternatives.
4910 * doc/bison.texinfo (Prologue Alternatives): Update.
4911 (Decl Summary): Update to %code "requires" and %code "provides".
4912 (Calc++ Parser): Update to %code "requires".
4913 (Table of Symbols): Remove entries for %requires, %provides, and
4914 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4915 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4916 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4917 which are skeleton-specific.
4918 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4919 declare what %code qualifiers it supports and to complain if any other
4920 qualifiers were used in the grammar.
4921 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4922 and b4_user_code([b4_percent_code_provides]) in place of
4923 b4_user_requires and b4_user_provides.
4924 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4925 Add b4_user_code([b4_percent_code_top]) and
4926 b4_user_code([b4_percent_code]).
4927 Invoke b4_check_percent_code_qualifiers.
4928 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4929 PERCENT_REQUIRES): Remove.
4930 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4931 %requires. Rewrite the %code RHS as the unqualified form defining the
4932 muscle b4_percent_code. Add another RHS for the qualified %code form,
4933 which defines muscles of the form b4_percent_code_QUALIFIER and the
4934 b4_used_percent_code_qualifiers muscle.
4935 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4936 PERCENT_REQUIRES): Remove.
4937 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4938 %code "requires" and %code "provides".
4939 * tests/input.at (Reject bad %code qualifiers): New.
4940
4941 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4942
4943 Use the new code_props interface for destructors and printers.
4944 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4945 printer_location members, and change the type of the destructor and
4946 printer members to code_props.
4947 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4948 symbol_printer_get, semantic_type_destructor_set,
4949 semantic_type_printer_set, default_tagged_destructor_set,
4950 default_tagless_destructor_set, default_tagged_printer_set,
4951 default_tagless_printer_set): Use code_props in arguments and return
4952 types in place of char const * and location.
4953 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4954 since the locations are now contained in the return of
4955 symbol_destructor_get and symbol_printer_get.
4956 * src/output.c (symbol_destructors_output, symbol_printers_output):
4957 Replace with...
4958 (symbol_code_props_output): ... this to eliminate duplicate code.
4959 (output_skeleton): Update to use symbol_code_props_output.
4960 * src/reader.c (symbol_should_be_used): Update use of
4961 symbol_destructor_get.
4962 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4963 Update uses of the various _destructor_set and _printer_set functions.
4964 * src/symtab.c: (default_tagged_destructor_location,
4965 default_tagless_destructor_location, default_tagged_printer_location,
4966 default_tagless_printer_location): Remove since we...
4967 (default_tagged_destructor, default_tagless_destructor,
4968 default_tagged_printer, default_tagless_printer): ... change the type
4969 of these to code_props.
4970 (symbol_new, semantic_type_new, symbol_destructor_set,
4971 semantic_type_destructor_set, symbol_destructor_get,
4972 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4973 symbol_check_alias_consistency, default_tagged_destructor_set,
4974 default_tagless_destructor_set, default_tagged_printer_set,
4975 default_tagless_printer_set): Update.
4976 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4977 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4978 code_props members.
4979 (symbol_print): Use SYMBOL_CODE_PRINT.
4980
4981 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4982
4983 Use the new code_props interface for rule actions.
4984 * src/symlist.h (symbol_list): Replace action, action_location, and
4985 used members with a code_props action_props member.
4986 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4987 grammar_midrule_action, grammar_current_rule_merge_set,
4988 grammar_current_rule_symbol_append, packgram): Update.
4989 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4990 * src/scan-code.l (handle_action_dollar): Update.
4991 (translate_rule_action): Remove, no longer used.
4992 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4993
4994 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4995
4996 Use the new code_props interface in parse-gram.y.
4997 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4998 Update all uses of translate_* functions to use the new code_props
4999 interface and to use gram_scanner_last_string_free and
5000 code_scanner_last_string_free where possible.
5001 (grammar_declaration): symbol_list_destructor_set and
5002 symbol_list_printer_set now perform the translation, so don't do it
5003 here. Use gram_scanner_last_string_free where possible.
5004 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5005 translate_code): Remove, no longer used.
5006 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5007 symbol_list_printer_set): Perform code translation here rather than
5008 depending on the caller to do so.
5009
5010 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5011 * src/scan-gram.h (gram_last_string): Remove declaration.
5012 * src/scan-gram.l (last_string): Declare it static.
5013
5014 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5015
5016 Encapsulate code properties and related functionality for the various
5017 destructors, printers, and actions into a code_props structure and
5018 interface. This patch merely implements code_props in scan-code.h and
5019 scan-code.l. Future patches will rewrite other modules to use it.
5020 Discussed starting at
5021 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5022 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5023 consistently initialize const structs that have an empty location
5024 field.
5025 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5026 to ensure consistency.
5027 * src/scan-code.h (code_props): New structure.
5028 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5029 function, macro, and const global variable for initializing a
5030 code_props with no code.
5031 (code_props_plain_init, code_props_symbol_action_init,
5032 code_props_rule_action_init, code_props_translate_code): The rest of
5033 the new code_props functional interface. Among other things, the init
5034 functions set the code_props kind field so that
5035 code_props_translate_code will know whether to behave like
5036 translate_symbol_action, translate_rule_action, or translate_code.
5037 These old translate functions must remain until all other modules are
5038 updated to use the new code_props interface.
5039 (code_scanner_last_string_free): New function similar to
5040 gram_scanner_last_string_free.
5041 (code_scanner_free): Add documentation.
5042 * src/scan-code.l: Implement the new interface.
5043 (code_lex): Make it static, add a code_props* argument, and remove the
5044 rule argument.
5045 (last_string): New static global similar to the one in scan-gram.l.
5046 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5047 instead of rule.
5048 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5049 code_props since Bison may one day use this information for destructors
5050 and printers.
5051 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5052 (handle_action_dollar): Use symbol_list_n_get and set used flag
5053 directly since symbol_list_n_used_set is removed.
5054 (translate_action): Add a code_props* argument and remove the rule,
5055 action, and location arguments. Pass the code_props* on to code_lex.
5056 (translate_rule_action, translate_symbol_action, translate_code):
5057 Rewrite as wrappers around the new code_props interface.
5058 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5059 it would eventually need to break the encapsulation of code_props.
5060
5061 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5062
5063 * etc/.cvsignore: New.
5064
5065 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5066
5067 Add maintainer-push-check to run maintainer-check using push parsing in
5068 place of pull parsing where available.
5069 * Makefile.am (maintainer-push-check): New.
5070 * data/bison.m4 (b4_use_push_for_pull_if): New.
5071 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5072 appropriately based on their existing values.
5073 (yypush_parse): Don't print push-parser-specific diagnostics if push
5074 parsing is being used in place of pull parsing.
5075 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5076 push.c.
5077 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5078 variable, and insert b4_use_push_for_pull_flag into muscles.
5079 * tests/Makefile.am (maintainer-push-check): New.
5080
5081 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5082
5083 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5084 (whether successful or failed) so that yypush_parse can be invoked
5085 again to start a new parse using the same yypstate.
5086 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5087 check multiple yypull_parse invocations on the same yypstate. For pull
5088 mode, extend to check multiple yyparse invocations.
5089 (Exploding the Stack Size with Alloca): Extend to try with
5090 %push-pull-parser.
5091 (Exploding the Stack Size with Malloc): Likewise.
5092
5093 * tests/calc.at (Simple LALR Calculator): Don't specify
5094 %skeleton "push.c" since %push-pull-parser implies that now.
5095 * tests/headers.at (export YYLTYPE): Don't check for the push
5096 declarations. Otherwise, this test case can't be used to see if push
5097 mode can truly emulate pull mode.
5098 * tests/input.at (Torturing the Scanner): Likewise.
5099 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5100 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5101 AT_YACC_IF, which now includes the case of push mode since %skeleton
5102 need not be used for push mode. This will be more intuitive once
5103 push.c is renamed to yacc.c.
5104
5105 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5106
5107 For push mode, convert yyparse from a macro to a function, invoke yylex
5108 instead of passing a yylexp argument to yypull_parse, and don't
5109 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5110 Discussed starting at
5111 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5112 * data/bison.m4 (b4_pull_if): New.
5113 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5114 * data/push.c: Improve M4 quoting a little.
5115 (b4_generate_macro_args, b4_parenthesize): Remove.
5116 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5117 any time a pull parser is requested.
5118 Don't #define this as a wrapper around yypull_parse. Instead, when
5119 both push and pull are requested, make it a function that does that
5120 same thing.
5121 (yypull_parse): If there's a b4_prefix, #define this to
5122 b4_prefix[pull_parse] when both push and pull are requested.
5123 Don't define this as a function unless both push and pull are
5124 requested.
5125 Remove the yylexp argument and hard-code yylex invocation instead.
5126 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5127 %push-parser.
5128 * src/getargs.c (pull_parser): New global initialized to true.
5129 * getargs.h (pull_parser): extern it.
5130 * src/output.c (prepare): Insert pull_flag muscle.
5131 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5132 (prologue_declaration): Set both push_parser and pull_parser = true for
5133 %push-pull-parser. Set push_parser = true and pull_parser = false for
5134 %push-parser.
5135 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5136 %push-parser since there's no backward-compatibility concern here.
5137 Scan %push-pull-parser.
5138 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5139 instead of %push-parser.
5140 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5141 prototype it in the module that calls yyparse.
5142 * tests/input.at (Torturing the Scanner): Likewise.
5143 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5144
5145 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5146
5147 Update etc/bench.pl. Optimize push mode a little (the yyn change
5148 deserves most of the credit).
5149 * Makefile.am (SUBDIRS): Add etc subdirectory.
5150 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5151 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5152 yytoken, yyval, and yyloc declarations to...
5153 (yyparse or yypush_parse): ... here to improve performance. For
5154 yypush_parse invocations after the first, be sure to assign yyn its old
5155 value again.
5156 (yypstate_new): Don't bother initializing the yyresult field since the
5157 initial value isn't used.
5158 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5159 remove the #define that, in push mode, set it to yyps->NAME.
5160 * etc/Makefile.am: New.
5161 * etc/bench.pl: Remove and build it instead from...
5162 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5163 "tests/bison" from the build directory by default rather than just
5164 invoking "bison" from $PATH.
5165 (calc_grammar): Update push parser code: don't declare yylval globally,
5166 don't define yyparse_wrapper, and don't #define yyparse.
5167 (bench_grammar): Update to check all working combinations of yacc.c,
5168 push.c, impure, pure, pull, and push.
5169
5170 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5171
5172 For push mode, add pull wrappers around yypush_parse.
5173 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5174 (yypull_parse): New function wrapping yypush_parse.
5175 (yyparse): New #define wrapping yypull_parse.
5176 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5177 is declared.
5178 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5179 prototype yylex in the module that calls yyparse, and don't prototype
5180 yyparse there. Otherwise, the yyparse expansion won't compile.
5181 * tests/input.at (Torturing the Scanner): Likewise.
5182
5183 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5184
5185 Enable push parsers to operate in impure mode. Thus, %push-parser no
5186 longer implies %pure-parser. The point of this change is to move
5187 towards being able to test the push parser code by running the entire
5188 test suite as if %push-parser had been declared.
5189 * data/push.c (yypush_parse): For impure mode, remove the
5190 yypushed_char, yypushed_val, and yypushed_loc arguments.
5191 Instead, declare these as local variables initialized to the global
5192 yychar, yylval, and yylloc.
5193 For the first yypush_parse invocation only, restore the initial values
5194 of these global variables when it's time to read a token since they
5195 have been overwritten.
5196 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5197 %push-parser.
5198 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5199 %pure-parser along with %push-parser since this test case was designed
5200 for pure push parsers.
5201 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5202 (AT_YACC_OR_PUSH_IF): New.
5203 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5204 add a note that it's still wrong for some cases (as it has been for a
5205 while).
5206 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5207 %push-parser no longer implies %pure-parser.
5208
5209 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5210
5211 Remove some unnecessary differences between the pull parser code and
5212 the push parser code. This patch enables yynerrs in push mode.
5213 * data/push.c: Reformat M4 a little.
5214 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5215 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5216 because push mode is on. Instead, if pure mode is on, move yynerrs
5217 to...
5218 (b4_declare_parser_state_variables): ... here.
5219 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5220 to yyps->NAME so it can be used in yypush_parse.
5221 (yypush_parse): Don't omit uses of yynerrs in push mode.
5222
5223 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5224
5225 Fix bug such that the first pushed token's value and location are
5226 sometimes overwritten (sometimes by %initial-action) before being used.
5227 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5228 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5229 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5230 more closely mimic the pull parser logic.
5231 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5232 time to read a token, which is after any initialization of yylval and
5233 yylloc.
5234 (gottoken): Rename label to...
5235 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5236 user namespace.
5237
5238 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5239
5240 Rearrange initialization of the parser state variables so that the
5241 skeleton doesn't have to have a copy for pull mode and another for push
5242 mode. This patch also fixes at least a bug such that yylloc was not
5243 initialized (with b4_location_initial_line and
5244 b4_location_initial_column) upon calling yypush_parse. However, that
5245 initialization now overwrites the first token's location;
5246 %initial-action assigning @$ already did the same thing, and both bugs
5247 will be fixed in a later patch.
5248 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5249 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5250 yyss, yyvs, yyls, and yystacksize.
5251 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5252 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5253 yylsp.
5254 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5255 yyps->NAME so it can be used in yypush_parse.
5256 (yyparse or yypush_parse): For yypush_parse, don't print the
5257 "Starting parse" diagnostic for invocations after the first.
5258 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5259 yypush_parse, only do it for the first invocation.
5260 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5261 initialization to occur in yypush_parse but only on the first
5262 invocation.
5263
5264 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5265
5266 * data/push.c: Add CPP guards around push parser declarations in both
5267 the header and the code file.
5268 In the code file, move the push parser declarations to the same place
5269 they appear in the header file.
5270 Clean up the M4 some, especially the inconsistent underquoting in
5271 some b4_c_function_def and b4_c_function_decl uses.
5272
5273 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5274
5275 Encapsulate the push parser state variables into an M4 macro so the
5276 push skeleton doesn't have to list them again for pull mode's yyparse.
5277 For push mode, remove yypush_parse's local equivalents of these
5278 variables to eliminate unnecessary copying between the two sets at
5279 run-time. This patch also fixes at least a bug related to multiple
5280 %initial-action invocations in push mode.
5281 * data/push.c (b4_declare_parser_variables): Rename to...
5282 (b4_declare_scanner_communication_variables): ... this for clarity and
5283 update both uses.
5284 (b4_declare_yyparse_variables): Remove and move its contents to the one
5285 spot where it was invoked.
5286 (b4_declare_parser_state_variables): New macro containing the parser
5287 state variables required by push mode.
5288 (struct yypstate): Replace all fields but yynew with
5289 b4_declare_parser_state_variables.
5290 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5291 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5292 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5293 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5294 parser state variable declarations with
5295 b4_declare_parser_state_variables.
5296 Don't initialize parser state variables when calling yypush_parse since
5297 yypstate_new already does that.
5298 Invoke the user's initial action only upon the first yypush_parse
5299 invocation.
5300 Remove all code that copies between the local parser state variables
5301 and the yypstate.
5302
5303 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5306 prevent a name collision in a future patch where these names will
5307 sometimes be #define'd.
5308 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5309 since it no longer has the same name as the existing argument.
5310 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5311
5312 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5313 and Joel E. Denny <jdenny@ces.clemson.edu>
5314
5315 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5316 that the argument is case-insensitive, and there's no `=' here.
5317 For the %skeleton entry, mention that %language is better.
5318 (Bison Options): Likewise for --language and --skeleton. Move the
5319 --skeleton entry so that the `Tuning the parser' section is sorted
5320 alphabetically on long options.
5321 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5322 %language directive in detail here; cross-reference the %language
5323 documentation instead.
5324 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5325 `%require "2.3b"' so that the example is always up-to-date.
5326 (Table of Symbols): Add entries for %language and %skeleton.
5327 * examples/extexi (normalize): Instead of replacing every %require
5328 argument with the current Bison version, just substitute for
5329 `@value{VERSION}'. This guarantees that we're testing what actually
5330 appears in the documentation.
5331 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5332 rather than `@VERSION@'.
5333
5334 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5335
5336 * NEWS: Reword the %language news a bit, and put it earlier.
5337
5338 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5339 Rewrite to simplify the logic.
5340 (language_argmatch): Likewise.
5341 (program_name): We now own this var.
5342 * src/getargs.h (struct bison_language): Use char[] rather than
5343 const char *.
5344
5345 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5346 Java is supported.
5347 * src/complain.c (program_name): Remove decl; no longer needed.
5348 * src/main.c (program_name): Remove; now belongs to getargs.
5349
5350 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5351
5352 * NEWS: Document %language.
5353
5354 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5355
5356 * data/c-skel.m4, data/c++-skel.m4: New files.
5357 * data/glr.c: Complain on push parsers.
5358
5359 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5360 over %skeleton.
5361 (Decl Summary): Document %language and %skeleton.
5362 (Command line): Document -L.
5363
5364 * examples/extexi: Rewrite %require directive.
5365 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5366
5367 * src/files.c (compute_exts_from_gc): Look in language structure
5368 for .y extension.
5369 (compute_file_name_parts): Check whether .tab should be added.
5370 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5371 (language, skeleton_arg, language_argmatch): New.
5372 (long_options): Add --language.
5373 (getargs): Use skeleton_arg, add -L/--language.
5374 * src/getargs.h: Include location.h.
5375 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5376 * src/output.c (prepare): Pick default skeleton from struct language.
5377 Don't dispatch C skeletons here.
5378 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5379 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5380 * src/scan-gram.l ("%language"): New rule.
5381
5382 * tests/calc.at: Test %skeleton and %language.
5383 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5384 (AT_GLR_IF): Look for %skeleton "glr.cc".
5385 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5386 (AT_YACC_IF): Reject %language.
5387
5388 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5389
5390 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5391 since it wasn't used; only the typedef name 'semantic_type' is needed.
5392 Also, omit trailing white space.
5393
5394 * bootstrap: Sync from coreutils.
5395 (gnulib_extra_files): Add build-aux/announce.gen.
5396 (slurp): Adjust .gitignore files like .cvsignore files.
5397 * build-aux/announce-gen: Remove from CVS, since bootstrap
5398 now creates this.
5399
5400 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5401
5402 Make %push-parser imply %pure-parser. This fixes several bugs; see
5403 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5404 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5405 pure_parser = true.
5406 * data/push.c: Don't bother testing b4_push_if when deciding whether
5407 to expand b4_declare_parser_variables globally.
5408 (yypush_parse): Likewise in here.
5409
5410 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5411 (yy_reduce_print): Reformat M4 for readability.
5412
5413 2006-12-15 Bob Rossi <bob@brasko.net>
5414 and Joel Denny <jdenny@ces.clemson.edu>
5415
5416 * data/push.c (yypstate): Add typedef, and update all uses of
5417 struct yypstate to just yypstate.
5418 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5419
5420 2006-12-14 Bob Rossi <bob@brasko.net>
5421
5422 * data/push.c (yypush_parse): Declare prototype regardless of
5423 %locations option.
5424
5425 2006-12-14 Bob Rossi <bob@brasko.net>
5426
5427 * data/push.c (yyparse): Remove the prototype and the #define when in
5428 push-parser mode.
5429
5430 2006-12-13 Bob Rossi <bob@brasko.net>
5431
5432 * data/push.c (yypstate_init): Rename to...
5433 (yypstate_new): ... this and use b4_c_function_def.
5434 (yypstate_delete): New.
5435 (yypush_parse): Change parameters yynval and yynlloc to be const.
5436 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5437 yypstate_delete functions.
5438
5439 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5440
5441 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5442 strange test case titles. Reported by Bob Rossi.
5443
5444 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5445
5446 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5447 of potential ambiguities in GLR grammers.
5448
5449 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5450
5451 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5452 `bison ', use m4_index instead of m4_substr since chopping up a string
5453 containing M4-special characters causes problems here.
5454
5455 Fix a couple of bugs related to special characters in user-specified
5456 file names, and make it easier for skeletons to compute output file
5457 names with the same file name prefix as Bison-computed output file
5458 names.
5459 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5460 b4_parser_file_name and b4_spec_defines_file instead of
5461 @output_parser_name@ and @output_header_name@, which are now redundant.
5462 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5463 b4_parser_file_name, b4_spec_defines_file, and the new
5464 @basename(FILENAME@) instead of @output_parser_name@ and
5465 @output_header_name@, which inappropriately escaped the file names as
5466 C string literals.
5467 * src/files.c (all_but_ext): Remove static qualifier.
5468 (compute_output_file_names): Move `free (all_but_ext)' to...
5469 (output_file_names_free): ... here since all_but_ext is needed later.
5470 * src/files.h (all_but_ext): Extern.
5471 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5472 exactly what MUSCLE_INSERT_STRING used to do.
5473 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5474 characters are escaped properly.
5475 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5476 all_but_ext.
5477 For pkgdatadir muscle, maintain previous functionality by using
5478 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5479 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5480 digraphs would never be expanded. Hopefully no one has M4-special
5481 characters in his Bison installation path.
5482 * src/scan-skel.l: Don't parse @output_header_name@ and
5483 @output_parser_name@ anymore since they're now redundant.
5484 In @output, use decode_at_digraphs.
5485 Parse a new @basename command that invokes last_component.
5486 (decode_at_digraphs): New.
5487 (BASE_QPUTS): Remove unused.
5488 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5489 (Output file name): New tests.
5490
5491 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5492
5493 Warn about output files that are generated by the skeletons and that
5494 conflict with other output files.
5495 * data/glr.c: Don't generate the header file here when glr.cc does.
5496 * src/files.c (file_names, file_names_count): New static globals.
5497 (compute_output_file_names): Invoke output_file_name_check for files
5498 not generated by the skeletons and remove existing checks.
5499 (output_file_name_check): New function that warns about conflicting
5500 output file names.
5501 (output_file_names_free): Free file_names.
5502 * src/files.h (output_file_name_check): Declare.
5503 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5504 the skeletons.
5505 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5506 (Conflicting output files): New tests.
5507
5508 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5509
5510 * doc/bison.texinfo: Fix a couple of typos.
5511
5512 2006-12-08 Bob Rossi <bob@brasko.net>
5513
5514 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5515 Rename to...
5516 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5517 update all uses.
5518 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5519 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5520 local pv.
5521 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5522 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5523
5524 2006-12-07 Bob Rossi <bob@brasko.net>
5525 and Joel Denny <jdenny@ces.clemson.edu>
5526
5527 * data/push.c (yypvarsinit): Change return type from void* to struct
5528 yypvars*. No longer cast to void* on return.
5529 (struct yypvars): Remove yylen since it need not be remembered between
5530 yypushparse invocations.
5531 (yypushparse): Don't copy between yylen and pv->yylen.
5532
5533 2006-12-05 Bob Rossi <bob@brasko.net>
5534
5535 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5536 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5537 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5538 (struct yypvars): Remove b4_declare_parser_variables.
5539 (yypvarsinit): Remove init code for removed variables.
5540 (global scope): Do not declare b4_declare_parser_variables if
5541 push or pure mode.
5542 (yypushparse): Add b4_declare_parser_variables.
5543 Init new local variables, and remove init code for removed
5544 yypvars variables.
5545 (yyparse): Delete.
5546 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5547 and yyparse for other modes.
5548 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5549 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5550 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5551 (AT_PURE_LEX_IF): True if pure or push parser.
5552
5553 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5554
5555 Document Yacc prologue alternatives and default %destructor's and
5556 %printer's as experimental. Don't mention Java yet. Discussed at
5557 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5558 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5559 (2.3a): Annotate this entry to say the old forms of these features were
5560 also experimental.
5561 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5562 Table of Symbols): Say they're experimental. Comment out any mention
5563 of Java (we'll want this back eventually).
5564
5565 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5566
5567 Support a file name argument to %defines. Deprecate `=' in
5568 %file-prefix, %name-prefix, and %output. Discussed at
5569 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5570 * NEWS (2.3a+): Mention.
5571 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5572 form of %defines, and remove `=' from entries for %file-prefix,
5573 %name-prefix, and %output.
5574 * src/parse-gram.y (prologue_declaration): Implement.
5575 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5576 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5577 all but one occurrence of %name-prefix.
5578 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5579 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5580 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5581 occurrence of each of %file-prefix and %output. Add check for %defines
5582 with argument.
5583 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5584 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5585 Remove the `=' from %output.
5586
5587 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5588
5589 Don't escape $ in test case titles since Autoconf 2.61 now does that
5590 correctly.
5591 * tests/actions.at (Default %printer and %destructor are not for error
5592 or $undefined): Here.
5593 (Default %printer and %destructor are not for $accept): Here.
5594 * tests/input.at (Invalid $n and @n): Here.
5595
5596 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5597
5598 Rename <!> to <>. Discussed starting at
5599 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5600 * NEWS (2.3a+): Update.
5601 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5602 Update.
5603 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5604 * src/scan-gram.l (INITIAL): Implement.
5605 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5606 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5607 comment.
5608 * tests/actions.at (Default tagless %printer and %destructor,
5609 Default tagged and per-type %printer and %destructor,
5610 Default %printer and %destructor are not for error or $undefined,
5611 Default %printer and %destructor are not for $accept,
5612 Default %printer and %destructor for mid-rule values): Update.
5613 * tests/input.at (Default %printer and %destructor redeclared,
5614 Unused values with default %destructor): Update.
5615
5616 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5617
5618 Don't let %prec take a nonterminal.
5619 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5620 token.
5621 * tests/input.at (%prec takes a token): New test checking that %prec
5622 won't take a nonterminal.
5623
5624 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5625
5626 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5627 it was double-quoted.
5628 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5629 grammar is maintained with Bison's highest standards.
5630 * src/getargs.c: Fix some typos in Doxygen comments.
5631
5632 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5633
5634 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5635 later. Reported by Paul Eggert in
5636 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5637 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5638 * src/scan-code.l (translate_action): Don't bother invoking
5639 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5640 (code_scanner_free): Instead of invoking
5641 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5642 which frees more.
5643 * src/scan-gram.l (gram_scanner_free): Likewise.
5644 * src/scan-skel.l (scan_skel): Likewise.
5645
5646 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5647
5648 * src/files.c (tr): Change return type to void.
5649 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5650 has been called previously for the same key.
5651 (muscle_find): Return storage instead of value so that
5652 --enable-gcc-warnings doesn't produce warnings that the return discards
5653 const. aver that the value and storage are the same since storage
5654 could potentially be NULL when value is not.
5655 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5656 same as 0.
5657
5658 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5659
5660 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5661 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5662 us a slightly cleaner distribution, and also works.
5663 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5664 gnulib changes.
5665
5666 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5667 and Paul Eggert <eggert@cs.ucla.edu>
5668
5669 Don't let Bison leak memory except when it complains.
5670 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5671 (spec_defines_file, dir_prefix): Now char *, not const char *,
5672 since they are freed.
5673 * src/files.c: Likewise.
5674 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5675 Likewise.
5676 (tr): Now operates in-place. All uses changed.
5677 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5678 values.
5679 (compute_file_name_parts, compute_output_file_names): Don't store
5680 read-only data in variables that will be freed.
5681 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5682 src_extension, and header_extension.
5683 (output_file_names_free): New public function to free
5684 spec_verbose_file, spec_graph_file, spec_defines_file,
5685 parser_file_name, and dir_prefix.
5686 * src/getargs.c (getargs): Don't store read-only data in variables that
5687 will be freed.
5688 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5689 (which previously existed but was unused), and quotearg_free.
5690 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5691 * src/muscle_tab.c: Likewise.
5692 (muscle_entry): Make the value char const *,
5693 and add a new storage member that is char * and can be freed.
5694 (muscle_entry_free): New private function.
5695 (muscle_init): Use it instead of free.
5696 (muscle_insert, muscle_grow): Update and use new storage member.
5697 (muscle_code_grow): Free the string passed to muscle_grow
5698 since it's not needed anymore.
5699 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5700 add a new `char *code' member.
5701 ("{...}"): Declare semantic type as code.
5702 * src/scan-code.h (translate_rule_action):
5703 (translate_symbol_action, translate_code, translate_action): Return
5704 `char const *' rather than `char *' since external code should not free
5705 these strings.
5706 * src/scan-code.l: Likewise.
5707 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5708 which is "{...}" in the parser.
5709 * tests/Makefile.am (maintainer-check-valgrind): Set
5710 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5711 Valgrind.
5712 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5713 complain.
5714 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5715 expecting a non-zero exit status sets --leak-check=summary and
5716 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5717 this case, and we don't want to hear about it.
5718
5719 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5720
5721 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5722 instead of from the template, to simplify configuration a bit.
5723 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5724 and m4/wint_t.m4, as they are needed with the latest gnulib.
5725
5726 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5727
5728 Disable unset/unused mid-rule value warnings by default, and recognize
5729 --warnings=midrule-values to enable them. Discussed starting at
5730 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5731 * NEWS (2.3a+): Mention.
5732 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5733 warnings): Add entry for midrule-values subargument.
5734 * src/reader.c (symbol_should_be_used): Don't return true just because
5735 the value is a set/used mid-rule value unless
5736 --warnings=midrule-values was specified.
5737 * tests/input.at (Unused values, Unused values before symbol
5738 declarations): Run tests with and without --warnings=midrule-values.
5739
5740 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5741 than LIST_FREE directly.
5742
5743 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5744
5745 Finish implementing --warnings=error, which should not be implied by
5746 --warnings=all (or by its synonyms -W and --warnings without
5747 subarguments).
5748 * src/complain.c (set_warning_issued): New function to report that
5749 warnings are being treated as errors and to record an error if so.
5750 Invoke...
5751 (warn_at, warn): ... here.
5752 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5753 "error - warnings are errors" does not appear above "all - all of the
5754 above".
5755 (getargs): For -W and --warnings without subarguments, don't let
5756 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5757 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5758
5759 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5760
5761 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5762 empty subargument list. For example: `bison --warnings= parser.y'.
5763
5764 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5767 the parser header file so that gcc doesn't warn.
5768
5769 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Split the default %destructor/%printer into two kinds: <*> and <!>.
5772 Discussed starting at
5773 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5774 * NEWS (2.3a+): Mention.
5775 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5776 previous change today related to mid-rules.
5777 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5778 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5779 (TYPE_TAG_ANY): Add as <*>.
5780 (TYPE_TAG_NONE): Add as <!>.
5781 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5782 for <*> and <!>.
5783 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5784 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5785 * src/symlist.c (symbol_list_default_new): Split into tagged and
5786 tagless versions.
5787 (symbol_list_destructor_set, symbol_list_printer_set): Split
5788 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5789 SYMLIST_DEFAULT_TAGLESS.
5790 * src/symlist.h: Update symbol_list_default*_new prototypes.
5791 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5792 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5793 * src/symtab.c (default_destructor, default_destructor_location,
5794 default_printer, default_printer_location): Split each into tagged and
5795 tagless versions.
5796 (symbol_destructor_get, symbol_destructor_location_get,
5797 symbol_printer_get, symbol_printer_location_get): Implement tagged
5798 default and tagless default cases.
5799 (default_destructor_set, default_printer_set): Split each into tagged
5800 and tagless versions.
5801 * src/symtab.h: Update prototypes.
5802 * tests/actions.at (Default %printer and %destructor): Rename to...
5803 (Default tagless %printer and %destructor): ... this, and extend.
5804 (Per-type %printer and %destructor): Rename to...
5805 (Default tagged and per-type %printer and %destructor): ... this, and
5806 extend.
5807 (Default %printer and %destructor for user-defined end token): Extend.
5808 (Default %printer and %destructor are not for error or $undefined):
5809 Update.
5810 (Default %printer and %destructor are not for $accept): Update.
5811 (Default %printer and %destructor for mid-rule values): Extend.
5812 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5813 (Unused values with default %destructor): Extend.
5814
5815 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5816
5817 Don't apply the default %destructor/%printer to an unreferenced midrule
5818 value. Mentioned at
5819 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5820 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5821 like $@n instead of just @n so that the default %destructor/%printer
5822 logic doesn't see them as user-defined symbols.
5823 (symbol_is_dummy): Check for both forms of the name.
5824 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5825 name for which the midrule value is referenced in any action.
5826 * tests/actions.at (Default %printer and %destructor for mid-rule
5827 values): New test.
5828 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5829 for change to dummy symbol names.
5830
5831 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5832
5833 Warn about unset midrule $$ if the corresponding $n is used.
5834 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5835 $n usage.
5836 (packgram): Before invoking grammar_rule_check on any rule, make sure
5837 all actions have already been scanned in order to set `used' flags.
5838 Otherwise, checking that a midrule's $$ is set will not always work
5839 properly because the midrule check must forward-reference the midrule's
5840 parent rule.
5841 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5842 warning.
5843
5844 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5845
5846 More improvements to the documentation of the prologue alternatives:
5847 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5848 Bison manual.
5849 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5850 some text to clarify the relative importance of the new directives and
5851 to show how these directives may be viewed as code labels.
5852
5853 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 Similar to the recently removed %before-header, add %code-top as the
5856 alternative to the pre-prologue. Mentioned at
5857 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5858 Also, let the prologue alternatives appear in the grammar section.
5859 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5860 (prologue_declaration): Move the existing prologue alternatives to...
5861 (grammar_declaration): ... here and add %code-top.
5862 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5863
5864 Clean up and extend documentation for the prologue alternatives.
5865 * NEWS (2.3a+): Describe prologue alternatives.
5866 * doc/bison.texinfo (Prologue): Move discussion of prologue
5867 alternatives to...
5868 (Prologue Alternatives): ... this new section, and extend it to discuss
5869 all 4 directives in detail.
5870 (Table of Symbols): Clean up discussion of prologue alternatives and
5871 add %code-top.
5872
5873 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5874
5875 DJGPP specific issues.
5876
5877 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5878 config.bat accordingly.
5879 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5880 * djgpp/config.site: Likewise.
5881
5882 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5883
5884 Replace %*-header with %provides, %requires, %code. See discussion at
5885 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5886
5887 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5888 (b4_user_start_header): Remove.
5889 * data/glr.c: Use new macros instead of b4_*start_header
5890 and b4_*end_header.
5891 * data/glr.cc: Likewise.
5892 * data/lalr1.cc: Likewise.
5893 * data/push.c: Likewise.
5894 * data/yacc.c: Likewise.
5895
5896 * doc/bison.texinfo: Remove %before-header, rename
5897 %{start,end,after}-header to %requires, %provides, %code.
5898
5899 * src/parse-gram.y: Likewise (also rename token names accordingly).
5900 * src/scan-gram.l: Likewise.
5901 * tests/actions.at: Likewise.
5902
5903 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5904
5905 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5906 Problem reported by Joel E. Denny.
5907
5908 2006-10-14 Jim Meyering <jim@meyering.net>
5909
5910 (Sync from coreutils.)
5911 Work also when the working directory (with e.g. coreutils sources)
5912 is version controlled with git, rather than CVS.
5913 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5914 rather than CVS.
5915 In messages and comments, say e.g., "checked-out sources",
5916 rather than "CVS sources".
5917 (version_controlled_file): New function. Work for git as well as
5918 for CVS. Don't use grep's -q option.
5919 (slurp): Call it here, in place of CVS-specific code.
5920
5921 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5922
5923 Fix testsuite for ./configure --enable-gcc-warnings:
5924 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5925 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5926 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5927 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5928 * test/regression.at (Diagnostic that expects two alternatives):
5929 Likewise.
5930
5931 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5932
5933 * bootstrap.conf (gnulib_modules): Add config-h.
5934 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5935 worry about HAVE_CONFIG_H.
5936 * lib/abitset.c: Likewise.
5937 * lib/bitset.c: Likewise.
5938 * lib/bitset_stats.c: Likewise.
5939 * lib/bitsetv-print.c: Likewise.
5940 * lib/bitsetv.c: Likewise.
5941 * lib/ebitset.c: Likewise.
5942 * lib/get-errno.c: Likewise.
5943 * lib/lbitset.c: Likewise.
5944 * lib/subpipe.c: Likewise.
5945 * lib/timevar.c: Likewise.
5946 * lib/vbitset.c: Likewise.
5947 * lib/bitset.c: Include "bitset.h" first, to test interface.
5948 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5949 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5950 * lib/bitsetv.c: Include "bitsetv.h" first.
5951 * lib/get-errno.c: Include "get-errno.h" first.
5952 * m4/.cvsignore: Add config-h.m4.
5953 * tests/actions.at (Default %printer and %destructor for ...):
5954 Adjust expected line numbers in output to reflect removal of #if
5955 HAVE_CONFIG_H lines.
5956 * tests/glr-regression.at (Missed %merge type warnings when ...):
5957 Likewise.
5958 * tests/regression.at (Braced code in declaration in rules section):
5959 Likewise.
5960 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5961 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5962 Include <config.h> unconditionally.
5963
5964 * bootstrap: Sync from coreutils, as follows:
5965
5966 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5967
5968 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5969 variable was sometimes used without being initialized. This
5970 messed up the installation of the INSTALL file in some cases.
5971
5972 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5973
5974 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5975 --copy. Inspired by a suggestion from Bruno Haible.
5976
5977 2006-10-03 Jim Meyering <jim@meyering.net>
5978
5979 * bootstrap: Undo last change to this file, since now gnulib-tool
5980 sticks with the automake default in generating dependencies.
5981
5982 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5983
5984 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5985 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5986
5987 * doc/bison.1: Add copyright notice.
5988
5989 * data/glr.c: Don't include <stdarg.h>; not used.
5990
5991 * NEWS: The -g and --graph options now output graphs in Graphviz
5992 DOT format, not VCG format.
5993 * doc/bison.1: Likewise.
5994 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5995 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5996 of this change in
5997 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5998 * TODO: Remove Graphviz entry.
5999 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6000 remove vcg.c, vcg.h, vcg_defaults.h.
6001 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6002 * src/graphviz.c, src/graphviz.h: New files.
6003 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6004 * src/files.h: Make comment more generic.
6005 * src/main.c (main): Likewise.
6006 * src/print_graph.h: Likewise.
6007 * src/getargs.c (usage): Make usage description more generic.
6008 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6009 (static_graph, fgraph): Remove. All uses changed to pass
6010 arguments instead of sharing a static var.
6011 (print_core, print_actions, print_state, print_graph):
6012 Output graphviz format rather than VCG format.
6013 * tests/.cvsignore: Remove *.vcg; add *.dot.
6014 * tests/output.at: Expect *.dot files, not *.vcg files.
6015
6016 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6017 accommodates the 2006-10-08 change.
6018
6019 2006-10-11 Bob Rossi <bob@brasko.net>
6020
6021 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6022 (b4_yyssa, b4_yyerror_range): New macros.
6023 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6024 (yypvarsinit): Remove init of removed fields.
6025 (yypushparse): Remove use of removed fields; use new macros instead.
6026
6027 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6028
6029 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6030 in a push parser. Reindent slightly to match yacc.c better.
6031
6032 2006-10-11 Bob Rossi <bob@brasko.net>
6033
6034 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6035 yymsg_alloc fields.
6036 (yypvarsinit, yypushparse): Remove init of removed fields.
6037 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6038
6039 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6040
6041 * THANKS: Add Paolo Bonzini and Bob Rossi.
6042
6043 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6044
6045 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6046 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6047 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6048 b4_define_user_cde and uses): Remove.
6049 (b4_comment, b4_prefix, b4_sync_start): New.
6050 * data/bison.m4: New file, with most of the content removed from c.m4.
6051 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6052 * src/output.c (output_skeleton): Pass bison.m4.
6053 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6054 only if specified.
6055
6056 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6057
6058 Fix test failure reported by Tom Lane in
6059 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6060 and try to make such failures easier to catch in the future.
6061 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6062 that's now the caller's responsibility.
6063 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6064 Set yychar = YYEOF if it's negative.
6065 * tests/actions.at (yylex): Abort if asked to read past EOF.
6066 * tests/conflicts.at (yylex): Likewise.
6067 * tests/cxx-type.at (yylex): Likewise.
6068 * tests/glr-regression.at (yylex): Likewise.
6069 * tests/input.at (yylex): Likewise.
6070 * tests/regression.at (yylex): Likewise.
6071 * tests/torture.at (yylex): Likewise.
6072
6073 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6074
6075 Fix problems with translating English-language diagnostics.
6076 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6077 respect to bison-runtime pot generation. The YY_ stuff
6078 wasn't being captured.
6079 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6080 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6081 * runtime-po/POTFILES.in: Add data/push.c.
6082
6083 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6084
6085 Merge bootstrap changes from coreutils.
6086
6087 2006-09-28 Jim Meyering <jim@meyering.net>
6088
6089 Automatically generated dependencies are important even
6090 when all of the sources in a directory come from gnulib.
6091 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6092 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6093
6094 2006-09-23 Jim Meyering <jim@meyering.net>
6095
6096 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6097
6098 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6099
6100 * bootstrap: Add support for --force.
6101 (usage): New function. Describe usage less tersely.
6102 (CVS_only_file): New var.
6103
6104 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6105
6106 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6107 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6108 Adjust white space and comments to match GNU style better.
6109
6110 2006-09-20 Bob Rossi <bob@brasko.net>
6111
6112 * data/push.c (yyresult_get): Remove function.
6113 (YYPUSH_MORE): Add #define.
6114 (yypushparse): Modify return value.
6115
6116 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 * stamp-h.in: Remove; no longer needed.
6119 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6120 Remove config.h, config.hin, intl (no longer created).
6121 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6122 stamp-h1.
6123
6124 Sync bootstrap from coreutils, as follows:
6125
6126 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6127
6128 * bootstrap (symlink_to_gnulib): New function.
6129 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6130 to copies-of-gnulib.
6131 (cp_mark_as_generated, slurp, gnulib_files):
6132 Avoid making a copy if it's the same as the old version.
6133 (gnulib_files): Add support for this variable (used by Bison).
6134
6135 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6136
6137 * src/getargs.c (usage): Rework to use conventions similar to
6138 coreutils, to make translation a bit easier and the code a bit
6139 smaller. Problem reported by Tim Van Holder.
6140
6141 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6142
6143 Use some of gnulib's new modules, taken from coreutils.
6144
6145 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6146 * bootstrap.conf: New file.
6147 (gnulib_modules): Add configmake, inttypes, unistd.
6148 (XGETTEXT_OPTIONS): Add complain, complain_at,
6149 fatal, fatal_at, warn, warn_at, unexpected_end.
6150 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6151 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6152 (gl_EARLY): Add.
6153 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6154 (gl_INIT): Add
6155 (GNULIB_AUTOCONF_SNIPPET): Remove.
6156 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6157 the pickiest.
6158 * lib/.cvsignore: Add inttypes_.h.
6159 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6160 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6161 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6162 no-longer-necessary initializations.
6163 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6164 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6165 use the unistd module.
6166 * src/system.h: Likewise.
6167 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6168 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6169 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6170 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6171 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6172 * src/system.h: Include inttypes.h unconditionally, now that we
6173 use the inttypes module. Don't bother to include stdint.h, since
6174 inttypes.h now does that for us.
6175 (LOCALEDIR): Remove, now that we use the configmake module.
6176 * src/getargs.c: Include configmake.h.
6177 * src/main.c: Likewise.
6178 * src/output.c: Likewise.
6179 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6180 not from $abs_top_builddir, since config.h moved.
6181
6182
6183 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6184 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6185
6186 * src/parse-gram.y (symbol_declaration): Don't put statements
6187 before declarations; it's not portable to C89.
6188 * src/scan-code.l (handle_action_at): Likewise.
6189
6190 * src/scan-code.l: Always initialize braces_level; the old code
6191 left it uninitialized and therefore had undefined behavior.
6192
6193 Don't attempt to redefine 'assert', since it runs afoul of
6194 systems where standard headers (mistakenly) include <assert.h>.
6195 Instead, define and use our own alternative, called 'aver'.
6196 * src/reader.c: Don't include assert.h, since we no longer
6197 use assert.
6198 * src/scan-code.l: Likewise.
6199 * src/system.h (assert): Remove, replacing with....
6200 (aver): New function, taking a bool arg. All uses changed.
6201 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6202 not merely an integer.
6203
6204 2006-09-15 Bob Rossi <bob@brasko.net>
6205
6206 Add support for push parsing. Based on the original work of
6207 Odd Arild Olsen <oao@fibula.no>.
6208 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6209 * data/c.m4 (YYPUSH): New.
6210 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6211 * data/push.c: New file.
6212 * src/getargs.c (push_parser): New var.
6213 * src/getargs.h (push_parser): New declaration.
6214 * src/output.c (prepare): Add macro insertion of `push_flag'.
6215 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6216 (prologue_declaration): Parse %push-parser.
6217 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6218 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6219 list of removed lines from the traces observed.
6220 (AT_CHECK_CALC_LALR): Added push parser tests.
6221
6222 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6223
6224 * NEWS: Version 2.3a.
6225 * configure.ac (AC_INIT): Likewise.
6226
6227 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6228 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6229 due to header ordering dependencies. I don't know why the #define
6230 was there.
6231
6232 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6233 runtime cost when YYDEBUG is not defined, and so that some tests
6234 that used to fail now work. Problem and initial suggestion by
6235 Paolo Bonzini.
6236 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6237 * data/glr.cc (b4_parser_class_name):
6238 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6239 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6240 (yydebug_) [YYDEBUG]: New member.
6241 (yycdebug_): Now defined only if YYDEBUG.
6242 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6243 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6244 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6245 if YYYDEBUG.
6246 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6247 Define only if YYDEBUG.
6248 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6249 set_debug_level.
6250 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6251 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6252 AT_CHECK_CALC_GLR_CC that are working now.
6253
6254 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6255
6256 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6257 We don't need them in glr.cc, and glr.c defines them.
6258 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6259 assumes that defining it to anything is the same as defining
6260 it to 1. Problem reported by Paolo Bonzini.
6261
6262 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6263
6264 * data/c.m4 (b4_null, b4_case): Define.
6265 * src/output.c (prepare_symbols): Use b4_null.
6266 (user_actions_output): Use b4_case.
6267
6268 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6269
6270 * data/glr.c (b4_shared_declarations): Put start-header first,
6271 before any #includes that we generate, so that feature-test
6272 macros work. Problem reported by Michael Deutschmann in
6273 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6274 * data/lalr1.cc: Likewise.
6275 * doc/bison.texinfo (Prologue): Document that feature-test macros
6276 should be defined before any Bison declarations.
6277 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6278 that depend on location.hh after, not before, Bison decls, since
6279 we now include location.hh after the first user prologue.
6280
6281 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6282 Sander Brandenburg in
6283 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6284 Also, fix minor white space and comment issues.
6285 (Prologue): Mention that it's better to define feature-test macros
6286 before Bison declarations. Problem reported by Michael Deutschmann.
6287
6288 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6289 by Jim Meyering.
6290 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6291 This adjusts to recent gnulib changes.
6292
6293 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6294
6295 Finish implementation of per-type %destructor/%printer. Discussed
6296 starting at
6297 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6298 and
6299 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6300 * NEWS (2.3+): Add a description of this feature to the default
6301 %destructor/%printer description.
6302 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6303 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6304 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6305 list node contains a semantic type.
6306 * src/symtab.c, src/symtab.h: Extend with a table that associates
6307 semantic types with their %destructor's and %printer's.
6308 (semantic_type_from_uniqstr, semantic_type_get,
6309 semantic_type_destructor_set, semantic_type_printer_set): New functions
6310 composing the public interface of that table.
6311 (symbol_destructor_get, symbol_destructor_location_get,
6312 symbol_printer_get, symbol_printer_location_get): If there's no
6313 per-symbol %destructor/%printer, look up the per-type before trying
6314 the default.
6315 * tests/actions.at (Per-type %printer and %destructor): New test case.
6316 * tests/input.at (Default %printer and %destructor redeclared):
6317 Extend to check that multiple occurrences of %symbol-default in a
6318 single %destructor/%printer declaration is an error.
6319 (Per-type %printer and %destructor redeclared, Unused values with
6320 per-type %destructor): New test cases.
6321
6322 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 Require default %destructor/%printer to be declared using
6325 %symbol-default instead of an empty symbol list, and start working on
6326 new per-type %destructor/%printer. Discussed at
6327 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6328 * NEWS (2.3+): Add %symbol-default to example.
6329 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6330 (Table of Symbols): Add entry for %symbol-default.
6331 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6332 (generic_symlist, generic_symlist_item): New nonterminals for creating
6333 a list in which each item is a symbol, semantic type, or
6334 %symbol-default.
6335 (grammar_declaration): Use generic_symlist in %destructor and %printer
6336 declarations instead of symbols.1 or an empty list.
6337 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6338 for changes to symbol_list.
6339 * src/reader.c: Update for changes to symbol_list.
6340 * src/scan-code.l: Likewise.
6341 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6342 * src/symlist.c, src/symlist.h: Extend such that a list node may
6343 represent a semantic type or a %symbol-default in addition to just an
6344 ordinary symbol. Add switched functions for setting %destructor's and
6345 %printer's.
6346 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6347 %destructor/%printer declarations.
6348
6349 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6350
6351 Whether the default %destructor/%printer applies to a particular symbol
6352 isn't a question of whether the user *declares* that symbol (in %token,
6353 for example). It's a question of whether the user by any means
6354 *defines* the symbol at all (by simply using a char token, for
6355 example). $end is defined by Bison whereas any other token with token
6356 number 0 is defined by the user. The error token is always defined by
6357 Bison regardless of whether the user declares it with %token, but we
6358 may one day let the user define error as a nonterminal instead.
6359 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6360 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6361 the meaning of "user-defined".
6362 * tests/actions.at (Default %printer and %destructor for user-declared
6363 end token): Rename to...
6364 (Default %printer and %destructor for user-defined end token): ...
6365 this.
6366
6367 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6368 computation of whether to apply the default, don't maintain a list of
6369 every Bison-defined symbol. Instead, just check for a first character
6370 of '$', which a user symbol cannot have, and check for the error token.
6371
6372 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6373
6374 Don't apply the default %destructor or %printer to the error token,
6375 $undefined, or $accept. This change fits the general rule that the
6376 default %destructor and %printer are only for user-declared symbols,
6377 and it solves several difficulties that are described in the new test
6378 cases listed below.
6379 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6380 * tests/actions.at (Default %printer and %destructor are not for error
6381 or $undefined, Default %printer and %destructor are not for $accept):
6382 New test cases.
6383
6384 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6385
6386 Allow %start after the first rule.
6387 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6388 when parsing the first rule.
6389 (check_and_convert_grammar): Search for it here after all grammar
6390 declarations have been parsed. Skip midrules, which have dummy LHS
6391 nonterminals.
6392 * src/symtab.c (symbol_is_dummy): New function.
6393 * src/symtab.h (symbol_is_dummy): Declare it.
6394 * tests/input.at (%start after first rule): New test.
6395
6396 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6397
6398 Redo some of the previous commit: add back the ability to use
6399 non-aliased/undeclared string literals since it might be useful to
6400 those declaring %token-table.
6401 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6402 commit: don't worry about complaints from symbols_pack.
6403 * src/symtab.c (symbol_new, symbol_class_set,
6404 symbol_check_alias_consistency): Undo changes in previous commit: count
6405 each string literal as a new symbol and token, assign it a symbol
6406 number, and don't complain about non-aliased string literals.
6407 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6408 and token counts but does still set aliased tokens to the same number,
6409 symbol_pack_processor now leaves empty slots in the symbols array.
6410 Remove those slots.
6411 * tests/regression.at (Undeclared string literal): Remove test case
6412 added in previous commit since non-aliased string literals are allowed
6413 again.
6414 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6415 remove unnecessary string literal declarations.
6416 * tests/sets.at (Firsts): Likewise.
6417
6418 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6419
6420 Don't allow an undeclared string literal, but allow a string literal to
6421 be used before its declaration.
6422 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6423 symbols_pack complained.
6424 * src/symtab.c (symbol_new): Don't count a string literal as a new
6425 symbol.
6426 (symbol_class_set): Don't count a string literal as a new token, and
6427 don't assign it a symbol number since symbol_make_alias does that.
6428 (symbol_make_alias): It's not necessary to decrement the symbol and
6429 token counts anymore. Don't assume that an alias declaration occurs
6430 before any uses of the identifier or string, and thus don't assert that
6431 one of them has the highest symbol number so far.
6432 (symbol_check_alias_consistency): Complain if there's a string literal
6433 that wasn't declared as an alias.
6434 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6435 symbol_pack asserts that every token has been assigned a symbol number
6436 although undeclared string literals have not.
6437 * tests/regression.at (String alias declared after use, Undeclared
6438 string literal): New test cases.
6439 (Characters Escapes, Web2c Actions): Declare string literals as
6440 aliases.
6441 * tests/sets.at (Firsts): Likewise.
6442
6443 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6444
6445 In the grammar scanner, STRING_FINISH unclosed constructs and return
6446 them to the parser in order to improve error messages.
6447 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6448 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6449 * tests/input.at (Unclosed constructs): New test case.
6450 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6451 seen.
6452
6453 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6454 unused global.
6455
6456 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6457
6458 Handle string aliases for character tokens correctly.
6459 * src/symtab.c (symbol_user_token_number_set): If the token has an
6460 alias, check and set its alias's user token number instead of its own,
6461 which is set to indicate the alias. Previously, every occurrence of
6462 the character token in the grammar overwrote that alias indicator with
6463 the character code.
6464 * tests/input.at (String aliases for character tokens): New test.
6465
6466 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6467
6468 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6469
6470 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6471
6472 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6473 to prevent failures when building on older platforms.
6474 Check for autopoint failure.
6475 Set XGETTEXT_OPTIONS to values that check for C format strings,
6476 so that translators are warned about them (this also helps
6477 prevent core dumps).
6478
6479 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6480 function, since it simplifies our code a bit.
6481
6482 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6483 rather than -W, so we don't get bogus warnings about sign comparisons.
6484 Add -Wpointer-arith, since that warning is useful (it reports code
6485 that does not conform to C89 and that some compilers reject).
6486 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6487 since it's no longer needed.
6488
6489 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6490
6491 Clean up scanners a bit.
6492 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6493 definitions so gcc won't warn when obstack_for_string is unused.
6494 * src/scan-code.l: config.h and system.h are already #include'd by
6495 scan-code-c.c, so get rid of them here.
6496 * src/scan-gram.l: Likewise.
6497 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6498 definitions rather than duplicating the rest of it.
6499 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6500
6501 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6502
6503 Suppress signed/unsigned comparison warnings for yycheck.
6504 * data/c.m4 (b4_safest_int_type): New macro.
6505 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6506 a signed int type, cast it to b4_safest_int_type first.
6507 * data/yacc.c: Likewise.
6508 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6509 also overwritten.
6510
6511 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6512
6513 * doc/bison.texinfo: Fix some typos.
6514
6515 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6516
6517 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6518 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6519
6520 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6521 the latest gnulib does this a different way.
6522 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6523 translation was patched, so stop omitting it.
6524
6525 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6526
6527 Enable declaration of default %printer/%destructor. Make the parser
6528 use these for all user-declared grammar symbols for which the user does
6529 not declare a specific %printer/%destructor. Thus, the parser uses it
6530 for token 0 if the user declares it but not if Bison generates it as
6531 $end. Discussed starting at
6532 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6533 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6534 and
6535 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6536 * NEWS (2.3+): Mention.
6537 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6538 declare a %destructor for a mid-rule's semantic value. It's just
6539 impossible to declare one specific to it.
6540 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6541 code. Describe default %destructor form.
6542 * src/parse-gram.y (grammar_declaration): Parse default
6543 %printer/%destructor declarations.
6544 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6545 and symbol_destructor_location_get rather than accessing the destructor
6546 and destructor_location members of struct symbol.
6547 (symbol_printers_output): Likewise but for %printer's.
6548 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6549 again.
6550 * src/symtab.c (default_destructor, default_destructor_location,
6551 default_printer, default_printer_location): New static global
6552 variables to record the default %destructor and %printer.
6553 (symbol_destructor_get, symbol_destructor_location_get,
6554 symbol_printer_get, symbol_printer_location_get): New functions to
6555 compute the appropriate %destructor and %printer for a symbol.
6556 (default_destructor_set, default_printer_set): New functions to set the
6557 default %destructor and %printer.
6558 * src/symtab.h: Prototype all those new functions.
6559 * tests/actions.at (Default %printer and %destructor): New test to
6560 check that the right %printer and %destructor are called, that they're
6561 not called for $end, and that $$ and @$ work correctly.
6562 (Default %printer and %destructor for user-declared end token): New
6563 test to check that the default %printer and %destructor are called for
6564 a user-declared end token.
6565 * tests/input.at (Default %printer and %destructor redeclared, Unused
6566 values with default %destructor): New tests to check related grammar
6567 warnings and errors.
6568
6569 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6570
6571 Clean up handling of %destructor for the end token (token 0).
6572 Discussed starting at
6573 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6574 and
6575 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6576
6577 Make the skeletons consistent in how they pop the end token and invoke
6578 its %destructor.
6579 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6580 state, which has token number 0, since this would invoke the
6581 %destructor for the end token.
6582 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6583 until after shifting the end token, or else it won't be popped.
6584 * data/yacc.c (yyparse): Likewise.
6585
6586 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6587 it's the end token. Upon termination, destroy an unshifted lookahead
6588 even when it's the end token.
6589 * data/lalr1.cc (yy::parser::parse): Likewise.
6590 * data/yacc.c (yyparse): Likewise.
6591
6592 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6593 value warnings for the end token when the user gives the end token a
6594 %destructor.
6595
6596 * tests/actions.at (Printers and Destructors): Test all the above.
6597
6598 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6599
6600 Update to latest gnulib and gettext versions.
6601 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6602 Add fopen-safer.
6603 (gnulib_files): Add m4/warning.m4. Don't worry about files
6604 overwritten by autopoint.
6605 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6606 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6607 rejects them.
6608 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6609 so that we can remove the intl files at a better time.
6610 (intl_files_to_remove): Remove aclocal.m4, since it gets
6611 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6612 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6613 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6614 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6615 Remove datarootdir hack; no longer needed.
6616 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6617 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6618 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6619 strdup.h.
6620 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6621 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6622
6623 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6624
6625 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6626 it with --assume-autoconf='latest-stable'.
6627
6628 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6629
6630 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6631 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6632 YYSTYPE' and `{'.
6633 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6634 those from muscle_tab.c since the old ones are misleading.
6635
6636 2006-07-13 Akim Demaille <akim@epita.fr>
6637
6638 Support %define "KEY" {VALUE}.
6639 * src/scan-code.h, src/scan-code.l (translate_action)
6640 (translate_rule_action, translate_symbol_action, translate_code):
6641 Return char *, not const char *.
6642 * src/parse-gram.y (declaration): Rename as...
6643 (prologue_declaration): this.
6644 (string_content): Remove this nonterminal, use STRING.
6645 (braceless, content, content.opt): New nonterminal.
6646 Use them.
6647 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6648 as value.
6649 * src/scan-gram.l (getargs.h): Don't include it.
6650
6651 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6652
6653 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6654 rather than a for-loop that declares a local bool variable. This
6655 should work around a compatibility problem with a Cray x1e C++
6656 compiler reported by Hung Nguyen in
6657 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6658 The for-loop was introduced in the 2004-11-17 change but I don't
6659 know why it was needed.
6660
6661 2006-07-12 Akim Demaille <akim@epita.fr>
6662
6663 * data/c.m4: Comment changes.
6664
6665 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6666
6667 * src/complain.c (error_message, ERROR_MESSAGE): New.
6668 To factor...
6669 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6670 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6671
6672 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6673
6674 * NEWS: Instead of %union, you can define and use your own union type
6675 YYSTYPE if your grammar contains at least one <type> tag.
6676 Your YYSTYPE need not be a macro; it can be a typedef.
6677 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6678 (Union Decl, Decl Summary): Document this.
6679 * data/glr.c (YYSTYPE): Implement this.
6680 * data/glr.cc (YYSTYPE): Likewise.
6681 * data/lalr1.cc (YYSTYPE): Likewise.
6682 * data/yacc.c (YYSTYPE): Likewise.
6683 * src/output.c (prepare): Output tag_seen_flag.
6684 * src/parse-gram.y (declaration, grammar_declaration):
6685 Use 'union_seen' rather than 'typed' to determine whether
6686 %union has been seen, since grammars can now be typed without
6687 %union.
6688 (symbol_declaration, type.opt, symbol_def):
6689 Keep track of whether a tag has been seen.
6690 * src/reader.c (union_seen, tag_seen): New vars.
6691 (typed): remove.
6692 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6693 * src/scan-code.l (untyped_var_seen): New variable.
6694 (handle_action_dollar): Adjust to above changes.
6695 (handle_action_dollar, handle_action_at):
6696 Improve overflow checking for outlandish numbers.
6697 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6698 avoid new diagnostics generated by above changes.
6699 * tests/regression.at (YYSTYPE typedef): Add test to check
6700 for type tags without %union.
6701
6702 * src/symlist.c (symbol_list_length): Return int, not unsigned
6703 int, since callers expect int. This may need to get revisited
6704 once we have proper integer overflow checking.
6705
6706 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6707 object is now static.
6708
6709 * src/getargs.c (flags_argmatch): Return void, not int,
6710 to pacify ./configure --enable-gcc-warnings.
6711
6712 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6713 since last_string is already defined to FLEX_PREFIX (last_string).
6714
6715 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6716
6717 Implement --warnings/-W.
6718 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6719 replaced by...
6720 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6721 Adjust callers.
6722 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6723 (warnings_args, warnings_types): New.
6724 (getargs, short_options, long_options): Accept -W/--warnings.
6725 Sort the options by alphabetical order, upper case letter right
6726 before its lower case.
6727
6728 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6729
6730 Change %merge result type clash warnings to errors. Discussed at
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6732 * src/reader.c (record_merge_function_type): Use complain_at.
6733 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6734 declared later): Update test case results.
6735
6736 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6737
6738 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6739 to be in alphabetical order.
6740 (trace_args): Spelling fixes.
6741
6742 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6743
6744 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6745 so they don't collide with user-defined macros.
6746 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6747 this was never guaranteed, and now that we're using gnulib stdint,
6748 which defines int_fast16_t to long int, the problem is exposed.
6749
6750 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6751
6752 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6753 need the full POSIX semantics (and weren't implementing them
6754 anyway).
6755
6756 Adjust to Autoconf 2.60 and today's gnulib.
6757 * bootstrap (gnulib_modules): Add stdint.
6758 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6759 no longer copies it.
6760 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6761 since stdint needs the former and wcwidth (which is now required
6762 by mbswidth) needs the latter.
6763 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6764 work around a compatibility glitch between gettext 0.14.6 and
6765 Autoconf 2.60.
6766 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6767 Do not check for uintptr_t, since new stdint module does the right
6768 thing.
6769 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6770 Add stdint.h, stdint_.h, wcwidth.h.
6771 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6772 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6773 stdint.m4, wchar_t.m4, wcwidth.m4.
6774 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6775 usual order for ../lib/*.h files.
6776 (file_name_split): Use last_component, not base_name, to adjust
6777 to gnulib changes.
6778 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6779 for ../lib/*.h files.
6780 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6781 Define unconditionally, since we now assume the stdint module.
6782 * src/scan-skel.l: Include <dirname.h>.
6783 (BASE_QPUTS): Use last_component, not base_name.
6784 * src/system.h: Include <unlocked-io.h> in the usual order
6785 for ../lib/*.h files. Include <stdint.h> unconditionally,
6786 since we now use the stdint module.
6787 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6788 HAVE_UINTPTR_T, since we now use the stdint module.
6789 (base_name): Remove decl, since files now include <dirname.h>
6790 to get the decl.
6791
6792 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6793
6794 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6795 New, default to 1.
6796 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6797 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6798 default.
6799 * tests/calc.at: Adjust.
6800
6801 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6802
6803 * data/c.m4 (b4_basename): New.
6804 (b4_syncline): Also output the location of its invocation (from
6805 the skeleton).
6806 (b4_user_action, b4_define_user_action, b4_user_actions)
6807 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6808 (b4_user_stype): New.
6809 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6810
6811 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6812
6813 In the grammar file, the first column is 1 not 0 on the first line as
6814 on every other line.
6815 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6816 * tests/input.at (Torturing the Scanner): Update output.
6817
6818 * src/scan-gram.l (scanner_cursor): Declare it static.
6819
6820 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6821
6822 In warnings, say "previous declaration" rather than "first
6823 declaration".
6824 * src/symtab.c (redeclaration): Do that here.
6825 * src/reader.c (record_merge_function_type): In the case of a result
6826 type clash, report the previous declaration rather than the very first
6827 one in the grammar file.
6828 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6829 declared later): Add a third declaration to check this behavior.
6830 * tests/input.at (Incompatible Aliases): Update output.
6831
6832 2006-06-27 Akim Demaille <akim@epita.fr>
6833
6834 * doc/Doxyfile.in: New.
6835 * doc/Makefile.am: Use it.
6836 * src/lalr.h, src/symtab.h: Initial doxygenation.
6837
6838 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6839
6840 Don't miss %merge result type warnings just because the LHS types are
6841 declared after the %merge. This continues the effort of the previous
6842 patch.
6843 * src/reader.c (get_merge_function): Don't set the merger type yet.
6844 (record_merge_function_type): New function for setting the merger type
6845 and checking for clashes.
6846 (grammar_current_rule_merge_set): Set the location of the %merge for
6847 the current rule.
6848 (packgram): Invoke record_merge_function_type for each rule now that
6849 all symbol type declarations have been parsed.
6850 * src/reader.h (merger_list.type_declaration_location): New member
6851 storing the location of the first %merge from which the type for this
6852 merging function was derived.
6853 * src/symlist.h (symbol_list.merger_declaration_location): New member
6854 storing the location of a rule's %merge, if any.
6855 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6856 declared later): New test to catch the error fixed by the above patch.
6857
6858 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6859
6860 Get action warnings (grammar_rule_check) right even when symbol
6861 declarations appear after the rules. Discussed at
6862 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6863 and
6864 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6865 Don't mistake the type of $$ in a midrule to be that of its parent
6866 rule's $$.
6867 * src/reader.c (grammar_current_rule_end): Don't invoke
6868 grammar_rule_check yet since not all symbol declarations may have been
6869 parsed yet.
6870 (grammar_midrule_action): Likewise.
6871 Don't record whether the midrule's $$ has been used yet since actions
6872 haven't been translated yet.
6873 Record the midrule's parent rule and its RHS index within the parent
6874 rule.
6875 (grammar_current_rule_action_append): Don't translate the action yet
6876 since not all symbol declarations may have been parsed yet and, thus,
6877 warnings about types for $$, $n, @$, and @n can't be reported yet.
6878 (packgram): Translate the action and invoke grammar_rule_check now that
6879 all symbol declarations have been parsed.
6880 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6881 after parsing the entire grammar file, the symbol list here in the case
6882 of a midrule is actually the midrule's empty RHS, so reference its
6883 parent rule's RHS where necessary.
6884 On the other hand, now that you can already know it's a midrule, you
6885 aren't forced to think $$ has the same type as its parent rule's $$.
6886 (handle_action_at): In the case of a midrule, reference the parent rule
6887 where necessary.
6888 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6889 members.
6890 (symbol_list_length): Now that this is invoked after all rules have
6891 been parsed, a NULL symbol (rather than a NULL symbol list node)
6892 terminates a rule. symbol_list_print already does this correctly.
6893 * src/symlist.h (symbol_list.midrule_parent_rule,
6894 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6895 remember their relationships with their parents.
6896 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6897 fixed by the above patch.
6898 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6899 implementing...
6900 (Unused values): ... this old test case and...
6901 (Unused values before symbol declarations): ... this new test case.
6902 This one is the same as `Unused values' except that all symbol
6903 declarations appear after the rules in order to catch the rest of the
6904 errors fixed by the above patch.
6905
6906 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6907
6908 More cleanup.
6909 * src/reader.c (current_rule): Declare it static since it's no longer
6910 used outside this file.
6911 (grammar_current_rule_action_append): Remove redundant arguments from
6912 translate_rule_action invocation.
6913 * src/reader.h (current_rule): Remove this unused extern.
6914 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6915 * src/scan-code.l (translate_rule_action): Likewise.
6916
6917 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6918
6919 Clean up yesterday's patch.
6920 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6921 to...
6922 * src/reader.c (grammar_current_rule_action_append): ... here for
6923 consistency with grammar_current_rule_symbol_append.
6924 * tests/regression.at (Braced code in declaration in rules section):
6925 Make yyerror and yylex static as usual.
6926
6927 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6928
6929 Fix bug that mistakes braced code in a declaration in the rules section
6930 to be a rule action. Mentioned at
6931 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6932 * src/scan-gram.l: Move midrule action detection from the start of the
6933 scanning of any braced code to...
6934 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6935 action. For readability, use $2 and @2 rather than the equivalent
6936 global variables.
6937 * tests/regression.at (Braced code in declaration in rules section):
6938 New test to catch the error fixed by the above patch.
6939
6940 Work on code readability some.
6941 * src/scan-code.l (current_rule): Get rid of this misleading and
6942 redundant declaration: it's actually extern'ed in reader.h.
6943 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6944 translate_action): Add a rule argument and use it instead of the global
6945 current_rule.
6946 (translate_rule_action): This already receives current_rule through an
6947 argument, so pass it on to translate_action instead of assigning
6948 current_rule to current_rule.
6949 (translate_symbol_action, translate_code): Pass rule = NULL to
6950 translate_action.
6951
6952 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6953
6954 Rename %before-definitions to %start-header and %after-definitions to
6955 %end-header. Don't use these declarations to separate pre-prologue
6956 blocks from post-prologue blocks. Add new order-independent
6957 declarations %before-header and %after-header as alternatives to the
6958 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6959 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6960 * NEWS (2.3+): Update for these changes.
6961 * data/glr.c (b4_before_definitions): Update to...
6962 (b4_start_header): ... this.
6963 (b4_after_definitions): Update to...
6964 (b4_end_header): ... this.
6965 * data/glr.cc: Likewise.
6966 * data/lalr1.cc: Likewise.
6967 * data/yacc.c: Likewise.
6968 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6969 prologue blocks with %*-header declarations.
6970 (Calc++ Parser): Likewise.
6971 (Decl Summary): Update names.
6972 (Table of Symbols): Update description.
6973 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6974 (PERCENT_END_HEADER): ... this.
6975 (PERCENT_BEFORE_DEFINITIONS): Update to...
6976 (PERCENT_START_HEADER): ... this.
6977 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6978 (declaration): Update token names and m4 macro names.
6979 When parsing %end-header and %start-header, invoke translate_code
6980 before muscle_code_grow, and no longer set global booleans to remember
6981 whether these declarations have been seen.
6982 Parse new %after-header and %before-header.
6983 * src/reader.c (before_definitions, after_definitions): Remove.
6984 (prologue_augment): Accept a new bool argument to specify whether to
6985 augment the pre-prologue or post-prologue.
6986 * src/reader.h (before_definitions, after_definitions): Remove these
6987 extern's.
6988 (prologue_augment): Add new bool argument.
6989 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6990 (PERCENT_END_HEADER): ... this.
6991 (PERCENT_BEFORE_DEFINITIONS): Update to...
6992 (PERCENT_START_HEADER): ... this.
6993 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6994 * tests/actions.at (Printers and Destructors): Update names.
6995
6996 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6997
6998 Add comparison operators for C++ location classes. Discussed at
6999 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7000 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7001 declaration indicating whether filename_type has an operator==. If
7002 filename_type is `std::string', it defaults to `1', `0' otherwise.
7003 * data/location.cc: Iff b4_define_location_comparison is `1', add
7004 operator== and operator!= for class position and for class location.
7005
7006 Some minor fixes.
7007 * src/scan-action.l: Remove unused file.
7008 * src/symtab.c (symbol_printer_set): Use printer_location not
7009 destructor_location.
7010 * src/symtab.h (struct symbol): Replace incorrect source comment for
7011 printer members.
7012 * tests/input.at (Incompatible Aliases): Update output with correct
7013 printer location.
7014
7015 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7016
7017 Don't put the pre-prologue in the header file. For the yacc.c code
7018 file and the glr.c header and code files, move the pre-prologue before
7019 the token definitions. Add new %before-definitions and
7020 %after-definitions to declare code that will go in both the header file
7021 and code file. Discussed at
7022 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7023 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7024 and
7025 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7026 * NEWS (2.3+): Describe these changes.
7027 * data/glr.c (b4_pre_prologue): Move from within to before...
7028 (b4_shared_declarations): ... this.
7029 Add new b4_before_definitions before b4_token_enums.
7030 Add new b4_after_definitions at the end.
7031 * data/glr.cc (b4_pre_prologue): Replace with...
7032 (b4_before_definitions): ... this in the header file.
7033 (b4_after_definitions): New near the end of the header file.
7034 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7035 code file right before including the header file.
7036 (b4_before_definitions): New in the previous position of
7037 b4_pre_prologue in the header file.
7038 (b4_after_definitions): New near the end of the header file.
7039 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7040 (b4_token_enums_defines): In the code file, move to right before
7041 YYSTYPE for consistency with the header file.
7042 (b4_before_definitions): New right before b4_token_enums_defines in
7043 both the header and code file.
7044 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7045 header and code file.
7046 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7047 of prologues for %union dependencies.
7048 (Decl Summary): In %defines description, mention the effect of
7049 %before-definitions and %after-definitions on the header file.
7050 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7051 than in the pre-prologue so that make check succeeds.
7052 (Table of Symbols): Add entries for %before-definitions and
7053 %after-definitions.
7054 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7055 %before-definitions.
7056 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7057 (declaration): Parse those declarations and append to
7058 b4_before_definitions and b4_after_definitions, respectively.
7059 * src/reader.c (before_definitions, after_definitions): New bools to
7060 track whether those declarations have been seen.
7061 (prologue_augment): Add to the post-prologue if %union,
7062 %before-definitions, or %after-definitions has been seen.
7063 * src/reader.h (before_definitions, after_definitions): New extern's.
7064 * src/scan-gram.l: Scan the new declarations.
7065 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7066 prologue block in a %before-definitions or a %after-definitions based
7067 on whether the %union is declared.
7068 * tests/regression.at (Early token definitions with --yacc, Early token
7069 definitions without --yacc): Move tests for token definitions into the
7070 post-prologue since token names are no longer defined in the
7071 pre-prologue.
7072
7073 2006-06-20 Akim Demaille <akim@epita.fr>
7074
7075 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7076 (symbol_get): Use it.
7077 * src/parse-gram.y: Use it.
7078
7079 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7080
7081 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7082 build succeeds when configured with --enable-gcc-warnings.
7083
7084 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7085
7086 * src/parse-gram.y (char_name): New function.
7087 (CHAR, STRING, string_content): For %printer, properly escape.
7088 (ID): Prefer fputs to fprintf.
7089 (id): Reindent to be consistent with other rules.
7090 Properly quote char.
7091
7092 The Translation Project changed its way of publishing translations
7093 to maintainers. I haven't received any responses to my request
7094 for supporting the old way, or for documenting the new way. I
7095 have modified 'bootstrap' to use screen scraping
7096 (in this case, HTML scraping). This is unreliable and inelegant,
7097 but I don't see any better way. Yuck.
7098 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7099 (get_translations): New function, which uses HTML scraping to
7100 deduce locations of latest translations.
7101 Use this function to grab both bison and bison-runtime .po files.
7102 Don't bother priming the pump for the runtime-po domain any more,
7103 as it's now translated better than bison is.
7104
7105 2006-06-19 Akim Demaille <akim@epita.fr>
7106
7107 * src/scan-gram.l: No longer "parse" things after `%union' until
7108 `{'. Rather, return a single "%union" token.
7109 No longer make symbols: return strings, and leave the conversion
7110 to symbols to the parser.
7111 (SC_PRE_CODE, token_type): Remove.
7112 * src/parse-gram.y (%union): New field `character'.
7113 Sort tokens.
7114 (CHAR): New token.
7115 (ID, ID_COLON): Now that the scanner no longer makes them
7116 identifiers, adjust all uses to invoke symbol_get.
7117 (id_colon): New, wraps the conversion from string to symbol.
7118 (%union): Accept a possible union_name.
7119 (symbol): Now can be a char.
7120 * data/c.m4 (b4_union_name): Leave a default value.
7121 * data/glr.c, data/yacc.c: Use it.
7122
7123 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7124
7125 For associating token numbers with token names for "yacc.c", don't use
7126 #define statements unless `--yacc' is specified; always use enum
7127 yytokentype. Most important discussions start at:
7128 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7129 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7130 and
7131 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7132 * NEWS (2.3+): Mention.
7133 * data/c.m4 (b4_yacc_if): New.
7134 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7135 token #define's.
7136 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7137 on token name definitions.
7138 * src/getargs.c (usage): Capitalize `Yacc' in English.
7139 * src/output.c (prepare): Define b4_yacc_flag.
7140 * tests/regression.at (Early token definitions): Test that tokens names
7141 are defined before the pre-prologue not just before the post-prologue.
7142 Remove this test case and copy to...
7143 (Early token definitions with --yacc): ... this to test #define's.
7144 (Early token definitions without --yacc): ... and this to test enums.
7145
7146 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7147
7148 * NEWS: Reword the post-2.3 change to not be so optimistic about
7149 removing the old "look-ahead" spelling.
7150 Update previous look-ahead/lookahead change reports.
7151 * REFERENCES: look-ahead -> lookahead (since that's
7152 what he actually wrote).
7153 * doc/refcard.tex: look ahead -> lookahead,
7154 look-ahead -> lookahead
7155
7156 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7157
7158 For consistency, use `lookahead' instead of `look-ahead' or
7159 `look_ahead'. Discussed starting at
7160 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7161 and then at
7162 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7163 * NEWS: For the next release, note the change to `--report'.
7164 * TODO, doc/bison.1: Update English.
7165 * doc/bison.texinfo: Update English.
7166 (Understanding Your Parser, Bison Options): Document as
7167 `--report=lookahead' rather than `--report=look-ahead'.
7168 * src/conflicts.c: Update English in comments.
7169 (lookahead_set): Rename from look_ahead_set.
7170 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7171 (resolve_sr_conflict): Rename local look_ahead_tokens to
7172 lookahead_tokens, and update other uses.
7173 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7174 count_rr_conflicts, conflicts_free): Update uses.
7175 * src/getargs.c (report_args): Move "lookahead" before alternate
7176 spellings.
7177 (report_types): Update uses.
7178 (usage): For `--report' usage description, state `lookahead' spelling
7179 rather than `look-ahead'.
7180 * src/getargs.h (report.report_lookahead_tokens): Rename from
7181 report_look_ahead_tokens.
7182 * src/lalr.c: Update English in comments.
7183 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7184 (state_lookahead_tokens_count): Rename from
7185 state_look_ahead_tokens_count.
7186 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7187 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7188 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7189 Update other uses.
7190 Update English in output.
7191 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7192 * src/print.c: Update English in comments.
7193 (lookahead_set): Rename from look_ahead_set.
7194 (print_reduction): Rename argument lookahead_token from
7195 look_ahead_token.
7196 (print_core, state_default_rule, print_reductions, print_results):
7197 Update uses.
7198 * src/print_graph.c: Update English in comments.
7199 (print_core): Update uses.
7200 * src/state.c: Update English in comments.
7201 (reductions_new): Update uses.
7202 (state_rule_lookahead_tokens_print): Rename from
7203 state_rule_look_ahead_tokens_print, and update other uses.
7204 * src/state.h: Update English in comments.
7205 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7206 (state_rule_lookahead_tokens_print): Rename from
7207 state_rule_look_ahead_tokens_print.
7208 * src/tables.c: Update English in comments.
7209 (conflict_row, action_row): Update uses.
7210 * tests/glr-regression.at
7211 (Incorrect lookahead during deterministic GLR,
7212 Incorrect lookahead during nondeterministic GLR): Rename
7213 print_look_ahead to print_lookahead.
7214 * tests/torture.at: Update English in comments.
7215 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7216 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7217 (Many lookahead tokens): Update uses.
7218 * data/glr.c: Update English in comments.
7219 * lalr1.cc: Likewise.
7220 * yacc.c: Likewise.
7221 * src/conflicts.h: Likewise.
7222 * src/lalr.h: Likewise.
7223 * src/main.c: Likewise.
7224 * src/output.c: Likewise.
7225 * src/parse-gram.c: Likewise.
7226 * src/tables.h: Likewise.
7227 * tests/calc.at: Likewise.
7228
7229 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7230
7231 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7232
7233 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7234
7235 * TODO: Add request from Nelson H. F. Beebe to be able to install
7236 Bison without installing the yacc script.
7237
7238 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7239
7240 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7241 and yytext if they're already #define'd.
7242 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7243 * src/scan-code-c.c: ... here.
7244 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7245 <config.h>.
7246
7247 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7248
7249 Get Bison to build again when configured with --enable-gcc-warnings.
7250 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7251 missing #include's.
7252 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7253 loc argument as it shadows a global.
7254 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7255 invocation.
7256
7257 * src/.cvsignore: Add scan-code.c.
7258
7259 2006-06-07 Akim Demaille <akim@epita.fr>
7260
7261 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7262 to...
7263 * src/scan-code.l: here.
7264 * tests/input.at (Torturing the Scanner): Fix another location
7265 error.
7266
7267 2006-06-07 Akim Demaille <akim@epita.fr>
7268
7269 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7270
7271 2006-06-06 Akim Demaille <akim@epita.fr>
7272
7273 Extract the parsing of user actions from the grammar scanner.
7274 As a consequence, the relation between the grammar scanner and
7275 parser is much simpler. We can also split "composite tokens" back
7276 into simple tokens.
7277 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7278 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7279 rename as...
7280 * src/location.h, src/location.c (add_column_width)
7281 (location_compute): these.
7282 Fix the column count: the initial column is 0.
7283 (location_print): Be robust to ending column being 0.
7284 * src/location.h (boundary_set): New.
7285 * src/main.c: Adjust to scanner_free being renamed as
7286 gram_scanner_free.
7287 * src/output.c: Include scan-code.h.
7288 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7289 Use boundary_set.
7290 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7291 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7292 which is now, again, a separate token.
7293 Adjust all dependencies.
7294 Whereever actions with $ and @ are used, use translate_code.
7295 (action): Remove this nonterminal which is now useless.
7296 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7297 (grammar_current_rule_action_append): Use translate_code.
7298 (packgram): Bound check ruleno, itemno, and rule_length.
7299 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7300 (last_string, last_braced_code_loc, max_left_semantic_context)
7301 (scanner_initialize, scanner_free, scanner_last_string_free)
7302 (gram_out, gram_lineno, YY_DECL_): Move to...
7303 * src/scan-gram.h: this new file.
7304 (YY_DECL): Rename as...
7305 (GRAM_DECL): this.
7306 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7307 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7308 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7309 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7310 Move these declarations, and...
7311 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7312 these to...
7313 * src/flex-scanner.h: this new file.
7314 * src/scan-gram.l (rule_length, rule_length_overflow)
7315 (increment_rule_length): Remove.
7316 (last_braced_code_loc): Rename as...
7317 (gram_last_braced_code_loc): this.
7318 Adjust to the changes of the parser.
7319 Move all the handling of $ and @ into...
7320 * src/scan-code.l: here.
7321 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7322 (handle_action_dollar, handle_action_at): Move to...
7323 * src/scan-code.l: here.
7324 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7325 scan-code.h, scan-code-c.c, scan-gram.h.
7326 (EXTRA_bison_SOURCES): Add scan-code.l.
7327 (BUILT_SOURCES): Add scan-code.c.
7328 (yacc): Be robust to white spaces.
7329
7330 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7331 * tests/regression.at: Adjust the column numbers.
7332 * tests/regression.at: Adjust the error message.
7333
7334 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7335
7336 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7337 Use Akim's wording from
7338 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7339
7340 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7341
7342 Between Bison releases, manually append `+' to the previous Bison
7343 release number, and use that as a signal to automatically print the
7344 ChangeLog's CVS Id keyword from --version. Discussed starting at
7345 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7346 * ChangeLog: Add Id header.
7347 * configure.ac (AC_INIT): Append `+' to `2.3'.
7348 * src/.cvsignore: Add revision.c.
7349 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7350 (BUILT_SOURCES): Add revision.c.
7351 (revision.c): New target rule. This file defines a new global variable
7352 named revision. It initializes it with either the Id from ChangeLog
7353 or, if VERSION doesn't contain `+', with the empty string.
7354 * src/getargs.c (version): Print the value of revision.
7355 * src/revision.h: Extern revision.
7356
7357 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7358
7359 * NEWS: Version 2.3.
7360 * configure.ac (AC_INIT): Likewise.
7361
7362 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7363
7364 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7365 with no arguments, not as an object-like macro. This is for
7366 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7367 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7368 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7369 Document this.
7370
7371 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7372
7373 * src/getargs.c (usage): Back out yesterday's modification of the
7374 --help output so that we don't have to wait for translation before
7375 releasing 2.3.
7376
7377 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7380 Problem reported by Akim Demaille.
7381
7382 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7383
7384 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7385
7386 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7387
7388 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7389 generated source code. Problem reported by Frans Englich in
7390 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7391
7392 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7393
7394 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7395 shell, not within 'make', so that 'make' by an ordinary builder
7396 (using GNU make) does not worry about configuring gzip. This also
7397 works around a bug reported independently by Keith Thompson and by
7398 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7399 stderr rather than stdout, messing up the build logs.
7400
7401 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7402
7403 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7404 to make sure that YYID will never be unused. This fixes a 'make
7405 maintainer-check' failure caused by the recent changes to the 'Trivial
7406 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7407 not used.
7408 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7409
7410 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7411
7412 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7413 state before an empty RHS is always resolved here. Only the location
7414 of that state is guaranteed to be resolved, and that's enough. This
7415 fixes the remaining bug reported by Derek M. Jones in
7416 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7417 * tests/glr-regression.at (Uninitialized location when reporting
7418 ambiguity): Test the above case.
7419 Also, the embedded comments in this test case claim it checks the case
7420 of an empty RHS that has inherited the initial location. However, the
7421 corresponding LHS was already resolved, so yyresolveLocations didn't
7422 actually have reason to modify it. Fix this by forcing
7423 nondeterministic operation at the beginning of the parse.
7424
7425 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7426
7427 * data/c.m4 (b4_yy_symbol_print_generate):
7428 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7429 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7430 of the bugs reported today by Derek M Jones in
7431 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7432 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7433 defined to be a type name without parens or brackets.
7434 (Location Type): Similarly for YYLTYPE.
7435 * tests/regression.at (Trivial grammars): Put in a test for this
7436 bug that will be caught by 'make maintainer-check' (though not,
7437 alas, by 'make check' unless your compiler is picky).
7438
7439 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7440
7441 * NEWS: Version 2.2.
7442 * configure.ac (AC_INIT): Likewise.
7443
7444 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7445
7446 * data/glr.c (yyreportTree): Make room in yystates for the state
7447 preceding the RHS. This fixes the segmentation fault reported by Derek
7448 M. Jones in
7449 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7450 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7451 to the user. Reported for yyreportTree by Derek M. Jones later in the
7452 same thread.
7453 * THANKS: Add Derek M. Jones.
7454 Update my email address.
7455 Fix typo in Steve Murphy's name.
7456
7457 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7460 checking against YYLAST that caused the parser to miss a potential
7461 alternative in its diagnostic.
7462 Problem reported by Maria Jose Moron Fernandez in
7463 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7464 * data/lalr1.cc (yysyntax_error_): Likewise.
7465 * data/yacc.c (yysyntax_error): Likewise.
7466 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7467 tokens, in case we run into an older C compiler.
7468 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7469 Use them to check for the off-by-one error fixed above.
7470
7471 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7472 YYSIZE_T, not size_t.
7473 * tests/regression.at (Trivial grammars): New test, to catch
7474 the error fixed by the above patch.
7475
7476 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7477
7478 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7479 scheme.
7480 Reported by Steve Murphy.
7481
7482 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7483
7484 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7485 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7486
7487 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7488
7489 Implement --trace=m4.
7490 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7491 * src/output.c (output_skeleton): When set, pass -dV to m4.
7492
7493 Factor the handling of flags in m4.
7494 * src/output.c (prepare): Rename the muscle names debug, defines,
7495 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7496 * data/c.m4: Adjust.
7497 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7498 Use b4_define_flag_if to define other b4_FLAG_if macros.
7499 (b4_location_if): As a consequence, rename as...
7500 (b4_locations_if): this, for consistency.
7501 Adjust all the skeletons.
7502
7503 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7504
7505 * etc/bench.pm: Shorten bench names.
7506
7507 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7508
7509 * src/output.h, src/output.c (error_verbose): Move to...
7510 * src/getargs.h, src/getargs.c: here.
7511 Sort the flags.
7512 Adjust dependencies.
7513
7514 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7515
7516 * data/c.m4 (b4_copyright): Put the special exception for Bison
7517 skeletons here, so we don't have to put it in each skeleton. All
7518 uses changed. Suggested by Akim Demaille. Also, wrap the
7519 copyright notice, in case it is longer than 80 columns. Replace
7520 comma by newline after title.
7521
7522 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7523
7524 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7525 incompatibility, not a bug. Mention that it wasn't fixed as of
7526 flex 2.5.33.
7527
7528 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7529
7530 * examples/extexi: Enforce the precedence of concatenation over
7531 >>.
7532 Reported by Tommy Nordgren.
7533
7534 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7535
7536 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7537 with the member "token".
7538 Reported by Martin Nylin.
7539
7540 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7541
7542 * data/glr.c: Switch to Bison 2.2 special-exception language in
7543 the copyright notice. Use more-regular format for titles and
7544 copyright notices.
7545 * data/glr.cc: Likewise.
7546 * data/location.cc: Likewise.
7547 * data/yacc.cc: Likewise.
7548 * doc/bison.texinfo (Conditions): Document this.
7549 * NEWS: likewise. Upgrade version to 2.2.
7550
7551 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7552
7553 * data/glr.cc: Remove dead code.
7554
7555 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7556
7557 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7558 that variable and the line breaks the bootstrap. Problem reported
7559 by Juan M. Guerrero.
7560
7561 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7562
7563 * doc/bison.texinfo (Multiple start-symbols): New.
7564
7565 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7566
7567 * etc/README, etc/bench.pl: New.
7568
7569 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7570
7571 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7572 rule.
7573 Reported by Mickael Labau.
7574 * tests/input.at (Torturing the Scanner): Test it.
7575
7576 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7577
7578 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7579 Problem reported by Bob Rossi.
7580
7581 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7582
7583 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7584 and didn't really work.
7585 For the index, use @ifnotinfo, not @iftex.
7586 Minor cleanups of spacing and terminology.
7587
7588 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7589
7590 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7591 of AT_NAME_PREFIX when %name-prefix is not used.
7592
7593 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7594
7595 Apply --prefix to C++ skeletons too: they change the namespace.
7596 The test suite already exercize these cases.
7597 * data/c++.m4 (b4_namespace): New.
7598 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7599 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7600 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7601 * doc/bison.texinfo: Document it.
7602 (Option Cross Key): Use @multitable in all formats. It looks
7603 nicer, even in TeX outputs.
7604 (Rules): Use the same code whatever the output type is.
7605 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7606 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7607 * tests/calc.at: Use it, instead of hard coding `yy'.
7608
7609 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7610
7611 * TODO: Remove dead items.
7612
7613 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7614
7615 * doc/FAQ: Remove, merged into...
7616 * doc/bison.texinfo (FAQ): this.
7617 * doc/Makefile.am (EXTRA_DIST): Adjust.
7618
7619 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7620
7621 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7622 even if empty.
7623 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7624 * doc/bison.texinfo (Calc++ Scanner): Use it.
7625
7626 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7627
7628 Fix two nits reported by twlevo, plus one more that I discovered.
7629
7630 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7631 this is the usual Bison style.
7632 * src/location.h (location_print): Likewise.
7633
7634 * src/reader.h (token_name): Likewise.
7635
7636 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7637
7638 Fix some nits reported by twlevo.
7639 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7640 and "POSIX". Use more-modern syntax for URLs. Mention C++
7641 and ask for Java. Don't hardwire OS version numbers. Add
7642 copyright notice.
7643 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7644 * src/conflicts.c (solved_conflicts_obstack): Now static.
7645
7646 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7647
7648 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7649 page. Say "you can use it" not "you may use it" as on the web page;
7650 we're describing capabilities not granting permission.
7651
7652 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7653
7654 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7655 shadowing warnings. Use usual patter for iterating through RHS.
7656 * tests/glr-regression.at
7657 (Uninitialized location when reporting ambiguity):
7658 Modify yylex so that it uses its argument, rather than trying
7659 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7660 const char -> char const.
7661
7662 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7663 Don't use tabs inside commands; it messes up 'ps'.
7664 Problem reported by twlevo.
7665
7666 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7667
7668 * tests/glr-regression.at (Uninitialized location when reporting
7669 ambiguity): New test case.
7670 * data/glr.c (yyresolveLocations): New function, which uses
7671 YYLLOC_DEFAULT.
7672 (yyresolveValue): Invoke yyresolveLocations before reporting an
7673 ambiguity.
7674 * doc/bison.texinfo (Default Action for Locations): Note
7675 YYLLOC_DEFAULT's usage for ambiguity locations.
7676 (GLR Semantic Actions): Cross-reference those notes.
7677
7678 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7679
7680 * tests/glr-regression.at (Leaked semantic values when reporting
7681 ambiguity): Remove unnecessary union and type declarations.
7682 (Leaked lookahead after nondeterministic parse syntax error): New test
7683 case.
7684 * data/glr.c (yyparse): Check for zero stacks remaining before
7685 attempting to shift the lookahead so that you don't lose it.
7686
7687 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7688
7689 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7690 * tests/glr-regression.at (Leaked semantic values when reporting
7691 ambiguity): New test case.
7692 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7693 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7694 now unnecessary yystackp parameter.
7695 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7696 destructors can be called.
7697
7698 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7699 in existing testcases.
7700
7701 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7702
7703 Don't leak semantic values for parent RHS when a user action cuts the
7704 parser, and clean up related code a bit.
7705 * tests/glr-regression.at (Leaked merged semantic value if user action
7706 cuts parse): Rename to...
7707 (Leaked semantic values if user action cuts parse): ... this. Add check
7708 for leaked parent RHS values.
7709 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7710 between an unresolved state (non-empty chain of semantic options) and
7711 an incomplete one (signaled by an empty chain).
7712 (yyresolveStates): Document the interface. Move all manipulation of a
7713 successfully or unsuccessfully resolved yyGLRState to...
7714 (yyresolveValue): ... here so that yyresolveValue always leaves a
7715 yyGLRState with consistent data and thus is easier to understand.
7716 Remove the yyvalp and yylocp parameters since they are always just
7717 taken from the yys parameter. When reporting a discarded merged value
7718 in debugging output, note that it is incompletely merged. Document the
7719 interface.
7720 (yyresolveAction): If resolving any of the RHS states fails, destroy
7721 them all rather than leaking them. Thus, as long as user actions are
7722 written to clean up the RHS correctly, yyresolveAction always cleans up
7723 the RHS of a semantic option. Document the interface.
7724
7725 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7726
7727 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7728 led to a segmentation fault in GNU Pascal. Problem reported
7729 by Waldek Hebisch.
7730
7731 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7732
7733 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7734 mid-rule action inside a nonterminal symbol in order to declare a
7735 destructor for its semantic value.
7736
7737 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7738
7739 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7740 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7741 __cplusplus && ! defined _STDLIB_H && !
7742 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7743 defined free))]: Include <stdlib.h> rather than rolling our own
7744 declarations of malloc and free, to avoid problems with
7745 incompatible declarations (using 'throw') C++'s stdlib.h. This
7746 should fix Debian bug 340012
7747 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7748 reported by Guillaume Melquiond.
7749
7750 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7751
7752 * NEWS: Clarify symbols versus types in unused-value warnings.
7753
7754 * configure.ac (AC_INIT): Bump version number.
7755
7756 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7757
7758 * NEWS: Version 2.1a.
7759 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7760 since C99 requires this.
7761
7762 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7763
7764 * m4/c-working.m4: New file.
7765 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7766
7767 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7768
7769 * Makefile.maint: Merge from coreutils.
7770
7771 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7772
7773 More portability fixes for problems summarized by Nelson H. F. Beebe.
7774
7775 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7776 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7777 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7778 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7779 messes up because C++ code is compiled in 32-bit mode but linked
7780 in 64-bit mode.
7781
7782 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7783
7784 More portability fixes for problems summarized by Nelson H. F. Beebe.
7785
7786 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7787 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7788
7789 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7790 nodist_PROGRAMS, since we don't need to actually compile the
7791 example if we're just doing a plain 'make'. This avoids bothering
7792 the installer unnecessarily about problems due to weird C++
7793 compilers.
7794
7795 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7796
7797 More portability fixes for problems summarized by Nelson H. F. Beebe.
7798
7799 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7800 than #include "...", and compile with -I'.'. The old method was
7801 not portable, according to Posix and the C standard, and it does
7802 not work with Sun C 5.7, where previous #line directives affect
7803 the working directory used in later #include "..." directives.
7804
7805 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7806
7807 Various DJGGP specific issues in /djgpp
7808
7809 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7810
7811 More portability fixes for problems summarized by Nelson H. F. Beebe.
7812
7813 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7814 '#include <map>' works and that you can apply ++ to iterators.
7815
7816 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7817
7818 Work around portability problems summarized by Nelson H. F. Beebe in
7819 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7820
7821 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7822 that '#include <string>' works.
7823
7824 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7825 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7826 "warning: sorry: semantics of inline function static data `const
7827 unsigned char translate_table[262]' are wrong (you'll wind up with
7828 multiple copies)".
7829
7830 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7831 or, xor to not_, and_, or_, and xor_, respectively. This works
7832 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7833 random system header somewhere that includes the equivalent of
7834 <iso646.h>.
7835
7836 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7837 -E" works; it apparently doesn't work with PathScale EKO Compiler
7838 Suite Version 2.0.
7839
7840 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7841
7842 During deterministic GLR operation, user actions should be able to
7843 influence the parse by changing yychar. To make this easier to fix and
7844 to make glr.c easier to evolve in general, don't maintain yytoken in
7845 parallel with yychar; just compute yytoken when needed.
7846 * tests/glr-regression.at (Incorrect lookahead during deterministic
7847 GLR): Check that setting yychar in a user action has the intended
7848 effect.
7849 * data/glr.c (yyGLRStack): Remove yytokenp member.
7850 (yyclearin): Don't set *yytokenp.
7851 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7852 yychar rather than *yytokenp to determine the current lookahead.
7853 Compute yytoken locally when needed.
7854 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7855 point to.
7856
7857 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7858 after `--report' documentation.
7859
7860 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7861
7862 * src/parse-gram.y (grammar_declaration): Location of printer
7863 symbol is @1, not list->location. Bug reported by twlevo.
7864 * tests/input.at (Incompatible Aliases): Adjust to above change.
7865
7866 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7867
7868 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7869 all the test at once. This makes the output easier to read in the
7870 normal case.
7871
7872 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7873 got from <http://bro-ids.org/download.html>. The bug is that
7874 when two actions appeared in succession, the second one was
7875 scanned before the first one was added to the grammar rule
7876 as a midrule action. Bison then output the incorrect warning
7877 "parse.y:905.17-906.36: warning: unused value: $3".
7878 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7879 associated with a value.
7880 (rhs): Don't invoke grammar_current_rule_action_append.
7881 (action): Invoke it here instead.
7882 * src/reader.c (grammar_midrule_action): Now extern.
7883 (grammar_current_rule_action_append): Don't invoke
7884 grammar_midrule_action; that is now the scanner's job.
7885 * src/reader.h (last_string, last_braced_code_loc):
7886 (grammar_midrule_action): New decls.
7887 * src/scan-gram.l (last_string): Now extern, sigh.
7888 (last_braced_code_loc): New extern variable.
7889 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7890 rule already has an action.
7891 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7892 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7893 Add some tests to check that the above changes fixed the bug.
7894
7895 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7896
7897 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7898 All used changed. Check whether the symbol has a destructor,
7899 not whether it is typed.
7900 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7901 that the values are still reported as unused. All line numbers
7902 adjusted.
7903
7904 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7905
7906 Work around a bug in bro 0.8, which underparenthesizes its
7907 definition of YYLLOC_DEFAULT.
7908 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7909 their arguments.
7910 * data/lalr1.cc: Likewise.
7911 * data/yacc.cc: Likewise.
7912
7913 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7914
7915 Work around a bug in Pike 7.0, and give the Pike folks a
7916 better way to override the usual int widths.
7917 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7918 user can override the types.
7919 (short): #undef, to work around a bug in Pike 7.0.
7920 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7921 (union yyalloc.yyss): Use yytype_int16 rather than short.
7922 All uses changed.
7923 (yysigned_char): Remove.
7924 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7925 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7926 * tests/regression.at (Web2c Actions): Adjust to above changes.
7927
7928 * src/reader.c (check_and_convert_grammar): New function.
7929 (reader): Close the input file even if something went wrong during
7930 parsing. Minor file descriptor leak reported by twlevo.
7931
7932 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7933 to pacify gcc -Wswitch-default.
7934 * src/scan-gram.l (adjust_location): Use a default: break; case
7935 to pacify gcc -Wswitch-default.
7936 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7937 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7938 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7939 Move these decls to scan-skel.l, since they don't need to be
7940 visible elsewhere.
7941 * src/scan-skel.l: Accept the above decls.
7942 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7943 is used.
7944
7945 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7946
7947 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7948 since we don't want to insist on a version number at the start
7949 of the changelog every time.
7950 * Makefile.maint: Sync from coreutils a bit better.
7951 (sc_trailing_blank): Renamed from sc_trailing_space.
7952 All uses changed.
7953 (sc_no_if_have_config_h, sc_require_config_h):
7954 (sc_prohibit_assert_without_use): New rules.
7955 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7956 (sc_dd_max_sym_length): Fix leading spaces in rule.
7957 (sc_system_h_headers): Prefix with @.
7958 (sc_useless_cpp_parens, m4-check): Output line numbers.
7959 (changelog-check): Allow version only in head.
7960 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7961 satisfy new Makefile.maint rule.
7962 * data/glr.c: Likewise.
7963 * data/glr.cc: Likewise.
7964 * data/lalr1.cc: Likewise.
7965 * data/yacc.c: Likewise.
7966 * lib/ebitsetv.c: Likewise.
7967 * lib/lbitset.c: Likewise.
7968 * lib/subpipe.c: Likewise.
7969 * lib/timevar.c: Likewise.
7970 * src/system.h: Likewise.
7971 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7972 * djgpp/Makefile.maint: Add copyright notice.
7973 * djgpp/README.in: Likewise.
7974 * djgpp/config.bat: Likewise.
7975 * djgpp/config.site: Likewise.
7976 * djgpp/config_h.sed: Likewise.
7977 * djgpp/djunpack.bat: Likewise.
7978 * djgpp/config.sed: Fix copyright notice to match standard format.
7979 * djgpp/subpipe.h: Likewise.
7980 * lib/bitsetv-print.c: Likewise.
7981 * lib/bitsetv.c: Likewise.
7982 * lib/subpipe.h: Likewise.
7983 * lib/timevar.c: Likewise.
7984 * lib/timevar.h: Likewise.
7985 * djgpp/subpipe.c: Use standard recipe for config.h.
7986 * lib/abitset.c: Likewise.
7987 * lib/bitset.c: Likewise.
7988 * lib/bitset_stats.c: Likewise.
7989 * lib/bitsetv-print.c: Likewise.
7990 * lib/bitsetv.c: Likewise.
7991 * lib/ebitsetv.c: Likewise.
7992 * lib/get-errno.c: Likewise.
7993 * lib/lbitset.c: Likewise.
7994 * lib/subpipe.c: Likewise.
7995 * lib/timevar.c: Likewise.
7996 * lib/vbitset.c: Likewise.
7997 * tests/local.at: Likewise.
7998 * src/scan-gram.l: Don't include verify.h, since system.h does
7999 that for us.
8000 * .x-sc_require_config_h: New file.
8001 * .x-sc_unmarked_diagnostics: New file.
8002
8003 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8004
8005 Be a bit more systematic about using 'abort'.
8006 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8007 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8008 Put 'default: abort ();' before some other case, to satisfy older
8009 pedantic compilers.
8010 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8011 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8012 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8013 * src/conflicts.c (resolve_sr_conflict): Likewise.
8014 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8015 (get_decision_str, get_orientation_str, get_node_alignment_str):
8016 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8017 (get_linestyle_str, get_arrowstyle_str): Likewise.
8018 * src/conflicts.c (resolve_sr_conflict):
8019 Use a default case rather than one for the one remaining enum
8020 value, to catch invalid enum values as well.
8021 * src/lalr.c (set_goto_map, map_goto):
8022 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8023 * src/nullable.c (nullable_compute, token_definitions_output):
8024 Likewise.
8025 * src/reader.c (packgram, reader): Likewise.
8026 * src/state.c (transitions_to, state_new, state_reduction_find):
8027 Likewise.
8028 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8029 (symbol_pack): Likewise.
8030 * src/tables.c (conflict_row, pack_vector): Likewise.
8031 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8032 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8033 * src/system.h: Don't include <assert.h>.
8034 (assert): New macro.
8035
8036 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8037 (Destructor Decl, Parser Function, Pure Calling):
8038 Describe rules for braces inside C code more carefully.
8039
8040 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8041
8042 Fix some porting glitches found by Nelson H. F. Beebe.
8043 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8044 compilers that don't understand that abort () does not return.
8045 * src/state.c (transitions_to): Likewise.
8046 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8047 that '#include <cstdlib>' works.
8048 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8049 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8050 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8051 for the benefit of some pre-C99 compilers.
8052
8053 * bootstrap: Undo changes to gnulib files that autoreconf made.
8054
8055 Minor fixups to get 'make maintainer-check' to work.
8056 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8057 with the new verify.h implementation.
8058 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8059 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8060 * data/yacc.c (YYUSE): Likewise.
8061 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8062 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8063 * src/parse-gram.y (declaration): Don't pass a string constant
8064 to a function that expects char *, since GCC might complain
8065 about the constant value.
8066 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8067 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8068 before #defining them.
8069 * tests/glr-regression.at
8070 (Incorrectly initialized location for empty right-hand side in GLR):
8071 In yyerror, use the msg arg.
8072 (Corrupted semantic options if user action cuts parse):
8073 (Incorrect lookahead during deterministic GLR):
8074 (Incorrect lookahead during nondeterministic GLR):
8075 Don't name a local var 'index'; it shadows string.h's 'index'.
8076
8077 2006-01-19 Akim Demaille <akim@epita.fr>
8078
8079 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8080 location, not just parts of it.
8081
8082 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8083
8084 * NEWS: Document the fact that multiple %unions are now allowed.
8085 * doc/bison.texinfo (Union Decl): Likewise.
8086 * TODO: This feature is now implemented, so remove it from
8087 the wishlist.
8088
8089 * Makefile.maint: Merge with coreutils Makefile.maint.
8090 (CVS_LIST): Use build-aux version if available.
8091 (VERSION_REGEXP): New macro.
8092 (syntax-check-rules): Add sc_no_if_have_config_h,
8093 sc_prohibit_assert_without_use, sc_require_config_h,
8094 sc_useless_cpp_parens.
8095 (sc_obsolete_symbols): Check for O_NDELAY.
8096 (sc_dd_max_sym_length): Track coreutils.
8097 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8098 (sc_useless_cpp_parens): New rule.
8099 (news-date-check): Look for version or today's date.
8100 (changelog-check): Don't require version number near head.
8101 (copyright-check): Use current year instead of hardwiring 2005.
8102 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8103 (announcement): Add --gpg-key-ID.
8104
8105 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8106 with "file system".
8107
8108 Avoid undefined behavior that addressed just before the start of an
8109 array. Problem reported by twlevo.
8110 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8111 * src/lalr.c (build_relations): Rely on new sentinel.
8112 * src/gram.c (gram_free): Adjust to new sentinel.
8113
8114 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8115
8116 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8117 yylookaheadNeeds. All uses updated.
8118 (yysplitStack): Rename local yynewLookaheadStatuses to
8119 yynewLookaheadNeeds.
8120 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8121 GLR): In comments, change `lookahead status' to `lookahead need'.
8122
8123 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8124
8125 * data/glr.c (yysplitStack): A little stylistic rewrite.
8126
8127 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8128
8129 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8130
8131 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8132
8133 * doc/bison.texinfo: Fix some typos.
8134 (GLR Semantic Actions): New subsection discussing special
8135 considerations because GLR semantic actions might be deferred.
8136 (Actions): Mention look-ahead usage of yylval.
8137 (Actions and Locations): Mention look-ahead usage of yylloc.
8138 (Special Features for Use in Actions): Add YYEOF entry and mention it
8139 in the yychar entry.
8140 In the yychar entry, remove mention of the local yychar case (pure
8141 parser) since this is irrelevant information when writing semantic
8142 actions and since it's already discussed in `Table of Symbols' where
8143 yychar is otherwise described as an external variable.
8144 In the yychar entry, don't call it the `current' look-ahead since it
8145 isn't when semantic actions are deferred.
8146 In the yychar and yyclearin entries, add note about deferred semantic
8147 actions.
8148 Add yylloc and yylval entries discussing look-ahead usage.
8149 (Look-Ahead Tokens): When discussing yychar, don't call it the
8150 `current' look-ahead, and do mention yylval and yylloc.
8151 (Error Recovery): Cross-reference `Action Features' when mentioning
8152 yyclearin.
8153 (Table of Symbols): In the yychar entry, don't call it the `current'
8154 look-ahead.
8155 In the yylloc and yylval entries, mention look-ahead usage.
8156
8157 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8158
8159 * tests/glr-regression.at: Update copyright year to 2006.
8160
8161 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8162
8163 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8164 use during nondeterministic operation to track which stacks have
8165 actually needed the current lookahead.
8166 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8167 Allocate, deallocate, resize, and otherwise shuffle space for
8168 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8169 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8170 appropriately during nondeterministic operation.
8171 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8172 members to store the current lookahead to be used by the deferred
8173 user action.
8174 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8175 from which the RHS is taken. Set the lookahead members of the new
8176 yySemanticOption according to the lookahead status for stack yyk.
8177 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8178 yyaddDeferredAction.
8179 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8180 members of yySemanticOption before invoking yyuserAction, and then set
8181 them back to their current values afterward.
8182 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8183 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8184 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8185 titles for consistency.
8186 (Leaked merged semantic value if user action cuts parse): In order to
8187 suppress lint warnings, use arguments in merge function, and assign
8188 char value < 128 in main.
8189 (Incorrect lookahead during deterministic GLR): New test case.
8190 (Incorrect lookahead during nondeterministic GLR): New test case.
8191
8192 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8193
8194 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8195 !yyvaluep as signal that no semantic value is available to print.
8196 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8197 to print a semantic value.
8198
8199 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8200
8201 * tests/glr-regression.at: For consistency with my newer test cases,
8202 don't thank myself.
8203
8204 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8205
8206 * data/glr.c (yyresolveValue): When merging semantic options, if at
8207 least one user action succeeds but a later one cuts the parse, then
8208 destroy the semantic value before returning rather than leaking it.
8209 (yyresolveStates): If a user action cuts the parse and thus
8210 yyresolveValue fails, ignore the (unset) semantic value rather than
8211 corrupting the yyGLRState, and empty the semantic options list since
8212 the user actions should have called all necessary destructors.
8213 Simplify code with YYCHK.
8214 * tests/glr-regression.at (Corrupted semantic options if user action
8215 cuts parse): New test case.
8216 (Undesirable destructors if user action cuts parse): New test case.
8217 Before applying any of this patch, this test case never actually failed
8218 for me... but only because the corrupted semantic options usually
8219 masked this bug.
8220 (Leaked merged semantic value if user action cuts parse): New test
8221 case.
8222
8223 2006-01-05 Akim Demaille <akim@epita.fr>
8224
8225 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8226
8227 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8228
8229 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8230 _MSC_VER. Problem reported by Cenzato Marco.
8231 (b4_c_function_def): Use it.
8232 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8233 b4_c_modern.
8234 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8235 than rolling our own.
8236
8237 2006-01-04 Akim Demaille <akim@epita.fr>
8238
8239 Also warn about non-used mid-rule values.
8240 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8241 member.
8242 (symbol_list_new): Adjust.
8243 * src/reader.c (symbol_typed_p): New.
8244 (grammar_rule_check): Use it.
8245 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8246 Check its rule.
8247 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8248 Use it.
8249 * tests/actions.at (Exotic Dollars): Adjust.
8250
8251 2006-01-04 Akim Demaille <akim@epita.fr>
8252
8253 * src/reader.c (grammar_midrule_action): If $$ is set in a
8254 mid-rule, move the `used' bit to its lhs.
8255 * tests/input.at (Unused values): New.
8256 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8257
8258 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8259
8260 * doc/bison.texinfo (Bison Options): Say more accurately what
8261 --yacc does.
8262 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8263 about declarations in the grammar when in Yacc mode, as POSIX does
8264 not require a diagnostic when the grammar uses extensions.
8265
8266 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8267
8268 Warn about dubious constructions like "%token T T".
8269 Reported by twlevo.
8270 * src/symtab.h (struct symbol.declared): New member.
8271 * src/symtab.c (symbol_new): Initialize it to false.
8272 (symbol_class_set): New arg DECLARING, specifying whether
8273 this is a declaration that we want to warn about, if there
8274 is more than one of them. All uses changed.
8275
8276 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8277 Allow multiple %union directives, whose contents concatenate.
8278 * src/parse-gram.y (grammar_declaration): Likewise.
8279 Use muscle_code_grow, so that we don't need stype_line any more.
8280 All uses changed.
8281
8282 * src/muscle_tab.c (muscle_grow): Fix comment.
8283
8284 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8285 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8286 Update copyright year to 2006.
8287
8288 2006-01-03 Akim Demaille <akim@epita.fr>
8289
8290 Have glr.cc pass (some of) the calc.at tests.
8291 * data/glr.cc (b4_parse_param_orig): New.
8292 (b4_parse_param): Improve its definition, and bound it more
8293 clearly in the skeleton.
8294 (b4_epilogue): Append, instead of prepending, in order to keep
8295 #line consistency.
8296 Simplify the generation of auxiliary functions: locations and
8297 purity are mandated.
8298 (b4_global_tokens_and_yystype): Honor it.
8299 * data/location.cc (c++.m4): Don't include it.
8300 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8301 and AT_SKEL_CC_IF.
8302 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8303 AT_LALR1_CC_IF.
8304 Be sure to initialize the first position's filename.
8305 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8306 mandated anyway.
8307 (AT_CHECK_CALC_GLR_CC): New.
8308 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8309
8310 2006-01-02 Akim Demaille <akim@epita.fr>
8311
8312 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8313 c.m4.
8314 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8315 * data/glr.cc: Do not include stack.hh.
8316
8317 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8318
8319 * data/glr.c: Reformat whitespace with tabs.
8320 (b4_lpure_formals): Remove this unused m4 macro.
8321 * tests/cxx-type.at: Reformat whitespace with tabs.
8322 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8323 since it's a member. Rename type to isNterm for clarity.
8324
8325 2005-12-29 Akim <akim@sulaco.local>
8326
8327 Let glr.cc catch up with symbol_value_print.
8328 * data/glr.cc (b4_yysymprint_generate): Replace by...
8329 (b4_yy_symbol_print_generate): this.
8330 (yy_symbol_print, yy_symbol_value_print): Declare them.
8331
8332 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8333
8334 * src/location.h (boundary): Note that a line or column equal
8335 to INT_MAX indicates an overflow.
8336 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8337 (rule_length_overflow, increment_rule_length, add_column_width):
8338 New functions.
8339 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8340 (<SC_BRACED_CODE>"}"):
8341 Use increment_rule_length rather than incrementing it by hand.
8342 (adjust_location, handle_syncline): Diagnose overflow.
8343 (handle_action_dollar, handle_action_at):
8344 Fix bug with monstrosities like $-2147483648.
8345 Remove now-unnecessary checks.
8346 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8347 (convert_ucn_to_byte): Verify assumptions.
8348 (handle_syncline): New arg LOC. All callers changed.
8349 Don't store through a value derived from char const * pointer.
8350
8351 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8352 GCC warnings.
8353
8354 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8357 Remove unnecessary forward static decls.
8358
8359 2005-12-27 Akim Demaille <akim@epita.fr>
8360
8361 * src/reader.c (grammar_current_rule_check): Also check that $$
8362 is used.
8363 Take the rule to check as argument, hence rename as...
8364 (grammar_rule_check): this.
8365 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8366 Rename as...
8367 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8368 (grammar_midrule_action, grammar_symbol_append): Now static.
8369 * tests/torture.at (input): Don't rely on the default action
8370 being always performed.
8371 * tests/calc.at: "Set" $$ even when the action is "cut" with
8372 YYERROR or other.
8373 * tests/actions.at (Exotic Dollars): Instead of using unused
8374 values, check that the warning is issued.
8375
8376 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8377
8378 * NEWS: Improve wording for unused-value warnings.
8379
8380 2005-12-22 Akim Demaille <akim@epita.fr>
8381
8382 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8383 (b4_yysymprint_generate): Rename as...
8384 (b4_yy_symbol_print_generate): this.
8385 Generate yy_symbol_print instead of yysymprint.
8386 Generate also yy_symbol_value_print, and use it.
8387
8388 2005-12-22 Akim Demaille <akim@epita.fr>
8389
8390 * NEWS: Warn about unused values.
8391 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8392 a `used' member.
8393 (symbol_list_n_get, symbol_list_n_used_set): New.
8394 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8395 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8396 * src/reader.c (grammar_current_rule_check): Check that values are
8397 used.
8398 * src/symtab.c (symbol_print): Accept 0.
8399 * tests/existing.at: Remove the type information.
8400 Empty the actions.
8401 Remove useless actions (beware of mid-rule actions: perl -000
8402 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8403 * tests/actions.at (Exotic Dollars): Use unused values.
8404 * tests/calc.at: Likewise.
8405 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8406 Likewise.
8407
8408 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8409 rule_useful_p.
8410
8411 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8412
8413 Undo 2005-12-01 tentative license wording change. The wording is
8414 still being reviewed by the lawyers, and we don't want to wait for
8415 them before publishing a test release. For now, revert to the
8416 previous wording.
8417 * NEWS: Undo 2005-12-01 change.
8418 * data/glr.c: Revert to previous license wording.
8419 * data/glr.cc: Likewise.
8420 * data/lalr1.cc: Likewise.
8421 * data/location.cc: Likewise.
8422 * data/yacc.c: Likewise.
8423
8424 * NEWS: Reword %destructor vs YYABORT etc.
8425 * data/glr.c: Use American spacing, for consistency.
8426 * data/glr.cc: Likewise.
8427 * data/lalr1.cc: Likewise.
8428 * data/yacc.c: Likewise.
8429 * data/yacc.c: Reformat comments slightly.
8430 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8431 for consistency. Fix some spelling errors and reword recently-included
8432 text slightly.
8433 * tests/cxx-type.at: Cast results of malloc, for C++.
8434
8435 2005-12-21 Joel E. Denny <address@hidden>
8436
8437 * tests/cxx-type.at: Construct a tree, count the parents of shared
8438 nodes, and free each node once and only once. Previously, the memory
8439 for semantic values was leaked instead.
8440
8441 2005-12-21 Joel E. Denny <address@hidden>
8442
8443 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8444 (yylval, yylloc): If pure, #define to yystackp->yyval and
8445 yystackp->yyloc similar to yychar and yynerrs.
8446 (yyparse): If pure, remove local yylval and yylloc. Add local
8447 yystackp to accommodate pure definitions of yylval and yylloc.
8448 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8449 yylvalp and yyllocp to &yylval and &yylloc.
8450 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8451 namespace. Previously, nerrs and char were missing, but lval and lloc
8452 weren't necessary.
8453 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8454 yylvalp and yyllocp parameters since, if pure, these are now always
8455 accessible through yystackp. If not pure, they are still accessible
8456 globally.
8457 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8458 `if (YYID (N))' to pacify lint.
8459
8460 2005-12-21 Akim Demaille <akim@epita.fr>
8461
8462 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8463 destroy the RHS symbols of a rule.
8464 * data/yacc.c (yylen): Initialize to 0.
8465 Keep its value to the number of items to possibly shift.
8466 In particular, a regular successful parse that ends on YYFINAL by
8467 a (internal) YYACCEPT must not have yylen != 0.
8468 (yyerrorlab, yyreturn): Pop the RHS.
8469 Reorder a bit to emphasize the `shifting' bits of code.
8470 (YYPOPSTACK): Now accept a number of items to pop.
8471 * data/lalr1.cc: Likewise.
8472 * data/glr.c: Formatting changes.
8473 Use goto instead of fall through.
8474 * doc/bison.texinfo (Destructor Decl): Complete.
8475
8476 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8477
8478 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8479 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8480 * djgpp/config.bat: Replace every occurence of the file name
8481 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8482 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8483 * djgpp/config.sed: Replace every occurence of the file name
8484 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8485 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8486 * djgpp/djunpack.bat: DJGPP specific file.
8487 * djgpp/fnchange.lst: DJGPP specific file.
8488 * djgpp/README.in: Add new information about how to unpack the bison
8489 source on MSDOS and other systems which have 8.3 file name restrictions
8490 using djunpack.bat and fnchange.lst.
8491
8492 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8493
8494 * bootstrap (build_cvs_prefix): Remove; unused.
8495 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8496 when getting gnulib.
8497
8498 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8499
8500 * data/glr.c: Reorder typedef declarations for structs to match order
8501 of struct declarations.
8502 Rename yystack everywhere to yystackp except in yyparse where it's not
8503 a pointer.
8504 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8505 consistency.
8506 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8507 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8508 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8509 lint.
8510
8511 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8512
8513 * tests/sets.at (Accept): Fix typos in regular expression used to
8514 sed out the final state number.
8515
8516 Work around portability problem on Solaris 10: flex-generated
8517 files include <stdio.h> before <config.h>, which messes up
8518 because the latter defines __EXTENSIONS__. Address the problem
8519 by creating two new little files that include <config.h> first,
8520 then include the flex-generated files. Rewrite everyone else
8521 to include <config.h> first, as well.
8522 * lib/timevar.c: Always include "config.h".
8523 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8524 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8525 (EXTRA_bison_SOURCES): New macro.
8526 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8527 * src/system.h: Don't include config.h.
8528 * src/LR0.c: Include <config.h> first.
8529 * src/assoc.c: Likewise.
8530 * src/closure.c: Likewise.
8531 * src/complain.c: Likewise.
8532 * src/conflicts.c: Likewise.
8533 * src/derives.c: Likewise.
8534 * src/files.c: Likewise.
8535 * src/getargs.c: Likewise.
8536 * src/gram.c: Likewise.
8537 * src/lalr.c: Likewise.
8538 * src/location.c: Likewise.
8539 * src/main.c: Likewise.
8540 * src/muscle_tab.c: Likewise.
8541 * src/nullable.c: Likewise.
8542 * src/output.c: Likewise.
8543 * src/parse-gram.y: Likewise.
8544 * src/print.c: Likewise.
8545 * src/print_graph.c: Likewise.
8546 * src/reader.c: Likewise.
8547 * src/reduce.c: Likewise.
8548 * src/relation.c: Likewise.
8549 * src/state.c: Likewise.
8550 * src/symlist.c: Likewise.
8551 * src/symtab.c: Likewise.
8552 * src/tables.c: Likewise.
8553 * src/uniqstr.c: Likewise.
8554 * src/vcg.c: Likewise.
8555
8556 * src/parse-gram.y: Fix minor problems uncovered by lint.
8557 (current_lhs, current_lhs_location): Now static.
8558 (current_assoc): Remove unused variable.
8559
8560 Cleanups so that Bison-generated parsers have less lint.
8561 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8562 Prepend /*ARGSUSED*/, for lint's sake.
8563 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8564 definition if 'lint' is defined.
8565 (YYID): New macro (or function, if lint).
8566 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8567 * data/yacc.c: Likewise.
8568 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8569 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8570 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8571 is C++ only.
8572 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8573 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8574 Use YYID(0) rather than 0, for lint.
8575 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8576 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8577
8578 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8579
8580 * tests/glr-regression.at
8581 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8582 Close memory leak reported by twlevo.
8583
8584 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8585
8586 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8587 all stacks.
8588 (yyparse): Iterate another stack in order to call user destructors.
8589 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8590 New test case.
8591 (Duplicated user destructor for lookahead): This test now is expected
8592 to succeed.
8593
8594 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8595
8596 * NEWS: Document the following change.
8597 * data/yacc.c: Say "parser skeleton" rather than "file", since
8598 it's no longer just a file.
8599 * data/glr.c: Grant a special exception for C GLR parsers, that
8600 reads like the already-existing exception for C LALR(1) parsers.
8601 * data/glr.cc: Likewise.
8602 * data/lalr1.cc: Likewise.
8603 * data/location.cc: Likewise.
8604 * data/yacc.c: Reword the "written by" statement to clarify that
8605 it was the parser skeleton, not the entire output file.
8606 * data/glr.c: Written by Paul Hilfinger.
8607 * data/glr.cc: Written by Akim Demaille.
8608 * data/lalr1.cc: Likewise.
8609
8610 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8611
8612 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8613 Fix typos in previous change that broke 'make check'.
8614 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8615 supported in C.
8616 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8617 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8618 We can revert this once things settle down.
8619
8620 * src/conflicts.c (conflicts_print): Don't print file name twice
8621 when %expect fails because there were no conflicts.
8622 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8623 change.
8624 * tests/conflicts.at (%expect not enough, %expect too much):
8625 (%expect with reduce conflicts): Adjust to new behavior.
8626
8627 2005-11-18 Akim Demaille <akim@epita.fr>
8628
8629 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8630 errors.
8631 * NEWS: Document this.
8632 * doc/bison.texinfo (Expect Decl): Likewise.
8633
8634 2005-11-16 Akim Demaille <akim@epita.fr>
8635
8636 Generalize the display of semantic values and locations in traces.
8637 * data/glr.c (yy_reduce_print): Fix indices (again).
8638 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8639 literal integers.
8640 * data/lalr1.cc (yyreduce_print): Rename as...
8641 (yy_reduce_print): this.
8642 Display values and locations.
8643 * data/yacc.c (yy_reduce_print): Likewise.
8644 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8645 (yysymprint): Move higher to be visible from yy_reduce_print).
8646 (yyparse): Adjust.
8647 * tests/calc.at: Adjust the expected length of the traces.
8648
8649 2005-11-14 Akim Demaille <akim@epita.fr>
8650
8651 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8652 from 1 to N, while values and location start at 0.
8653 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8654
8655 2005-11-14 Akim Demaille <akim@epita.fr>
8656
8657 * data/glr.c (yy_reduce_print): Fix the $ number.
8658
8659 2005-11-14 Akim Demaille <akim@epita.fr>
8660
8661 "Use" parse parameters.
8662 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8663 * data/glr.c, data/glr.cc: Use them.
8664 * data/glr.c (YYUSE): Have a C++ definition that supports
8665 non-pointer types.
8666
8667 2005-11-14 Akim Demaille <akim@epita.fr>
8668
8669 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8670
8671 2005-11-14 Akim Demaille <akim@epita.fr>
8672
8673 * data/glr.cc: New.
8674 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8675
8676 2005-11-12 Akim Demaille <akim@epita.fr>
8677
8678 Let position and location be PODs.
8679 * data/location.cc (position::initialize, location::initialize): New.
8680 (position::position, location::location): Define only if
8681 b4_location_constructors is defined.
8682 * data/lalr1.cc (b4_location_constructors): Define it for backward
8683 compatibility.
8684 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8685
8686 2005-11-12 Akim Demaille <akim@epita.fr>
8687
8688 * data/lalr1.cc: Move the body of the ctor and dtor into the
8689 parser file (instead of the header).
8690 Wrap the implementations in a "namespace yy".
8691
8692 2005-11-12 Akim Demaille <akim@epita.fr>
8693
8694 Have glr.c include its header file when created.
8695 * data/glr.c (b4_shared_declarations): New.
8696 Output them verbatim in the parser if !%defines, otherwise
8697 output then in the header file, and include it instead.
8698
8699 2005-11-11 Akim Demaille <akim@epita.fr>
8700
8701 * data/glr.c: Comment changes.
8702
8703 2005-11-11 Akim Demaille <akim@epita.fr>
8704
8705 When yydebug, report semantic and location values for reductions.
8706 * data/glr.c (yy_reduce_print): Report the semantic values and the
8707 locations.
8708 (YY_REDUCE_PRINT): Adjust.
8709 (yyglrReduce): Use them.
8710 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8711 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8712 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8713 traces.
8714
8715 2005-11-10 Akim Demaille <akim@epita.fr>
8716
8717 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8718 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8719 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8720
8721 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8722
8723 * m4/cxx.m4, examples/Makefile.am: Don't build
8724 examples/calc++ if no C++ compiler is available. (trivial change)
8725
8726 2005-11-09 Akim Demaille <akim@epita.fr>
8727
8728 * src/scan-skel.l: Use a couple of asserts.
8729
8730 2005-11-03 Akim Demaille <akim@epita.fr>
8731
8732 In some (weird) cases, the final state number is incorrect.
8733 Reported by Alexandre Duret-Lutz.
8734 * src/LR0.c (state_list_append): Remove the computation of
8735 final_state.
8736 (save_reductions): Do it here.
8737 (get_state): Alpha conversion.
8738 (generate_states): Use a for loop.
8739 * src/gram.h (item_number_is_rule_number)
8740 (item_number_is_symbol_number): New.
8741 * src/state.c: Use assert.
8742 * src/system.h: Include assert.h.
8743 * tests/sets.at (Accept): New.
8744
8745 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8746
8747 * data/glr.c (yyfill): Adjust comment.
8748 (yyresolveAction): Initialize default location properly
8749 for empty right-hand sides.
8750 (yydoAction): Ditto.
8751 Add comment explaining apparently dead code.
8752 * tests/glr-regression.at
8753 (Incorrectly initialized location for empty right-hand side in GLR):
8754 New test.
8755
8756 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8757
8758 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8759 gnulib when interrupted. This fixes some race conditions and
8760 works around some portability problems (one noted by Paul
8761 Hilfinger).
8762
8763 2005-10-22 Akim <akim@epita.fr>
8764
8765 * Makefile.cfg: Adjust to config -> build-aux.
8766 Reported by twledo.
8767
8768 2005-10-21 Akim Demaille <akim@epita.fr>
8769
8770 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8771 the %parse-params.
8772 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8773 * data/yacc.c (b4_Pure_if): Rename as...
8774 (b4_yacc_pure_if): this.
8775 (YY_SYMBOL_PRINT, yyparse): Adjust.
8776 * doc/bison.texinfo: Formatting changes.
8777
8778 2005-10-21 Akim Demaille <akim@epita.fr>
8779
8780 Finish the transition config -> build-aux.
8781 * configure.ac, Makefile.am: Use build-aux.
8782 * config/prev-version, config/announce-gen, config/Makefile.am:
8783 Move to...
8784 * build-aux/prev-version, build-aux/announce-gen,
8785 * build-aux/Makefile.am: here.
8786
8787 2005-10-14 Akim Demaille <akim@epita.fr>
8788
8789 * examples/calc++/test: Use set -x only when VERBOSE.
8790
8791 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8792
8793 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8794 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8795
8796 2005-10-13 Akim Demaille <akim@epita.fr>
8797
8798 * src/scan-skel.l: Output the base name parts of the parser and
8799 header file names.
8800 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8801 additional checks.
8802 Use this to exercise C++ outputs in subdirs.
8803 Reported by Oleg Smolsky.
8804
8805 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8806
8807 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8808 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8809 Problem reported by John P. Hartmann.
8810 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8811 already defined it.
8812
8813 2005-10-12 Akim Demaille <akim@epita.fr>
8814
8815 * src/parse-gram.y (version_check): Exit 63 to please missing
8816 (stands for "version mismatch).
8817 * tests/input.at, doc/bison.texinfo: Adjust.
8818
8819 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8820
8821 Work around portability problems with Visual Age C compiler
8822 (xlc and xlC_r) reported by John P. Hartmann.
8823 * data/location.cc (initial_column, initial_line): Remove.
8824 All uses replaced by 0 and 1.
8825 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8826 that xlc complains about.
8827 * src/scan-skel.l (skel_wrap): Likewise.
8828 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8829 as __STDC__.
8830 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8831 __STDC_VERSION__. Use it everywhere instead of looking at
8832 __STDC__ and __cplusplus.
8833
8834 2005-10-10 Akim Demaille <akim@epita.fr>
8835
8836 * examples/calc++/test: Be quiet unless VERBOSE.
8837
8838 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8839
8840 * data/c.m4 (yydestruct, yysymprint):
8841 Use YYUSE instead of casting to void.
8842 * data/glr.c (YYUSE): New macro.
8843 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8844 Use it instead of rolling our own.
8845 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8846 (YYCHK1):
8847 Use /*CONSTCOND*/ to suppress lint warnings.
8848 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8849 (YY_STACK_PRINT): Use 'false' not '0'.
8850 (YYUSE): New macro.
8851 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8852 * data/yacc.c (YYUSE): New macro.
8853 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8854 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8855 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8856
8857
8858 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8859 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8860
8861 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8862
8863 Undo the parts of the unlocked-I/O change that substituted
8864 putc or puts for printf. This might hurt performance a bit,
8865 but some people prefer the printf style.
8866 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8867 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8868 All uses replaced by YYFPRINTF and YYDPRINTF.
8869 * data/yacc.c: Likewise.
8870 * lib/bitset.c (bitset_print): Likewise.
8871 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8872 putc and puts.
8873 * lib/lbitset.c (debug_lbitset): Likewise.
8874 * src/closure.c (print_firsts, print_fderives): Likewise.
8875 * src/gram.c (grammar_dump): Likewise.
8876 * src/lalr.c (look_ahead_tokens_print): Likewise.
8877 * src/output.c (escaped_output): Likewise.
8878 (user_actions_output): Break apart two printfs.
8879 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8880 * src/reduce.c (reduce_print): Likewise.
8881 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8882 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8883
8884 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8885 Use assignments rather than casts-to-void to suppress
8886 unused-variable warnings. This pacifies 'lint'.
8887 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8888 unused-variable warnings.
8889
8890 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8891
8892 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8893
8894 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8895
8896 Use unlocked I/O for a minor performance improvement on hosts like
8897 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8898 is to use the gnlib unlocked-io module, and to prefer putc and
8899 puts to printf when either will work (since the latter doesn't
8900 come in an unlocked flavor).
8901 * bootstrap (gnulib_modules): Add unlocked-io.
8902 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8903 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8904 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8905 and similarly for puts and putc and printf.
8906 * data/yacc.c: Likewise.
8907 * lib/bitset.c (bitset_print): Likewise.
8908 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8909 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8910 to printf.
8911 * lib/lbitset.c (debug_lbitset): Likewise.
8912 * src/closure.c (print_firsts, print_fderives): Likewise.
8913 * src/gram.c (grammar_dump): Likewise.
8914 * src/lalr.c (look_ahead_tokens_print): Likewise.
8915 * src/output.c (escaped_output): Likewise.
8916 (user_actions_output): Coalesce two printfs.
8917 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8918 * src/reduce.c (reduce_print): Likewise.
8919 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8920 * src/system.h: Include unlocked-io.h rather than stdio.h.
8921
8922 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8923 this confuses xgettext.
8924
8925 2005-10-02 Akim Demaille <akim@epita.fr>
8926
8927 * bootstrap (gnulib_modules): Add strverscmp.
8928 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8929 * m4/.cvsignore: Add strverscmp.m4.
8930 * src/parse-gram.y (%require): New token, new rule.
8931 (version_check): New.
8932 * src/scan-gram.l (%require): Adjust.
8933 * tests/input.at (AT_REQUIRE): New.
8934 Use it.
8935 * doc/bison.texinfo (Require Decl): New.
8936 (Calc++ Parser): Use %require.
8937
8938 2005-10-02 Akim Demaille <akim@epita.fr>
8939
8940 * data/location.cc: New.
8941
8942 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8943 Akim Demaille <akim@epita.fr>
8944
8945 Make sure -odir/foo.cc creates dir/location.hh etc.
8946 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8947 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8948 (spec_defines_file): Now const.
8949 (dir_prefix): New.
8950 (short_base_name): Remove.
8951 * src/files.c: Adjust.
8952 (dirname.h): Include.
8953 (base_name): Don't prototype it.
8954 (finput): Remove, duplicates gram_in.
8955 (full_base_name, short_base_name): Replace by...
8956 (all_but_ext, all_but_tab_ext): these.
8957 (compute_base_names): Rename as...
8958 (compute_file_name_parts): this.
8959 Update to compute the new variables, including dir_prefix.
8960 Adjust dependencies.
8961 * src/output.c (prepare): Output them.
8962 * src/reader.c: Adjust to use gram_in, not finput.
8963 * src/scan-skel.l (@dir_prefix@): New.
8964
8965 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8966
8967 * lib/subpipe.c: New function end_of_output_subpipe() added
8968 to allow support for non-posix systems. This is a no-op function
8969 for posix systems.
8970
8971 * lib/subpipe.h: New function end_of_output_subpipe() added
8972 to allow support for non-posix systems. This is a no-op function
8973 for posix systems.
8974
8975 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8976 handle the lack of pipe/fork functionality on non-posix systems.
8977
8978 * djgpp/Makefile.maint: DJGPP specific file.
8979
8980 * djgpp/README.in: DJGPP specific file.
8981
8982 * djgpp/config.bat: DJGPP specific configuration file.
8983
8984 * djgpp/config.sed: DJGPP specific configuration file.
8985
8986 * djgpp/config.site: DJGPP specific configuration file.
8987
8988 * djgpp/config_h.sed: DJGPP specific configuration file.
8989
8990 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8991
8992 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8993
8994 2005-10-02 Akim Demaille <akim@epita.fr>
8995
8996 * data/location.cc: New, extract from...
8997 * data/lalr1.cc: here.
8998 (location.hh): Include it after the user prologue, in case the
8999 filename type is defined by the user.
9000 Forward declation location and position before the pre-prologue.
9001 (yyresult_): Rename as...
9002 (yyresult): this, it's a local variable, not an attribute.
9003 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9004
9005 2005-10-01 Akim Demaille <akim@epita.fr>
9006
9007 * examples/extexi: Restore the #line generation.
9008
9009 2005-09-30 Akim Demaille <akim@epita.fr>,
9010 Alexandre Duret-Lutz <adl@gnu.org>
9011
9012 Move the token type and YYSTYPE in the parser class.
9013 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9014 (parser::token): New, from the moved free definition of tokens.
9015 (parser::semantic_value): Now a full definition instead of an
9016 indirection to YYSTYPE.
9017 (b4_post_prologue): No longer included in the header file, but
9018 in the implementation file.
9019 * doc/bison.texi (C+ Language Interface): Update.
9020 * src/parse-gram.y: Support unary %define.
9021 * tests/actions.at: Define global_tokens_and_yystype for backward
9022 compatibility until we update the tests.
9023 * tests/calc.at: Idem.
9024 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9025 to simplify the code.
9026
9027 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9028
9029 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9030 Ah, the good old days! Problem reported by Peter Klein.
9031 * bootstrap (gnulib_modules): Add strerror, strtoul.
9032 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9033 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9034
9035 2005-09-29 Akim Demaille <akim@epita.fr>
9036
9037 * data/c.m4 (b4_error_verbose_if): New.
9038 * data/lalr1.cc: Use it.
9039 (YYERROR_VERBOSE_IF): Remove.
9040 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9041 parser members, replaced by...
9042 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9043 local variables.
9044 (yysyntax_error_): Takes the state number as argument.
9045 (yyreduce_print_): Use the argument yyrule, not the former
9046 attribute yyn_.
9047
9048 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9049
9050 * bootstrap (gnulib_modules): Add verify.
9051 * lib/.cvsignore: Add verify.h.
9052 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9053 * src/system.h (verify): Remove.
9054 Include verify.h instead.
9055 * src/tables.c (tables_generate): Use new API for 'verify'.
9056
9057 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9058
9059 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9060 local variables whose names begin with 'yy'.
9061 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9062 Trivial changes from Joel E. Denny.
9063
9064 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9065 it itself.
9066 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9067 don't use alloca any more.
9068
9069 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9070 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9071 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9072 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9073 to match yacc.c, to test more hosts.
9074
9075 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9076
9077 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9078 doesn't affect behavior.
9079 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9080 Solaris, AIX, MSC.
9081 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9082 This works a bit better with glibc, if user code has already included
9083 stdlib.h.
9084 * doc/bison.texinfo (Bison Parser): Document that users can't
9085 arbitrarily use malloc and free for other purposes. Document
9086 that <alloca.h> and <malloc.h> might be included.
9087 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9088 user must declare alloca.
9089
9090 * HACKING (release): Forwarn the Translation Project about
9091 stable releses.
9092
9093 2005-09-20 Akim Demaille <akim@epita.fr>
9094
9095 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9096
9097 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9098
9099 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9100 (YYSTACK_ALLOC_MAXIMUM): Use it.
9101 (yysyntax_error): New function.
9102 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9103 multiple syntax errors are reported, and alloca is being used.
9104 Instead, reallocate buffers twice as big each time, so that
9105 we waste at most half the allocated memory. Start with a small
9106 (128-byte) buffer that will suffice in most cases anyway.
9107 Use yysyntax_error to do most of the work.
9108
9109 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9110 yynerrs is the number of errors reported, not the number of
9111 errors encountered.
9112
9113 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9114 Mark it as expected to fail.
9115 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9116 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9117 Don't start user-code symbols with "yy", to avoid name space problems.
9118
9119 2005-09-19 Akim Demaille <akim@epita.fr>
9120
9121 Remove the traits, failed experiment.
9122 It never proved useful, and anyway because of the current
9123 definition, it was not possible to have several specialization of
9124 this traits, making it useless.
9125 * data/lalr1.cc (yy:traits): Remove.
9126 Inline its definitions in the parser class.
9127
9128 2005-09-19 Akim Demaille <akim@epita.fr>
9129
9130 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9131 least Mac OSX with a /usr/local install of gettext.
9132
9133 2005-09-19 Akim Demaille <akim@epita.fr>
9134
9135 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9136 and yytoken for similarity with the other skeletons.
9137
9138 2005-09-19 Akim Demaille <akim@epita.fr>
9139
9140 * NEWS, configure.ac: update version number to 2.1a.
9141
9142 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9143
9144 * NEWS: Version 2.1.
9145
9146 * NEWS: Remove notice of yytname change, since it was never in an
9147 official release.
9148 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9149 diagnostic.
9150 * src/output.c (prepare): Likewise.
9151 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9152 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9153 is not defined. This is an awful hack, but it's enough for now.
9154 All callers changed.
9155 * tests/glr-regression-at (make_value): Args are const pointers now,
9156 to avoid GCC warning.
9157 (Duplicated user destructor for lookahead): New test. Currently
9158 skipped. It fails on my host but I'm not sure it'll always fail.
9159
9160 2005-09-16 Akim Demaille <akim@epita.fr>
9161
9162 * src/symtab.h (struct symbol): Declare the printer and destructor
9163 as const, to avoid accidental calls to free.
9164 (symbol_destructor_set, symbol_printer_set): Adjust.
9165 * src/symtab.c: Adjust.
9166
9167 2005-09-16 Akim Demaille <akim@epita.fr>
9168
9169 * data/c.m4 (b4_token_enums): New.
9170 (b4_token_defines): Rename as...
9171 (b4_token_enums_defines): this.
9172 (b4_token_defines): New, output only the #defines.
9173 * data/yacc.c, data/glr.c: Adjust.
9174 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9175 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9176 as default values.
9177
9178 2005-09-16 Akim Demaille <akim@epita.fr>
9179
9180 * data/lalr1.cc (yylex_): Remove, inline its code.
9181 (yyreport_syntax_error_): Remove, replaced by...
9182 (yysyntax_error_): this which returns a string and leaves to the
9183 caller the call to the users' error function.
9184 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9185 Move from members of the parser object...
9186 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9187 to local variables of the parse function.
9188
9189 2005-09-16 Akim Demaille <akim@epita.fr>
9190
9191 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9192 since it's in Bison's name space.
9193
9194 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9195
9196 * data/glr.c (yyresolveValue): Add default case to pacify
9197 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9198
9199 * NEWS: Document when yyparse started to return 2.
9200 * doc/bison.texinfo (Parser Function): Document when yyparse
9201 returns 2.
9202
9203 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9204 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9205 changed.
9206 (class position): file_name -> filename (reverting). All uses changed.
9207
9208 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9209
9210 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9211 do anything if $@ exists. This reverts part of the 2005-07-07
9212 patch.
9213
9214 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9215
9216 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9217 contains obsolete information and isn't worth distributing as a
9218 separate file anyway.
9219 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9220 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9221 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9222 (yyparse): Abort if user code uses longjmp to throw an unexpected
9223 value.
9224
9225 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9226
9227 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9228 Suggested by twlevo@xs4all.nl.
9229
9230 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9231 This avoids a diagnostic from gcc -Wswitch-enum.
9232 Problem reported by twlevo@xs4all.nl.
9233
9234 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9235 standards. Use "file name" or "file" or "name", depending on
9236 the context.
9237 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9238 not to hack/foo.tab.c.
9239 (Calc++ Top Level): 2nd arg of main is not const.
9240 * data/glr.c: b4_filename -> b4_file_name.
9241 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9242 All uses changed.
9243 (class position): filename -> file_name. All uses changed.
9244 * data/yacc.c: b4_filename -> b4_file_name.
9245 * lib/bitset.h: filename -> file_name in local vars.
9246 * lib/bitset_stats.c: Likewise.
9247 * src/files.c: Likewise.
9248 * src/scan-skel.l ("@output ".*\n): Likewise.
9249 * src/files.c (file_name_split): Renamed from filename_split.
9250 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9251
9252 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9253
9254 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9255 to accommodate latest gnulib.
9256
9257 * tests/glr-regression.at (Duplicate representation of merged trees):
9258 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9259
9260 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9261 needed.
9262
9263 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9264
9265 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9266 All uses changed. Invoke user destructor after an error during a
9267 split parse (trivial change from Joel E. Denny).
9268
9269 * tests/glr-regression.at
9270 (User destructor after an error during a split parse): New test case.
9271 Problem reported by Joel E. Denny in:
9272 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9273
9274 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * README-cvs: Give URLs for recommended tools.
9277 Mention Gzip version problem, and bootstrapping issues.
9278 Remove troubleshooting section, as it's somewhat obsolete.
9279
9280 * bootstrap (no_cache): New var, to accommodate different wget
9281 variants. Use it instead of '-C off'. Problem reported by
9282 twlevo@xs4all.nl.
9283
9284 * data/glr.c (yydestroyStackItem): New function.
9285 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9286 debugging information. Problem reported by Joel E. Denny.
9287
9288 2005-08-25 Akim Demaille <akim@epita.fr>
9289
9290 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9291
9292 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9293
9294 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9295 Don't invoke destructor on unresolved entries.
9296 * tests/glr-regression.at
9297 (User destructor for unresolved GLR semantic value): New test case.
9298 Problem reported by Joel E. Denny in:
9299 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9300
9301 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9302
9303 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9304 Add strnlen.c.
9305 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9306 lib-prefix.m4, po.m4.
9307
9308 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9309 in yydestruct diagnostic, since it might not be an error.
9310 Problem reported by Joel Denny near end of
9311 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9312 * data/lalr1.cc (yyerturn): Likewise.
9313 * data/yacc.c (yyreturn): Likewise.
9314 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9315
9316 * src/files.c: Remove obsolete FIXME comment.
9317
9318 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9319 with the other templates, and to fix bogus run-on messages such
9320 as the one reported at the end of
9321 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9322 All callers changed to avoid the newline.
9323 (yyprocessOneStack): Output two lines rather than one, to accommodate
9324 the above change. This changes the debug output format slightly.
9325
9326 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9327 reported by Joel E. Denny in
9328 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9329 (trivial change).
9330 * tests/glr-regression.at (Duplicate representation of merged trees):
9331 New test, from Joel E. Denny in:
9332 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9333 * THANKS: Add Joel E. Denny.
9334
9335 * configure.ac (AC_INIT): Bump to 2.0c.
9336
9337 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9338
9339 * NEWS: Version 2.0b.
9340
9341 * Makefile.am (SUBDIRS): Put examples before tests, so that
9342 "make check" doesn't finish with "All 1 tests passed".
9343
9344 * tests/regression.at (Token definitions): Don't rely on
9345 AT_PARSER_CHECK for data that contains backslashes. It currently
9346 uses 'echo', and 'echo' isn't portable if its argument contains
9347 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9348 that the byte '\0xff' is not printable in the C locale; it is,
9349 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9350 not printable, so use '\0x81' to test.
9351
9352 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9353 version of GCC, since the macro is used with non-GCC compilers.
9354
9355 Fix core dump reported by Pablo De Napoli in
9356 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9357 * tests/regression.at (Invalid inputs with {}): New test.
9358 * src/parse-gram.y (token_name): Translate type before using
9359 it as an index.
9360
9361 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9362 the user's name space. All uses changed to __attribute__
9363 ((__unused__)).
9364 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9365 Add __attribute__ ((__noreturn__)).
9366
9367 * etc/clcommit: Remove. We weren't using it, and it failed
9368 "make maintainer-distcheck".
9369 * Makefile.maint: Merge from coreutils.
9370 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9371 (syntax-check-rules): Change list of rules as described below.
9372 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9373 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9374 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9375 (sc_trailing_space): New rules.
9376 (sc_xalloc_h_in_src): Remove.
9377 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9378 (sc_space_tab, sc_error_exit_success, sc_changelog):
9379 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9380 (makefile-check, po-check, author_mark_check):
9381 (makefile_path_separator_check, copyright-check):
9382 Use grep -n, to make it easier to find violations.
9383 Use CVS_LIST and CVS_LIST_EXCEPT.
9384 (header_regexp, h_re): Remove.
9385 (dd_c): New macro.
9386 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9387 (my-distcheck): Use more-modern GCC flags.
9388 (signatures, %.asc): Remove.
9389 (rel-files, announcement): Remove signatures.
9390 Restore old updating code, even though we don't use it, so
9391 that we're the same as coreutils.
9392 (alpha, beta, major): Depend on news-date-check.
9393 Make the upload commands.
9394
9395 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9396 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9397 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9398 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9399 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9400 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9401 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9402 * tests/sets.at: Likewise.
9403
9404 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9405 we comment out the Autoconf version number.
9406 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9407 it's error-prone and "make maintainer-distcheck" rejects it.
9408
9409 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9410 Indent calls to "error" to pacify "make maintainer-distcheck",
9411 when the calls are not intended to be translated.
9412 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9413
9414 * src/Makefile.am (DEFS): Use +=, to pacify
9415 "make maintainer-distcheck".
9416 (bison_SOURCES): Add scan-skel.h.
9417 (sc_tight_scope): New rule, from coreutils.
9418
9419 * src/files.c (src_extension, header_extension):
9420 Now static, not extern.
9421 * src/getargs.c (short_options): Likewise.
9422 * src/muscle_tab.c (muscle_table): Likewise.
9423 * src/parse-gram.y (current_class, current_type, current_prec):
9424 Likewise.
9425 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9426 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9427 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9428 void, to avoid warning when NLS is disabled.
9429 * src/output.c: Include scan-skel.h.
9430 (scan_skel): Remove decl, since scan-skel.h does this.
9431 (output_skeleton):
9432 Indent calls to "error" to pacify "make maintainer-distcheck".
9433 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9434 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9435 "make maintainer-distcheck".
9436 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9437 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9438 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9439 (skel_lex_destroy, scan_skel): Move these decls to...
9440 * src/scan-skel.h: New file.
9441 * src/uniqstr.c (uniqstr_assert):
9442 Indent calls to "error" to pacify "make maintainer-distcheck".
9443
9444 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9445 not @VAR@.
9446
9447 * tests/torture.at: Revamp to avoid misuse of atoi that
9448 "make maintainer-distcheck" complained about.
9449
9450 * examples/extexi (message): Don't print a message more than once,
9451 and omit line-number decoration that makes Emacs compile think
9452 that informative messages are worth worrying about.
9453
9454 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9455
9456 * configure.ac: Update version number.
9457
9458 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9459 accidentally.
9460 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9461 autogenerated by the maintainer.
9462 * examples/calc++/.cvsignore: Add *.yy.
9463
9464 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9465 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9466 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9467
9468 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9469
9470 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9471 from maintainer-distcheck about casting the argument of 'free'.
9472
9473 * NEWS: Mention recent yytname changes.
9474 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9475
9476 * bootstrap: For translations that have not yet been upgraded to
9477 the new runtime-po domain, prime the pump by extracting the
9478 relevant strings from the obsolete translations. This code can be
9479 removed once the bison-runtime domain has been translated by each
9480 team.
9481
9482 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9483 now that token names are already quoted.
9484
9485 Fix problem reported by Anthony Heading.
9486 * data/glr.c (YYTOKEN_TABLE): New macro.
9487 (yytname): Define if YYTOKEN_TABLE.
9488 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9489 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9490 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9491 * src/output.c (prepare_symbols): Output token_table_flag.
9492
9493 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9494
9495 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9496 again if the first call fails.
9497
9498 * data/glr.c (yytnamerr): New function.
9499 (yyreportSyntaxError): Use it to dequote most string literals.
9500 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9501 with other skeletons. All uses changed.
9502 (yytnameerr_): New function.
9503 (yyreport_syntax_error): Use it to dequote most string literals.
9504 * data/yacc.c (yytnamerr): New function.
9505 (yyerrlab): Use it to decode most string literals.
9506 * doc/bison.texinfo (Decl Summary, Calling Convention):
9507 Clarify quoting convention of yytname.
9508 * src/output.c (prepare_symbols): Quote all names. This undoes
9509 the 2005-04-17 change, which is now accomplished (mostly) via
9510 changes in the parsers as described above.
9511 * tests/regression.at (Token definitions, Web2c Actions):
9512 Undo most 2005-04-17 change here, too.
9513
9514 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9515
9516 Fix more problems reported by twlevo@xs4all.nl.
9517 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9518 remove trailing spaces. This loses the exit status of ./types,
9519 and isn't needed since ./types shouldn't be emitting trailing
9520 spaces.
9521 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9522 as the stack isn't valid in that case.
9523
9524 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9525 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9526 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9527 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9528 is used.
9529 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9530 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9531 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9532 Likewise.
9533
9534 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9535 overly-picky compilers that reject 'char *foo = "bar";'.
9536
9537 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9538 to FILE * parameter, not to stderr. This fixes a typo introduced
9539 in the 2005-07-12 change.
9540
9541 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9542 warnings from GCC 4.
9543
9544 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9545 (yyglrShiftDefer, yysplitStack):
9546 Remove unused parameters b4_pure_formals. All uses changed.
9547 (yyglrShift): Remove unused parameters b4_user_formals.
9548 All uses changed.
9549 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9550
9551 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9552
9553 Destructor cleanups and regularization among the three skeletons.
9554 * NEWS: Document the behavior changes.
9555 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9556 stack before failing, as the cleanup code will do it for us now.
9557 * data/lalr1.cc (yyerrlab): Likewise.
9558 * data/glr.c (yyparse): Pop everything off the stack before
9559 freeing it, so that destructors get called properly.
9560 * data/lalr1.cc (yyreturn): Likewise.
9561 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9562 This is more consistent.
9563 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9564 why destructors might be called. 1.875 -> 2.1.
9565 (Destructor Decl, Decl Summary, Table of Symbols):
9566 Some English-language cleanups for %destructor.
9567 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9568 Add output line for destructor of start symbol.
9569 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9570 because of that same extra output line.
9571
9572 * NEWS: Document minor wording changes in diagnostics of
9573 Bison-generated parsers.
9574 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9575 Remove unused formals. All uses changed.
9576 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9577 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9578 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9579 Rename yyoverflowab to yyexhaustedlab.
9580 When memory exhaustion occurs during syntax-error reporting,
9581 report it separately rather than in a single diagnostic; this
9582 eases translation.
9583 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9584 (Memory Exhausted): Renamed from Parser Stack Overflow.
9585 Revamp wording slightly to prefer "memory exhaustion".
9586 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9587
9588 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9589
9590 Add i18n support to the GLR skeleton. Partially fix the C++
9591 skeleton; a C++ expert needs to finish this. Remove debugging
9592 msgids; there's little point to having them translated, since they
9593 can be understood only by someone who can read the
9594 (English-language) source code.
9595
9596 Generate runtime-po/bison-runtime.pot automatically, so that we
9597 don't have to worry about garbage getting in that file. We'll
9598 make sure after the next official release that old msgids don't
9599 get lost. See
9600 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9601
9602 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9603 Now auto-generated.
9604 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9605 Fix typos in explanations of the runtime file.
9606 * bootstrap: Change gettext keyword from YYI18N to YY_.
9607 Use standard Makefile.in.in in runtime-po, since we'll arrange
9608 for backward-compatible bison-runtime.po files in a different way.
9609 * data/glr.c (YY_): New macro, from yacc.c.
9610 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9611 Translate messages intended for users.
9612 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9613 the wording in the other skeletons. We don't know that the memory
9614 is virtual.
9615 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9616 Use same method that yacc.c uses.
9617 Don't translate debugging messages.
9618 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9619 it doesn't work (yet), and requires C++ expertise to fix.
9620 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9621 Move defn to a more logical place, to be consistent with other
9622 skeletons.
9623 Don't translate debugging messages.
9624 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9625 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9626 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9627 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9628
9629 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9630 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9631 void, not int.
9632 * tests/glr-regression.at (Badly Collapsed GLR States):
9633 Likewise.
9634 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9635 yylex should return 0 at EOF rather than aborting.
9636
9637 Improve tests for stack overflow in GLR parser.
9638 Problem reported by twlevo@xs4all.nl.
9639 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9640 All uses removed.
9641 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9642 can handle the problem.
9643 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9644 (yyparse): New local variable yyresult to record the result.
9645 Use result of setjmp to set it, rather than storing itinto
9646 struct.
9647 (yyDone): Remove label.
9648 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9649 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9650 if YYABORT is used).
9651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9652 yyparse status; put status > 1 into diagnostic.
9653 Check that status==2 works.
9654 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9655 Use exit status 3 for failure to open (which shouldn't happen).
9656
9657 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9658
9659 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9660 1 on syntax error; just let yyparse do its thing.
9661 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9662 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9663 (Exploding the Stack Size with Alloca):
9664 (Exploding the Stack Size with Malloc):
9665 Expect exit status 2, not 1, since the parser is supposed to blow
9666 its stack. Problem reported by twlevo@xs4all.nl.
9667
9668 * data/glr.c (yyparse): Don't assume that the initial calls
9669 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9670 Print a stack-overflow message and fail instead.
9671 Initialize the line-number information before creating the stack,
9672 so that the stack-overflow message can report line zero safely.
9673
9674 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9675
9676 Fix problems reported by twlevo@xs4all.nl.
9677 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9678 (yyuserMerge): Provide a default case if b4_mergers is empty.
9679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9680 * tests/glr-regression.at
9681 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9682 Add casts to pacify C++ compilers.
9683 * tests/glr-regression.at (Improper merging of GLR delayed action
9684 sets): Declare yylex before using it.
9685 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9686 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9687 test for valgrind; valgrind is independent of g++.
9688 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9689 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9690 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9691 Use a destructor, so that we can expand the stack. Change
9692 YYSTYPE to char * so that we can free it. Cast result of malloc.
9693
9694 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9695
9696 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9697 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9698
9699 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9700
9701 * PACKAGING: New file, suggested by Bruno Haible and taken from
9702 similar wording in gettext's PACKAGING file.
9703 * NEWS: Mention PACKAGING.
9704 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9705
9706 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9707
9708 * NEWS: Document recent i18n improvements.
9709 * bootstrap: Get runtime translations into runtime-po.
9710 Create runtime-po files automatically, if possible.
9711 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9712 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9713 does not infringe on the user's name space.
9714 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9715 * doc/bison.texinfo (Internationalization): Revamp the English
9716 and Texinfo syntax a bit, to try to make it clearer.
9717 (Bison Options, Option Cross Key): Mention --print-localedir.
9718 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9719 YYENABLE_NLS. Quote a bit more.
9720 * runtime-po/.cvsignore: New file.
9721 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9722 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9723 * runtime-po/quot.sed: Likewise.
9724 * runtime-po/boldquot.sed: Likewise.
9725 * runtime-po/en@quot.header: Likewise.
9726 * runtime-po/en@boldquot.header: Likewise.
9727 * runtime-po/insert-header.sin: Likewise.
9728 * runtime-po/remove-potcdate.sin: Likewise.
9729 * runtime-po/Makevars: Likewise.
9730 * runtime-po/LINGUAS: Likewise.
9731 * runtime-po/de.po: Likewise; we will rely on the translation project
9732 to maintain this, so "bootstrap" should get it.
9733 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9734 its value.
9735 * src/main.c (main): Bind the bison-runtime domain, too.
9736
9737 2005-07-12 Bruno Haible <bruno@clisp.org>
9738
9739 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9740 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9741 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9742 * runtime-po: New directory.
9743 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9744 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9745 * runtime-po/Rules-quot: New file, copied from po/.
9746 * runtime-po/quot.sed: Likewise.
9747 * runtime-po/boldquot.sed: Likewise.
9748 * runtime-po/en@quot.header: Likewise.
9749 * runtime-po/en@boldquot.header: Likewise.
9750 * runtime-po/insert-header.sin: Likewise.
9751 * runtime-po/remove-potcdate.sin: Likewise.
9752 * runtime-po/Makevars: New file.
9753 * runtime-po/POTFILES.in: New file.
9754 * runtime-po/LINGUAS: New file.
9755 * runtime-po/bison-runtime.pot: New file.
9756 * runtime-po/de.po: New file.
9757 * m4/bison.m4: New file.
9758 * Makefile.am (SUBDIRS): Add runtime-po.
9759 (aclocaldir, aclocal_DATA): New variables.
9760 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9761 Define aclocaldir.
9762 * src/getargs.c (usage): Document --print-localedir option.
9763 (PRINT_LOCALEDIR_OPTION): New enum item.
9764 (long_options): Add --print-localedir option.
9765 (getargs): Handle --print-localedir option.
9766 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9767 (Internationalization): New section.
9768
9769 2005-07-12 Akim Demaille <akim@epita.fr>
9770
9771 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9772 for consistency with the rest of the code.
9773 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9774 Add separators.
9775
9776 2005-07-12 Akim Demaille <akim@epita.fr>
9777
9778 * src/parse-gram.y: Use %printer instead of YYPRINT.
9779
9780 2005-07-12 Akim Demaille <akim@epita.fr>
9781
9782 * src/symtab.h, src/symtab.c (symbol_print): New.
9783 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9784 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9785
9786 2005-07-12 Akim Demaille <akim@epita.fr>
9787
9788 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9789 b4_at_dollar and b4_dollar_dollar.
9790
9791 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9792
9793 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9794 and Pennello's paper.
9795
9796 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9797
9798 * data/yacc.c (yyparse): Undo previous patch. Instead,
9799 set yylsp[0] and yyvsp[0] only if the initial action
9800 sets yylloc and yylval, respectively.
9801
9802 * data/yacc.c (yyparse): In the initial action, set
9803 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9804 This avoids the use of undefined variables if the initial
9805 action does not set yylloc and/or yylval.
9806
9807 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9808
9809 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9810 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9811 Remove from CVS. These files are automatically generated.
9812 * examples/extexi: Clarify that this file is now part of Bison,
9813 not GNU M4, and that it works with any POSIX-compatible Awk.
9814 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9815 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9816 so that we also get calc++-parser.yy. Geneate it.
9817 Use $(AWK), not gawk, since any conforming Awk will do.
9818 Put comment before action, since older 'make' can't handle comment
9819 in action.
9820 $(BUILT_SOURCES): List all built sources, not just some of them.
9821 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9822 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9823 $($(calc_sources_generated)): Remove unnecessary test for existence
9824 of target. (This had a shell syntax error anyway; a stray "x".)
9825 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9826 calc++-parser.yy.
9827 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9828
9829 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9830 implied by the other modules.
9831
9832 2005-07-06 Akim Demaille <akim@epita.fr>
9833
9834 Bind examples/calc++ to the package.
9835 * examples/calc++/Makefile: Remove, replaced by...
9836 * examples/calc++/Makefile.am: ... this new file.
9837 * examples/calc++/test: Remove input.
9838 * examples/calc++/compile: Remove.
9839 * examples/Makefile.am: New.
9840 * configure.ac, Makefile.am: Adjust.
9841 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9842
9843 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9844
9845 * data/glr.c (yyFail): Drastically simplify; since the format argument
9846 never had any % directives, we can simply pass it to yyerror.
9847 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9848 be modified later, as that is the usual style in glr.c.
9849 Problems reported by Paul Hilfinger.
9850
9851 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9852 and size overflow errors.
9853 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9854 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9855 (YYSIZEMAX): New macro.
9856 (yystpcpy): New function, taken from yacc.c.
9857 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9858 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9859 so that we don't have to maintain their signatures.
9860 (yyFail): Check for buffer overflow, by using vsnprintf rather
9861 than vsprintf. Allocate a bigger buffer if possible.
9862 Report an error if buffer allocation fails.
9863 (yyStackOverflow): New function.
9864 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9865 the initialization was successful. It might fail if storage was
9866 exhausted.
9867 (yyexpandGLRStack): Add more checks for storage allocation failure.
9868 Use yyStackOverflow to report failures.
9869 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9870 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9871 Don't assume stack number fits in int.
9872 (yysplitStack): Check for storage allocation failure.
9873 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9874 can print diagnostics on storage allocation failure. All callers
9875 changed.
9876 (yyresolveValue): Use yybool for boolean.
9877 (yyreportSyntaxError): Check for size-calculation overflow.
9878 This code is taken from yacc.c.
9879 (yyparse): Check for storage allocation errors when allocating
9880 the initial stack.
9881
9882 2005-07-05 Akim Demaille <akim@epita.fr>
9883
9884 Extract calc++ from the documentation.
9885 * doc/bison.texinfo (Calc++): Add the extraction marks.
9886 * examples/extexi: New, from the aborted GNU Programming 2E.
9887 Separate the different paragraph of a file with empty lines.
9888 * examples/Makefile: Use it to extract the whole calc++ example.
9889
9890 2005-06-24 Akim Demaille <akim@epita.fr>
9891
9892 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9893 class typedefs.
9894
9895 2005-06-22 Akim Demaille <akim@epita.fr>
9896
9897 * doc/bison.texinfo (C++ Language Interface): First stab.
9898 (C++ Parsers): Remove.
9899
9900 2005-06-22 Akim Demaille <akim@epita.fr>
9901
9902 * data/lalr1.cc (yylex_): Honor %lex-param.
9903
9904 2005-06-22 Akim Demaille <akim@epita.fr>
9905
9906 Start a set of simple examples.
9907 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9908 * examples/calc++/calc++-driver.hh,
9909 * examples/calc++/calc++-parser.yy,
9910 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9911 * examples/calc++/compile, examples/calc++/test: New.
9912
9913 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9914
9915 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9916 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9917 which stems from the 2005-05-27 patch.
9918
9919 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9920
9921 * data/glr.c: Modify treatment of unused parameters to permit use
9922 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9923
9924 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9925
9926 Fix infringement on user name space reported by Janos Zoltan Szabo.
9927 * data/yacc.c (yyparse): strlen -> yystrlen.
9928
9929 2005-05-30 Akim Demaille <akim@epita.fr>
9930
9931 * data/lalr1.cc (_): New.
9932 Translate the various messages.
9933
9934 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9935
9936 Fix infringement on user name space reported by Bruno Haible.
9937 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9938 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9939 the user's name space.
9940 (alloca): Include <stdlib.h> to get it, if it's not built in.
9941 (YYMALLOC, YYFREE): Define only if needed.
9942 (malloc, free): Declare, but only if needed, as this infringes on
9943 the user name space.
9944
9945 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9946
9947 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9948 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9949 with %d format.
9950 * lib/ebitset.c (min, max): Undef before defining.
9951 * lib/vbitset.c (min, max): Likewise.
9952 * lib/subpipe.c (create_subpipe): Save local variables in case
9953 vfork clobbers them.
9954
9955 2005-05-24 Bruno Haible <bruno@clisp.org>
9956
9957 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9958 error message syntax used by gcc-4.0.
9959
9960 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9961
9962 * README: Mention m4 1.4.3. Remove obsolete advice about
9963 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9964
9965 * bootstrap: Remove workaround for problem I encountered with
9966 gettext 0.14.1; it seems to be fixed now.
9967
9968 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9969
9970 * NEWS: Version 2.0a.
9971
9972 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9973 the previous change.
9974
9975 Various maintainer cleanups.
9976 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9977 conftest*, for benefit of CVS commands run at the same time as
9978 "configure". Add build-aux, since "bootstrap" now creates it and
9979 its subfiles.
9980 * Makefile.cfg (move_if_change): Remove.
9981 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9982 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9983 (po_repo, do-po-update, po-update, wget_files, get-targets):
9984 (config.guess-url_prefix, config.sub-url_prefix):
9985 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9986 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9987 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9988 Remove.
9989 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9990 this is now the recommended name.
9991 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9992 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9993 ylwrap. These files now go into build-aux.
9994 * config/move-if-change: Remove.
9995 * config/prev-version.txt: Bump from 1.75 to 2.0.
9996
9997 * bootstrap: Add stdio-safer, unistd-safer modules.
9998 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9999 we don't need it).
10000 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10001 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10002 * lib/subpipe.c: Include "unistd-safer.h".
10003 (create_subpipe): Make sure all the newly-created
10004 file descriptors are > 2, so that diagnostics don't
10005 get sent down them (which might cause Bison to hang, in theory).
10006 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10007 * src/files.c (xfopen): Use fopen_safer, not fopen.
10008
10009 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10010 yesterday's yacc.c fix.
10011
10012 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10013
10014 * data/glr.c, data/lalr1.cc: Update copyright date.
10015
10016 Fix a destructor bug reported by Wolfgang Spraul in
10017 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10018 * data/yacc.c (yyabortlab): Don't call destructor, and
10019 don't set yychar to EMPTY.
10020 (yyoverflowlab): Don't call destructor.
10021 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10022 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10023 since we no longer output the message "discarding lookahead token
10024 end of input ()".
10025
10026 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10027
10028 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10029 fix a small glitch in debugging output.
10030 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10031 after YY_SYMBOL_PRINT where needed.
10032
10033 (struct yyGLRState): Add some comments.
10034 (struct yySemanticOption): Add some comments.
10035 (union yyGLRStackItem): Add comment.
10036
10037 (yymergeOptionSets): Correct this to properly perform the union,
10038 avoiding infinite reported by Michael Rosien.
10039 Update comment.
10040
10041 * tests/glr-regression.at: Add test for GLR merging error reported
10042 by M. Rosien.
10043
10044 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10047 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10048 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10049 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10050 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10051 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10052 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10053 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10054 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10055 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10056 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10057 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10058 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10059 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10060 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10061 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10062 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10063 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10064 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10065 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10066 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10067 src/output.h, src/parse-gram.c, src/parse-gram.h,
10068 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10069 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10070 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10071 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10072 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10073 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10074 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10075 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10076 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10077 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10078 tests/reduce.at, tests/regression.at, tests/sets.at,
10079 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10080 Update FSF postal mail address.
10081
10082 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10083
10084 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10085 Problem reported by Ralf Menzel.
10086
10087 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10088
10089 * tests/actions.at: Test that stack overflow invokes destructors.
10090 From Marcus Holland-Moritz.
10091 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10092 from here....
10093 (yyreturn): to here. That way, destructors are called properly
10094 even if the stack overflows, or the user calls YYACCEPT or
10095 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10096 (yyoverflowlab): Destroy the lookahead.
10097
10098 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10099
10100 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10101
10102 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10103
10104 * NEWS: Bison-generated C parsers no longer quote literal strings
10105 associated with tokens.
10106 * src/output.c (prepare_symbols): Don't escape strings,
10107 since users don't want to see C escapes.
10108 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10109 in diagnostics.
10110 * tests/input.at (Torturing the Scanner): Likewise.
10111 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10112
10113 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10114
10115 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10116 the data size is known to be too small and we can't increase it.
10117 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10118
10119 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10120
10121 * src/parse-gram.y: Include quotearg.h.
10122 (string_as_id): Quote $1 before using it as a key, since the
10123 lexer no longer quotes it for us.
10124 (string_content): Don't strip quotes, since lexer no longer
10125 quotes it for us.
10126 * src/scan-gram.l: Include quotearg.h.
10127 ("\""): Omit quote.
10128 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10129 a key, since the rest of the lexer doesn't quote it.
10130 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10131 * tests/regression.at (Token definitions): Check for backslashes
10132 in token strings.
10133
10134 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10135 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10136 (yyparse): Revamp code to generate long syntax error message, to
10137 make it easier to translate, and to avoid problems with arithmetic
10138 overflow. Change "virtual memory" to "memory" in diagnostic, since
10139 we don't know whether the memory is virtual.
10140
10141 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10142
10143 * NEWS: Bison-generated C parsers now use the _ macro to
10144 translate strings.
10145 * data/yacc.c (_) [!defined _]: New macro.
10146 All English strings wrapped inside this macro.
10147 * doc/bison.texinfo (Bison Parser): Document _.
10148 * po/POTFILES.in: Include src/parse-gram.c, since it now
10149 includes translateable strings that parse-gram.y doesn't.
10150
10151 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10152
10153 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10154 reverting the 2004-10-11 change to this function.
10155 (symbol_check_alias_consistency): Don't call symbol_type_set
10156 if the type name is already correct.
10157 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10158
10159 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10160
10161 * tests/regression.at (Token definitions): Don't use a token named
10162 c, as that generates a "#define c ..." that runs afoul of buggy
10163 stdlib.h that uses the identifier c as a member of struct
10164 drand48_data. Problem reported by Horst Wente.
10165
10166 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10167
10168 * bootstrap: Change translation URL from
10169 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10170 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10171 redirection glitches. Problem reported by twlevo@xs4all.nl.
10172
10173 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10174
10175 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10176 after operands; POSIX says this isn't portable for the c99 command.
10177
10178 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10179
10180 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10181 immediately if a data overrun has occurred; this may help us track
10182 down what may be a spurious failure on MacOS.
10183
10184 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10185
10186 Respond to problems reported by twlevo@xs4all.nl.
10187
10188 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10189
10190 * src/vcg.h: Comment fix.
10191 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10192 (G_CMAX): Change to -1 instead of INT_MAX.
10193
10194 * data/yacc.c (yyparse): Omit spaces before #line.
10195
10196 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10197
10198 * src/tables.c (state_number_to_vector_number): Put it inside an
10199 "#if 0", since it's not currently used. Problem reported by
10200 Roland McGrath.
10201
10202 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10203
10204 * src/output.c (escaped_output): Renamed from
10205 escaped_file_name_output, since we now use it for symbol tags as
10206 well. All uses changed.
10207 (symbol_destructors_output, symbol_printers_output):
10208 Escape symbol tags too.
10209 Problem reported by Matyas Forstner in
10210 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10211
10212 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10213 not needed.
10214 * src/output.c (user_actions_output, token_definitions_output,
10215 symbol_destructors_output, symbol_printers_output): Likewise.
10216 * src/reader.c (prologue_augment): Likewise.
10217 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10218
10219 * src/vcg.c (output_edge): Don't quote linestyle arg.
10220 Problem reported by twlevo@xs4all.nl.
10221
10222 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10223
10224 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10225 example, reported by Derek M Jones. Also, make the example even
10226 more outrageous, to better illustrate how bad the problem is.
10227
10228 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10229
10230 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10231 putsym. Typo reported by Sebastian Piping.
10232
10233 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10234
10235 * doc/bison.texinfo (Language and Grammar): some -> same
10236 (Epilogue): int he -> in the
10237 Typos reported by Sebastian Piping via Justin Pence.
10238
10239 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10240
10241 * tests/glr-regression.at (Improper handling of embedded actions
10242 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10243 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10244 with dollar signs in test names.
10245 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10246 for a similar reason.
10247
10248 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10249
10250 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10251 wants to redefine G_VIEW.
10252
10253 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10254
10255 * src/vcg.c (get_view_str): Remove case for normal_view.
10256 Problem reported by twlevo@xs4all.nl.
10257
10258 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10261 Problem reported by twlevo@xs4all.nl.
10262
10263 * doc/bison.texinfo: Change @dircategory from "GNU programming
10264 tools" to "Software development". Requested by Richard Stallman
10265 via Karl Berry.
10266
10267 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10268
10269 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10270 Problem reported by twlevo@xs4all.nl.
10271
10272 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10273
10274 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10275 keyword; it's not needed with modern compilers, and it doesn't
10276 affect correctness with older compilers. Suggested by
10277 twlevo@xs4all.nl.
10278
10279 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10280
10281 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10282 gcc -Wswitch-default.
10283 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10284 * data/yacc.c (yyparse): Likewise.
10285
10286 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10287
10288 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10289 already. Let config.h define any nonstandard values.
10290
10291 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10292
10293 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10294 for the benefit of slower hosts. Problem reported by
10295 Nelson H. F. Beebe.
10296
10297 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10298
10299 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10300 being defined and not used.
10301 * data/lalr1.cc (yyparse): Likewise.
10302 Use "if (false)" rather than "if (0)".
10303
10304 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10305
10306 * TODO: Mention that we should allow NUL bytes in tokens.
10307
10308 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10309
10310 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10311 Problem reported by Hans Aberg.
10312
10313 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10314
10315 * src/getargs.c (version): Happy new year; update overall
10316 program copyright date from 2004 to 2005.
10317
10318 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10319 Problem reported by Hans Aberg.
10320 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10321 (Output file names.): Add a test for the case when standard output
10322 is closed.
10323
10324 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10325
10326 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10327 to fix an oversight in the Bison 2.0 manual.
10328
10329 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10330
10331 * NEWS: Version 2.0. Reformat the existing news items since
10332 1.875, so that related items are grouped together.
10333 * configure.ac (AC_INIT): Bump version to 2.0.
10334 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10335
10336 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10337 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10338 otherwise, we're not testing alloca. Unfortunately there's no
10339 simple way to consult HAVE_ALLOCA here.
10340
10341 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10342 for yymsg, too.
10343
10344 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10345 hand. This avoids a warning about comparing int to size_t when
10346 GCC warnings are enabled.
10347
10348 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10349
10350 * NEWS: Bison-generated parsers no longer default to using the
10351 alloca function (when available) to extend the parser stack, due
10352 to widespread problems in unchecked stack-overflow detection.
10353 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10354 responsibility to set it to a positive value. This lets the user
10355 specify a value that is not a preprocessor constant.
10356 * data/yacc.c (YYMAXDEPTH): Likewise.
10357 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10358 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10359 to be a compile-time constant. However, explain the constraints on it.
10360 Also, explain the constraints on YYINITDEPTH.
10361 (Table of Symbols): Explain that alloca is no longer the default.
10362 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10363 to 1.
10364
10365 * doc/bison.texinfo (Location Default Action): Mention that n must
10366 be zero when k is zero. Suggested by Frank Heckenbach.
10367
10368 2004-12-22 Akim Demaille <akim@epita.fr>
10369
10370 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10371 (parser::state_type, parser::semantic_type, parser::location_type):
10372 Private, not public.
10373 (parser::parse): Return ints, not bool.
10374 Returning a bool introduces a problem: 0 corresponds to false, and
10375 it seems weird to return false on success. Returning true changes
10376 the conventions for yyparse.
10377 Alternatively we could return void and send an exception.
10378 There is no clear consensus (yet?).
10379 (state_stack, semantic_stack, location_stack): Rename as...
10380 (state_stack_type, semantic_stack_type, location_stack_type): these.
10381 Private, not public.
10382 * tests/c++.at: New.
10383 * tests/testsuite.at, tests/Makefile.am: Adjust.
10384
10385 2004-12-21 Akim Demaille <akim@epita.fr>
10386
10387 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10388
10389 2004-12-21 Akim Demaille <akim@epita.fr>
10390
10391 Don't impose std::string for filenames.
10392
10393 * data/lalr1.cc (b4_filename_type): New.
10394 (position::filename): Use it.
10395 (parser.hh): Move the inclusion of stack.hh and location.hh below
10396 the user code, so that needed headers for the filename type can be
10397 included first.
10398 Forward declare them before the user code.
10399 * tests/Makefile.am (check-local, installcheck-local): Pass
10400 TESTSUITEFLAGS to the TESTSUITE.
10401
10402 2004-12-20 Akim Demaille <akim@epita.fr>
10403
10404 Use more STL like names: my_class instead of MyClass.
10405
10406 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10407 (SemanticStack, SemanticType, StateStack, StateType)
10408 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10409 (Parser::value): Rename as...
10410 (location_stack, location_type, rhs_number_type, semantic_stack)
10411 (semantic_type, state_stack, state_type, token_number_type, stack)
10412 (slice, traits, parser::yylloc, parser::yylval): these.
10413
10414 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10415
10416 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10417
10418 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10419 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10420
10421 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10422
10423 Remove uses of 'short int' and 'unsigned short int'. This raises
10424 some arbitrary limits. It uses more memory but nowadays that's
10425 not much of an issue.
10426
10427 This change does not affect the generated parsers; that's a different
10428 task, as some users will want to conserve memory there.
10429
10430 Ideally we should use size_t to represent all object counts, and
10431 something like ptrdiff_t to represent signed differences of object
10432 counts; but that will require more code-cleanup than I have the
10433 time to do right now.
10434
10435 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10436 Use size_t, not int or short int, to count objects.
10437 * src/closure.c (nritemset, closure): Likewise.
10438 * src/closure.h (nritemset, closure): Likewise.
10439 * src/nullable.c (nullable_compute): Likewise.
10440 * src/print.c (print_core): Likewise.
10441 * src/print_graph.c (print_core): Likewise.
10442 * src/state.c (state_compare, state_hash): Likewise.
10443 * src/state.h (struct state): Likewise.
10444 * src/tables.c (default_goto, goto_actions): Likewise.
10445
10446 * src/gram.h (rule_number, rule): Use int, not short int.
10447 * src/output.c (prepare_rules): Likewise.
10448 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10449 errs, reductions): Likewise.
10450 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10451 Likewise.
10452 * src/tables.c (vector_number, tally, action_number,
10453 ACTION_NUMBER_MINIMUM): Likewise.
10454 * src/output.c (muscle_insert_short_int_table): Remove.
10455
10456 2004-12-17 Akim Demaille <akim@epita.fr>
10457
10458 * data/lalr1.cc: Extensive Doxygenation.
10459 (error_): Rename as...
10460 (error): this, since it is visible to the user.
10461 Adjust callers.
10462 (Parser::message): Now an automatic variable from...
10463 (Parser::yyreport_syntax_error_): here.
10464 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10465 Parser::error.
10466 * tests/input.at: Escape $.
10467
10468 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10469
10470 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10471 Parenthesize rhs to avoid obscure problems with mistakes like
10472 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10473 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10474 b4_rhs_location): Likewise.
10475 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10476 b4_rhs_location): Likewise.
10477
10478 2004-12-16 Akim Demaille <akim@epita.fr>
10479
10480 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10481 yacc.c: be sure to stay within yycheck_.
10482 * tests/actions.at: Re-enable C++ tests.
10483
10484 2004-12-16 Akim Demaille <akim@epita.fr>
10485
10486 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10487 real.
10488
10489 2004-12-16 Akim Demaille <akim@epita.fr>
10490
10491 Use #define to handle the %name-prefix.
10492
10493 * data/glr.c, data/yacc.c: Comment changes.
10494 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10495 so that one can refer to yylex in the parser file, and have it
10496 renamed, as is the case with other skeletons.
10497
10498 2004-12-16 Akim Demaille <akim@epita.fr>
10499
10500 Move lalr1.cc internals into yy*.
10501
10502 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10503 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10504 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10505 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10506 (empty_, final_, terror_, errcode_, ntokens_)
10507 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10508 (looka_, ilooka_, error_range_, nerrs_):
10509 Rename as...
10510 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10511 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10512 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10513 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10514 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10515 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10516 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10517 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10518 these.
10519
10520 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10521
10522 Fix some problems reported by twlevo at xs4all.
10523 * src/symtab.c (symbol_new): Report an error if the input grammar
10524 contains too many symbols. This is better than calling abort() later.
10525 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10526 (struct node, struct graph):
10527 Rename member expand to stretch. All uses changed.
10528 (struct graph): Remove member layoutalgorithm. All uses removed.
10529 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10530 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10531 All uses changed.
10532 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10533
10534 2004-12-15 Akim Demaille <akim@epita.fr>
10535
10536 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10537 Add more Doxygen comments.
10538 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10539 (report_syntax_error_, translate_): Rename as...
10540 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10541 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10542
10543 2004-12-15 Akim Demaille <akim@epita.fr>
10544
10545 * data/lalr1.cc (lex_): Rename as...
10546 (yylex_): this.
10547 Move the trace here.
10548 Take the %name-prefix into account.
10549 Reported by Alexandre Duret-Lutz.
10550
10551 2004-12-15 Akim Demaille <akim@epita.fr>
10552
10553 Simplify the C++ parser constructor.
10554
10555 * data/lalr1.cc (debug_): Rename as...
10556 (yydebug_): so that the parser's internals are always in the yy*
10557 pseudo namespace.
10558 Adjust uses.
10559 (b4_parse_param_decl): Remove the leading comma as it is now only
10560 called as unique argument list.
10561 (Parser::Parser): Remove the constructor accepting a location and
10562 an initial debugging level.
10563 Remove from the other ctor the argument for the debugging level.
10564 (debug_level_type, debug_level, set_debug_level): New.
10565
10566 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10567 constructor calls.
10568
10569 2004-12-15 Akim Demaille <akim@epita.fr>
10570
10571 Remove b4_root related material: failure experiment
10572 (which goal was to allow to derive from a class).
10573
10574 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10575 definitions and uses.
10576
10577 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10578
10579 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10580 not 2, since it's not portable to subtract 1 from the start of an
10581 array. The new item 0 is never set or used. All uses changed.
10582
10583 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10584 the default definition of YYLLOC_DEFAULT. Problem reported
10585 by Frank Heckenbach.
10586
10587 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10588
10589 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10590 the normal case and one for the error case. Just use the
10591 first one uniformly. Problem reported by Frank Heckenbach.
10592 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10593 use exactly the same macro in both places.
10594 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10595 so that the normal-case YYRHSLOC works for the error case too.
10596 All uses changed.
10597 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10598 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10599 * doc/bison.texinfo (Location Default Action): Don't claim that
10600 we have an array of locations. Use the same macro for both glr
10601 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10602 the index is 0.
10603
10604 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10605
10606 * HACKING: Update email addresses to send announcements to.
10607
10608 * configure.ac (AC_INIT): Bump version to 1.875f.
10609
10610 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10611
10612 * NEWS: Version 1.875e.
10613 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10614
10615 * src/scan-skel.l: Include "complain.h", for "fatal".
10616
10617 * src/relation.h (relation_print, relation_digraph):
10618 Relation sizes are of type relation_node, not size_t (this is
10619 merely a doc fix, since the two types are equivalent).
10620 (relation_transpose): Relation sizes are of type relation_node,
10621 not int.
10622 * src/relation.c: Likewise.
10623 (top, infinity): Now of type relation_node, not int.
10624 (traverse, relation_transpose): Use relation_node, not int.
10625
10626 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10627 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10628 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10629
10630 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10631 specifying whether the test should be skipped. Use it tp
10632 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10633 fail on some hosts, and should be skipped.
10634
10635 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10636
10637 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10638 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10639 unless otherwise specified below.
10640
10641 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10642 to allocate kernel_base, kernel_items, kernel_size, since
10643 they needn't be initialized to 0.
10644 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10645 * src/closure.c (new_closure): Likewise, for itemset.
10646 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10647 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10648 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10649 (build_relations): Likewise for edge, states1, includes.
10650 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10651 * src/reader.c (packgram): Likewise, for ritem, rules.
10652 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10653 * src/relation.c (relation_digraph): Likewise for VERTICES.
10654 (relation_transpose): Likewise for new_R, end_R.
10655 * src/symtab.c (symbols_token_translations_init): Likewise for
10656 token_translations.
10657 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10658 (token_actions): Likewise for yydefact, actrow, conflrow,
10659 conflict_list.
10660 (save_column): Likewise for froms[symno], tos[symno].
10661 (goto_actions): Likewise for state_count.
10662 (pack_table): Likewise for base, pos, check.
10663 (tables_generate): Likewise for width.
10664
10665 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10666 for initial core. Just have a separate core, so we needn't worry
10667 about whether kernel_size and kernel_base are initialized.
10668
10669 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10670 kernel_size, kernel_items): Remove unnecessary initialization.
10671 * src/conflicts.c (conflicts): Likewise.
10672 * src/derives.c (derives): Likewise.
10673 * src/muscle_tablc (muscle_insert): Likewise.
10674 * src/relation.c (relation_digraph): Likewise.
10675 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10676 conflrow, conflict_table, conflict_list, table, check):
10677 Likewise.
10678
10679 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10680 This is because all callers pass unsigned int.
10681 * src/closure.h (new_closure): Likewise.
10682
10683 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10684 (build_relations): Initialize includes[i] in all cases.
10685 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10686 and rules[ruleno].precsym. Initialize members in order.
10687 * src/relation.c (relation_transpose): Always initialize new_R[i]
10688 and end_R[i].
10689 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10690
10691 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10692 conflict_list[0] was always 0, but now it isn't initialized.
10693
10694 * src/table.c (table_grow): When conflict_table grew, the grown
10695 area wasn't cleared. Fix this.
10696
10697 * lib/.cvsignore: Add strdup.c, strdup.h.
10698 * m4/.cvsignore: Add strdup.m4.
10699
10700 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10701
10702 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10703 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10704 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10705 ngotos + 1 without checking for overflow.
10706 (build_relations): Use END_NODE, not -1, to denote end of edges.
10707 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10708 build_relations): Use goto_number, not int, for goto numbers.
10709 * src/tables.c (save_column, default_goto): Likewise.
10710
10711 2004-11-23 Akim Demaille <akim@epita.fr>
10712
10713 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10714 of #defining from yystype.
10715 Don't typedef yystype, C++ does not need it.
10716 This lets it possible to forward declare it as union.
10717
10718 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 * bootstrap (gnulib_modules): Add extensions.
10721 Problem reported by Jim Meyering.
10722
10723 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10724
10725 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10726 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10727 src/system.h, src/tables.c: XFREE -> free, to accommodate
10728 recent change to gnulib xalloc.h.
10729 Problem reported by Jim Meyering.
10730
10731 2004-11-17 Akim Demaille <akim@epita.fr>
10732
10733 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10734
10735 2004-11-17 Akim Demaille <akim@epita.fr>,
10736 Alexandre Duret-Lutz <adl@gnu.org>
10737
10738 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10739 changes.
10740 (YYCDEBUG): Adjust.
10741 Use it instead of cdebug_.
10742 (Parser::debug_stream, Parser::set_debug_stream): New.
10743 (Parser::symprint_): Define cdebug_ for temporary backward
10744 compatibility.
10745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10746 debug_stream ().
10747
10748 2004-11-17 Akim Demaille <akim@epita.fr>
10749
10750 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10751 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10752 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10754
10755 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10756
10757 * data/glr.c (yyloc_default): Remove; not used.
10758 Problem reported by Frank Heckenbach.
10759
10760 2004-10-25 Akim Demaille <akim@epita.fr>
10761
10762 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10763 Introduce another definition to address simple location arrays.
10764 (yyGLRStack): New member: yyerror_range.
10765 (yyrecoverSyntaxError, yyparse): Update it.
10766 (yyrecoverSyntaxError): Use it when shifting the error token to
10767 have an accurate range, equivalent to the one computed by both
10768 yacc.c and lalr1.cc.
10769 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10770 that column numbers start at column 0, as per GNU Coding
10771 Standards, the others tests, and the doc.
10772 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10773 Adjust to the above change (first column is 0).
10774 And adjust the location of the "<error>", now covering the whole
10775 line.
10776
10777 2004-10-22 Akim Demaille <akim@epita.fr>
10778 and Paul Eggert <eggert@cs.ucla.edu>
10779
10780 Remove some arbitrary limits on goto numbers and relations.
10781 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10782 initial values, since they're never used.
10783 (set_goto_map): ngotos is now unsigned, so test for overflow
10784 by seeing whether it wraps around to zero.
10785 * src/lalr.h (goto_number): Now size_t, not short int.
10786 (GOTO_NUMBER_MAXIMUM): Remove.
10787 * src/relation.c (relation_print, traverse, relation_transpose):
10788 Check for END_NODE rather than looking at sign.
10789 * src/relation.h (END_NODE): New macro.
10790 (relation_node): Now size_t, not short int.
10791
10792 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10793
10794 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10795 keyword, not an identifier. Problem reported by Baron Schwartz in
10796 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10797
10798 2004-10-11 Akim Demaille <akim@epita.fr>
10799
10800 * src/symtab.c (symbol_check_alias_consistency): Also check
10801 type names, destructors, and printers.
10802 Reported by Alexandre Duret-Lutz.
10803 Recode the handling of associativity and precedence in terms
10804 of symbol_precedence_set.
10805 Accept no redeclaration at all, not even equal to the previous
10806 value.
10807 (redeclaration): New.
10808 Use it to factor redeclaration complaints.
10809 (symbol_make_alias): Don't set the type of the alias, let
10810 symbol_check_alias_consistency do it as for other features.
10811 * src/symtab.h (symbol): Add new member prec_location, and
10812 type_location.
10813 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10814 * tests/input.at (Incompatible Aliases): New.
10815
10816 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10817
10818 .cvsignore fixes to accommodate gnulib changes,
10819 and the practice of naming build directories "_build".
10820 * .cvsignore: Add "_*". Sort.
10821 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10822 * m4/.cvsignore: Add "*_gl.m4".
10823
10824 2004-10-06 Akim Demaille <akim@epita.fr>
10825
10826 * src/parse-gram.y (add_param): Fix the truncation of trailing
10827 spaces.
10828
10829 2004-10-05 Akim Demaille <akim@epita.fr>
10830
10831 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10832 whether the reducion was empty or not. This leaves room to
10833 improve the use of YYLLOC_DEFAULT in such a case.
10834 lalr1.cc is still experimental, so changing this is acceptable.
10835 And finally, there are probably not many users who changed the
10836 handling of locations in GLR, so changing is admissible too.
10837
10838 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10839 empty reduction, set @$ to an empty location ending the previously
10840 stacked symbol.
10841 Adjust uses to make sure the code is triggered on empty
10842 reductions.
10843 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10844 expected output: empty reductions have empty locations.
10845
10846 2004-09-29 Akim Demaille <akim@epita.fr>
10847
10848 * data/lalr1.cc: Move towards a more standard C++ coding style
10849 for templates: Class < T > -> Class<T>.
10850
10851 2004-09-29 Akim Demaille <akim@epita.fr>
10852
10853 * data/lalr1.cc: Reinstall the former ctor, for sake of
10854 compatibility, but warn it will be removed.
10855 Move towards a more standard C++ coding style (i.e., type *var ->
10856 type* var).
10857
10858 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10861 since it's less likely to work if NULs are involved in the future.
10862
10863 2004-09-27 Akim Demaille <akim@epita.fr>
10864
10865 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10866
10867 2004-09-27 Akim Demaille <akim@epita.fr>
10868
10869 * data/lalr1.cc (b4_parse_param_decl_1): New.
10870 (b4_parse_param_decl): Use it to have different names between attribute
10871 and argument names.
10872 (b4_cc_constructor_call): Likewise.
10873
10874 2004-09-24 Akim Demaille <akim@epita.fr>
10875
10876 * src/parse-gram.y (add_param): Strip the leading and trailing
10877 blanks from a formal argument declaration.
10878 (YY_LOCATION_PRINT): New.
10879
10880 2004-09-24 Akim Demaille <akim@epita.fr>
10881
10882 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10883 after the location.
10884
10885 2004-09-24 Akim Demaille <akim@epita.fr>
10886
10887 * doc/bison.texinfo (Table of Symbols): Sort.
10888
10889 2004-09-21 Akim Demaille <akim@epita.fr>
10890
10891 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10892 the useless parentheses.
10893 Suggested by Paul Eggert.
10894
10895 2004-09-20 Akim Demaille <akim@epita.fr>
10896
10897 Let the initial-action act on the look-ahead, and use it for the
10898 "initial push" (corresponding to an hypothetical beginning-of-file).
10899 And let lalr1.cc honor %initial-action.
10900
10901 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10902 example.
10903 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10904 (Parser::Parser): Remove the ctor that used to initialize it.
10905 (Parser::parse): Like in the other skeletons, issue the "starting
10906 parse" message before any action.
10907 Honor %initial-action.
10908 Initialize the stacks with the lookahead.
10909 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10910 look-ahead.
10911 Push them in the stacks.
10912 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10913
10914 2004-09-20 Akim Demaille <akim@epita.fr>
10915
10916 * doc/bison.texinfo (Initial Action Decl): New.
10917
10918 2004-09-20 Akim Demaille <akim@epita.fr>
10919
10920 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10921 clearer criterion to define it.
10922 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10923 When reducing on an empty RHS, use the latest stacked location as
10924 location.
10925 yylloc is not always available.
10926 * data/glr.c: Likewise.
10927 Also, honor initial-actions.
10928
10929 2004-09-20 Akim Demaille <akim@epita.fr>
10930
10931 * data/yacc.c (YY_LOCATION_PRINT): New.
10932 Define when we know YYLTYPE's structure, i.e., when the default
10933 YYLLOC_DEFAULT is used.
10934 * data/c.m4 (b4_yysymprint_generate): Use it.
10935 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10936 value of the result.
10937 (error_start_): Replace with...
10938 (error_range_): this location array.
10939 This allows to replace code relying on the implementation of
10940 locations by portable code.
10941 * data/yacc.c (yylerrsp): Replace with...
10942 (yyerror_range): this.
10943 Every time a token is popped, update yyerror_range[0], to have an
10944 accurate location for the error token.
10945 * data/glr.c (YY_LOCATION_PRINT): New.
10946 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10947 deference a pointer.
10948 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10949 report the location in %printers.
10950
10951 * src/scan-skel.l: Instead of abort, report error messages to ease
10952 understanding skeleton scanning failures.
10953
10954 2004-09-16 Akim Demaille <akim@epita.fr>
10955
10956 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10957 (iterator, const_iterator): these, to be more in the C++ spirit.
10958 Also, return reverse iterators so that when displaying the stack
10959 we display its bottom first.
10960 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10961 from yacc.c.
10962 We should probably use vector here though.
10963
10964 2004-09-16 Akim Demaille <akim@epita.fr>
10965
10966 Have more complete shift traces.
10967
10968 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10969 to report Shifts instead of ad hoc YYDPRINTF invocations,
10970 including for the error token.
10971 * data/lalr1.cc (symprint_): Output the location.
10972 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10973 output the location within the %printer.
10974 Activate GLR tests, at least to make sure they compile properly.
10975 They still don't pass though.
10976 * tests/calc.at: Adjust expect verbose output, since now "Entering
10977 state..." is on a different line than the "Shifting" message.
10978
10979 2004-09-08 Akim Demaille <akim@epita.fr>
10980
10981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10982 Bison directive from the Bison file to the invocation of this
10983 macro, so that these directives are passed to
10984 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10985 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10986 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10987 the extra Bison directives instead of the whole series.
10988 Change the grammar so that there are recoverable errors, and
10989 unrecoverable errors. Now we can have the parser give up before
10990 consuming the whole input. As a result we now can observe that
10991 the lookahead is freed when needed.
10992 Change the parser source to parse argv[1] instead of a hard coded
10993 string.
10994 Simplify yylex, and give a value and location to EOF.
10995 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10996 passed directives already coded in the file.
10997 Add some tests to check the location of "error".
10998 For some tests, the C++ parser is correct, and not yacc.c.
10999 For other tests, they provide different, but unsatisfying, values,
11000 so keep the C++ value so that at least one parser is "correct"
11001 according to the test suite.
11002 (Actions after errors): Remove, this is subsumed by the
11003 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11004
11005 2004-09-06 Akim Demaille <akim@epita.fr>
11006
11007 * data/lalr1.cc: Adjust the indentation of the labels.
11008 (Parser::pop): New.
11009 Use it.
11010
11011 2004-09-06 Akim Demaille <akim@epita.fr>
11012
11013 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11014 argument, an informative message.
11015 Call YY_SYMBOL_PRINT.
11016 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11017 * data/lalr1.cc (destruct_): Likewise.
11018 In addition, no longer depend on b4_yysymprint_generate and
11019 b4_yydestruct_generate to generate these functions, do it "by
11020 hand".
11021
11022 2004-09-03 Akim Demaille <akim@epita.fr>
11023
11024 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11025 invoked, yydestruct the lookahead.
11026 * tests/calc.at (Calculator $1): Update the expected lengths of
11027 traces: there is an added line for the discarded lookahead.
11028 * doc/bison.texinfo (Destructor Decl): Some rewording.
11029 Define "discarded" symbols.
11030
11031 2004-09-02 Akim Demaille <akim@epita.fr>
11032
11033 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11034
11035 2004-09-02 Akim Demaille <akim@epita.fr>
11036
11037 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11038 (YYDSYMPRINTF): Rename as...
11039 (YY_SYMBOL_PRINT): this.
11040 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11041 two.
11042 Use it instead of direct symprint_ calls.
11043 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11044 one.
11045
11046 2004-09-02 Akim Demaille <akim@epita.fr>
11047
11048 * data/lalr1.cc (b4_yysymprint_generate): New.
11049 (symprint_): New member function, defined when YYDEBUG.
11050 Use it consistently instead of token/nterm debugging output by
11051 hand.
11052 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11053 %printer calls to use cdebug_ when using lalr1.cc.
11054
11055 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11056
11057 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11058 with #ifdef YYDEBUG.
11059
11060 2004-08-26 Akim Demaille <akim@epita.fr>
11061
11062 * doc/bison.texinfo (Implementing Loops): Rename as...
11063 (Implementing Gotos/Loops): this.
11064
11065 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11066
11067 Adjust to latest gnulib.
11068 * bootstrap (gnulib_modules): Add xalloc-die.
11069 Set LC_ALL=C so that file names sort consistently.
11070 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11071 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11072 uintmax_t.m4, ulonglong.m4.
11073 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11074 po.m4 since we are now using _gl.m4 instead.
11075
11076 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11077
11078 * src/scan-action.l: Remove. Scanning of semantic actions is
11079 handled in scan-gram.l.
11080
11081 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11082
11083 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11084
11085 * src/location.h (struct): The file member is a uniqstr.
11086 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11087
11088 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11089
11090 Fix bug with non-%union parsers that have printers or destructors,
11091 which led to a Bison core dump. Reported by Peter Fales in
11092 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11093
11094 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11095 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11096 not to our own type.
11097 * src/output.c (symbol_destructors_output, symbol_printers_output):
11098 Don't assume %union.
11099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11100 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11101 UNION-FLAG. All callers changed.
11102 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11103 Use type char, not unsigned int, when declaring an array of char;
11104 this lets us remove a cast.
11105 (Printers and Destructors): Add non-%union test cases.
11106
11107 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11108
11109 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11110 GLR writeups. E.g., avoid frenchspacing and the future tense,
11111 change "lookahead" to "look-ahead", and change "wrt" to "with
11112 respect to".
11113
11114 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11115
11116 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11117 New sections, split off from the GLR Parsers section. Put the new
11118 Simple GLR Parser near the start of the GLR section, for clarity.
11119 Rewrite connective text.
11120
11121 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11122
11123 * doc/bison.texinfo (Simple GLR Parsers): New section.
11124
11125 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11126
11127 * NEWS, TODO, doc/bison.texinfo:
11128 Use "look-ahead" instead of "lookahead", to be consistent.
11129 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11130 while we're fixing "look-ahead".
11131 * src/conflicts.c (shift_set): Renamed from shiftset.
11132 (look_ahead_set): Renamed from lookaheadset.
11133 * src/print.c: Likewise.
11134 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11135 name for "lookahead".
11136 (report_types, usage): Likewise.
11137 * src/getargs.h (report_look_ahead_tokens): Renamed from
11138 report_lookaheads.
11139 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11140 compute_lookaheads.
11141 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11142 (look_ahead_tokens_print): Renamed from lookaheads_print.
11143 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11144 state_rule_lookaheads_print.
11145 * src/state.h: Likewise.
11146 (reductions.look_ahead_tokens): Renamed from lookaheads.
11147 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11148 AT_DATA_LOOKAHEADS_GRAMMAR.
11149
11150 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11151
11152 * README: Update location of patched M4 distribution.
11153
11154 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11155
11156 Don't assume the C++ compiler takes the same arguments as the C compiler
11157 (trivial change).
11158 * configure.ac (O0CXXFLAGS): New var.
11159 * tests/atlocal.in (CXXFLAGS): Use it.
11160
11161 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11162
11163 Fix some "make check" problems with C++ reported by
11164 Albert Chin-A-Young for Tru64 C++ in this thread:
11165 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11166
11167 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11168 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11169 Output to a .cc file for C++, not to a .c file.
11170 * tests/calc.at (AT_CHECK_CALC): Likewise.
11171 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11172 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11173
11174 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11175
11176 * tests/calc.at, tests/actions.at: Workaround for SGI
11177 C++ compiler. (trivial change)
11178
11179 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11180
11181 Spent a few hours checking out which prerequisite versions the
11182 current sources actually require. I went all the way back to
11183 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11184 a seemingly endless set of combinations of versions more recent
11185 than that. The bottom line is that the current sources require
11186 fairly recent versions of the build tools, and it'll be some work
11187 to change this.
11188 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11189 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11190 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11191 Add comments explaining why those particular versions are
11192 currently needed.
11193
11194 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11195 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11196 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11197
11198 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11199 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11200
11201 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11202
11203 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11204 0.11.5. Suggested by Bruno Haible.
11205 * bootstrap: Remove gettext version checking.
11206
11207 * doc/bison.texinfo (Decl Summary): Also mention that %union
11208 can depend on prerequisite types. Problem reported by Tim
11209 Van Holder.
11210
11211 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11212
11213 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11214 * README-alpha: Don't tell people not to package this.
11215
11216 * bootstrap: Don't assume $(...) works; use `...` instead.
11217 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11218 gettext better.
11219
11220 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11221 put into the -d output file, and mention what to do if YYSTYPE is
11222 defined as a macro.
11223
11224 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11225
11226 Undo change made earlier today: it caused autopoint to not bring
11227 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11228 autopoint's.
11229
11230 * bootstrap: Check that gettext version matches what's in
11231 configure.ac. Warn users to ignore robots.txt ERROR 404.
11232 * bootstrap: Undo today's earlier change (logged below).
11233 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11234
11235 The gettext version checking is causing more trouble than it's
11236 curing; remove it. Problem reported by Paul Hilfinger.
11237
11238 * bootstrap: Issue a warning that one can expect a message
11239 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11240 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11241
11242 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11243
11244 Ensure that the C++ compiler used for testing actually works on a
11245 simple test program; if not, skip the C++-related tests. Problem
11246 reported by Vin Shelton in:
11247 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11248
11249 * m4/cxx.m4: New file.
11250 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11251 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11252 * tests/local.at (AT_COMPILE_CXX): Use it.
11253
11254 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11255
11256 * data/glr.c (yylloc): Output this macro even if locations are not
11257 being generated, as the GLR parser needs it even in that case.
11258 Problem reported by Troy A. Johnson
11259 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11260
11261 * configure.ac (AC_INIT): Update to 1.875e.
11262
11263 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11264
11265 * NEWS: Version 1.875d.
11266 * configure.ac (AC_INIT): Likewise.
11267 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11268
11269 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11270 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11271 lalr1.cc runs afoul of the first, and the last two are no longer
11272 supported by GCC 3.4.0.
11273 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11274 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11275
11276 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11277
11278 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11279 unsigned int, for compatibility with latest gnulib hash module.
11280 * src/state.c (state_hash, state_hasher): Likewise.
11281 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11282 * src/uniqstr.c (hash_uniqstr): Likewise.
11283
11284 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11285
11286 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11287
11288 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11289 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11290 character and string literals.
11291 (unexpected_end): New function.
11292 (unexpected_eof): Use it.
11293 (unexpected_newline): New function.
11294 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11295 actions.
11296
11297 * NEWS: Document %expect-rr.
11298
11299 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11300 Fix typo by replacing $1 with $option.
11301 Remove more 'intl'-related files.
11302 Don't DEFUN AM_INTL_SUBDIR twice.
11303
11304 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11305 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11306 strtoul.c.
11307 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11308 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11309 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11310 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11311 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11312 * src/.cvsignore: Add *.output.
11313
11314 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11315 gets copied to the output file.
11316
11317 2004-04-28 Paul Eggert <eggert@twinsun.com>
11318
11319 Get files from the gnulib and po repositories, instead of relying
11320 on them being in our CVS. Upgrade to latest versions of gnulib
11321 and Automake.
11322
11323 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11324 * bootstrap: Bootstrap from gnulib and po repositories.
11325 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11326 * README-cvs: Document these changes. Remove version numbers from
11327 mentions of build tools, since they change so often. Mention Flex.
11328
11329 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11330 (gl_USE_SYSTEM_EXTENSIONS): Add.
11331 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11332 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11333 does this for us.
11334 (AC_ISC_POSIX): Remove; we no longer support this
11335 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11336 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11337 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11338 Do not check for C89 headers, except for locale.h which is used
11339 by the Yacc library and must port to K&R hosts.
11340 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11341 Do not check for C89 functions, except for setlocale which is
11342 used by the Yacc library.
11343 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11344 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11345 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11346 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11347 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11348 AM_GNU_GETTEXT): Remove; now done by:
11349 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11350 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11351 for us.
11352
11353 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11354 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11355 Define to empty, as gnulib.mk will do the rest for us.
11356 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11357 for us.
11358 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11359 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11360
11361 * src/files.c: Include gnulib's xstrndup.h.
11362
11363 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11364 (REALLOC): Use xnrealloc, for likewise.
11365 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11366 (strnlen, memrchr): Remove decls; functions no longer used.
11367 Include <stpcpy.h>.
11368
11369 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11370 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11371 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11372 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11373 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11374 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11375 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11376 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11377 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11378 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11379 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11380 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11381 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11382 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11383 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11384 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11385 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11386 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11387 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11388 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11389 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11390 Remove, as these files are now generated automatically
11391 by bootstrap or automake.
11392
11393 * po/ChangeLog: Remove: all but one entry was a duplicate
11394 of this file, and I moved that 2000-11-02 entry here.
11395
11396 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11397 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11398 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11399 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11400 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11401 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11402 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11403 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11404 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11405 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11406 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11407 xstrndup.h.
11408 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11409 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11410 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11411 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11412 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11413 * src/.cvsignore: Remove *_.c.
11414
11415
11416 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11417 support it. (The latest stable gzip doesn't.)
11418
11419 2004-04-27 Paul Eggert <eggert@twinsun.com>
11420
11421 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11422 case, as stos_ is now used by destructors due to the 2004-02-09
11423 change.
11424
11425 Remove more K&R C support.
11426 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11427 * lib/subpipe.c (errno): Remove decl.
11428 Include <stdlib.h> unconditionally.
11429 (EXIT_FAILURE): Remove macro.
11430 * src/complain.c (vfprintf, strerror): Remove.
11431 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11432 unconditionally.
11433 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11434 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11435 (strchr, strspn, memchr): Remove decls.
11436 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11437 unconditionally. Do not declare perror.
11438 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11439 unconditionally.
11440
11441 * src/complain.c (_): Remove useless defn, as system.h defines this.
11442
11443 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11444 with latest obstack.h.
11445 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11446 to procedure types, as obstack.h now does that for us.
11447 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11448
11449 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11450 so that this include file can stand alone.
11451 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11452 does this now. Include subpipe.h first after config.h, to
11453 test whether it can stand alone.
11454
11455 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11456 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11457 unused declaration.
11458
11459 * tests/synclines.at (%union synch line): Put a dummy member in
11460 the union, because empty unions aren't allowed in C. Caught
11461 by GCC 3.4.0.
11462
11463 2004-04-13 Jim Meyering <jim@meyering.net>
11464
11465 * src/conflicts.c (conflicts_print): Correct format string typo:
11466 use `%%' to produce literal `%'. (trivial change)
11467
11468 2004-03-30 Paul Eggert <eggert@twinsun.com>
11469
11470 * src/getargs.c (version): Update copyright year to 2004.
11471
11472 * data/c.m4 (b4_int_type): Use 'short int' rather than
11473 'short', and similarly for 'long', 'unsigned', etc.
11474 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11475 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11476 yy_yypstack, yydumpstack): Likewise.
11477 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11478 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11479 Likewise.
11480 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11481 yy_stack_print, yyparse): Likewise.
11482 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11483 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11484 * lib/bitset.c (bitset_print): Likewise.
11485 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11486 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11487 * lib/bitsetv.c (bitsetv_dump): Likewise.
11488 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11489 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11490 Likewise.
11491 * src/LR0.c (allocate_itemsets): Likewise.
11492 * src/gram.h (rule_number, rule): Likewise.
11493 * src/lalr.h (goto_number): Likewise.
11494 * src/nullable.c (nullable_compute): Likewise.
11495 * src/output.c (prepare_rules): Likewise.
11496 * src/relation.c (relation_print, relation_digraph): Likewise.
11497 * src/relation.h (relation_node): Likewise.
11498 * src/state.h (state_number, transitions, errs, reductions,
11499 struct state): Likewise.
11500 * src/symtab.h (symbol_number, struct symbol): Likewise.
11501 * src/tables.c (vector_number, tally, action_number,
11502 default_goto, goto_actions): Likewise.
11503 * tests/existing.at (GNU Cim Grammar): Likewise.
11504 * tests/regression.at (Web2c Actions): Likewise.
11505
11506 * src/output.c (muscle_insert_short_int_table): Renamed from
11507 muscle_insert_short_table. All uses changed.
11508
11509 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11510
11511 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11512 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11513 Add %expect-rr rule.
11514
11515 * src/scan-gram.l: Recognize %expect-rr.
11516
11517 * src/conflicts.h (expected_sr_conflicts): Rename from
11518 expected_conflicts.
11519 (expected_rr_conflicts): Declare.
11520
11521 * src/conflicts.c (expected_sr_conflicts): Rename from
11522 expected_conflicts.
11523 (expected_rr_conflicts): Define.
11524 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11525 for GLR parsers.
11526 Use expected_sr_conflicts in place of expected_conflicts.
11527 Warn if expected_rr_conflicts used in non-GLR parser.
11528
11529 * doc/bison.texinfo: Add documentation for %expect-rr.
11530
11531 2004-03-08 Paul Eggert <eggert@gnu.org>
11532
11533 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11534 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11535
11536 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11537 in lalr1.cc.
11538 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11539 * src/scan-gram.l (scan_integer): New function.
11540 ({int}): Use it.
11541 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11542 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11543 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11544 Say "long int", not "long", for uniformity with GNU style.
11545
11546 2004-02-25 Paul Eggert <eggert@twinsun.com>
11547
11548 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11549 compilers. This fixes a problem with Intel's C++ compiler being
11550 chatty, reported by Guido Trentalancia in
11551 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11552
11553 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11554
11555 Support %destructor and merge error locations in lalr1.cc.
11556
11557 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11558 (Parser::stos_): Define unconditionally.
11559 (Parser::destruct_): New method. Generate its body with
11560 b4_yydestruct_generate.
11561 (Parser::error_start_): New attribute.
11562 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11563 token which are discarded.
11564 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11565 error_start_ when erroneous token are discarded.
11566 (Parser::parse) <yyerrlab1>: Compute the location of the error
11567 token so that it covers all the discarded tokens.
11568 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11569 it can be called with `%skeleton "lalr1.cc"', and do that.
11570
11571 2004-02-02 Paul Eggert <eggert@twinsun.com>
11572
11573 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11574 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11575 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11576 There's no need to mention top_builddir since Automake does that
11577 for us.
11578 (INCLUDES): Remove, as Automake says it's obsolescent.
11579 Contents migrated into AM_CPPFLAGS as described above.
11580 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11581
11582 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11583
11584 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11585 (yyreportSyntaxError): Handle case where lookahead token is
11586 YYEMPTY.
11587
11588 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11589
11590 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11591 resulting parsers are compilable with C++.
11592
11593 2003-12-23 Paul Eggert <eggert@twinsun.com>
11594
11595 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11596 * src/output.c (output_skeleton): Rename local var.
11597 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11598 Bison tokens, as this runs afoul of the 2003-10-07 change that
11599 disallowed NUL bytes in character constants or string literals.
11600
11601 * tests/local.at: Require Autoconf 2.59's Autotest.
11602 * tests/testsuite.at: Don't include local.at, since we now assume
11603 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11604 including it.
11605 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11606 multiple inclusion warnings.
11607
11608 2003-12-02 Akim Demaille <akim@epita.fr>
11609
11610 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11611 conditions.
11612 From Bruno Haible.
11613
11614 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11615
11616 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11617
11618 2003-10-07 Paul Eggert <eggert@twinsun.com>
11619
11620 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11621 if testsuite doesn't exist.
11622
11623 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11624 literals, unfortunately.
11625 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11626 Complain about NUL bytes in character constants or string literals.
11627
11628 2003-10-05 Paul Eggert <eggert@twinsun.com>
11629
11630 * NEWS: Don't document %no-default-prec, as it's still
11631 too experimental.
11632 * doc/bison.texinfo: Document %no-default-prec only if
11633 the defaultprec flag is set. Normally it's not.
11634
11635 2003-10-04 Paul Eggert <eggert@twinsun.com>
11636
11637 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11638 non-modifiable lvalue, instead of a modifiable one.
11639 * doc/bison.texinfo (Actions): Document that $$ can
11640 be assigned to. Do not claim that $$ and $N are
11641 array element references: user code should not rely on this.
11642
11643 2003-10-01 Paul Eggert <eggert@twinsun.com>
11644
11645 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11646 (grammar_declaration): Use it.
11647 * src/scan-gram.l: New token %no-default-prec.
11648 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11649 * NEWS, doc/bison.texinfo: Document the above.
11650
11651 2003-10-01 Akim Demaille <akim@epita.fr>
11652
11653 VCG no longer supports long_straight_phase.
11654
11655 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11656 * src/print_graph.c (print_graph): Adjust.
11657
11658 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11659 and Paul Eggert <eggert@twinsun.com>
11660
11661 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11662 Table of Symbols): Document %default-prec.
11663 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11664 (grammar_declaration): Set default_prec on %default-prec.
11665 * src/scan-gram.l (%default-prec): New token.
11666 * src/reader.h (default_prec): New flag.
11667 * src/reader.c: Likewise.
11668 (packgram): Handle it.
11669 * tests/conflicts.at (%default-prec without %prec,
11670 %default-prec with %prec, %default-prec 1): New tests.
11671
11672 2003-09-30 Paul Eggert <eggert@twinsun.com>
11673
11674 * tests/testsuite.at: Include local.at, not input.at, fixing
11675 a typo in the 2003-08-25 patch.
11676
11677 2003-08-27 Akim Demaille <akim@epita.fr>
11678
11679 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11680 GCC warnings.
11681
11682 2003-08-26 Akim Demaille <akim@epita.fr>
11683
11684 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11685 "<\#" to avoid magic from Gnus when posting parts of this script.
11686
11687 2003-08-26 Akim Demaille <akim@epita.fr>
11688
11689 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11690 (Parser::parse): here.
11691 Adjust: nerrs and errstatus is now replaced by...
11692 (Parser::nerrs_, Parser::errstatus_): New.
11693
11694 2003-08-25 Akim Demaille <akim@epita.fr>
11695
11696 * config/announce-gen, Makefile.cfg: New.
11697 * Makefile.am: Adjust.
11698 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11699 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11700
11701 2003-08-25 Akim Demaille <akim@epita.fr>
11702
11703 When reducing initial empty rules, Bison parser read an initial
11704 location that is not defined. This results in garbage, and that
11705 affects Bison's own parser. Therefore we need (i) to extend Bison
11706 to support a means to initialize this location, and (ii) to use
11707 this CVS Bison to fix CVS Bison's parser.
11708
11709 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11710 with...
11711 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11712 * src/parse-gram.y: Adjust.
11713 (%initial-action): New.
11714 (%error-verbose): Since we require CVS Bison, there is no reason
11715 not to use it.
11716 * src/scan-gram.l: Adjust.
11717 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11718 * data/yacc.c (yyparse): Use b4_initial_action.
11719
11720 2003-08-25 Akim Demaille <akim@epita.fr>
11721
11722 * doc/bison.texinfo: Don't promote stdout for error messages.
11723
11724 2003-08-25 Akim Demaille <akim@epita.fr>
11725
11726 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11727 From Alexandre Duret-Lutz.
11728
11729 2003-08-25 Akim Demaille <akim@epita.fr>
11730
11731 Version 1.875c.
11732
11733 2003-08-25 Akim Demaille <akim@epita.fr>
11734
11735 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11736 Use them.
11737
11738 2003-08-25 Akim Demaille <akim@epita.fr>
11739
11740 * data/lalr1.cc (Parser::reduce_print_): New.
11741 Use it.
11742
11743 2003-08-25 Akim Demaille <akim@epita.fr>
11744
11745 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11746 error recovery loops. This patch is based on
11747 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11748 Also, augment the similarity between lalr1.cc and yacc.c.
11749 Note: the locations of error recovery rules are not correct yet.
11750
11751 * data/lalr1.cc: Comment changes to augment the similarity between
11752 lalr1.cc and yacc.c.
11753 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11754 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11755 yyerrlab), when hitting EOF, pop the whole stack here instead of
11756 merely falling thru the default error handling mechanism.
11757 (yyerrorlab): New label, with the old contents of YYERROR,
11758 plus the following change: pop the stack of rhs corresponding
11759 to the production that invoked YYERROR. That is how Yacc
11760 behaves (required by POSIX).
11761 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11762 fail.
11763
11764 2003-08-25 Akim Demaille <akim@epita.fr>
11765
11766 Tune local.at so that people can "autom4te -l autotest calc.at -o
11767 calc" for instance, to extract a sub test suite.
11768
11769 * tests/testsuite.at: Move the initialization, Autotest version
11770 requirement, and AT_TESTED invocation into...
11771 * tests/local.at: here.
11772 * tests/testsuite.at: Include it for compatibility with Autoconf
11773 2.57.
11774 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11775 be ignore.
11776
11777 2003-08-04 Paul Eggert <eggert@twinsun.com>
11778
11779 Rework code slightly to avoid gcc -Wtraditional warnings.
11780 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11781 The returned value is now stored in *YY0. All callers changed.
11782 * src/output.c (merge_output): Adjust to the above change.
11783
11784 2003-07-26 Paul Eggert <eggert@twinsun.com>
11785
11786 * data/glr.c (YYASSERT): New macro.
11787 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11788 yyresolveStates, yyprocessOneStack):
11789 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11790 Derived from a suggestion by Frank Heckenbach.
11791
11792 2003-07-25 Paul Eggert <eggert@twinsun.com>
11793
11794 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11795 for portability to K&R C (after ansi2knr, presumably). See
11796 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11797 by Frank Heckenbach, though I have omitted the structure-initialization
11798 part of his glr-knr.diff patch since I recall that the Portable
11799 C Compiler didn't require that change.
11800
11801 Let the user specify how to allocate and free memory.
11802 Derived from a suggestion by Frank Heckenbach in
11803 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11804 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11805 All uses of free, malloc, realloc changed to use these macros,
11806 and unnecessary casts removed.
11807 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11808
11809 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11810
11811 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11812 use s.empty() rather than s == "" to test for empty string; see
11813 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11814 (trivial change)
11815
11816 2003-06-25 Akim Demaille <akim@epita.fr>
11817
11818 * config/depcomp, config/install-sh: Update from masters.
11819
11820 2003-06-20 Paul Eggert <eggert@twinsun.com>
11821
11822 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11823 and return properly parenthesized result.
11824 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11825 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11826 Remove unnecessary parentheses from uses.
11827 * doc/bison.texinfo (Location Default Action): Describe the
11828 conventions for parentheses.
11829
11830 2003-06-19 Paul Eggert <eggert@twinsun.com>
11831
11832 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11833 yyreportTree): Do not assume that size_t is the same width as int,
11834 when printing sizes. Print sizes using an unsigned format.
11835 Problem reported by Frank Heckenbach in
11836 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11837
11838 Port to Forte Developer 7 C compiler.
11839 * data/glr.c (struct YYLTYPE): If locations are not being used,
11840 declare a single dummy member, as empty structs do not conform
11841 to the C standard.
11842 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11843 the Forte Developer 7 C compiler complains that end-of-loop
11844 code is not reached.
11845
11846 2003-06-17 Paul Eggert <eggert@twinsun.com>
11847
11848 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11849 avoid warnings from picky compilers about redefinition of PARAMS.
11850
11851 2003-06-17 Paul Eggert <eggert@twinsun.com>
11852
11853 Version 1.875b.
11854
11855 * NEWS: Document 1.875b.
11856
11857 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11858 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11859 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11860 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11861 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11862 per recent gettext manual's suggestion.
11863 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11864 Use prototypes, not old-style definitions.
11865 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11866 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11867 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11868 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11869 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11870 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11871 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11872 vbitset_or_and_cmp, vbitset_copy): Likewise.
11873
11874 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11875 Do not include <stdlib.h>.
11876 (PARAMS): Define unconditionally for C89.
11877 (ATTRIBUTE_NORETURN): Remove.
11878 (ATTRIBUTE_UNUSED): Define unconditionally.
11879
11880 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11881 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11882 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11883 * lib/vbitset.c, lib/vbitset.h: New files.
11884 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11885 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11886 from libbitset.
11887
11888 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11889 `How Can I Reset @code{yyparse}', since texinfo does not allow
11890 arbitrary @ in node names.
11891
11892 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11893 shouldn't be needed according to the gettext 0.12.1 documentation
11894 but which seem to be needed anyway: codeset.m4 glibc21.m4
11895 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11896 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11897 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11898
11899 * lib/.cvsignore: Add stdbool.h.
11900 * m4/.cvsignore: Add nls.m4, po.m4.
11901
11902 Upgrade to CVS gnulib.
11903 * stdbool_.h: File renamed from stdbool.h.in.
11904 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11905 AC_HEADER_STDBOOL.
11906 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11907 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11908 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11909 (MOSTLYCLEANFILES): New var.
11910 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11911 (stdbool.h): New rule.
11912 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11913 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11914 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11915 m4/quote.m4: Upgrade to today's gnulib.
11916
11917 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11918 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11919 the tests right now.
11920 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11921 yyerror are declared before use; C99 requires this.
11922
11923 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11924
11925 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11926 first.
11927 (yyrecoverSyntaxError): Correct the logic for setting and testing
11928 yyerrState.
11929 Correct comment on handling EOF.
11930 Allow states with only a default reduction, rather than failing
11931 (I can't quite reconstruct why these were not allowed before).
11932
11933 Fixes to avoid problem that $-N rules in GLR parsers can cause
11934 buffer overruns, corrupting state.
11935
11936 * src/output.c (prepare_rules): Output max_left_semantic_context
11937 definition.
11938 * src/reader.h (max_left_semantic_context): New variable declaration.
11939 * src/scan-gram.l (max_left_semantic_context): Define.
11940 (handle_action_dollar): Update max_left_semantic_context.
11941 * data/glr.c (YYMAXLEFT): New definition.
11942 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11943 (yyresolveAction): Ditto.
11944
11945 Fixes to problems with location handling in GLR parsers reported by
11946 Frank Heckenbach (2003/06/05).
11947
11948 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11949 (YYRHSLOC): Add parentheses, and define only if locations used.
11950 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11951 locations not used.
11952 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11953 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11954
11955 * tests/cxx-type.at: Exercise location information; update tests
11956 to differentiate output with and without locations.
11957 Remove forward declarations of yylex and yyerror---caused errors
11958 because default YYLTYPE not yet defined.
11959 Change semantic actions to compute strings, rather than printing
11960 them directly (to test proper passing of semantics values). Change
11961 output to prefix notation and update test data and expected results.
11962 (yylex): Track locations.
11963 (stmtMerge): Return value rather than printing, and include arguments
11964 in value.
11965
11966 2003-06-03 Paul Eggert <eggert@twinsun.com>
11967
11968 Avoid warnings generated by GCC 2.95.4 when Bison is
11969 configured with --enable-gcc-warnings.
11970 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11971 yy::]b4_parser_class_name[::translate_,
11972 yy::Stack::operator[] (unsigned),
11973 yy::Stack::operator[] (unsigned) const,
11974 yy::Slice::operator[] (unsigned),
11975 yy::Slice::operator[] (unsigned) const):
11976 Rename local vars to avoid warnings.
11977 * tests/glr-regression.at (Improper handling of embedded actions
11978 and $-N in GLR parsers): Remove unused local variable from yylex.
11979 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11980 (void) as arg when not pure, since we now assume C89 when building
11981 Bison. Pacify GCC by using parameter.
11982
11983 2003-06-02 Paul Eggert <eggert@twinsun.com>
11984
11985 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11986 yy::Location::lines, yy::Location::columns): Rename arguments
11987 to avoid shadowing; this removes a warning generated by GCC 3.3.
11988
11989 2003-06-01 Paul Eggert <eggert@twinsun.com>
11990
11991 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11992 to g++, as GCC 3.3 complains if you do it.
11993 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11994 everything that WARNING_CFLAGS has, except omit warnings
11995 not suitable for C++.
11996 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11997 * tests/atlocal.in (CXXFLAGS): New var.
11998 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11999
12000 Fix a GLR parser bug I reported in February; see
12001 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12002 The problem was that GLR parsers did not conform to the C standard,
12003 because actions like { $1 = $2 + $3; } expanded to expressions
12004 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12005 to a local variable. The C standard says that expressions
12006 like (var = f ()) + (var = f ()) have undefined behavior.
12007 Another problem was that GCC sometimes issues warnings that
12008 yyfill and its parameters are unused.
12009
12010 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12011 as possibly unused.
12012 (yyfill): New function.
12013 (YYFILL): Use it.
12014 (yyuserAction): Change type of yynormal to bool, so that it matches
12015 the new yyfill signature. Mark it as possibly unused.
12016
12017
12018 Follow up on a bug I reported in February, where a Bison-generated
12019 parser can loop. Provide a test case and a fix for yacc.c. I
12020 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12021 The original bug report is in:
12022 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12023
12024 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12025 macro's size was becoming unwieldy.
12026 (yyerrlab): Do not discard an empty lookahead symbol, as this
12027 might destroy garbage.
12028 (yyerrorlab): New label, with the old contents of YYERROR,
12029 plus the following change: pop the stack of rhs corresponding
12030 to the production that invoked YYERROR. That is how Yacc
12031 behaves, and POSIX requires this behavior.
12032 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12033 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12034 Define 'alarm' to do nothing if unistd.h is not available.
12035 Add a new rule "exp: '-' error;" to test the above change to
12036 data/yacc.c. Use 'alarm' to abort any test taking longer than
12037 10 seconds, as it's probably looping.
12038 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12039 Also, the new yacc.c generates two fewer diagnostics for an
12040 existing test.
12041
12042 2003-05-24 Paul Eggert <eggert@twinsun.com>
12043
12044 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12045 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12046 This fixes a problem reported by John Bowman when the Compaq/HP
12047 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12048 -ansi -Wall -gall).
12049 * data/yacc.c (union yyalloc): Likewise.
12050 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12051
12052 Switch from 'int' to 'bool' where that makes sense.
12053
12054 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12055 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12056 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12057 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12058 Return or accept bool, not int. All callers changed.
12059 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12060 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12061 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12062 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12063 bitset_or_and_cmp_): Likewise.
12064 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12065 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12066 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12067 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12068 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12069 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12070 bitset_stats_or_and_cmp): Likewise.
12071 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12072 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12073 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12074 ebitset_xor_cmp): Likewise.
12075 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12076 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12077 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12078 lbitset_xor_cmp): Likewise.
12079 * lib/bbitset.h: Include <stdbool.h>.
12080 (struct bitset_vtable): The following members now return bool, not
12081 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12082 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12083 or_and_cmp).
12084 * src/conflicts.c (count_rr_conflicts): Likewise.
12085 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12086 All uses changed.
12087 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12088 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12089 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12090 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12091 graph_flag): Likewise.
12092 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12093 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12094 graph_flag): Likewise.
12095 * src/output.c (error_verbose): Likewise.
12096 * src/output.h (error_verbose): Likewise.
12097 * src/reader.c (start_flag, typed): Likewise.
12098 * src/reader.h (typed): Likewise.
12099 * src/getargs.c (LOCATIONS_OPTION): New constant.
12100 (long_options, getargs): Use it.
12101 * src/lalr.c (build_relations): Use bool, not int.
12102 * src/nullable.c (nullable_compute): Likewise.
12103 * src/print.c (print_reductions): Likewise.
12104 * src/tables.c (action_row, pack_vector): Likewise.
12105 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12106 * src/output.c (prepare): Use it.
12107 * src/output.c (token_definitions_output,
12108 symbol_destructors_output, symbol_destructors_output): Use string,
12109 not boolean integer, to keep track of whether to output separator.
12110 * src/print_graph.c (print_core): Likewise.
12111 * src/state.c (state_rule_lookaheads_print): Likewise.
12112
12113 * config/install-sh: Sync from automake 1.7.5.
12114
12115 2003-05-14 Paul Eggert <eggert@twinsun.com>
12116
12117 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12118 semicolon after a grammar declaration, in the interest of possible
12119 future changes to the Bison input language.
12120 Do not allow a stray semicolon at the start of the grammar.
12121 (rhses.1): Allow one or more semicolons after any rule, including
12122 just before "|" as required by POSIX.
12123 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12124 grammar.
12125
12126 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12127
12128 %parse-param support for lalr1.cc.
12129
12130 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12131 b4_cc_constructor_calls, b4_cc_constructor_call,
12132 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12133 definitions.
12134 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12135 parse-param arguments.
12136 (yy::b4_parser_class_name): Declare instance variables to
12137 hold parse-param arguments.
12138 * tests/calc.at: s/value/semantic_value/ because value clashes
12139 with a member of yy::b4_parser_class_name. Adjust C++ code
12140 to handle %parse-param. Enable %parse-param test in C++.
12141
12142 2003-05-12 Paul Eggert <eggert@twinsun.com>
12143
12144 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12145 English a bit. Fix fclose typo. Change "const char" to "char
12146 const", and use ANSI C rather than K&R for "main". Suggest
12147 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12148 and suggest yy_switch_to_buffer.
12149
12150 2003-05-05 Paul Eggert <eggert@twinsun.com>
12151
12152 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12153 C89. This avoids a diagnostic on compilers that define __STDC__
12154 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12155 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12156
12157 2003-05-03 Paul Eggert <eggert@twinsun.com>
12158
12159 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12160 Do not overrun array bounds.
12161 This should fix a bug reported today by Olatunji Oluwabukunmi in
12162 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12163
12164 2003-04-29 Akim Demaille <akim@epita.fr>
12165
12166 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12167 * src/getargs.c, src/getargs.h: here, as bool, not int.
12168 (nondeterministic_parser): New.
12169 * src/parse-gram.y, src/scan-gram.l: Support
12170 %nondeterministic-parser.
12171 * src/output.c (prepare): Use nondeterministic_parser instead
12172 of glr_parser where appropriate.
12173 * src/tables.c (conflict_row, action_row, save_row)
12174 (token_actions, token_actions, pack_vector): Ditto.
12175
12176 2003-04-29 Akim Demaille <akim@epita.fr>
12177
12178 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12179
12180 2003-04-29 Akim Demaille <akim@epita.fr>
12181
12182 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12183 with %pure-parser and %locations to exercise the patch from Yakov
12184 Markovitch below.
12185
12186 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12187
12188 * data/yacc.c: (b4_lex_param): Corrected for the case where
12189 %lex-param is provided and %pure-parser isn't.
12190
12191 2003-04-27 Paul Eggert <eggert@twinsun.com>
12192
12193 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12194 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12195 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12196 if it is not defined.
12197 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12198
12199 2003-04-26 Paul Eggert <eggert@twinsun.com>
12200
12201 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12202 Declare to be of type suitable for the ninf value itself, not of
12203 type suitable for the corresponding table, since the latter might
12204 be unsigned but the ninf value might be negative. This fixes a
12205 bug reported by Alexandre Duret-Lutz in
12206 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12207
12208 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12209 invokes it. We shouldn't invoke it twice because it will attempt
12210 to put error.o in the archive twice. This fixes a glitch reported
12211 by Martin Mokrejs in
12212 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12213
12214 2003-04-21 Paul Eggert <eggert@twinsun.com>
12215
12216 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12217 to gnulib.
12218
12219 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12220
12221 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12222 Fix obvious typo that results in uncompilable GLR parsers
12223 when both %pure-parser and %locations are used. (trivial change)
12224
12225 2003-04-17 Paul Eggert <eggert@twinsun.com>
12226
12227 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12228 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12229 Do not insert the expected token via unput, as this runs afoul
12230 of a POSIX-compatibility bug in flex 2.5.31.
12231 All uses changed to BEGIN the parent state,
12232 since we no longer insert the expected token via unput.
12233 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12234 that is no longer emitted after the above change.
12235
12236 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12237 the first one. This change is from Paul Hilfinger, and it fixes
12238 regression reported by Werner Lemberg in
12239 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12240
12241 (resolve_sr_conflict): Don't invoke state_errs_set
12242 unless one or more tokens have been explicitly made errors.
12243 Otherwise, the above change causes Bison to abort.
12244
12245 * tests/existing.at (GNU pic Grammar): New test case, taken from
12246 Lemberg's email.
12247
12248 2003-03-31 Akim Demaille <akim@epita.fr>
12249
12250 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12251
12252 2003-03-31 Akim Demaille <akim@epita.fr>
12253
12254 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12255 output.
12256
12257 2003-03-31 Akim Demaille <akim@epita.fr>
12258
12259 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12260 From Paul Hilfinger.
12261
12262 2003-03-29 Akim Demaille <akim@epita.fr>
12263
12264 * m4/error.m4: Do not put under dynamic conditions some code which
12265 expansion is under static control.
12266
12267 2003-03-29 Akim Demaille <akim@epita.fr>
12268
12269 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12270
12271 2003-03-29 Akim Demaille <akim@epita.fr>
12272
12273 * doc/bison.texinfo (Strings are Destroyed): New.
12274
12275 2003-03-13 Paul Eggert <eggert@twinsun.com>
12276
12277 * .cvsignore: Add configure.lineno.
12278 * src/.cvsignore: Add yacc.
12279 * tests/.cvsignore: Add testsuite.log.
12280 * doc/fdl.texi: Sync with latest FSF version.
12281
12282 2003-03-12 Paul Eggert <eggert@twinsun.com>
12283
12284 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12285 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12286 cursor, instead of leaving it undefined. This fixes a bug
12287 reported by Tim Van Holder in
12288 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12289 * tests/input.at (Torturing the Scanner): Test the scanner on
12290 an empty input file, which was Tim Van Holder's test case.
12291
12292 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12293 <sys/resource.h> can be included, include sys/time.h and
12294 sys/times.h first, if available. This works around the SunOS
12295 4.1.4 porting bug reported by Bruce Becker in
12296 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12297
12298 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12299 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12300 AC_HEADER_SYS_WAIT.
12301
12302 Merge changes from gnulib. This was prompted because the CVS
12303 snapshot didn't build on Solaris 7 due to strnlen problems.
12304
12305 These changes need to be merged back into gnulib:
12306 * lib/hash.c: Include <stdbool.h> unconditionally.
12307 * m4/onceonly.m4 (m4_quote): New macro.
12308 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12309 Quote AC_FOREACH variable-expansions properly.
12310 The 2003-01-03 obstack.h change also needs merging.
12311 {end of changes requiring merging}
12312
12313 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12314 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12315 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12316 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12317 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12318 New files, imported from gnulib.
12319 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12320 above.
12321
12322 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12323 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12324 gnulib sources.
12325
12326 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12327 Add.
12328 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12329 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12330 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12331 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12332 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12333 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12334 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12335 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12336 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12337 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12338 (jm_PREREQ_ARGMATCH): Remove.
12339 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12340 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12341
12342 * src/system.h: Include <stdbool.h> unconditionally.
12343
12344 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12345 assuming at least C89 in the bitset code for some time now.
12346
12347 2003-03-03 Akim Demaille <akim@epita.fr>
12348
12349 * ro.po: New.
12350
12351 2003-03-02 Akim Demaille <akim@epita.fr>
12352
12353 * doc/bison.texinfo (Table of Symbols): Reactivate the
12354 documentation for %lex-param, and %parse-param.
12355
12356 2003-03-02 Akim Demaille <akim@epita.fr>
12357
12358 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12359 generate verbose error messages.
12360 Use the number of tokens as an upper bound in yytname, as it
12361 cannot be a non terminal.
12362
12363 2003-03-02 Akim Demaille <akim@epita.fr>
12364
12365 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12366 message.
12367
12368 2003-03-02 Akim Demaille <akim@epita.fr>
12369
12370 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12371 Use them to exercise yycheck overrun.
12372 Based on Andrew Suffield's grammar.
12373
12374 2003-03-02 Akim Demaille <akim@epita.fr>
12375
12376 Create tests/local.at for Bison generic testing macros.
12377
12378 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12379 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12380 This new file.
12381 * tests/calc.at (AT_CHECK_CALC): Adjust.
12382 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12383 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12384 * tests/local.at: here.
12385 (AT_COMPILE_CXX): Tags the tests using it as c++.
12386 Ignore the test if CXX is not functional.
12387
12388 2003-03-01 Paul Eggert <eggert@twinsun.com>
12389
12390 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12391 not loc->end, since loc->end might contain garbage and this leads
12392 to undefined behavior on some platforms.
12393 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12394 depend on *loc, so that the reader doesn't give the the false
12395 impression that *loc is initialized.
12396 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12397 does not survive the return.
12398
12399 2003-03-01 Akim Demaille <akim@epita.fr>
12400
12401 * src/scan-gram.l (code_start): Always initialize it when entering
12402 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12403 yylex invocation. An alternative would be making it static, but
12404 then it starts with the second %%'s beginning, instead of its end.
12405
12406 2003-02-28 Paul Eggert <eggert@twinsun.com>
12407
12408 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12409 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12410 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12411
12412 2003-02-26 Paul Eggert <eggert@twinsun.com>
12413
12414 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12415 Remove Sequent/Pyramid discussion (nobody uses them any more).
12416 Merge VMS and MS-DOS discussion; these ports may well be dead
12417 but let's keep mentioning them for now. Put <> around email
12418 addresses. Add copyright notice.
12419
12420 2003-02-24 Paul Eggert <eggert@twinsun.com>
12421
12422 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12423 to avoid collision with flex use of yylineno.
12424 Problem reported by Bruce Lilly in
12425 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12426 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12427 * data/yacc.c (yy_reduce_print): Likewise.
12428
12429 * config/depcomp: Sync with Automake 1.7.3.
12430
12431 2003-02-21 Akim Demaille <akim@epita.fr>
12432
12433 * data/lalr1.cc: Use temporary variables instead of casts to
12434 change integer types.
12435 Suggested by Paul Eggert.
12436
12437 2003-02-21 Akim Demaille <akim@epita.fr>
12438
12439 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12440 to avoid confusions with lalr1.cc's notion of Position.
12441 Suggested by Paul Eggert.
12442
12443 2003-02-20 Akim Demaille <akim@epita.fr>
12444
12445 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12446 before initial_columns.
12447 (location.hh): Use consistent variable names when defining the
12448 operator<<.
12449 Use "last" so that we subtract from Positions, not from unsigned.
12450
12451 2003-02-20 Akim Demaille <akim@epita.fr>
12452
12453 * data/lalr1.cc (position.hh): New subfile, including the extended
12454 and Doxygen'ed documentation of class Position.
12455 (location.hh): Use it.
12456 Document a` la Doxygen.
12457 With the help of Benoit Perrot.
12458
12459 2003-02-20 Akim Demaille <akim@epita.fr>
12460
12461 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12462 AT_YACC_IF.
12463 Redefine AT_YYERROR_SEES_LOC_IF using it.
12464 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12465 not defined.
12466 Don't use the location in yy::Parser::error_ and
12467 yy::Parser::print_ when not %locations.
12468 Activate more lalr1.cc tests.
12469
12470 2003-02-19 Akim Demaille <akim@epita.fr>
12471
12472 * data/lalr1.cc: When displaying a line number, be sure to make it
12473 an int.
12474
12475 2003-02-19 Akim Demaille <akim@epita.fr>
12476
12477 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12478 Remove, useless.
12479 (YYABORT, YYACCEPT, YYERROR): New.
12480 * tests/calc.at: Renable the lalr1.cc test.
12481
12482 2003-02-19 Akim Demaille <akim@epita.fr>
12483
12484 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12485 error recovery, mixing with/without pops and discarding of the
12486 lookahead.
12487 Exercise YYERROR.
12488 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12489
12490 2003-02-17 Paul Eggert <eggert@twinsun.com>
12491
12492 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12493 * tests/testsuite.at (AT_COMPILE): Use them.
12494 This fixes the testsuite problem reported by Robert Lentz in
12495 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12496
12497 2003-02-12 Paul Eggert <eggert@twinsun.com>
12498
12499 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12500 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12501 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12502 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12503 Check for malloc failure, for consistency with yacc.c.
12504 (yytname_size): Remove, for consistency with yacc.c.
12505
12506 The bug still remains in data/lalr1.cc, as I didn't have time
12507 to fix it there.
12508
12509 2003-02-06 Akim Demaille <akim@epita.fr>
12510
12511 * configure.ac (GXX): Rename as...
12512 (CXX): this, to keep the original Autoconf semantics.
12513 Require 2.57.
12514 * data/lalr1.cc: Fix b4_copyright invocations.
12515 If YYDEBUG is not defined, don't depend upon name_ being defined.
12516 (location.hh): Include string and iostream.
12517 (Position::filename): New member.
12518 (Position::Position ()): New.
12519 (operator<< (Position)): New.
12520 (operator- (Position, int)): New.
12521 (Location::first, Location::last): Rename as...
12522 (Location::begin, Location::end): these, to mock the conventional
12523 iterator names.
12524 (operator<< (Location)): New.
12525 * tests/atlocal.in (CXX): New.
12526 * tests/testsuite.at (AT_COMPILE_CXX): New.
12527 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12528 locations in a more synthetic way.
12529 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12530 lalr1.cc is used.
12531 Adjust the C locations to match those from Emacs: first column is
12532 column 0.
12533 Change all the expected results.
12534 Conform to the GCS: simplify the locations when applicable.
12535 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12536 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12537 these CPP macros with the m4 macros new defined by...
12538 (AT_CHECK_PUSHDEFS): this, i.e.:
12539 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12540 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12541 New macros.
12542 (AT_CHECK_POPDEFS): Undefine them.
12543 (AT_CHECK_CALC_LALR1_CC): New.
12544 Use it for the first lalr1.cc test.
12545
12546 2003-02-04 Akim Demaille <akim@epita.fr>
12547
12548 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12549 Location as is defined.
12550
12551 2003-02-04 Akim Demaille <akim@epita.fr>
12552
12553 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12554 name_ being defined.
12555
12556 2003-02-03 Paul Eggert <eggert@twinsun.com>
12557
12558 * src/gram.h (start_symbol): Remove unused decl.
12559
12560 Use more-consistent naming conventions for local vars.
12561
12562 * src/derives.c (derives_compute): Change type of local var from
12563 int to rule_number.
12564 * src/gram.c (grammar_rules_partial_print): Likewise.
12565 * src/print.c (print_core): Likewise.
12566 * src/reduce.c (reduce_grammar_tables): Likewise.
12567
12568 * src/gram.c (grammar_dump): Change name of item_number *
12569 local var from r to rp.
12570 * src/nullable.c (nullable_compute): Likewise.
12571
12572 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12573
12574 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12575 for symbol or symbol_number var.
12576 * src/reader.c (grammar_start_symbol_set): Likewise.
12577 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12578 Likewise.
12579 * src/state.c (transitions_to): Likewise.
12580 * src/state.h: Likewise.
12581 * src/tables.c (symbol_number_to_vector_number): Likewise.
12582
12583 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12584 char * var.
12585
12586 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12587 var.
12588
12589 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12590 var.
12591
12592 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12593 Use str, not s, for char * var. Use ch, not c, for character var.
12594 Use size for size var.
12595
12596 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12597 char * var.
12598 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12599 uniqstr var.
12600 * src/uniqstr.h: Likewise.
12601
12602 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12603 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12604 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12605 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12606 param to have same name as that of enum, so that we don't use
12607 "s" to stand for a non-state.
12608
12609 2003-02-02 Akim Demaille <akim@epita.fr>
12610
12611 * src/scan-skel.l: Scan more than one inert character per yylex
12612 invocation.
12613
12614 2003-02-01 Paul Eggert <eggert@twinsun.com>
12615
12616 Version 1.875a.
12617
12618 * po/LINGUAS: Add ms.
12619
12620 2003-01-30 Akim Demaille <akim@epita.fr>
12621
12622 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12623
12624 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12625
12626 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12627 of $1.
12628
12629 Changes in response to error report by S. Eken: GLR mode does not
12630 handle negative $ indices or $ indices in embedded rules correctly.
12631 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12632
12633 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12634 (b4_rhs_location): Ditto.
12635 (yyfill): New function to copy from stack tree into array
12636 incrementally.
12637 (yyuserAction): Modify to allow incremental move of semantic values
12638 to rhs array when in GLR mode.
12639 Define YYFILL to use in user-defined actions to fill semantic array
12640 as needed.
12641 Remove dummy use of yystack, as there is now a guaranteed use.
12642 (yydoAction): Modify to allow incremental move of semantic values
12643 to rhs array when in GLR mode.
12644 (yyresolveAction): Ditto.
12645 (yyglrShiftDefer): Update comment.
12646 (yyresolveStates): Use X == NULL for pointers, not !X.
12647 (yyglrReduce): Ditto.
12648 (yydoAction): Ditto
12649
12650 * tests/glr-regr1.at: Rename to ...
12651 * tests/glr-regression.at: Add new regression test for the problems
12652 described above (adapted from S. Eken).
12653 Update copyright notice.
12654 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12655 * tests/Makefile.am: Ditto.
12656
12657 2003-01-28 Paul Eggert <eggert@twinsun.com>
12658
12659 * data/lalr1.cc: Do not use @output_header_name@ unless
12660 b4_defines_flag is set. This fixes two bugs reported by
12661 Tim Van Holder in
12662 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12663 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12664
12665 2003-01-21 Paul Eggert <eggert@twinsun.com>
12666
12667 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12668 we don't need to worry about yyerrlab1 being reported as an
12669 "unused label" by non-GCC C compilers. The downside is that if
12670 locations are used then a couple of statements are duplicated each
12671 time YYERROR is invoked, but the upside is that the warnings
12672 should vanish.
12673 (yyerrlab1): Move code to YERROR.
12674 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12675 This reverts some of the 2002-12-27 change.
12676
12677 2003-01-17 Paul Eggert <eggert@twinsun.com>
12678
12679 * src/output.c (symbol_printers_output): Fix typo that led
12680 to core dump. Problem reported by Antonio Rus in
12681 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12682
12683 2003-01-13 Akim Demaille <akim@epita.fr>,
12684 Quoc Peyrot <chojin@lrde.epita.fr>,
12685 Robert Anisko <anisko_r@lrde.epita.fr>
12686
12687 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12688 when the stacks contain one element, as the loop would otherwise
12689 free the last state, and then use the top state (the one we just
12690 popped). This means that the initial elements will not be freed
12691 explicitly, as is the case in yacc.c; it is not a problem, as
12692 these elements have fake values.
12693
12694 2003-01-11 Paul Eggert <eggert@twinsun.com>
12695
12696 * NEWS: %expect-violations are now just warnings, reverting
12697 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12698 bootstrapping problem reported by Matthias Klose; see
12699 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12700 * src/conflicts.c (conflicts_print): Likewise.
12701 * tests/conflicts.at (%expect not enough, %expect too much,
12702 %expect with reduce conflicts): Likewise.
12703 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12704 that the warning is enabled if the number of conflicts changes
12705 (not necessarily increases).
12706
12707 * src/getargs.c (version): Update copyright year.
12708
12709 2003-01-09 Akim Demaille <akim@epita.fr>
12710
12711 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12712
12713 2003-01-08 Paul Eggert <eggert@twinsun.com>
12714
12715 * Makefile.maint (WGETFLAGS):
12716 New macro, containing "-C off" to disable proxy caches.
12717 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12718 (rel-check): Use $(WGET) instead of wget.
12719
12720 2003-01-06 Paul Eggert <eggert@twinsun.com>
12721
12722 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12723 the GLR paper of Scott, Johnstone and Hussain.
12724
12725 2003-01-04 Paul Eggert <eggert@twinsun.com>
12726
12727 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12728 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12729 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12730 (EXTRA_LIBRARIES): New var, for liby.a.
12731 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12732 (EXTRA_SCRIPTS): New var, for yacc.
12733
12734 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12735 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12736 Problem reported by Nelson H. F. Beebe.
12737
12738 2003-01-03 Paul Eggert <eggert@twinsun.com>
12739
12740 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12741 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12742 when compiling Bison 1.875's `bitset bset = obstack_alloc
12743 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12744
12745 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12746 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12747 grow to a huge size with typical invocation.
12748
12749 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12750 Use the pattern recommended by Autoconf 2.57, except also protect
12751 against double-definition.
12752 * src/system.h: Likewise.
12753 Portability issues reported by Nelson H. F. Beebe.
12754
12755 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12756 All uses changed. Provide a definition in both C and C++.
12757 (yytrue, yyfalse): Define even if defined (__cplusplus).
12758
12759 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12760 Reported by Nelson H. F. Beebe.
12761
12762 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12763
12764 2003-01-02 Paul Eggert <eggert@twinsun.com>
12765
12766 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12767 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12768 Bug reported by Nelson H. F. Beebe.
12769
12770 2003-01-01 Paul Eggert <eggert@twinsun.com>
12771
12772 * Version 1.875.
12773
12774 2002-12-30 Paul Eggert <eggert@twinsun.com>
12775
12776 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12777 Moved here from...
12778 (<INITIAL>","): Here. This causes stray "," to be treated
12779 more uniformly.
12780
12781 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12782 last brace in braced code when not in Yacc mode, for compatibility
12783 with Bison 1.35. This resurrects the 2001-12-15 patch to
12784 src/reader.c.
12785
12786 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12787 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12788
12789 2002-12-28 Paul Eggert <eggert@twinsun.com>
12790
12791 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12792 that of SYM's type. This fixes Debian bug 168069, reported by
12793 Thomas Olsson.
12794
12795 2002-12-28 Paul Eggert <eggert@twinsun.com>
12796
12797 Version 1.75f.
12798
12799 Switch back to the Yacc style of conflict reports, undoing some
12800 of the 2002-07-30 change.
12801 * doc/bison.texinfo (Understanding): Use Yacc style for
12802 conflict reports. Also, use new way of locating rules.
12803 * src/conflicts.c (conflict_report):
12804 Renamed from conflict_report_yacc, removing the old
12805 'conflict_report'. Translate the entire conflict report at once,
12806 so that we don't assume that "," has the same interpretation in
12807 all languages.
12808 (conflicts_output): Use Yacc-style conflict report for each state,
12809 instead of our more-complicated style.
12810 (conflicts_print): Use Yacc-style conflict report, except print
12811 the input file name when not emulating Yacc.
12812 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12813 Conflicted Reduction, %expect not enough, %expect too much,
12814 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12815 * tests/existing.at (GNU Cim Grammar): Likewise.
12816 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12817
12818 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12819 fatal): Don't invoke fflush; it's not needed and it might even be
12820 harmful for stdout, as stdout might not be open.
12821 * src/reduce.c (reduce_print): Likewise.
12822
12823 2002-12-27 Paul Eggert <eggert@twinsun.com>
12824
12825 Fix a bug where error locations were not being recorded correctly.
12826 This problem was originally reported by Paul Hilfinger in
12827 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12828
12829 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12830 top of the location stack's error locations.
12831 (yyerrlab): Set it. When discarding a token, push its location
12832 onto yylerrsp so that we don't lose track of the error's end.
12833 (yyerrlab1): Now is only the target of YYERROR, so that we can
12834 properly record the location of the action that failed. For GCC
12835 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12836 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12837 (yyerrlab2): New label, which yyerrlab now falls through to.
12838 Compute the error's location by applying YYLLOC_DEFAULT to
12839 the locations of all the symbols that went into the error.
12840 * doc/bison.texinfo (Location Default Action): Mention that
12841 YYLLOC_DEFAULT is also invoked for syntax errors.
12842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12843 Error locations include the locations of all the tokens that were
12844 discarded, not just the last token.
12845
12846 2002-12-26 Paul Eggert <eggert@twinsun.com>
12847
12848 * src/files.c: Include quote.h.
12849 (compute_output_file_names): Warn if we detect conflicting
12850 outputs to the same file. This should catch the misunderstanding
12851 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12852
12853 * src/conflicts.c (conflicts_print): If the user specifies
12854 "%expect N", report an error if there are any reduce/reduce
12855 conflicts. This is what the manual says should happen.
12856 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12857 * tests/conflicts.at (%expect with reduce conflicts): New test.
12858
12859 Don't use m4_include on relative file names, as it doesn't work as
12860 desired if there happens to be a file with that name under ".".
12861
12862 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12863 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12864 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12865 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12866 * src/output.c (output_skeleton): Use full path names when
12867 specifying a file to include; don't rely on include path, as
12868 it's unreliable when the working file contains a file with
12869 that name.
12870
12871 2002-12-25 Paul Eggert <eggert@twinsun.com>
12872
12873 Remove obsolete references to bison.simple and bison.hairy.
12874 Problem mentioned by Aubin Mahe in
12875 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12876 * data/glr.c: Comment fix.
12877 * doc/bison.1: Remove references. Also, mention "yacc".
12878
12879 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12880 with -g option.
12881
12882 * src/parse-gram.y (declaration): Use enum "report_states" rather
12883 than its numeric value 1.
12884
12885 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12886 opening a new one. This fixes Debian bug 165349, reported by
12887 Bruce Stephens.
12888
12889 2002-12-24 Paul Eggert <eggert@twinsun.com>
12890
12891 Version 1.75e.
12892
12893 * Makefile.maint (cvs-update): Don't assume that the shell
12894 supports $(...), as Solaris sh doesn't.
12895
12896 * src/parse-gram.y (lloc_default): Remove test for empty
12897 nonterminals at the end, since it didn't change the result.
12898
12899 2002-12-24 Paul Eggert <eggert@twinsun.com>
12900
12901 If the user does not define YYSTYPE as a macro, Bison now declares it
12902 using typedef instead of defining it as a macro. POSIX requires this.
12903 For consistency, YYLTYPE is also declared instead of defined.
12904
12905 %union directives can now have a tag before the `{', e.g., the
12906 directive `%union foo {...}' now generates the C code
12907 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12908 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12909 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12910 instead of `yyltype'.
12911
12912 `yystype' and `yyltype' are now obsolescent macros instead of being
12913 typedefs or tags; they are no longer documented and will be
12914 withdrawn in a future release.
12915
12916 * data/glr.c (b4_location_type): Remove.
12917 (YYSTYPE): Renamed from yystype.
12918 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12919 (struct YYLTYPE): Renamed from struct yyltype.
12920 (YYLTYPE): Renamed from yyltype.
12921 (yyltype, yystype): New (and obsolescent) macros,
12922 for backward compatibility.
12923 * data/yacc.c: Likewise.
12924
12925 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12926 does not specify a union tag. This is for compatibility with
12927 Solaris 9 yacc.
12928
12929 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12930 const *, since it is now modified by stripping surrounding { }.
12931 (current_braced_code): Remove.
12932 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12933 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12934 trailing " {...}". Now of type <chars>.
12935 (grammar_declaration): Adjust to bundled tokens.
12936 (code_content): Remove; stripping is now done by add_param.
12937 (print_token_value): Print contents of bundled tokens.
12938 (token_name): New function.
12939
12940 * src/reader.h (braced_code, current_braced_code): Remove.
12941 (token_name): New decl.
12942
12943 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12944 token_type, not braced_code code_kind. All uses changed.
12945 (SC_PRE_CODE): New state, for scanning after a keyword that
12946 has (or usually has) an immediately-following braced code.
12947 (token_type): New local var, to keep track of which token type
12948 to return when scanning braced code.
12949 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12950 <INITIAL>"%parse-param", <INITIAL>"%printer",
12951 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12952 instead of returning a token type immediately.
12953 (<INITIAL>"{"): Set token type.
12954 (<SC_BRACED_CODE>"}"): Use it.
12955 (handle_action_dollar, handle_action_at): Now returns bool
12956 indicating success. Fail if ! current_rule; this prevents a core dump.
12957 (handle_symbol_code_dollar, handle_symbol_code_at):
12958 Remove; merge body into caller.
12959 (handle_dollar, handle_at): Complain in invalid contexts.
12960
12961 * NEWS, doc/bison.texinfo: Document the above.
12962 * NEWS: Fix years and program names in copyright notice.
12963
12964 2002-12-17 Paul Eggert <eggert@twinsun.com>
12965
12966 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12967 Reporting, Table of Symbols): Omit mentions of %lex-param and
12968 %parse-param from the documentation for now.
12969
12970 2002-12-15 Paul Eggert <eggert@twinsun.com>
12971
12972 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12973 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12974 lookahead symbol, and which sets yychar in parser actions) and it
12975 disagreed with the Bison documentation. Bug
12976 reported by Andrew Walrond.
12977
12978 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12979 as the caller now does that.
12980 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12981 (YYEMPTY): Parenthesize right hand side, since others use it.
12982 (yyparse): Don't assume that our generated code is the only code
12983 that sets yychar.
12984
12985 2002-12-13 Paul Eggert <eggert@twinsun.com>
12986
12987 Version 1.75d.
12988
12989 POSIX requires a "yacc" command.
12990 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12991 (MOSTLYCLEANFILES): Add yacc.
12992 (yacc): New rule.
12993 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12994 as an alias for bison y.
12995
12996 * po/LINGUAS: Add da.
12997
12998 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12999 problem with latest <getopt.h>.
13000 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13001
13002 * doc/fdl.texi: Upgrade to 1.2.
13003 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13004 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13005 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13006 gnulib.
13007 * config/install-sh: Sync with autotools.
13008
13009 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13010 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13011 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13012 locations are requested.
13013 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13014 locations are requested.
13015
13016 2002-12-12 Paul Eggert <eggert@twinsun.com>
13017
13018 Remove unportable casts and storage allocation tricks.
13019 While we're at it, remove almost all casts, since they
13020 usually aren't needed and are a sign of trouble.
13021
13022 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13023
13024 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13025 the pointer DSET returned by malloc; this isn't portable.
13026 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13027 Similarly for DERIVES.
13028 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13029 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13030 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13031
13032 * src/derives.c (derives_compute): Do not bother invoking
13033 int_of_rule_number, since rule numbers are integers.
13034
13035 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13036 rather than XMALLOC (char, N).
13037
13038 * src/files.c (filename_split): Rewrite to avoid cast.
13039
13040 * src/gram.h (symbol_number_as_item_number,
13041 item_number_as_symbol_number, rule_number_as_item_number,
13042 item_number_as_rule_number):
13043 Now inline functions rather than macros, to avoid casts.
13044 * src/state.h (state_number_as_int): Likewise.
13045 * src/tables.c (state_number_to_vector_number,
13046 symbol_number_to_vector_number): Likewise.
13047
13048 * src/gram.h (int_of_rule_number): Remove; no longer used.
13049
13050 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13051 since the resulting storage is always stored into.
13052
13053 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13054 where it's needed.
13055
13056 * src/muscle_tab.c (muscle_m4_output):
13057 Now inline. Return bool, not int.
13058 * src/state.c (state_compare): Likewise.
13059 * src/symtab.c (symbol_check_defined,
13060 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13061 hash_compare_symbol, hash_symbol):
13062 Likewise.
13063 * src/uniqstr.c (uniqstr_print): Likewise.
13064 * src/muscle_tab.c (muscle_m4_output_processor):
13065 New function, to avoid casts.
13066 * src/state.c (state_comparator, stage_hasher): Likewise.
13067 * src/symtab.c (symbol_check_defined_processor,
13068 symbol_check_alias_consistency_processor, symbol_pack_processor,
13069 symbol_translation_processor, hash_symbol_comparator,
13070 hash_symbol_hasher): Likewise.
13071 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13072 * src/muscle_tab.c (muscles_m4_output):
13073 Use new functions instead of casting old functions unportably.
13074 * src/state.c (state_hash_new): Likewise.
13075 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13076 symbols_token_translations_init):
13077 Likewise.
13078 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13079
13080 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13081 var instead of casting to long, to avoid casts.
13082 (prepare_states): Use MALLOC rather than alloca, so that we don't
13083 have to worry about alloca.
13084 * src/state.c (state_hash_lookup): Likewise.
13085
13086 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13087 local var instead of casting to unsigned char, to avoid casts.
13088
13089 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13090 STATE_ALLOC): Remove.
13091 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13092 rather than calloc, and use offsetof to avoid allocating slightly
13093 too much storage.
13094 (state_new): Initialize all members.
13095
13096 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13097
13098 * src/symtab.c (symbol_free): Remove; unused.
13099 (symbol_get): Remove cast in lhs of assignment.
13100 (symbols_do): Now static. Accept generic arguments, not
13101 hashing-related ones.
13102
13103 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13104 (symbol_processor): Remove.
13105 (symbols_do): Remove decl; now static.
13106
13107 * src/system.h (alloca): Remove; decl no longer needed.
13108 (<stddef.h>): Include, for offsetof.
13109 (<inttypes.>, <stdint.h>): Include if available.
13110 (uintptr_t): New type, if system lacks it.
13111 (CALLOC, MALLOC, REALLOC): New macros.
13112 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13113 new macros.
13114
13115 * src/tables.c (table_size): Now int, to pacify GCC.
13116 (table_grow, table_ninf_remap): Use signed table size.
13117 (save_row): Don't bother initializing locals when not needed.
13118 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13119 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13120
13121 * src/vcg.h: Correct misspellings.
13122
13123 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13124
13125
13126 * src/getargs.c (getargs): Don't assume EOF == -1.
13127
13128 2002-12-09 Paul Eggert <eggert@twinsun.com>
13129
13130 Change identifier spellings to avoid collisions with names
13131 that are reserved by POSIX.
13132
13133 Don't use names ending in _t, since POSIX reserves them.
13134 For consistency, remove _e and _s endings -- they're weren't
13135 needed to remove ambiguity. All uses changed.
13136 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13137 turn was just renamed from struniq_t.
13138 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13139 which in turn was just renamed from struniq_processor_t.
13140 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13141 in turn was renamed from hash_compare_struniq_t.
13142 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13143 (state_list): Renamed from state_list_t.
13144 * src/assoc.h (assoc): Renamed from assoc_t.
13145 * src/conflicts.c (enum conflict_resolution): Renamed from
13146 enum conflict_resolution_e.
13147 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13148 (rule_list): Renamed from rule_list_t.
13149 * src/getargs.h (enum trace): Renamed from enum trace_e.
13150 (enum report): Renamed from enum report_e.
13151 * src/gram.h (item_number): Renamed from item_number_t.
13152 (rule_number): Renamed from rule_number_t.
13153 (struct rule_s): Remove the "rule_s" part; not used.
13154 (rule): Renamed from rule_t.
13155 (rule_filter): Renamed from rule_filter_t.
13156 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13157 (goto_list): Renamed from goto_list_t.
13158 * src/lalr.h (goto_number): Renamed from goto_number_t.
13159 * src/location.h (location): Renamed from location_t.
13160 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13161 and moved here from:
13162 * src/muscle_tab.h (muscle_entry_t): here.
13163 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13164 (rule_list): Renamed from rule_list_t.
13165 * src/print_graph.c (static_graph): Renamed from graph.
13166 * src/reader.h (braced_code): Renamed from braced_code_t.
13167 Remove brace_code_e tag.
13168 * src/relation.h (relation_node): Renamed from relation_node_t.
13169 (relation_nodes): Renamed from relation_nodes_t.
13170 (relation): Renamed from relation_t.
13171 * src/state.h (state_number): Renamed from state_number_t.
13172 (struct state): Renamed from struct state_s.
13173 (state): Renamed from state_t.
13174 (transitions): Renamed from transitions_t. Unused (and
13175 misspelled) transtion_s tag removed.
13176 (errs): Renamed from errs_t. Unused errs_s tag removed.
13177 (reductions): Renamed from reductions_t. Unused tag
13178 reductions_s removed.
13179 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13180 (struct symbol_list): Renamed from struct symbol_list_s.
13181 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13182 (struct symbol): Renamed from struct symbol_s.
13183 (symbol): Renamed from symbol_t.
13184 * src/tables.c (vector_number): Renamed from vector_number_t.
13185 (action_number): Renamed from action_t.
13186 * src/tables.h (base_number): Renamed from base_t.
13187 * src/vcg.h (enum color): Renamed from enum color_e.
13188 (enum textmode): Renamed from enum textmode_e.
13189 (enum shape): Renamed from enum shape_e.
13190 (struct colorentry): Renamed from struct colorentry_s.
13191 (struct classname): Renamed from struct classname_s.
13192 (struct infoname): Renamed from struct infoname_s.
13193 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13194 (enum decision): Renamed from enum decision_e.
13195 (enum orientation): Renamed from enum orientation_e.
13196 (enum alignment): Renamed from enum alignment_e.
13197 (enum arrow_mode): Renamed from enum arrow_mode_e.
13198 (enum crossing_type): Renamed from enum crossing_type_e.
13199 (enum view): Renamed from enum view_e.
13200 (struct node): Renamed from struct node_s.
13201 (node): Renamed from node_t.
13202 (enum linestyle): Renamed from enum linestyle_e.
13203 (enum arrowstyle): Renamed from enum arrowstyle_e.
13204 (struct edge): Renamed from struct edge.
13205 (edge): Renamed from edge_t.
13206 (struct graph): Renamed from struct graph_s.
13207 (graph): Renamed from graph_t.
13208 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13209 Rename value_t -> value.
13210 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13211 value_t_as_yystype -> value_as_yystype.
13212
13213 Don't include <errno.h> in the mainstream code, since it
13214 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13215 * lib/get-errno.c, lib/get-errno.h: New files.
13216 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13217 get-errno.c.
13218 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13219 * src/output.c (output_skeleton): Likewise.
13220 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13221 instead of errno.
13222 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13223 Likewise.
13224 (handle_action_dollar, handle_action_at): Likewise.
13225 * src/system.h: Do not include <errno.h>.
13226 (TAB_EXT): Renamed from EXT_TAB.
13227 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13228
13229 Avoid str[a-z]*, since <string.h> reserves that name space.
13230 Change all instances of "struniq" in names to "uniqstr", and
13231 likewise for "STRUNIQ" and "UNIQSTR".
13232 * src/uniqstr.c: Renamed from src/struniq.c.
13233 * src/uniqstr.h: Renamed from src/struniq.h.
13234 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13235 * src/files.c (strsuffix): Remove; unused.
13236 (concat2): Renamed from stringappend. Now static.
13237 * src/files.h (strsuffix, stringappend): Remove; unused.
13238 * src/parse-gram.y (<chars>): Renamed from <string>.
13239 (<uniqstr>): Renamed from <struniq>.
13240 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13241 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13242 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13243 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13244 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13245 (N_EXPAND): Renamed from N_STRETCH.
13246
13247 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13248 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13249 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13250 Remove; unused.
13251 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13252 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13253 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13254 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13255 (BASE_MAXIMUM): Renamed from BASE_MAX.
13256 (BASE_MINIMUM): Renamed from BASE_MIN.
13257 (ACTION_MAX): Remove; unused.
13258 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13259 Unnecessary casts removed from above defines.
13260
13261
13262 Fix misspelling in names.
13263 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13264 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13265 G_NODE_ALIGNEMENT.
13266
13267
13268 * lib/timevar.c (timevar_report): Renamed from time_report,
13269 for consistency with other names.
13270 * lib/timevar.h (timevar_report): New decl.
13271 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13272
13273
13274 Sort include-file uses.
13275
13276 Reorder all include files under src to be in the order "system.h".
13277 then the ../lib include files in angle brackets (alphabetized),
13278 then the . include files in double-quotes (alphabetized). Fix
13279 dependency breakages encountered in this process, as follows:
13280 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13281 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13282 * src/state.h: Include "symtab.h".
13283
13284 2002-12-08 Paul Eggert <eggert@twinsun.com>
13285
13286 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13287 since this causes problems when __file__ contains character
13288 sequences like "@" that are treated specially by src/scan-skel.l.
13289 Instead, just use the file's basename. This fixes the bug
13290 reported by Martin Mokrejs in
13291 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13292
13293 2002-12-06 Paul Eggert <eggert@twinsun.com>
13294
13295 Add support for rules that do not have trailing semicolons, as
13296 POSIX requires. Improve the quality of locations in Bison
13297 diagnostics.
13298
13299 * src/location.c: Include <quotearg.h>.
13300 (empty_location): Now const.
13301 (location_print): New function. Follow the recommendation of the
13302 GNU Coding Standards for locations that span file boundaries.
13303 * src/location.h: Do not include <quotearg.h>; no longer needed.
13304 (boundary): New type.
13305 (location_t): Use it. This allows locations to span file boundaries.
13306 All member uses changed: file -> start.file or end.file (as needed),
13307 first_line -> start.line, first_column -> start.column,
13308 last_line -> end.line, last_column -> end.column.
13309 (equal_boundaries): New function.
13310 (LOCATION_RESET, LOCATION_STEP): Remove.
13311 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13312 (empty_location): Now const.
13313 (location_print): New decl.
13314 * src/parse-gram.y (lloc_default): New function, which handles
13315 empty locations more accurately.
13316 (YYLLOC_DEFAULT): Use it.
13317 (%token COLON): Remove.
13318 (%token ID_COLON): New token.
13319 (rules): Use it.
13320 (declarations, rules): Remove trailing semicolon.
13321 (declaration, rules_or_grammar_declaration):
13322 Allow empty (";") declaration.
13323 (symbol_def): Remove empty actions; no longer needed.
13324 (rules_or_grammar_declaration): Remove trailing semicolon.
13325 (semi_colon.opt): Remove.
13326 * src/reader.h: Include location.h.
13327 (scanner_cursor): New decl.
13328 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13329 rolling our own.
13330 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13331 of *loc.
13332 (STEP): Remove. No longer needed, now that adjust_location does
13333 the work. All uses removed.
13334 (scanner_cursor): New var.
13335 (adjust_location): Renamed from extend_location. It now sets
13336 *loc and adjusts the scanner cursor. All uses changed.
13337 Don't bother testing for CR.
13338 (handle_syncline): Remove location arg; now updates scanner cursor.
13339 All callers changed.
13340 (unexpected_end_of_file): Now accepts start boundary of token or
13341 comment, not location. All callers changed. Update scanner cursor,
13342 not the location.
13343 (SC_AFTER_IDENTIFIER): New state.
13344 (context_state): Renamed from c_context. All uses changed.
13345 (id_loc, code_start, token_start): New local vars.
13346 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13347 processing of Yacc white space and equivalents here.
13348 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13349 instead of returning ID immediately, since we need to search for
13350 a subsequent colon.
13351 (<INITIAL>"'", "\""): Save token_start.
13352 (<INITIAL>"%{", "{", "%%"): Save code_start.
13353 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13354 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13355 BEGIN context_state at end, not INITIAL.
13356 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13357 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13358 Return correct token start.
13359 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13360 the start of a character, string or multiline comment is found.
13361 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13362 Reduction): Adjust reported locations to match the more-precise
13363 results now expected.
13364 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13365 * tests/reduce.at (Useless Rules, Reduced Automaton,
13366 Underivable Rules): Likewise.
13367 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13368 or "|"' now that so many other tokens are allowed by the new grammar.
13369
13370 * src/complain.h (current_file): Remove duplicate decl;
13371 current_file is now owned by files.h.
13372 * src/complain.c, src/scan-gram.l: Include files.h.
13373
13374 2002-12-06 Paul Eggert <eggert@twinsun.com>
13375
13376 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13377 promotes to int; it might be unsigned int.
13378 * data/yacc.c (yy_reduce_print): Likewise.
13379
13380 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13381 be #defined in the prologue, not in the Bison declarations.
13382 This fixes Debian Bug 102878, reported by Shaul Karl.
13383
13384 2002-12-02 Paul Eggert <eggert@twinsun.com>
13385
13386 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13387 * lib/strtoul.c: New file, from gnulib.
13388 This fixes a porting bug reported by Peter Klein in
13389 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13390
13391 2002-11-30 Paul Eggert <eggert@twinsun.com>
13392
13393 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13394 and put only a forward declaration in the prologue. This is for
13395 consistency with the other scanner helper functions.
13396
13397 Type clashes now generate warnings, not errors, since it
13398 appears that POSIX may allow some grammars with type clashes.
13399 * src/reader.c (grammar_current_rule_check): Warn about
13400 type clashes instead of complaining.
13401 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13402
13403 Add Yacc library, since POSIX requires it.
13404 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13405 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13406 * lib/main.c, lib/yyerror.c: New files.
13407
13408 gram_error can be static; it need not be extern.
13409 * src/reader.h (gram_error): Remove decl.
13410 * src/parse-gram.y (gram_error): Now static. Add static decl.
13411 (print_token_value): Omit parameter names from forward decl,
13412 for consistency.
13413
13414 2002-11-29 Paul Eggert <eggert@twinsun.com>
13415
13416 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13417 be declared before being used. E.g., one should typically
13418 declare them in the prologue. Use GNU coding style in examples.
13419 Put "const" consistently after the type it modifies. Mention
13420 that C99 supports "inline". Mention that yyerror traditionally
13421 returns "int".
13422
13423 %parse-param and %lex-param now take just one argument, the
13424 declaration; the argument name is deduced from the declaration.
13425
13426 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13427 Reporting, Table of Symbols): Document this.
13428 * src/parse-gram.y (add_param): New function.
13429 (COMMA): Remove.
13430 (declaration): Implement new rule for %parse-param and %lex-param.
13431 * src/scan-gram.l: "," now elicits a warning, rather than being
13432 a token; this is more compatible with byacc.
13433 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13434
13435 2002-11-27 Paul Eggert <eggert@twinsun.com>
13436
13437 Rename identifiers to avoid real and potential collisions.
13438
13439 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13440 to avoid collision with lex macro described by Bruce Lilly in
13441 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13442 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13443 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13444 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13445 All uses changed.
13446 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13447 The name "yycontrol" violates the name space rules, and this stuff
13448 wasn't being used anyway.
13449 (input): Remove action; this stuff wasn't being used.
13450 (gram_error): Rename local variable yylloc -> loc.
13451 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13452 (YY_DECL): Don't use "yy" at start of local variables.
13453 All uses changed, e.g., yylloc -> loc.
13454 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13455 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13456 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13457 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13458
13459 * src/parse-gram.y (gram_error): loc is now const *.
13460 * src/reader.h (gram_error): Likewise.
13461
13462 2002-11-24 Paul Eggert <eggert@twinsun.com>
13463
13464 Version 1.75c.
13465
13466 * tests/actions.at (Actions after errors): Use an output format
13467 more similar to that of the Printers and Destructors test.
13468 Test the position of the ';' token too.
13469 (Printers and Destructors): Likewise.
13470 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13471 unnecessarily alarming people when the test fails.
13472
13473 * data/yacc.c (yyerrlab1): Move this label down, so that the
13474 parser does not discard the lookahead token if the user code
13475 invokes YYERROR. This change is required for POSIX conformance.
13476
13477 * lib/error.c: Sync with gnulib.
13478
13479 2002-11-22 Paul Eggert <eggert@twinsun.com>
13480
13481 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13482 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13483 * lib/xmalloc.c: Likewise.
13484
13485 2002-11-20 Paul Eggert <eggert@twinsun.com>
13486
13487 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13488
13489 2002-11-20 Paul Eggert <eggert@twinsun.com>
13490
13491 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13492 should use `if (! x) abort ();' rather than `assert (x);', and
13493 anyway it's one less thing to worry about configuring.
13494
13495 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13497 and replace all instances of assert with abort.
13498 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13499 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13500
13501 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13502 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13503 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13504 hash_find_entry, hash_rehash, hash_insert): Likewise.
13505 * src/conflicts.c (resolve_sr_conflict): Likewise.
13506 * src/lalr.c (set_goto_map, map_goto): Likewise.
13507 * src/nullable.c (nullable_compute): Likewise.
13508 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13509 * src/reader.c (packgram, reader): Likewise.
13510 * src/state.c (state_new, state_free, state_transitions_set,
13511 state_reduction_find): Likewise.
13512 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13513 symbol_pack): Likewise.
13514 * src/tables.c (conflict_row, pack_vector): Likewise.
13515 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13516 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13517 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13518 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13519
13520 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13521 (ARGMATCH_CONSTRAINT): New macro.
13522 (ARGMATCH_ASSERT): Use it.
13523
13524 * src/system.h (verify): New macro.
13525 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13526 rather than assert.
13527 * src/tables.c (tables_generate): Likewise.
13528
13529 * src/struniq.c (struniq_assert): Now returns void, and aborts
13530 if the assertion is false.
13531 (struniq_assert_p): Remove.
13532 * src/struniq.h: Likewise.
13533
13534 2002-11-18 Paul Eggert <eggert@twinsun.com>
13535
13536 * data/glr.c (yygetLRActions): Replace `yyindex' with
13537 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13538 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13539 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13540
13541 2002-11-18 Akim Demaille <akim@epita.fr>
13542
13543 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13544 space.
13545 From Tim Van Holder.
13546
13547 2002-11-17 Paul Eggert <eggert@twinsun.com>
13548
13549 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13550 to "SyntaxError" for consistency with my 2002-11-15 change.
13551
13552 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13553 not define to {}, since this breaks the common use of `YYDPRINTF
13554 ((...));' if a single statement is desired (e.g. before `else').
13555 Work around GCC warnings by surrounding corresponding calls with
13556 {} if needed.
13557 (yyhasResolvedValue): Remove unused function.
13558 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13559 loop body.
13560 (yyreportSyntaxError): Renamed from yyreportParseError.
13561 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13562 All uses changed.
13563 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13564 extern when possible. Remove unused initializations.
13565
13566 2002-11-16 Akim Demaille <akim@epita.fr>
13567
13568 Augment the similarity between GLR and LALR traces.
13569
13570 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13571 (YY_REDUCE_PRINT): New.
13572 (yyparse): Use them.
13573 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13574 YYDPRINT here.
13575 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13576 state reached after the reduction/recovery, since...
13577 (yyparse, yyprocessOneStack): Report the state we are entering in.
13578
13579 2002-11-16 Akim Demaille <akim@epita.fr>
13580
13581 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13582 Add support for --trace=skeleton.
13583 * src/scan-skel.l: %option debug.
13584 Scan strings of non-@ or \n instead of character by character.
13585 (scan_skel): Handle trace_skeleton.
13586 (QPUTS): New.
13587 (@output_parser_name@, @output_header_name@): ``Restore'' their
13588 support (used to be M4 macros).
13589 * data/yacc.c: Quote larger chunks, a la glr.c.
13590 * data/lalr1.cc: Likewise.
13591 The header guards are no longer available, so use some other
13592 string than `YYLSP_NEEDED'.
13593
13594 2002-11-16 Akim Demaille <akim@epita.fr>
13595
13596 Make the ``Printers and Destructors'' test more verbose, taking
13597 `yacc.c''s behavior as (possibly wrong) reference.
13598
13599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13600 instead of fprint on stdout.
13601 Set and report the last_line of the symbols.
13602 Consistently display values and locations.
13603
13604 2002-11-16 Paul Eggert <eggert@twinsun.com>
13605
13606 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13607
13608 2002-11-15 Paul Eggert <eggert@twinsun.com>
13609
13610 * tests/actions.at (Actions after errors): New test case.
13611
13612 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13613 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13614 tests/action.at, tests/calc.at, tests/conflicts.at,
13615 tests/cxx-type.at, tests/regression.at:
13616 "parse error" -> "syntax error" for POSIX compatibility.
13617 "parsing stack overflow..." -> "parser stack overflow" so
13618 that code matches Bison documentation.
13619
13620 2002-11-15 Akim Demaille <akim@epita.fr>
13621
13622 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13623 take two BRACED_CODE, not two string_content.
13624 Free the scanner's obstack when we are done.
13625 (code_content): New.
13626 * tests/calc.at: Adjust.
13627 * doc/bison.texinfo: Adjust.
13628 Also, make sure to include the `,' for these declarations.
13629
13630 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13631
13632 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13633 definition; avoids potential autoreconf problems.
13634
13635 2002-11-15 Akim Demaille <akim@epita.fr>
13636
13637 Always check the value returned by yyparse.
13638
13639 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13640 returned by yyparse.
13641 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13642 Adjust calls.
13643 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13644 returned by yyparse.
13645
13646 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13647
13648 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13649 on input.at test.
13650
13651 2002-11-14 Paul Eggert <eggert@twinsun.com>
13652
13653 * src/output.c (output_skeleton): Call xfopen instead of
13654 duplicating xfopen's body.
13655
13656 Fix bugs reported by Nelson H. F. Beebe in
13657 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13658
13659 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13660 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13661 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13662 file twice in the grammar, as an extra check.
13663
13664 * tests/input.at (Torturing the Scanner): Surround the
13665 backslash-newline tests with "#if 0", to make it less likely that
13666 we'll run into compiler bugs. Bring back solitary \ inside
13667 comment, but add a closing comment to work around HP C bug. Don't
13668 test backslash-newline in C character constant.
13669
13670 2002-11-14 Akim Demaille <akim@epita.fr>
13671
13672 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13673 status of the compiler.
13674 Calling `exit 1' is no longer needed.
13675 Reported by Nelson H. F. Beebe.
13676
13677 2002-11-14 Akim Demaille <akim@epita.fr>
13678
13679 * tests/atlocal.in (CPPFLAGS): We have config.h.
13680 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13681 New.
13682 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13683 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13684 * tests/regression.at, tests/torture.at: Use them for all the
13685 grammars that are to be compiled.
13686 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13687 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13688 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13689
13690 2002-11-14 Akim Demaille <akim@epita.fr>
13691
13692 * doc/bison.texinfo: Various formatting changes (alignments in
13693 samples, additional @group/@end group, GCS in samples.
13694 Use @deffn instead of simple @table to define the directives,
13695 macros, variables etc.
13696
13697 2002-11-13 Paul Eggert <eggert@twinsun.com>
13698
13699 Fix some bugs reported by Albert Chin-A-Young in
13700 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13701
13702 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13703 -o c"; the HP C compiler chatters during compilation.
13704 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13705 * tests/headers.at (export YYLTYPE): Likewise.
13706
13707 * tests/input.at (Torturing the Scanner): Remove lines containing
13708 solitary backslashes, as they tickle a bug in the HP C compiler.
13709
13710 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13711 comments, since they're not portable. Use GNU coding style.
13712
13713 2002-11-13 Akim Demaille <akim@epita.fr>
13714
13715 * data/yacc.c: Leave bigger chunks of quoted text.
13716 (YYDSYMPRINTF): New.
13717 Use it to report symbol activities.
13718 * data/glr.c (YYDSYMPRINTF): New.
13719 Use it.
13720
13721 2002-11-12 Paul Eggert <eggert@twinsun.com>
13722
13723 Version 1.75b.
13724
13725 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13726 (yyglrReduce): Return yyok, not 0.
13727 This should avoid the enumerated-type warnings reported
13728 by Nelson H. F. Beebe in
13729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13730
13731 * lib/bbitset.h (BITSET_INLINE): Remove.
13732 * lib/bitset.h [! BITSET_INLINE]: Remove.
13733 (bitset_set, bitset_reset, bitset_test): Rename local vars
13734 to avoid shadowing warnings by GCC.
13735
13736 * data/glr.c (inline): Remove #define. It's the user's
13737 responsibility to #define it away, just like 'const'.
13738 This fixes one of the bugs reported by Nelson H. F. Beebe in
13739 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13740
13741 * Makefile.maint (po-check): Scan .l and .y files instead of the
13742 .c and the .h files that they generate. This fixes the bug
13743 reported by Tim Van Holder in:
13744 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13745 Look for N_ as well as for _. Try to avoid matching #define for
13746 N_ and _.
13747 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13748 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13749 * src/scan-gram.l: Revamp regular expressions so that " and '
13750 do not confuse xgettext.
13751
13752 * src/struniq.h (struniq_new): Do not declare the return type
13753 to be 'const'; this violates the C standard.
13754 * src/struniq.c (struniq_new): Likewise.
13755
13756 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13757
13758 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13759 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13760 linker.
13761
13762 2002-11-12 Akim Demaille <akim@epita.fr>
13763
13764 * Makefile.maint: Sync with Autoconf:
13765 (local_updates): New.
13766
13767 2002-11-12 Akim Demaille <akim@epita.fr>
13768
13769 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13770
13771 2002-11-12 Akim Demaille <akim@epita.fr>
13772
13773 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13774 locations.
13775
13776 2002-11-12 Akim Demaille <akim@epita.fr>
13777
13778 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13779 not yyvalue.
13780
13781 2002-11-12 Akim Demaille <akim@epita.fr>
13782
13783 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13784 Use it to test the GLR parser.
13785
13786 2002-11-12 Akim Demaille <akim@epita.fr>
13787
13788 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13789 defines it.
13790 * data/glr.c (yystos): New.
13791 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13792 (YYDSYMPRINT): New.
13793 (yyval): Don't define it, it is handled via M4.
13794 (yyrecoverParseError): Free verbosely the discarded symbols.
13795 * data/yacc.c (yysymprint): Remove, rather...
13796 (b4_yysymprint_generate): invoke.
13797 * data/c.m4 (b4_yysymprint_generate): New.
13798 Accept pointers as arguments, as opposed to the version from
13799 yacc.c.
13800 (b4_yydestruct_generate): Likewise.
13801 * tests/cations.at (Printers and Destructors): Use Bison directives
13802 instead of CPP macros.
13803 Don't rely on internal details.
13804
13805 2002-11-12 Akim Demaille <akim@epita.fr>
13806
13807 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13808 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13809 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13810 it against YYEMPTY and so forth), work on yytoken (i.e., set
13811 it to YYEMPTY etc.).
13812 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13813 (b4_symbol_actions): Remove.
13814 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13815 for 0, end-of-input.
13816
13817 2002-11-12 Akim Demaille <akim@epita.fr>
13818
13819 * doc/bison.texinfo (Destructor Decl): New.
13820
13821 2002-11-12 Akim Demaille <akim@epita.fr>
13822
13823 * src/tables.c (tables_generate): Use free for pointers that
13824 cannot be NULL, not XFREE.
13825 (pack_vector): Use assert, not fatal, for bound violations.
13826 * src/state.c (state_new): Likewise.
13827 * src/reader.c (reader): Likewise.
13828 * src/lalr.c (set_goto_map): Likewise.
13829 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13830 the file name.
13831
13832 2002-11-12 Akim Demaille <akim@epita.fr>
13833
13834 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13835 Restore.
13836 * src/scan-gram.l (last_string): Is global to the file, not to
13837 yylex.
13838 * src/parse-gram.y (input): Don't append the epilogue here,
13839 (epilogue.opt): do it here, and free the scanner's obstack.
13840 * src/reader.c (epilogue_set): Rename as...
13841 (epilogue_augment): this.
13842 * data/c.m4 (b4_epilogue): Defaults to empty.
13843
13844 2002-11-12 Akim Demaille <akim@epita.fr>
13845
13846 * src/getargs.c (long_options): Remove duplicates.
13847 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13848 Remove.
13849 * doc/bison.rnh: Remove.
13850 * doc/bison.texinfo (VMS Invocation): Remove.
13851
13852 2002-11-12 Akim Demaille <akim@epita.fr>
13853
13854 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13855 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13856
13857 Use struniq for symbols.
13858
13859 * src/symtab.h (symbol_t): The tag member is a struniq.
13860 (symbol_type_set): Adjust.
13861 * src/symtab.c (symbol_new): Takes a struniq.
13862 (symbol_free): Don't free the tag member.
13863 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13864 (hash_compare_symbol, hash_symbol): these.
13865 Use the fact that tags as struniqs.
13866 (symbol_get): Use struniq_new.
13867 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13868 Returns a strniq.
13869 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13870 and type members are struniqs.
13871 * src/reader.c (get_merge_function)
13872 (grammar_current_rule_merge_set): Adjust.
13873 (TYPE, current_type): Are struniq.
13874
13875 Use struniq for file names.
13876
13877 * src/files.h, src/files.c (infile): Split into...
13878 (grammar_file, current_file): these.
13879 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13880 * src/reduce.c (reduce_print): Likewise.
13881 * src/getargs.c (getargs): Likewise.
13882 * src/complain.h, src/complain.c: Likewise.
13883 * src/main.c (main): Call struniqs_new early enough to use it for
13884 file names.
13885 Don't free the input file name.
13886
13887 2002-11-12 Akim Demaille <akim@epita.fr>
13888
13889 * src/symtab.c (symbol_free): Remove dead deactivated code:
13890 type_name are properly removed.
13891 Don't use XFREE to free items that cannot be NULL.
13892 * src/struniq.h, src/struniq.c: New.
13893 * src/main.c (main): Initialize/free struniqs.
13894 * src/parse-gram.y (%union): Add astruniq member.
13895 (yyprint): Adjust.
13896 * src/scan-gram.l (<{tag}>): Return a struniq.
13897 Free the obstack bit that used to store it.
13898 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13899
13900 2002-11-11 Paul Eggert <eggert@twinsun.com>
13901
13902 Revamp to fix many (but not all) of the C- and M4-related quoting
13903 problems. Among other things, this fixes the Bison bug reported
13904 by Jan Hubicka when processing the Bash grammar; see:
13905 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13906
13907 Use new @ escapes consistently. Represent brackets with @{ and @}
13908 rather than @<:@ and @:>@, since this works a bit better with dumb
13909 editors like vi. Represent @ with @@, since @ is now consistently
13910 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13911 __ofile__, to avoid unexpected expansions. Similarly, use @output
13912 rather than #output.
13913
13914 * data/c.m4 (b4_copyright): Omit file name from comment, since
13915 the file name could contain "*/".
13916 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13917 be quoted. All uses changed.
13918
13919 * data/glr.c: Use new @ escapes consistently.
13920 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13921 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13922 Remove, since they couldn't handle arbitrary characters in file
13923 names.
13924 * data/lalr1.cc: Likewise.
13925 * data/yacc.c: Likewise.
13926
13927 * src/files.c (output_infix): Remove; all uses removed.
13928 * src/files.h: Likewise.
13929
13930 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13931 mishandled funny characters in file names, and anyway it isn't
13932 needed any more.
13933 * data/yacc.c: Likewise.
13934 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13935
13936 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13937 * data/yacc.c: Likewise.
13938
13939 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13940 strings now.
13941 (muscle_init): Quote filename as a C string.
13942 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13943 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13944 * src/output.c (escaped_file_name_output): New function.
13945 (prepare_symbols): Quote tokens for M4.
13946 (prepare): Don't insert output_infix, output_prefix,
13947 output_parser_name, output_header_name; this is now down by scan-skel.
13948 Insert skeleton as a C string.
13949
13950 * src/output.c (user_actions_output, symbol_destructors_output,
13951 symbol_printers_output): Quote filenames for C and M4.
13952 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13953
13954 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13955 escapes other than \\ and \'; this simplifies the code.
13956 (<SC_STRING>): Likewise, for \\ and \".
13957 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13958 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13959 Use new escapes @{ and @} for [ and ].
13960
13961 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13962 them with auto vars.
13963 Switch to new escape scheme, where @ is the escape character uniformly.
13964 Abort if a stray escape character is found. Avoid unbounded input
13965 buffer when parsing non-escaped text.
13966
13967 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13968 __oline__, #output, $@, and @{ do not have unintended meanings.
13969
13970 2002-11-09 Paul Eggert <eggert@twinsun.com>
13971
13972 Fix the test failure due to GCC warnings described in
13973 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13974 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13975 evaluate to 0 if it's impossible for NINF to be in the respective
13976 table.
13977 (yygetLRActions, yyrecoverParseError): Use them.
13978
13979 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13980 counted in the token inserted at end of file. Now takes
13981 location_t *, not location_t, so that the location can be
13982 adjusted. All uses changed.
13983
13984 * tests/regression.at (Invalid inputs): Adjust wording in
13985 diagnostic to match the new behavior.
13986
13987 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13988 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13989 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13990 abort ();'. This reduces the runtime of the "Many lookaheads"
13991 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13992 GCC 3.2.
13993
13994 2002-11-07 Paul Eggert <eggert@twinsun.com>
13995
13996 * src/parse-gram.y (CHARACTER): Remove unused token.
13997 All uses removed.
13998
13999 * src/scan-gram.l: Remove stack option. We no longer use the
14000 stack, since the stack was never deeper than 1; instead, use the
14001 new auto var c_context to record the stacked value.
14002
14003 Remove nounput option. At an unexpected end of file, we now unput
14004 the minimal input necessary to end cleanly; this simplifies the
14005 code.
14006
14007 Avoid unbounded token sizes where this is easy.
14008
14009 (unexpected_end_of_file): New function.
14010 Use it to systematize the error message on unexpected EOF.
14011 (last-string): Now auto, not static.
14012 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14013 (scanner_last_string_free): Remove; not used.
14014 (percent_percent_count): Move decl to just before use.
14015 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14016 not the (never otherwised-used) CHARACTER.
14017
14018 2002-11-07 Akim Demaille <akim@epita.fr>
14019
14020 Let yyerror always receive the msg as last argument, so that
14021 yyerror can be variadic.
14022
14023 * data/yacc.c (b4_yyerror_args): New.
14024 Use it when calling yyerror.
14025 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14026 Use it when calling yyerror.
14027 * doc/bison.texinfo (Error Reporting): Adjust.
14028 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14029 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14030
14031 2002-11-06 Akim Demaille <akim@epita.fr>
14032
14033 #line should have quoted strings.
14034 Ideally, this should be done by m4_quotearg.
14035
14036 * src/scan-skel.l: Include quotearg.h.
14037 Quote __ofile__.
14038 * src/output.c (symbol_printers_output)
14039 (symbol_destructors_output): Quote the file name.
14040
14041 2002-11-06 Akim Demaille <akim@epita.fr>
14042
14043 * tests/regression.at (Invalid inputs): Adjust to the recent
14044 messages.
14045
14046 2002-11-06 Akim Demaille <akim@epita.fr>
14047
14048 Restore --no-lines.
14049 Reported by Jim Kent.
14050
14051 * data/c.m4 (b4_syncline): New.
14052 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14053 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14054 * src/output.c (user_actions_output): Likewise.
14055 (prepare): Define 'b4_synclines_flag'.
14056 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14057
14058 2002-11-06 Akim Demaille <akim@epita.fr>
14059
14060 * src/main.c (main): Free `infile'.
14061 * src/scan-gram.l (handle_syncline): New.
14062 Recognize `#line'.
14063 * src/output.c (user_actions_output, symbol_destructors_output)
14064 (symbol_printers_output): Use the location's file name, not
14065 infile.
14066 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14067
14068 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14069
14070 * src/tables.c (matching_state): Don't allow states to match if
14071 either has GLR conflict entries.
14072
14073 2002-11-05 Paul Eggert <eggert@twinsun.com>
14074
14075 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14076 "integer out of range" rather than "invalid value".
14077 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14078 accordingly.
14079
14080 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14081 Also, remove one static variable in the scanner.
14082
14083 * src/scan-gram.l (braces_level): Now auto, not static.
14084 Initialize to zero if the compiler is being picky.
14085 (INITIAL): Clear braces_level instead of incrementing it.
14086 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14087 as POSIX 1003.1-2001 requires.
14088 * src/system.h (IF_LINT): New macro, taken from coreutils.
14089 * configure.ac: Define "lint" if --enable-gcc-warnings.
14090
14091 2002-11-05 Akim Demaille <akim@epita.fr>
14092
14093 * src/scan-gram.l: When it starts with `%', complain about the
14094 whole directive, not just that `invalid character: %'.
14095
14096 2002-11-04 Akim Demaille <akim@epita.fr>
14097
14098 * Makefile.maint: Update from Autoconf.
14099 (update, cvs-update, po-update, do-po-update): New.
14100
14101 2002-11-04 Akim Demaille <akim@epita.fr>
14102
14103 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14104 and yyerror.
14105 Have yyerror `use' its arguments.
14106 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14107 returns true when location & yacc & pure & parse-param.
14108 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14109
14110 2002-11-04 Akim Demaille <akim@epita.fr>
14111
14112 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14113 clashes.
14114 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14115 font-lock-mode.
14116 Use complain_at.
14117 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14118 slot 0.
14119
14120 2002-11-03 Paul Eggert <eggert@twinsun.com>
14121
14122 * src/reader.c (get_merge_function, grammar_current_rule_check):
14123 Use consistent diagnostics for reporting type name clashes.
14124 Quote the types with <>, for consistency with Yacc.
14125 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14126
14127 2002-11-03 Akim Demaille <akim@epita.fr>
14128
14129 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14130 New.
14131 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14132 (b4_parse_param): Remove.
14133 Use b4_identification.
14134 Propagate b4_pure_args where needed to pass them to yyerror.
14135 * data/glr.m4 (b4_parse_param): Remove.
14136 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14137 (b4_lpure_formals): New.
14138 Use b4_identification.
14139 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14140 b4_user_formals and b4_user_args.
14141 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14142 (yyreportAmbiguity): When using a pure parser, also need
14143 the location, and the parse-params.
14144 Adjust callers.
14145 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14146 When using a pure parser, also need the parse-params.
14147 Adjust callers.
14148 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14149 (%pure-parser + %parse-param) LALR and GLR parsers.
14150 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14151 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14152 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14153 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14154 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14155 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14156 * doc/bison.texinfo: Untabify the whole file.
14157 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14158 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14159 (Error Reporting): Adjust to these new directives.
14160 Document %error-verbose, deprecate YYERROR_VERBOSE.
14161
14162 2002-11-03 Akim Demaille <akim@epita.fr>
14163
14164 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14165 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14166 command line options.
14167 * tests/cxx-type.at: Formatting changes.
14168
14169 2002-11-03 Paul Eggert <eggert@twinsun.com>
14170
14171 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14172 to count columns correctly, and to check for invalid inputs.
14173
14174 Use mbsnwidth to count columns correctly. Account for tabs, too.
14175 Include mbswidth.h.
14176 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14177 (extend_location): New function.
14178 (YY_LINES): Remove.
14179
14180 Handle CRLF in C code rather than in Lex code.
14181 (YY_INPUT): New macro.
14182 (no_cr_read): New function.
14183
14184 Scan UCNs, even though we don't fully handle them yet.
14185 (convert_ucn_to_byte): New function.
14186
14187 Handle backslash-newline correctly in C code.
14188 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14189 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14190 all uses changed.
14191 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14192 Use {splice} wherever C allows backslash-newline.
14193 YY_STEP after space, newline, vertical-tab.
14194 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14195
14196 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14197
14198 ({int}, handle_action_dollar, handle_action_at): Check for integer
14199 overflow.
14200
14201 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14202
14203 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14204 as well as \000. Check for UCHAR_MAX, not 255.
14205 Allow \x with an arbitrary positive number of digits, as in C.
14206 Check for overflow here.
14207 Allow \? and UCNs, for compatibility with C.
14208
14209 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14210 with quote slot used by complain_at.
14211
14212 * tests/input.at: Add tests for backslash-newline, m4 quotes
14213 in symbols, long literals, and funny escapes in strings.
14214
14215 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14216 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14217 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14218 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14219 * m4/mbswidth.m4: New file, from GNU coreutils.
14220
14221 * doc/bison.texinfo (Grammar Outline): Document // comments.
14222 (Symbols): Document that trigraphs have no special meaning in Bison,
14223 nor is backslash-newline allowed.
14224 (Actions): Document that trigraphs have no special meaning.
14225
14226 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14227 no longer used.
14228
14229 2002-11-02 Paul Eggert <eggert@twinsun.com>
14230
14231 * src/reader.c: Don't include quote.h; not needed.
14232 (get_merge_function): Reword warning to be consistent with
14233 type clash diagnostic in grammar_current_rule_check.
14234
14235 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14236 bug in trigraph handling.
14237
14238 * src/output.c (prepare_symbols): When printing token names,
14239 escape "[" as "@<:@" and likewise for "]".
14240
14241 * src/system.h (errno): Remove declaration, as we are now
14242 assuming C89 or better, and C89 guarantees errno.
14243
14244 2002-10-30 Paul Eggert <eggert@twinsun.com>
14245
14246 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14247 Check for close failures.
14248 * src/files.h (xfclose): Return void, not int, since it always
14249 returned zero.
14250 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14251 indicates one.
14252 * src/output.c (output_skeleton): Use xfclose rather than fclose
14253 and ferror. xfclose now checks ferror.
14254
14255 * data/glr.c (YYLEFTMOST_STATE): Remove.
14256 (yyreportTree): Use a stack-based leftmost state. This avoids
14257 our continuing battles with bogus warnings about initializers.
14258
14259 2002-10-30 Akim Demaille <akim@epita.fr>
14260
14261 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14262 #if.
14263
14264 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14265
14266 * tests/glr-regr1.at: New test for reported regressions.
14267 * tests/testsuite.at: Add glr-regr1.at test.
14268 * tests/Makefile.am: Add glr-regr1.at test.
14269
14270 2002-10-24 Paul Eggert <eggert@twinsun.com>
14271
14272 Version 1.75a.
14273
14274 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14275 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14276 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14277 Don't assume strdup exists; POSIX says its an XSI extension.
14278 Check for buffer overflow on input.
14279
14280 2002-10-24 Akim Demaille <akim@epita.fr>
14281
14282 * src/output.c (output_skeleton): Don't disable M4sugar comments
14283 too soon: it results in comments being expanded.
14284 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14285 first output.
14286
14287 2002-10-24 Akim Demaille <akim@epita.fr>
14288
14289 * data/yacc.c (m4_int_type): New.
14290 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14291 char' as only yacc.c wants K&R portability.
14292 * data/glr.c (yysigned_char): Remove.
14293 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14294 Reported by Quoc Peyrot.
14295
14296 2002-10-23 Paul Eggert <eggert@twinsun.com>
14297
14298 * src/main.c (main): With --trace=time, report times even if a
14299 non-fatal error occurs. Formerly, the times were reported in some
14300 such cases but not in others.
14301 * src/reader.c (reader): Just return if a complaint has been issued,
14302 instead of exiting, so that 'main' can report times.
14303
14304 2002-10-22 Akim Demaille <akim@epita.fr>
14305
14306 * src/system.h: Include sys/types.
14307 Reported by Bert Deknuydt.
14308
14309 2002-10-23 Paul Eggert <eggert@twinsun.com>
14310
14311 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14312 Suggested by Art Haas.
14313
14314 2002-10-22 Paul Eggert <eggert@twinsun.com>
14315
14316 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14317 decl; not needed any more.
14318 * src/main.c (main): Use return to exit, undoing yesterday's change.
14319 The last OS that we could find where this wouldn't work is
14320 SunOS 3.5, and that's too old to worry about now.
14321
14322 * data/glr.c (struct yyltype): Define members even when not
14323 doing locations. This is more consistent with yacc.c, and it
14324 works around the following bug reports:
14325 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14326 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14327
14328 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14329 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14330 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14331
14332 2002-10-22 Akim Demaille <akim@epita.fr>
14333
14334 * data/README: New.
14335
14336 2002-10-21 Paul Eggert <eggert@twinsun.com>
14337
14338 Be consistent about 'bool'; the old code used an enum in one
14339 module and an int in another, and this violates the C standard.
14340 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14341 * configure.ac (AC_HEADER_STDBOOL): Add.
14342 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14343 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14344 * src/symtab.c (hash_compare_symbol_t): Likewise.
14345 * src/system.h (bool, false, true): Use a definition consistent
14346 with ../lib/hash.c. All uses changed.
14347
14348 * src/complain.c (warning_issued): Renamed from warn_message_count,
14349 so that we needn't worry about integer overflow (!).
14350 Now of type bool. All uses changed.
14351 (complaint_issued): Renamed from complain_message_count; likewise.
14352
14353 * src/main.c (main): Use exit to exit with failure.
14354
14355 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14356 rather than 1 and 0.
14357 * src/main.c (main): Likewise.
14358 * src/getargs.c (getargs): Likewise.
14359 * src/reader.c (reader): Likewise.
14360
14361 * src/getarg.c (getargs): Remove duplicate code for
14362 "Try `bison --help'".
14363
14364 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14365 What was that "2" for?
14366
14367 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14368 * src/getargs.c (usage): Likewise.
14369
14370 * src/getargs.c (getargs): When there are too few operands, report
14371 the last one. When there are too many, report the first extra
14372 one. This is how diffutils does it.
14373
14374 2002-10-20 Paul Eggert <eggert@twinsun.com>
14375
14376 Remove K&R vestiges.
14377 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14378 * src/complain.c (VA_START): Remove. Assume prototypes.
14379 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14380 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14381 fatal): Assume prototypes.
14382 * src/complain.h: Assume prototypes.
14383 * src/system.h (PARAMS): Remove.
14384 Include <limits.h> unconditionally, since it's guaranteeed even
14385 for a freestanding C89 compiler.
14386 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14387 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14388
14389 2002-10-20 Akim Demaille <akim@epita.fr>
14390
14391 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14392 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14393 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14394 (yyresolveStates, yyresolveAction, yyresolveStack)
14395 (yyprocessOneStack): Use them.
14396 (yy_reduce_print): New.
14397 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14398
14399 2002-10-20 Akim Demaille <akim@epita.fr>
14400
14401 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14402 arguments and output `void'.
14403 (b4_c_function): Rename as...
14404 (b4_c_function_def): this.
14405 (b4_c_function_decl, b4_c_ansi_function_def)
14406 (b4_c_ansi_function_decl): New.
14407 Change the interpretation of the arguments: before `int, foo', now
14408 `int foo, foo'.
14409 * data/yacc.c (yyparse): Prototype and define thanks to these.
14410 Adjust b4_c_function_def uses.
14411 * data/glr.c (yyparse): Likewise, but ANSI only.
14412
14413 2002-10-20 Akim Demaille <akim@epita.fr>
14414
14415 * src/output.c (prepare): Move the definition of `tokens_number',
14416 `nterms_number', `undef_token_number', `user_token_number_max'
14417 to...
14418 (prepare_tokens): Here.
14419 (prepare_tokens): Rename as...
14420 (prepare_symbols): this.
14421 (prepare): Move the definition of `rules_number' to...
14422 (prepare_rules): here.
14423 (prepare): Move the definition of `last', `final_state_number',
14424 `states_number' to...
14425 (prepare_states): here.
14426 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14427
14428 2002-10-20 Akim Demaille <akim@epita.fr>
14429
14430 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14431
14432 2002-10-20 Akim Demaille <akim@epita.fr>
14433
14434 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14435 * data/c.m4: here.
14436
14437 2002-10-20 Akim Demaille <akim@epita.fr>
14438
14439 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14440 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14441 `pair'.
14442 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14443 `name' to...
14444 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14445 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14446 These.
14447
14448 2002-10-19 Paul Eggert <eggert@twinsun.com>
14449
14450 Do not create a temporary file, as that involves security and
14451 cleanup headaches. Instead, use a pair of pipes.
14452 Derived from a suggestion by Florian Krohm.
14453 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14454 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14455 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14456 (BISON_PREREQ_SUBPIPE): Add.
14457 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14458 Add subpipe.h, subpipe.c.
14459 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14460 * po/POTFILES.in: Add lib/subpipe.c.
14461 * src/output.c: Include "subpipe.h".
14462 (m4_invoke): Remove decl.
14463 (scan_skel): New decl.
14464 (output_skeleton): Use pipe rather than temporary file for m4 input.
14465 Check that m4sugar.m4 is readable, to avoid deadlock.
14466 Check for pipe I/O error.
14467 * src/scan-skel.l (readpipe): Remove decl.
14468 (scan_skel): New function, to be used in place of m4_invoke.
14469 Read from stream rather than file.
14470
14471 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14472 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14473 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14474 this generates a more-accurate value anyway.
14475
14476 * lib/timevar.c (timervar_accumulate): Rename locals to
14477 avoid confusion with similarly-named more-global.
14478 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14479
14480 * src/output.c (prepare): Use xstrdup to convert char const *
14481 to char *, to avoid GCC warning.
14482
14483 2002-10-19 Akim Demaille <akim@epita.fr>
14484
14485 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14486 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14487 Use them to have `calc.y' ready for %pure-parser.
14488 * data/yacc.c (YYLEX): Pass a yylex return type to
14489 b4_c_function_call.
14490
14491 2002-10-19 Akim Demaille <akim@epita.fr>
14492
14493 Prototype support of %lex-param and %parse-param.
14494
14495 * src/parse-gram.y: Add the definition of the %lex-param and
14496 %parse-param tokens, plus their rules.
14497 Drop the `_' version of %glr-parser.
14498 Add the "," token.
14499 * src/scan-gram.l (INITIAL): Scan them.
14500 * src/muscle_tab.c: Comment changes.
14501 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14502 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14503 (muscle_entry_s): The `value' member is no longer const.
14504 Adjust all dependencies.
14505 * src/muscle_tab.c (muscle_init): Adjust: use
14506 MUSCLE_INSERT_STRING.
14507 Initialize the obstack earlier.
14508 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14509 (muscle_pair_list_grow): New.
14510 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14511 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14512 * tests/calc.at: Use %locations, not --locations.
14513 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14514
14515 2002-10-19 Akim Demaille <akim@epita.fr>
14516
14517 * src/getargs.c (usage): Take status as argument and exit
14518 accordingly.
14519 Report the traditional `Try ... --help' message when status != 0.
14520 (usage, version): Don't take a FILE * as arg, it is pointless.
14521 (getargs): When there is an incorrect number of arguments, make it
14522 an error, and report it GNUlically thanks to `usage ()'.
14523
14524 2002-10-18 Paul Eggert <eggert@twinsun.com>
14525
14526 * data/glr.c (yyreportParseError): Don't assume that sprintf
14527 yields the length of the printed string, as this is not true
14528 on SunOS 4.1.4. Reported by Peter Klein.
14529
14530 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14531 * tests/conflicts.at (%nonassoc and eof): Likewise.
14532 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14533
14534 2002-10-17 Akim Demaille <akim@epita.fr>
14535
14536 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14537 * src/getargs.c (trace_types, trace_args): Adjust.
14538 * src/reader.c (grammar_current_rule_prec_set)
14539 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14540 Standardize error messages.
14541 And s/@prec/%prec/!
14542 (reader): Use trace_flag to enable scanner/parser debugging,
14543 instead of an adhoc scheme.
14544 * src/scan-gram.l: Remove trailing debugging code.
14545
14546 2002-10-16 Paul Eggert <eggert@twinsun.com>
14547
14548 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14549 MUSCLE_TAB_H.
14550
14551 * NEWS: Officially drop support for building Bison with K&R C,
14552 since it didn't work anyway and it's not worth worrying about.
14553 * Makefile.maint (wget_files): Remove ansi2knr.c.
14554 (ansi2knr.c-url_prefix): Remove.
14555 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14556 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14557 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14558
14559 2002-10-15 Paul Eggert <eggert@twinsun.com>
14560
14561 Stop using the "enum_" trick for K&R-style function definitions;
14562 it confused me, and I was the author! Instead, assume that people
14563 who want to use K&R C compilers (when using these modules in GCC,
14564 perhaps?) will run ansi2knr.
14565
14566 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14567 All uses of "enum_" changed to "enum ".
14568 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14569 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14570
14571 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14572 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14573 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14574 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14575 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14576 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14577 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14578 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14579 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14580 Use function prototypes; this removes the need for declaring
14581 static functions simply to provide their prototypes.
14582 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14583 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14584 bitset_count_, bitset_create, bitset_dump, bitset_first,
14585 bitset_free, bitset_init, bitset_last, bitset_next,
14586 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14587 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14588 bitset_print, bitset_release_memory, bitset_toggle_,
14589 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14590 debug_bitset): Likewise.
14591 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14592 * lib/bitset_stats.c (bitset_log_histogram_print,
14593 bitset_percent_histogram_print, bitset_stats_and,
14594 bitset_stats_and_cmp, bitset_stats_and_or,
14595 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14596 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14597 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14598 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14599 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14600 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14601 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14602 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14603 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14604 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14605 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14606 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14607 bitset_stats_zero): Likewise.
14608 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14609 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14610 bitsetv_dump, debug_bitsetv): Likewise.
14611 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14612 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14613 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14614 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14615 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14616 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14617 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14618 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14619 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14620 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14621 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14622 Likewise.
14623 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14624 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14625 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14626 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14627 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14628 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14629 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14630 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14631 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14632 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14633 lbitset_xor_cmp, lbitset_zero): Likewise.
14634
14635 2002-10-14 Akim Demaille <akim@epita.fr>
14636
14637 Version 1.75.
14638
14639 2002-10-14 Akim Demaille <akim@epita.fr>
14640
14641 * tests/Makefile.am (maintainer-check-posix): New.
14642
14643 2002-10-14 Akim Demaille <akim@epita.fr>
14644
14645 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14646 member.
14647
14648 2002-10-14 Akim Demaille <akim@epita.fr>
14649
14650 * src/tables.c (table_ninf_remap): base -> tab.
14651 Reported by Matt Rosing.
14652
14653 2002-10-14 Paul Eggert <eggert@twinsun.com>
14654
14655 * tests/action.at, tests/calc.at, tests/conflicts.at,
14656 tests/cxx-type.at, tests/headers.at, tests/input.at,
14657 tests/regression.at, tests/synclines.at, tests/torture.at:
14658 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14659 so that the tests still work even if POSIXLY_CORRECT is set.
14660 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14661
14662 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14663 for portability to K&R hosts. Fix typo: signed char is guaranteed
14664 only to 127, not to 128.
14665 * data/glr.c (yysigned_char): New type.
14666 * data/yacc.c (yysigned_char): Likewise.
14667 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14668
14669 2002-10-13 Paul Eggert <eggert@twinsun.com>
14670
14671 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14672 true due to limited range of data type" warning from GCC.
14673
14674 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14675 by wrapping enum yytokentype's definition inside #ifndef
14676 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14677
14678 2002-10-13 Akim Demaille <akim@epita.fr>
14679
14680 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14681 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14682
14683 2002-10-13 Akim Demaille <akim@epita.fr>
14684
14685 * Makefile.maint: Update from Autoconf 2.54.
14686 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14687
14688 2002-10-13 Akim Demaille <akim@epita.fr>
14689
14690 * src/print.c (print_state): Separate the list of solved conflicts
14691 from the other items.
14692 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14693
14694 2002-10-13 Akim Demaille <akim@epita.fr>
14695
14696 Let nondeterministic skeletons be usable with deterministic
14697 tables.
14698
14699 With the patch, GAWK compiled by GCC without -O2 passes its test
14700 suite using a GLR parser driven by LALR tables. It fails with -O2
14701 because `struct stat' gives two different answers on my machine:
14702 88 (definition of an auto var) and later 96 (memset on this var).
14703 Hence the stack is badly corrumpted. The headers inclusion is to
14704 blame: if I move the awk.h inclusion before GLR's system header
14705 inclusion, the two struct stat have the same size.
14706
14707 * src/tables.c (pack_table): Always create conflict_table.
14708 (token_actions): Always create conflict_list.
14709 * data/glr.c (YYFLAG): Remove, unused.
14710
14711 2002-10-13 Akim Demaille <akim@epita.fr>
14712
14713 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14714 (O0FLAGS): New.
14715 (VALGRIND, GXX): New.
14716 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14717 * tests/bison.in: Run $PREBISON a pre-command.
14718 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14719 (maintainer-check-g++): New.
14720 * Makefile.am (maintainer-check): New.
14721
14722 2002-10-13 Akim Demaille <akim@epita.fr>
14723
14724 * data/glr.c: Formatting changes.
14725 Tweak some trace messages to match yacc.c's.
14726
14727 2002-10-13 Akim Demaille <akim@epita.fr>
14728
14729 GLR parsers sometimes raise parse errors instead of performing the
14730 default reduction.
14731 Reported by Charles-Henry de Boysson.
14732
14733 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14734 check the length of the traces when %glr.
14735 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14736 GLR's traces.
14737 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14738 Test GLR parsers.
14739 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14740 (yyltype): Remove the yy prefix from the member names.
14741 (yytable): Complete its comment.
14742 (yygetLRActions): Map error action number from YYTABLE from
14743 YYTABLE_NINF to 0.
14744 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14745 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14746 not satisfying as we could compare an YYACTION computed from
14747 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14748 only value for error actions.
14749 (yyreportParseError): In verbose parse error messages, don't issue
14750 `error' in the list of expected tokens.
14751 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14752 next action to perform to match glr.c's decoding.
14753 (yytable): Complete its comment.
14754
14755 2002-10-13 Paul Eggert <eggert@twinsun.com>
14756
14757 Fix problem reported by Henrik Grubbstroem in
14758 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14759 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14760 because the Bison parser reads the second action before reducing
14761 the first one.
14762 * src/scan-gram.l (rule_length): New static var.
14763 Use it to keep track of the rule length in the scanner, since
14764 we can't expect the parser to be in lock-step sync with the scanner.
14765 (handle_action_dollar, handle_action_at): Use this var.
14766 * tests/actions.at (Exotic Dollars): Test for the problem.
14767
14768 2002-10-12 Paul Eggert <eggert@twinsun.com>
14769
14770 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14771 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14772 Include <sys/time.h> when checking for clock_t and struct tms.
14773 Use same include order as source.
14774 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14775 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14776
14777 * lib/timevar.c: Update copyright date and clarify comments.
14778 (get_time) [IN_GCC]: Keep the GCC version for reference.
14779
14780 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14781 GCC version as of today, then merge Bison's changes.
14782 Change "GCC" to "Bison" in copyright notice. timevar.def's
14783 author is Akim, so change that too.
14784
14785 * src/reader.c (grammar_current_rule_check):
14786 Don't worry about the default action if $$ is untyped.
14787 Prevents bogus warnings reported by Jim Gifford in
14788 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14789
14790 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14791 * data/glr.c, data/lalr1.cc, data/yacc.c:
14792 Output token definitions before the first part of user declarations.
14793 Fixes compatibility problem reported by Jim Gifford for kbd in
14794 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14795
14796 2002-10-11 Paul Eggert <eggert@twinsun.com>
14797
14798 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14799 (yyparse): here. This undoes some of the 2002-07-25 change.
14800 Compatibility problem reported by Ralf S. Engelschall with
14801 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14802
14803 2002-10-11 Akim Demaille <akim@epita.fr>
14804
14805 * tests/regression.at Characters Escapes): New.
14806 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14807 characters.
14808 Reported by Jan Nieuwenhuizen.
14809
14810 2002-10-11 Akim Demaille <akim@epita.fr>
14811
14812 * po/id.po: New.
14813
14814 2002-10-10 Paul Eggert <eggert@twinsun.com>
14815
14816 Portability fixes for bitsets; this also avoids several GCC
14817 warnings.
14818
14819 * lib/abitset.c: Include <stddef.h>, for offsetof.
14820 * lib/lbitset.c: Likewise.
14821
14822 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14823 properly for vectors of objects. Do not assume that adding a
14824 header size to a multiple of a word size yields a value that is
14825 properly aligned for the whole union.
14826 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14827
14828 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14829 unique names for structures.
14830 * lib/ebitset.c (ebitset_bytes): Likewise.
14831 * lib/lbitset.c (lbitset_bytes): Likewise.
14832
14833 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14834 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14835 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14836 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14837 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14838 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14839 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14840 to improve the type-checking that GCC can do.
14841 * lib/bitset.c (bitset_op4_cmp): Likewise.
14842 * lib/bitset_stats.c (bitset_stats_count,
14843 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14844 bitset_stats_copy, bitset_stats_disjoint_p,
14845 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14846 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14847 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14848 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14849 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14850 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14851 bitset_stats_or_and_cmp): Likewise.
14852 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14853 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14854 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14855 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14856
14857 * lib/abitset.h: Include bitset.h, not bbitset.h.
14858 * lib/ebitset.h: Likewise.
14859 * lib/lbitset.h: Likewise.
14860
14861 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14862 All instances of parameters of type enum bitset_opts are now of
14863 type enum_bitset_opts, to conform to the C Standard, and similarly
14864 for enum_bitset_type.
14865 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14866 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14867
14868 Do not use "struct bitset_struct" to mean different things in
14869 different modules. Not only is this confusing, it violates
14870 the C Standard, which requires that structure types in different
14871 modules must be compatible if one is to be passed to the other.
14872 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14873 All instances of "struct bitset_struct *" replaced with "bitset".
14874 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14875 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14876 struct lbitset_struct, struct bitset_stats_struct): New types.
14877 All uses of struct bitset_struct changed to union bitset_union,
14878 etc.
14879 * lib/abitset.c (struct abitset_struct, abitset,
14880 struct bitset_struct): Remove.
14881 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14882 struct bitset_struct): Remove.
14883 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14884 bitset_struct): Remove.
14885 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14886 Likewise.
14887
14888 Do not call a function of type T using a call that assumes the
14889 function is of a different type U. Standard C requires that a
14890 function must be called with a type that is compatible with its
14891 definition.
14892 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14893 New decls.
14894 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14895 New functions.
14896 * lib/ebitset.c (PFV): Remove.
14897 * lib/lbitset.c (PFV): Likewise.
14898 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14899 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14900 decls.
14901 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14902 (ebitset_vtable): Use them.
14903 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14904 lbitset_xor): New functions.
14905 (lbitset_vtable): Use them.
14906
14907 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14908 Declare.
14909
14910 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14911 GCC warning.
14912 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14913 Use offsetof, for simplicity.
14914
14915 2002-10-06 Paul Eggert <eggert@twinsun.com>
14916
14917 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14918 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14919 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14920 which was inadvertently undone by the 2002-09-30 patch.
14921 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14922 the same width as int.
14923
14924 2002-10-04 Paul Eggert <eggert@twinsun.com>
14925
14926 Version 1.50.
14927
14928 * configure.ac (AC_INIT), NEWS: Increment version number.
14929
14930 * doc/bison.texinfo: Minor spelling, grammar, and white space
14931 fixes.
14932 (Symbols): Mention that any negative value returned from yylex
14933 signifies end-of-input. Warn about negative chars. Mention
14934 the portable Standard C character set.
14935
14936 The GNU coding standard says CFLAGS and YFLAGS are reserved
14937 for the installer to set.
14938 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14939 * src/Makefile.am (AM_CFLAGS): Likewise.
14940 (AM_YFLAGS): Renamed from YFLAGS.
14941
14942 Fix some MAX and MIN problems.
14943 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14944 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14945 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14946 * src/reader.c (reader): Use it.
14947
14948 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14949 POSIX 1003.1-2001 has removed fgrep.
14950
14951 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14952
14953 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14954 interpreted as signed.
14955 * lib/ebitset.c (ebitset_list): Fix bug.
14956
14957 2002-10-01 Paul Eggert <eggert@twinsun.com>
14958
14959 More fixes for 64-bit hosts and large bitsets.
14960
14961 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14962 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14963 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14964 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14965 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14966 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14967 bitset_count_): Likewise.
14968 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14969 bitset_first, bitset_last): Likewise.
14970 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14971 bitset_stats_list_reverse, bitset_stats_size,
14972 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14973 Likewise.
14974 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14975 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14976 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14977 bitsetv_reflexive_transitive_closure): Likewise.
14978 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14979 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14980 Likewise.
14981 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14982 Likewise.
14983
14984 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14985 Use size_t, not unsigned int, to count bytes.
14986 * lib/abitset.h (abitset_bytes): Likewise.
14987 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14988 Likewise.
14989 * lib/bitset.h (bitset_bytes): Likewise.
14990 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14991 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14992 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14993 * lib/ebitset.c (ebitset_bytes): Likewise.
14994 * lib/ebitset.h (ebitset_bytes): Likewise.
14995 * lib/lbitset.c (lbitset_bytes): Likewise.
14996 * lib/lbitset.h (lbitset_bytes): Likewise.
14997
14998 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14999 abitset_subset_p, abitset_disjoint_p, abitset_and,
15000 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15001 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15002 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15003 abitset_or_and, abitset_or_and_cmp):
15004 Use bitset_windex instead of unsigned int.
15005 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15006 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15007 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15008 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15009 Likewise.
15010 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15011
15012 * lib/bitset.c (bitset_print):
15013 Use proper printf formats for widths of integer types.
15014 * lib/bitset_stats.c (bitset_percent_histogram_print,
15015 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15016 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15017 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15018 * lib/lbitset.c (lbitset_bytes): Likewise.
15019
15020 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15021 BITSET_SIZE_MAX): New macros.
15022 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15023 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15024 to BITSET_WINDEX_MAX.
15025
15026 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15027 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15028 since we now return the bitset_bindex type (not int).
15029
15030 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15031 when computing sizes.
15032 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15033
15034 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15035 and avoid cast to unsigned.
15036
15037 2002-09-30 Akim Demaille <akim@epita.fr>
15038
15039 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15040 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15041 Updates from Michael Hayes.
15042
15043 2002-09-30 Art Haas <ahaas@neosoft.com>
15044
15045 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15046 invocations.
15047 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15048 defined.
15049
15050 2002-09-27 Akim Demaille <akim@epita.fr>
15051
15052 Version 1.49c.
15053
15054 2002-09-27 Akim Demaille <akim@epita.fr>
15055
15056 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15057 (Because of AC_LIBSOURCE).
15058
15059 2002-09-27 Akim Demaille <akim@epita.fr>
15060
15061 Playing with Autoscan.
15062
15063 * configure.ac: Remove the old LIBOBJ tweaks.
15064 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15065 * lib/strrchr.c: New.
15066 * lib/strtol.c: New, from the Coreutils 4.5.1.
15067
15068 2002-09-27 Akim Demaille <akim@epita.fr>
15069
15070 Playing with Autoscan.
15071
15072 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15073 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15074 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15075 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15076 Coreutils 4.5.1.
15077
15078 2002-09-24 Akim Demaille <akim@epita.fr>
15079
15080 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15081 (Frequently Asked Questions, Parser Stack Overflow): New.
15082
15083 2002-09-13 Akim Demaille <akim@epita.fr>
15084
15085 Playing with autoscan.
15086
15087 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15088 * src/files.c (skeleton_find): Remove, unused.
15089 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15090 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15091
15092 2002-09-13 Akim Demaille <akim@epita.fr>
15093
15094 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15095 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15096
15097 2002-09-13 Akim Demaille <akim@epita.fr>
15098
15099 * configure.ac: Require 2.54.
15100 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15101 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15102 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15103 Remove, provided by Autoconf macros.
15104
15105 2002-09-12 Akim Demaille <akim@epita.fr>
15106
15107 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15108
15109 2002-09-12 Akim Demaille <akim@epita.fr>
15110
15111 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15112 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15113 Reported by Martin Mokrejs.
15114
15115 2002-09-10 Akim Demaille <akim@epita.fr>
15116
15117 * src/parse-gram.y: Associate a human readable string to each
15118 token type.
15119 * tests/regression.at (Invalid inputs): Adjust.
15120
15121 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15122
15123 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15124 with an Autoconf-2.5x style configure.ac.
15125
15126 2002-09-06 Paul Eggert <eggert@twinsun.com>
15127
15128 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15129 exception applies only to yacc.c. This is a modification of a
15130 patch originally suggested by Akim Demaille.
15131
15132 2002-09-06 Akim Demaille <akim@epita.fr>
15133
15134 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15135 here to...
15136 * data/yacc.c: here.
15137
15138 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15139 LocationType.
15140 (b4_ltype): Default to yy::Location from location.hh.
15141
15142 2002-09-04 Jim Meyering <jim@meyering.net>
15143
15144 * data/yacc.c: Guard the declaration of yytoknum also with
15145 `#ifdef YYPRINT', so it is declared only when used.
15146
15147 2002-09-04 Akim Demaille <akim@epita.fr>
15148
15149 * configure.in: Rename as...
15150 * configure.ac: this.
15151 Bump to 1.49c.
15152
15153 2002-09-04 Akim Demaille <akim@epita.fr>
15154
15155 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15156 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15157 translate maintainer only messages.
15158
15159 2002-08-12 Paul Eggert <eggert@twinsun.com>
15160
15161 Version 1.49b.
15162
15163 * Makefile.am (SUBDIRS): Remove intl.
15164 (DISTCLEANFILES): Remove.
15165 * NEWS: Mention that GNU M4 is now required. Clarify what is
15166 meant by "larger grammars". Mention the pt_BR translation.
15167 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15168 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15169 Bump version from 0.11.2 to 0.11.5.
15170 (BISON_PREREQ_STAGE): Remove.
15171 (AM_GNU_GETTEXT): Use external gettext.
15172 (AC_OUTPUT): Remove intl/Makefile.
15173
15174 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15175
15176 * data/glr.c: Include string.h, for strlen.
15177 (yyreportParseError): Use size_t for yysize.
15178 (yy_yypstack): No longer nested inside yypstates, as nested
15179 functions are not portable. Do not assume size_t is the
15180 same width as int.
15181 (yypstates): Do not assume that ptrdiff_t is the same width
15182 as int, and similarly for yyposn and YYINDEX.
15183
15184 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15185
15186 * lib/Makefile.am (INCLUDES): Do not include from the intl
15187 directory, which has been removed.
15188 * src/Makefile.am (INCLUDES): Likewise.
15189
15190 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15191 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15192 New vars.
15193
15194 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15195 * tests/Makefile.am (EXTRA_DIST): Likewise.
15196
15197 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15198 Do not assume that bitset_windex is the same width as unsigned.
15199
15200 * lib/abitset.c (abitset_unused_clear): Do not assume that
15201 bitset_word is the same width as int.
15202 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15203 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15204 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15205 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15206 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15207
15208 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15209 portability to one's complement hosts!).
15210 * lib/ebitset.c (ebitset_op1): Likewise.
15211 * lib/lbitset.c (lbitset_op1): Likewise.
15212
15213 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15214 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15215 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15216 Sync with fileutils.
15217 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15218 lib/gettext.h: Sync with diffutils.
15219
15220 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15221 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15222
15223 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15224 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15225 check for void *.
15226
15227 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15228 size_t; the old version tried to do this but casted improperly.
15229 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15230 (bitset_test): Now returns int, not unsigned long.
15231
15232 * lib/bitset_stats.c: Include "gettext.h".
15233 (_): New macro.
15234 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15235 name locals "index", as it generates unnecessary warnings on some
15236 hosts that have an "index" function.
15237
15238 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15239 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15240 they need translation.
15241 * src/LR0.c (state_list_append, new_itemsets, get_state,
15242 append_states, generate_states): Likewise.
15243 * src/assoc.c (assoc_to_string): Likewise.
15244 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15245 * src/gram.c (grammar_dump): Likewise.
15246 * src/injections.c (injections_compute): Likewise.
15247 * src/lalr.c (lookaheads_print): Likewise.
15248 * src/relation.c (relation_transpose): Likewise.
15249 * src/scan-gram.l: Likewise.
15250 * src/tables.c (table_grow, pack_vector): Likewise.
15251
15252 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15253 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15254 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15255 * m4/mbstate_t.m4: Sync with fileutils.
15256 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15257
15258 * po/LINGUAS: Add pt_BR.
15259 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15260 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15261 lib/timevar.c.
15262 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15263 manual recommends.
15264 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15265
15266 * src/complain.c (strerror_r): Remove decl; not needed.
15267 (strerror): Use same pattern as ../lib/error.c.
15268
15269 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15270
15271 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15272
15273 * src/main.c (main): Cast result of bindtextdomain and textdomain
15274 to void, to avoid a GCC warning when --disable-nls is in effect.
15275
15276 * src/scan-gram.l: Use strings rather than escapes when possible,
15277 to minimize the number of warnings from xgettext.
15278 (handle_action_dollar, handle_action_at): Don't use isdigit,
15279 as it mishandles negative chars and it may not work as expected
15280 outside the C locale.
15281
15282 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15283 this is a GCC extension and is not portable to other compilers.
15284
15285 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15286 Do not include <ctype.h>; no longer needed.
15287 Do not include <malloc.h>; no longer needed (and generates
15288 warnings on OpenBSD 3.0).
15289
15290 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15291 it's not portable.
15292
15293 * tests/regression.at: Do not use 'cc -c input.c -o input';
15294 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15295
15296 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15297 exit status as failure, not just exit status 1. Sun C exits
15298 with status 2 sometimes.
15299
15300 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15301 Use it for the two large tests.
15302
15303 2002-08-02 Akim Demaille <akim@epita.fr>
15304
15305 * src/conflicts.c (conflicts_output): Don't output rules never
15306 reduced here, since anyway that computation doesn't work.
15307 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15308 (rule_useless_p, rule_never_reduced_p): New.
15309 (grammar_rules_partial_print): Use a filter instead of a range.
15310 Display the title only if needed.
15311 (grammar_rules_print): Adjust.
15312 (grammar_rules_never_reduced_report): New.
15313 * src/tables.c (action_row): Move the computation of rules never
15314 reduced to...
15315 (token_actions): here.
15316 * src/main.c (main): Make the parser before making the report, so
15317 that rules never reduced are computed.
15318 Call grammar_rules_never_reduced_report.
15319 * src/print.c (print_results): Report rules never reduced.
15320 * tests/conflicts.at, tests/reduce.at: Adjust.
15321
15322 2002-08-01 Akim Demaille <akim@epita.fr>
15323
15324 Instead of attaching lookaheads and duplicating the rules being
15325 reduced by a state, attach the lookaheads to the reductions.
15326
15327 * src/state.h (state_t): Remove the `lookaheads',
15328 `lookaheads_rule' member.
15329 (reductions_t): Add a `lookaheads' member.
15330 Use a regular array for the `rules'.
15331 * src/state.c (reductions_new): Initialize the lookaheads member
15332 to 0.
15333 (state_rule_lookaheads_print): Adjust.
15334 * src/state.h, src/state.c (state_reductions_find): New.
15335 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15336 (count_rr_conflicts): Adjust.
15337 * src/lalr.c (LArule): Remove.
15338 (add_lookback_edge): Adjust.
15339 (state_lookaheads_count): New.
15340 (states_lookaheads_initialize): Merge into...
15341 (initialize_LA): this.
15342 (lalr_free): Adjust.
15343 * src/main.c (main): Don't free nullable and derives too early: it
15344 is used by --verbose.
15345 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15346
15347 2002-08-01 Akim Demaille <akim@epita.fr>
15348
15349 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15350 `rule_number_t**'.
15351 (set_derives, free_derives): Rename as...
15352 (derives_compute, derives_free): this.
15353 Adjust all dependencies.
15354 * src/nullable.c (set_nullable, free_nullable): Rename as...
15355 (nullable_compute, nullable_free): these.
15356 (rule_list_t): Store rule_t *, not rule_number_t.
15357 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15358 pointers, instead of their numbers.
15359 * src/main.c (main): Call nullable_free, and derives_free earlier,
15360 as they were lo longer used.
15361
15362 2002-08-01 Akim Demaille <akim@epita.fr>
15363
15364 * lib/timevar.c (get_time): Include children time.
15365 * src/lalr.h (LA, LArule): Don't export them: used with the
15366 state_t.
15367 * src/lalr.c (LA, LArule): Static.
15368 * src/lalr.h, src/lalr.c (lalr_free): New.
15369 * src/main.c (main): Call it.
15370 * src/tables.c (pack_vector): Check whether loc is >= to the
15371 table_size, not >.
15372 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15373 (tables_generate): do it, since that's also it which allocates
15374 them.
15375 Don't free LA and LArule, main does.
15376
15377 2002-07-31 Akim Demaille <akim@epita.fr>
15378
15379 Separate parser tables computation and output.
15380
15381 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15382 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15383 (yydefgoto, yydefact, high): Move to...
15384 * src/tables.h, src/tables.c: here.
15385 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15386 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15387 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15388 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15389 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15390 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15391 (action_row, save_row, token_actions, save_column, default_goto)
15392 (goto_actions, sort_actions, matching_state, pack_vector)
15393 (table_ninf_remap, pack_table, prepare_actions): Move to...
15394 * src/tables.c: here.
15395 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15396 * src/output.c (token_actions, output_base, output_conflicts)
15397 (output_check): Merge into...
15398 (prepare_actions): this.
15399 (actions_output): Rename as...
15400 (user_actions_output): this.
15401 * src/main.c (main): Call tables_generate and tables_free.
15402
15403 2002-07-31 Akim Demaille <akim@epita.fr>
15404
15405 Steal GCC's --time-report support.
15406
15407 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15408 stolen/adjusted from GCC.
15409 * m4/stage.m4: Remove time related checks.
15410 * m4/timevar.m4: New.
15411 * configure.in: Adjust.
15412 * src/system.h: Adjust to using timevar.h.
15413 * src/getargs.h, src/getargs.c: Support trace_time for
15414 --trace=time.
15415 * src/main.c (stage): Remove.
15416 (main): Replace `stage' invocations with timevar calls.
15417 * src/output.c: Insert pertinent timevar calls.
15418
15419 2002-07-31 Akim Demaille <akim@epita.fr>
15420
15421 Let --trace have arguments.
15422
15423 * src/getargs.h (enum trace_e): New.
15424 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15425 (long_options, short_options): --trace/-T takes an optional
15426 argument.
15427 Change all the uses of trace_flag to reflect the new flags.
15428 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15429
15430 Strengthen `stage' portability.
15431
15432 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15433 * configure.in: Use it.
15434 Don't check for malloc.h and sys/times.h.
15435 * src/system.h: Include them when appropriate.
15436 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15437 times and struct tms are available.
15438
15439 2002-07-30 Akim Demaille <akim@epita.fr>
15440
15441 In verbose parse error message, don't report `error' as an
15442 expected token.
15443 * tests/actions.at (Printers and Destructors): Adjust.
15444 * tests/calc.at (Calculator $1): Adjust.
15445 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15446 error message, do not report the parser accepts the error token in
15447 that state.
15448
15449 2002-07-30 Akim Demaille <akim@epita.fr>
15450
15451 Normalize conflict related messages.
15452
15453 * src/complain.h, src/complain.c (warn, complain): New.
15454 * src/conflicts.c (conflicts_print): Use them.
15455 (conflict_report_yacc): New, extracted from...
15456 (conflicts_print): here.
15457 * tests/conflicts.at, tests/existing.at: Adjust.
15458
15459 2002-07-30 Akim Demaille <akim@epita.fr>
15460
15461 Report rules which are never reduced by the parser: those hidden
15462 by conflicts.
15463
15464 * src/LR0.c (save_reductions): Don't make the final state too
15465 different: save its reduction (accept) instead of having a state
15466 without any action (no shift or goto, no reduce).
15467 Note: the final state is now a ``regular'' state, i.e., the
15468 parsers now contain `reduce 0' as default reduction.
15469 Nevertheless, since they decide to `accept' when yystate =
15470 final_state, they still will not reduce rule 0.
15471 * src/print.c (print_actions, print_reduction): Adjust.
15472 * src/output.c (action_row): Track reduced rules.
15473 (token_actions): Report rules never reduced.
15474 * tests/conflicts.at, tests/regression.at: Adjust.
15475
15476 2002-07-30 Akim Demaille <akim@epita.fr>
15477
15478 `stage' was accidently included in a previous patch.
15479 Initiate its autoconfiscation.
15480
15481 * configure.in: Look for malloc.h and sys/times.h.
15482 * src/main.c (stage): Adjust.
15483 Report only when trace_flag.
15484
15485 2002-07-29 Akim Demaille <akim@epita.fr>
15486
15487 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15488 state_number_t.
15489 (errs_t): symbol_t*, not symbol_number_t.
15490 (reductions_t): rule_t*, not rule_number_t.
15491 (FOR_EACH_SHIFT): New.
15492 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15493 * src/print.c, src/print_graph.c: Adjust.
15494
15495 2002-07-29 Akim Demaille <akim@epita.fr>
15496
15497 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15498
15499 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15500 (endtoken, accept): these.
15501 * src/reader.c (reader): Set endtoken's default tag to "$end".
15502 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15503 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15504 Adjust.
15505
15506 2002-07-29 Akim Demaille <akim@epita.fr>
15507
15508 * src/reduce.c (reduce_grammar): When the language is empty,
15509 complain about the start symbol, not the axiom.
15510 Use its location.
15511 * tests/reduce.at (Empty Language): New.
15512
15513 2002-07-26 Akim Demaille <akim@epita.fr>
15514
15515 * src/reader.h, src/reader.c (gram_error): ... can't get
15516 yycontrol without making too strong assumptions on the parser
15517 itself.
15518 * src/output.c (prepare_tokens): Use the real 0th value of
15519 token_translations instead of `0'.
15520 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15521 visible here.
15522 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15523 for the time being: %locations ought to provide it to yyerror.
15524
15525 2002-07-25 Akim Demaille <akim@epita.fr>
15526
15527 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15528 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15529 * tests/regression.at (Web2c Actions): Adjust.
15530
15531 2002-07-25 Akim Demaille <akim@epita.fr>
15532
15533 Stop storing rules from 1 to nrules + 1.
15534
15535 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15536 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15537 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15538 Iterate from 0 to nrules.
15539 Use rule_number_as_item_number and item_number_as_rule_number.
15540 Adjust to `derive' now containing possibly 0.
15541 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15542 Handle the `- 1' part in rule numbers from/to item numbers.
15543 * src/conflicts.c (log_resolution): Fix the message which reversed
15544 shift and reduce.
15545 * src/output.c (action_row): Initialize default_rule to -1.
15546 (token_actions): Adjust.
15547 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15548 expected output.
15549 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15550
15551 2002-07-25 Akim Demaille <akim@epita.fr>
15552
15553 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15554 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15555 (b4_c_knr_arg_decl): New.
15556 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15557 yyreport_parse_error.
15558
15559 2002-07-25 Akim Demaille <akim@epita.fr>
15560
15561 * data/yacc.c (yyreport_parse_error): New, extracted from...
15562 (yyparse): here.
15563 (yydestruct, yysymprint): Move above yyparse.
15564 Be K&R compliant.
15565
15566 2002-07-25 Akim Demaille <akim@epita.fr>
15567
15568 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15569 replace...
15570 (b4_sint_type, b4_uint_type): these.
15571 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15572 * tests/regression.at (Web2c Actions): Adjust.
15573
15574 2002-07-25 Akim Demaille <akim@epita.fr>
15575
15576 * src/gram.h (TIEM_NUMBER_MAX): New.
15577 (item_number_of_rule_number, rule_number_of_item_number): Rename
15578 as...
15579 (rule_number_as_item_number, item_number_as_rule_number): these.
15580 Adjust dependencies.
15581 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15582 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15583 (symbol_number_to_vector_number): New.
15584 (order): Of vector_number_t* type.
15585 (base_t, BASE_MAX, BASE_MIN): New.
15586 (froms, tos, width, pos, check): Of base_t type.
15587 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15588 (actrow): Of action_number_t type.
15589 (conflrow): Of unsigned int type.
15590 (table_ninf, base_ninf): New.
15591 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15592 (muscle_insert_int_table, muscle_insert_base_table)
15593 (muscle_insert_rule_number_table): New.
15594 (prepare_tokens): Output `toknum' as int_table.
15595 (action_row): Returns a rule_number_t.
15596 Use ACTION_MIN, not SHRT_MIN.
15597 (token_actions): yydefact is rule_number_t*.
15598 (table_ninf_remap): New.
15599 (pack_table): Use it for `base' and `table'.
15600 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15601 replaced with...
15602 (YYPACT_NINF, YYTABLE_NINF): these.
15603 (yypact, yytable): Compute their types instead of hard-coded
15604 `short'.
15605 * tests/regression.at (Web2c Actions): Adjust.
15606
15607 2002-07-19 Akim Demaille <akim@epita.fr>
15608
15609 * src/scan-gram.l (id): Can start with an underscore.
15610
15611 2002-07-16 Akim Demaille <akim@epita.fr>
15612
15613 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15614 Adjust all former `associativity' dependencies.
15615 * src/symtab.c (symbol_new): Default associativity is `undef', not
15616 `right'.
15617 (symbol_check_alias_consistence): Adjust.
15618
15619 2002-07-09 Akim Demaille <akim@epita.fr>
15620
15621 * doc/bison.texinfo: Properly set the ``header'' part.
15622 Use @dircategory ``GNU programming tools'' as per Texinfo's
15623 documentation.
15624 Use @copying.
15625
15626 2002-07-09 Akim Demaille <akim@epita.fr>
15627
15628 * lib/quotearg.h: Protect against multiple inclusions.
15629 * src/location.h (location_t): Add a `file' member.
15630 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15631 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15632 `error_one_per_line' support.
15633
15634 2002-07-09 Akim Demaille <akim@epita.fr>
15635
15636 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15637 * src/reader.c (lineno): Remove.
15638 Adjust all dependencies.
15639 (get_merge_function): Take a location and use complain_at.
15640 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15641 * tests/regression.at (Invalid inputs, Mixing %token styles):
15642 Adjust.
15643
15644 2002-07-09 Akim Demaille <akim@epita.fr>
15645
15646 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15647 recovery rule, and forbid extensions when --yacc.
15648 (gram_error): Use complain_at.
15649 * src/reader.c (reader): Exit if there were parse errors.
15650
15651 2002-07-09 Akim Demaille <akim@epita.fr>
15652
15653 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15654 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15655 Reported by R Blake <blakers@mac.com>.
15656
15657 2002-07-09 Akim Demaille <akim@epita.fr>
15658
15659 * data/yacc.c: Output the copyright notive in the header.
15660
15661 2002-07-03 Akim Demaille <akim@epita.fr>
15662
15663 * src/output.c (froms, tos): Are state_number_t.
15664 (save_column): sp, sp1, and sp2 are state_number_t.
15665 (prepare): Rename `final' as `final_state_number', `nnts' as
15666 `nterms_number', `nrules' as `rules_number', `nstates' as
15667 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15668 unused.
15669 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15670 * data/lalr1.cc (nsym_): Remove, unused.
15671
15672 2002-07-03 Akim Demaille <akim@epita.fr>
15673
15674 * src/lalr.h, src/lalr.c (goto_number_t): New.
15675 * src/lalr.c (goto_list_t): New.
15676 Propagate them.
15677 * src/nullable.c (rule_list_t): New.
15678 Propagate.
15679 * src/types.h: Remove.
15680
15681 2002-07-03 Akim Demaille <akim@epita.fr>
15682
15683 * src/closure.c (print_fderives): Use rule_rhs_print.
15684 * src/derives.c (print_derives): Use rule_rhs_print.
15685 (rule_list_t): New, replaces `shorts'.
15686 (set_derives): Add comments.
15687 * tests/sets.at (Nullable, Firsts): Adjust.
15688
15689 2002-07-03 Akim Demaille <akim@epita.fr>
15690
15691 * src/output.c (prepare_actions): Free `tally' and `width'.
15692 (prepare_actions): Allocate and free `order'.
15693 * src/symtab.c (symbols_free): Free `symbols'.
15694 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15695 * src/output.c (m4_invoke): Move to...
15696 * src/scan-skel.l: here.
15697 (<<EOF>>): Close yyout, and free its name.
15698
15699 2002-07-03 Akim Demaille <akim@epita.fr>
15700
15701 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15702
15703 * src/LR0.c (new_state): Merge into...
15704 (state_list_append): this.
15705 (new_states): Merge into...
15706 (generate_states): here.
15707 (set_states): Don't ensure a proper `errs' state member here, do it...
15708 * src/conflicts.c (conflicts_solve): here.
15709 * src/state.h, src/state.c: Comment changes.
15710 (state_t): Rename member `shifts' as `transitions'.
15711 Adjust all dependencies.
15712 (errs_new): For consistency, also take the values as argument.
15713 (errs_dup): Remove.
15714 (state_errs_set): New.
15715 (state_reductions_set, state_transitions_set): Assert that no
15716 previous value was assigned.
15717 (state_free): New.
15718 (states_free): Use it.
15719 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15720 temporary storage: use `errs' and `nerrs' as elsewhere.
15721 (set_conflicts): Allocate and free this `errs'.
15722
15723 2002-07-02 Akim Demaille <akim@epita.fr>
15724
15725 * lib/libiberty.h: New.
15726 * lib: Update the bitset implementation from upstream.
15727 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15728 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15729 * src/main.c: Adjust bitset stats calls.
15730
15731 2002-07-01 Paul Eggert <eggert@twinsun.com>
15732
15733 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15734 char, so that negative chars don't collide with $.
15735
15736 2002-06-30 Akim Demaille <akim@epita.fr>
15737
15738 Have the GLR tests be `warning' checked, and fix the warnings.
15739
15740 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15741 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15742 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15743 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15744 (yyaddDeferredAction): static.
15745 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15746 (yyreportParseError): yyprefix is const.
15747 yytokenp is used only when verbose.
15748 (yy__GNUC__): Replace with __GNUC__.
15749 (yypdumpstack): yyi is size_t.
15750 (yypreference): Un-yy local variables and arguments, to avoid
15751 clashes with `yyr1'. Anyway, we are not in the user name space.
15752 (yytname_size): be an int, as is compared with ints.
15753 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15754 Use them.
15755 * tests/cxx-gram.at: Use quotation to protect $1.
15756 Use AT_COMPILE to enable warnings hunts.
15757 Prototype yylex and yyerror.
15758 `Use' argc.
15759 Include `string.h', not `strings.h'.
15760 Produce and prototype stmtMerge only when used.
15761 yylex takes a location.
15762
15763 2002-06-30 Akim Demaille <akim@epita.fr>
15764
15765 We spend a lot of time in quotearg, in particular when --verbose.
15766
15767 * src/symtab.c (symbol_get): Store a quoted version of the key.
15768 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15769 Adjust all callers.
15770
15771 2002-06-30 Akim Demaille <akim@epita.fr>
15772
15773 * src/state.h (reductions_t): Rename member `nreds' as num.
15774 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15775 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15776
15777 2002-06-30 Akim Demaille <akim@epita.fr>
15778
15779 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15780 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15781 (shifts_to): Rename as...
15782 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15783 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15784 (TRANSITION_IS_DISABLED, transitions_to): these.
15785
15786 2002-06-30 Akim Demaille <akim@epita.fr>
15787
15788 * src/print.c (print_shifts, print_gotos): Merge into...
15789 (print_transitions): this.
15790 (print_transitions, print_errs, print_reductions): Align the
15791 lookaheads columns.
15792 (print_core, print_transitions, print_errs, print_state,
15793 print_grammar): Output empty lines separator before, not after.
15794 (state_default_rule_compute): Rename as...
15795 (state_default_rule): this.
15796 * tests/conflicts.at (Defaulted Conflicted Reduction),
15797 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15798 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15799
15800 2002-06-30 Akim Demaille <akim@epita.fr>
15801
15802 Display items as we display rules.
15803
15804 * src/gram.h, src/gram.c (rule_lhs_print): New.
15805 * src/gram.c (grammar_rules_partial_print): Use it.
15806 * src/print.c (print_core): Likewise.
15807 * tests/conflicts.at (Defaulted Conflicted Reduction),
15808 (Unresolved SR Conflicts): Adjust.
15809 (Unresolved SR Conflicts): Adjust and rename as...
15810 (Resolved SR Conflicts): this, as was meant.
15811 * tests/regression.at (Web2c Report): Adjust.
15812
15813 2002-06-30 Akim Demaille <akim@epita.fr>
15814
15815 * src/print.c (state_default_rule_compute): New, extracted from...
15816 (print_reductions): here.
15817 Pessimize, but clarify the code.
15818 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15819
15820 2002-06-30 Akim Demaille <akim@epita.fr>
15821
15822 * src/output.c (action_row): Let default_rule be always a rule
15823 number.
15824
15825 2002-06-30 Akim Demaille <akim@epita.fr>
15826
15827 * src/closure.c (print_firsts, print_fderives, closure):
15828 Use BITSET_EXECUTE.
15829 * src/lalr.c (lookaheads_print): Likewise.
15830 * src/state.c (state_rule_lookaheads_print): Likewise.
15831 * src/print_graph.c (print_core): Likewise.
15832 * src/print.c (print_reductions): Likewise.
15833 * src/output.c (action_row): Likewise.
15834 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15835
15836 2002-06-30 Akim Demaille <akim@epita.fr>
15837
15838 * src/print_graph.c: Use report_flag.
15839
15840 2002-06-30 Akim Demaille <akim@epita.fr>
15841
15842 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15843 to...
15844 * src/relation.h, src/relation.c (traverse, relation_digraph)
15845 (relation_print, relation_transpose): New.
15846
15847 2002-06-30 Akim Demaille <akim@epita.fr>
15848
15849 * src/state.h, src/state.c (shifts_to): New.
15850 * src/lalr.c (build_relations): Use it.
15851
15852 2002-06-30 Akim Demaille <akim@epita.fr>
15853
15854 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15855 (item_number_of_rule_number, rule_number_of_item_number): New.
15856 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15857 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15858 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15859 Propagate their use.
15860 Much remains to be done, in particular wrt `shorts' from types.h.
15861
15862 2002-06-30 Akim Demaille <akim@epita.fr>
15863
15864 * src/symtab.c (symbol_new): Initialize the `printer' member.
15865
15866 2002-06-30 Akim Demaille <akim@epita.fr>
15867
15868 * src/LR0.c (save_reductions): Remove, replaced by...
15869 * src/state.h, src/state.c (state_reductions_set): New.
15870 (reductions, errs): Rename as...
15871 (reductions_t, errs_t): these.
15872 Adjust all dependencies.
15873
15874 2002-06-30 Akim Demaille <akim@epita.fr>
15875
15876 * src/LR0.c (state_list_t, state_list_append): New.
15877 (first_state, last_state): Now symbol_list_t.
15878 (this_state): Remove.
15879 (new_itemsets, append_states, save_reductions): Take a state_t as
15880 argument.
15881 (set_states, generate_states): Adjust.
15882 (save_shifts): Remove, replaced by...
15883 * src/state.h, src/state.c (state_shifts_set): New.
15884 (shifts): Rename as...
15885 (shifts_t): this.
15886 Adjust all dependencies.
15887 * src/state.h (state_t): Remove the `next' member.
15888
15889 2002-06-30 Akim Demaille <akim@epita.fr>
15890
15891 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15892 escaped in slot 0.
15893
15894 2002-06-30 Akim Demaille <akim@epita.fr>
15895
15896 Use hash.h for the state hash table.
15897
15898 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15899 (allocate_storage): Use state_hash_new.
15900 (free_storage): Use state_hash_free.
15901 (new_state, get_state): Adjust.
15902 * src/lalr.h, src/lalr.c (states): Move to...
15903 * src/states.h (state_t): Remove the `link' member, no longer
15904 used.
15905 * src/states.h, src/states.c: here.
15906 (state_hash_new, state_hash_free, state_hash_lookup)
15907 (state_hash_insert, states_free): New.
15908 * src/states.c (state_table, state_compare, state_hash): New.
15909 * src/output.c (output_actions): Do not free states now, since we
15910 still need to know the final_state number in `prepare', called
15911 afterwards. Do it...
15912 * src/main.c (main): here: call states_free after `output'.
15913
15914 2002-06-30 Akim Demaille <akim@epita.fr>
15915
15916 * src/state.h, src/state.c (state_new): New, extracted from...
15917 * src/LR0.c (new_state): here.
15918 * src/state.h (STATE_ALLOC): Move to...
15919 * src/state.c: here.
15920 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15921 * src/state.h, src/state.c: here.
15922
15923 2002-06-30 Akim Demaille <akim@epita.fr>
15924
15925 * src/reader.c (gensym): Rename as...
15926 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15927 (getsym): Rename as...
15928 (symbol_get): this.
15929
15930 2002-06-30 Akim Demaille <akim@epita.fr>
15931
15932 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15933 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15934 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15935 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15936
15937 2002-06-30 Akim Demaille <akim@epita.fr>
15938
15939 Make the test suite pass with warnings checked.
15940
15941 * tests/actions.at (Printers and Destructors): Improve.
15942 Avoid unsigned vs. signed issues.
15943 * tests/calc.at: Don't exercise the scanner here, do it...
15944 * tests/input.at (Torturing the Scanner): here.
15945
15946 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15947
15948 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15949 reorganize first lines parallel to yacc.c.
15950
15951 2002-06-28 Akim Demaille <akim@epita.fr>
15952
15953 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15954 (b4_token_enum, b4_token_defines): New, factored from...
15955 * data/lalr1.cc, data/yacc.c, glr.c: here.
15956
15957 2002-06-28 Akim Demaille <akim@epita.fr>
15958
15959 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15960 unused variables.
15961 * src/output.c (merger_output): static.
15962
15963 2002-06-28 Akim Demaille <akim@epita.fr>
15964
15965 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15966 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15967 pacify GCC.
15968 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15969
15970 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15971
15972 Accumulated changelog for new GLR parsing features.
15973
15974 * src/conflicts.c (count_total_conflicts): Change name to
15975 conflicts_total_count.
15976 * src/conflicts.h: Ditto.
15977 * src/output.c (token_actions): Use the new name.
15978 (output_conflicts): Change conflp => conflict_list_heads, and
15979 confl => conflict_list for better readability.
15980 * data/glr.c: Use the new names.
15981 * NEWS: Add self to GLR announcement.
15982
15983 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15984
15985 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15986 Akim Demaille.
15987
15988 * data/bison.glr: Change name to glr.c
15989 * data/glr.c: Renamed from bison.glr.
15990 * data/Makefile.am: Add glr.c
15991
15992 * src/getargs.c:
15993
15994 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15995 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15996
15997 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15998
15999 * data/bison.glr: Be sure to restore the
16000 current #line when returning to the skeleton contents after having
16001 exposed the input file's #line.
16002
16003 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16004
16005 * data/bison.glr: Bring up to date with changes to bison.simple.
16006
16007 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16008
16009 * data/bison.glr: Correct definitions that use b4_prefix.
16010 Various reformatting.
16011 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16012 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16013 yytokenp argument; now part of stack.
16014 (yychar): Define to behave as documented.
16015 (yyclearin): Ditto.
16016
16017 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16018
16019 * src/reader.h: Add declaration for free_merger_functions.
16020
16021 * src/reader.c (merge_functions): New variable.
16022 (get_merge_function): New function.
16023 (free_merger_functions): New function.
16024 (readgram): Check for %prec that is not followed by a symbol.
16025 Handle %dprec and %merge declarations.
16026 (packgram): Initialize dprec and merger fields in rules array.
16027
16028 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16029 conflict_list_cnt, conflict_list_free): New variables.
16030 (table_grow): Also grow conflict_table.
16031 (prepare_rules): Output dprec and merger tables.
16032 (conflict_row): New function.
16033 (action_row): Output conflict lists for GLR parser. Don't use
16034 default reduction in conflicted states for GLR parser so that there
16035 are spaces for the conflict lists.
16036 (save_row): Also save conflict information.
16037 (token_actions): Allocate conflict list.
16038 (merger_output): New function.
16039 (pack_vector): Pack conflict table, too.
16040 (output_conflicts): New function to output yyconflp and yyconfl.
16041 (output_check): Allocate conflict_tos.
16042 (output_actions): Output conflict tables, also.
16043 (output_skeleton): Output b4_mergers definition.
16044 (prepare): Output b4_max_rhs_length definition.
16045 Use 'bison.glr' as default skeleton for GLR parsers.
16046
16047 * src/gram.c (glr_parser): New flag.
16048 (grammar_free): Call free_merger_functions.
16049
16050 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16051 all pairs of conflicting reductions, rather than just all tokens
16052 causing conflicts. Needed to size conflict tables.
16053 (conflicts_output): Modify call to count_rr_conflicts for new
16054 interface.
16055 (conflicts_print): Ditto.
16056 (count_total_conflicts): New function.
16057
16058 * src/reader.h (merger_list): New type.
16059 (merge_functions): New variable.
16060
16061 * src/lex.h (tok_dprec, tok_merge): New token types.
16062
16063 * src/gram.h (rule_s): Add dprec and merger fields.
16064 (glr_parser): New flag.
16065
16066 * src/conflicts.h (count_total_conflicts): New function.
16067
16068 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16069
16070 * doc/bison.texinfo (Generalized LR Parsing): New section.
16071 (GLR Parsers): New section.
16072 (Language and Grammar): Mention GLR parsing.
16073 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16074 Correct typo ("tge" -> "the").
16075
16076 * data/bison.glr: New skeleton for GLR parsing.
16077
16078 * tests/cxx-gram.at: New tests for GLR parsing.
16079
16080 * tests/testsuite.at: Include cxx-gram.at.
16081
16082 * tests/Makefile.am: Add cxx-gram.at.
16083
16084 * src/parse-gram.y:
16085
16086 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16087
16088 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16089
16090 2002-06-27 Akim Demaille <akim@epita.fr>
16091
16092 * src/options.h, src/options.c: Remove.
16093 * src/getargs.c (short_options, long_options): New.
16094
16095 2002-06-27 Akim Demaille <akim@epita.fr>
16096
16097 * data/bison.simple, data/bison.c++: Rename as...
16098 * data/yacc.c, data/lalr1.cc: these.
16099 * doc/bison.texinfo (Environment Variables): Remove.
16100
16101 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16102
16103 * src/getargs.c (report_argmatch): Initialize strtok().
16104
16105 2002-06-20 Akim Demaille <akim@epita.fr>
16106
16107 * data/bison.simple (b4_symbol_actions): New, replaces...
16108 (b4_symbol_destructor, b4_symbol_printer): these.
16109 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16110 user token numbers.
16111
16112 2002-06-20 Akim Demaille <akim@epita.fr>
16113
16114 * data/bison.simple (yydestructor): Rename as...
16115 (yydestruct): this.
16116
16117 2002-06-20 Akim Demaille <akim@epita.fr>
16118
16119 * src/symtab.h, src/symtab.c (symbol_type_set)
16120 (symbol_destructor_set, symbol_precedence_set): The location is
16121 the last argument.
16122 Adjust all callers.
16123
16124 2002-06-20 Akim Demaille <akim@epita.fr>
16125
16126 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16127 internals.
16128 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16129 Takes a location.
16130 * src/symtab.h, src/symtab.c (symbol_class_set)
16131 (symbol_user_token_number_set): Likewise.
16132 Adjust all callers.
16133 Promote complain_at.
16134 * tests/input.at (Type Clashes): Adjust.
16135
16136 2002-06-20 Akim Demaille <akim@epita.fr>
16137
16138 * data/bison.simple (YYLEX): Fix the declaration when
16139 %pure-parser.
16140
16141 2002-06-20 Akim Demaille <akim@epita.fr>
16142
16143 * data/bison.simple (yysymprint): Don't print the token number,
16144 just its name.
16145 * tests/actions.at (Destructors): Rename as...
16146 (Printers and Destructors): this.
16147 Also exercise %printer.
16148
16149 2002-06-20 Akim Demaille <akim@epita.fr>
16150
16151 * data/bison.simple (YYDSYMPRINT): New.
16152 Use it to remove many of the #if YYDEBUG/if (yydebug).
16153
16154 2002-06-20 Akim Demaille <akim@epita.fr>
16155
16156 * src/symtab.h, src/symtab.c (symbol_t): printer and
16157 printer_location are new members.
16158 (symbol_printer_set): New.
16159 * src/parse-gram.y (PERCENT_PRINTER): New token.
16160 Handle its associated rule.
16161 * src/scan-gram.l: Adjust.
16162 (handle_destructor_at, handle_destructor_dollar): Rename as...
16163 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16164 * src/output.c (symbol_printers_output): New.
16165 (output_skeleton): Call it.
16166 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16167 since there are already many grammar files with a user `yyprint'.
16168 Replace the calls to YYPRINT to calls to yysymprint.
16169 * tests/calc.at: Adjust.
16170 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16171 taking advantage of parser very internal details (stack size!).
16172
16173 2002-06-20 Akim Demaille <akim@epita.fr>
16174
16175 * src/scan-gram.l: Complete the scanner with the missing patterns
16176 to pacify Flex.
16177 Use `quote' and `symbol_tag_get' where appropriate.
16178
16179 2002-06-19 Akim Demaille <akim@epita.fr>
16180
16181 * tests/actions.at (Destructors): Augment to test locations.
16182 * data/bison.simple (yydestructor): Pass it the current location
16183 if locations are enabled.
16184 Prototype only when __STDC__ or C++.
16185 Change the argument names to move into the yy name space: there is
16186 user code here.
16187
16188 2002-06-19 Akim Demaille <akim@epita.fr>
16189
16190 * data/bison.simple (b4_pure_if): New.
16191 Use it instead of #ifdef YYPURE.
16192
16193 2002-06-19 Akim Demaille <akim@epita.fr>
16194
16195 * data/bison.simple (b4_location_if): New.
16196 Use it instead of #ifdef YYLSP_NEEDED.
16197
16198 2002-06-19 Akim Demaille <akim@epita.fr>
16199
16200 Prepare @$ in %destructor, but currently don't bind it in the
16201 skeleton, as %location use is not cleaned up yet.
16202
16203 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16204 (handle_action_at): New.
16205 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16206 a braced_code_t and a location as additional arguments.
16207 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16208 unquote one when outputting `b4_dollar_dollar'.
16209 Adjust callers.
16210 * data/bison.simple (b4_eval): Remove.
16211 (b4_symbol_destructor): Adjust.
16212 * tests/input.at (Invalid @n): Adjust.
16213
16214 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16215
16216 * doc/bison.texinfo: Document ability to have multiple
16217 prologue sections.
16218
16219 2002-06-18 Akim Demaille <akim@epita.fr>
16220
16221 * src/files.c (compute_base_names): When computing the output file
16222 names from the input file name, strip the directory part.
16223
16224 2002-06-18 Akim Demaille <akim@epita.fr>
16225
16226 * data/bison.simple.new: Comment changes.
16227 Reported by Andreas Schwab.
16228
16229 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16230
16231 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16232 there are no `label `yyoverflowlab' defined but not used' warnings
16233 when yyoverflow is defined.
16234
16235 2002-06-18 Akim Demaille <akim@epita.fr>
16236
16237 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16238 new member.
16239 (symbol_destructor_set): Adjust.
16240 * src/output.c (symbol_destructors_output): Output the destructor
16241 locations.
16242 Output the symbol name.
16243 * data/bison.simple (b4_symbol_destructor): Adjust.
16244
16245 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16246 and Akim Demaille <akim@epita.fr>
16247
16248 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16249 what's left on the stack when the error recovery hits EOF.
16250 * tests/actions.at (Destructors): Complete to exercise this case.
16251
16252 2002-06-17 Akim Demaille <akim@epita.fr>
16253
16254 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16255 arguments is really empty, not only equal to `[]'.
16256 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16257 member.
16258 (symbol_destructor_set): New.
16259 * src/output.c (symbol_destructors_output): New.
16260 * src/reader.h (brace_code_t, current_braced_code): New.
16261 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16262 (handle_dollar): Rename as...
16263 (handle_action_dollar): this.
16264 (handle_destructor_dollar): New.
16265 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16266 (grammar_declaration): Use it.
16267 * data/bison.simple (yystos): Is always defined.
16268 (yydestructor): New.
16269 * tests/actions.at (Destructors): New.
16270 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16271
16272 2002-06-17 Akim Demaille <akim@epita.fr>
16273
16274 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16275 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16276 rule_length only when needed.
16277 * src/output.c (actions_output, token_definitions_output): Output
16278 the full M4 block.
16279 * src/symtab.c: Don't access directly to the symbol tag, use
16280 symbol_tag_get.
16281 * src/parse-gram.y: Use symbol_list_free.
16282
16283 2002-06-17 Akim Demaille <akim@epita.fr>
16284
16285 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16286 (symbol_list_prepend, get_type_name): Move to...
16287 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16288 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16289 Adjust all callers.
16290 (symbol_list_free): New.
16291 * src/scan-gram.l (handle_dollar): Takes a location.
16292 * tests/input.at (Invalid $n): Adjust.
16293
16294 2002-06-17 Akim Demaille <akim@epita.fr>
16295
16296 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16297 (symbol_list_prepend): New.
16298 * src/parse-gram.y (%union): `list' is a new member.
16299 (symbols.1): New, replaces...
16300 (terms_to_prec.1, nterms_to_type.1): these.
16301 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16302 Take a location as additional argument.
16303 Adjust all callers.
16304
16305 2002-06-15 Akim Demaille <akim@epita.fr>
16306
16307 * src/parse-gram.y: Move %token in the declaration section so that
16308 we don't depend upon CVS Bison.
16309
16310 2002-06-15 Akim Demaille <akim@epita.fr>
16311
16312 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16313 * src/print.c (print_core): Use it.
16314
16315 2002-06-15 Akim Demaille <akim@epita.fr>
16316
16317 * src/conflicts.c (log_resolution): Accept the rule involved in
16318 the sr conflicts instead of the lookahead number that points to
16319 that rule.
16320 (flush_reduce): Accept the current lookahead vector as argument,
16321 instead of the index in LA.
16322 (resolve_sr_conflict): Accept the current number of lookahead
16323 bitset to consider for the STATE, instead of the index in LA.
16324 (set_conflicts): Adjust.
16325 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16326
16327 2002-06-15 Akim Demaille <akim@epita.fr>
16328
16329 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16330 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16331 Adjust all dependencies.
16332 * src/lalr.c (initialize_lookaheads): Split into...
16333 (states_lookaheads_count, states_lookaheads_initialize): these.
16334 (lalr): Adjust.
16335
16336 2002-06-15 Akim Demaille <akim@epita.fr>
16337
16338 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16339 out of...
16340 (grammar_rules_print): here.
16341 * src/reduce.c (reduce_output): Use it.
16342 * tests/reduce.at (Useless Rules, Reduced Automaton)
16343 (Underivable Rules): Adjust.
16344
16345 2002-06-15 Akim Demaille <akim@epita.fr>
16346
16347 Copy BYacc's nice way to report the grammar.
16348
16349 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16350 New.
16351 Don't print the rules' location, it is confusing and useless.
16352 (rule_print): Use grammar_rhs_print.
16353 * src/print.c (print_grammar): Use grammar_rules_print.
16354
16355 2002-06-15 Akim Demaille <akim@epita.fr>
16356
16357 Complete and rationalize `useless thing' warnings.
16358
16359 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16360 (symbol_tag_print): New.
16361 Use them everywhere in place of accessing directly the tag member.
16362 * src/gram.h, src/gram.c (rule_print): New.
16363 Use it where a rule used to be printed `by hand'.
16364 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16365 (reduce_grammar_tables): Report the useless rules.
16366 (reduce_print): Useless things are a warning, not an error.
16367 Report it as such.
16368 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16369 (Reduced Automaton, Underivable Rules): Adjust.
16370 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16371 * tests/conflicts.at (Unresolved SR Conflicts)
16372 (Solved SR Conflicts): Adjust.
16373
16374 2002-06-15 Akim Demaille <akim@epita.fr>
16375
16376 Let symbols have a location.
16377
16378 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16379 (getsym): Adjust.
16380 Adjust all callers.
16381 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16382 Use location_t, not int.
16383 * src/symtab.c (symbol_check_defined): Take advantage of the
16384 location.
16385 * tests/regression.at (Invalid inputs): Adjust.
16386
16387 2002-06-15 Akim Demaille <akim@epita.fr>
16388
16389 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16390 (input): Don't try to initialize yylloc here, do it in the
16391 scanner.
16392 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16393 * src/gram.h (rule_t): Change line and action_line into location
16394 and action_location, of location_t type.
16395 Adjust all dependencies.
16396 * src/location.h, src/location.c (empty_location): New.
16397 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16398 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16399 (grammar_current_rule_symbol_append)
16400 (grammar_current_rule_action_append): Expect a location as argument.
16401 * src/reader.c (grammar_midrule_action): Adjust to attach an
16402 action's location as dummy symbol location.
16403 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16404 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16405 the line numbers.
16406
16407 2002-06-14 Akim Demaille <akim@epita.fr>
16408
16409 Grammar declarations may be found in the grammar section.
16410
16411 * src/parse-gram.y (rules_or_grammar_declaration): New.
16412 (declarations): Each declaration may end with a semicolon, not
16413 just...
16414 (grammar_declaration): `"%union"'.
16415 (grammar): Branch to rules_or_grammar_declaration.
16416
16417 2002-06-14 Akim Demaille <akim@epita.fr>
16418
16419 * src/main.c (main): Invoke scanner_free.
16420
16421 2002-06-14 Akim Demaille <akim@epita.fr>
16422
16423 * src/output.c (m4_invoke): Extracted from...
16424 (output_skeleton): here.
16425 Free tempfile.
16426
16427 2002-06-14 Akim Demaille <akim@epita.fr>
16428
16429 * src/parse-gram.y (directives, directive, gram)
16430 (grammar_directives, precedence_directives, precedence_directive):
16431 Rename as...
16432 (declarations, declaration, grammar, grammar_declaration)
16433 (precedence_declaration, precedence_declarator): these.
16434 (symbol_declaration): New.
16435
16436 2002-06-14 Akim Demaille <akim@epita.fr>
16437
16438 * src/files.c (action_obstack): Remove, unused.
16439 (output_obstack): Remove it, and all its dependencies, as it is no
16440 longer needed.
16441 * src/reader.c (epilogue_set): Build the epilogue in the
16442 muscle_obstack.
16443 * src/output.h, src/output.c (muscle_obstack): Move to...
16444 * src/muscle_tab.h, src/muscle_tab.h: here.
16445 (muscle_init): Initialize muscle_obstack.
16446 (muscle_free): New.
16447 * src/main.c (main): Call it.
16448
16449 2002-06-14 Akim Demaille <akim@epita.fr>
16450
16451 * src/location.h: New, extracted from...
16452 * src/reader.h: here.
16453 * src/Makefile.am (noinst_HEADERS): Merge into
16454 (bison_SOURCES): this.
16455 Add location.h.
16456 * src/parse-gram.y: Use location_t instead of Bison's.
16457 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16458 Use location_t instead of ints.
16459
16460 2002-06-14 Akim Demaille <akim@epita.fr>
16461
16462 * data/bison.simple, data/bison.c++: Be sure to restore the
16463 current #line when returning to the skeleton contents after having
16464 exposed the input file's #line.
16465
16466 2002-06-12 Akim Demaille <akim@epita.fr>
16467
16468 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16469 eager.
16470 * tests/actions.at (Exotic Dollars): New.
16471
16472 2002-06-12 Akim Demaille <akim@epita.fr>
16473
16474 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16475 ['"/] too eagerly.
16476 * tests/input.at (Torturing the Scanner): New.
16477
16478 2002-06-11 Akim Demaille <akim@epita.fr>
16479
16480 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16481 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16482 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16483 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16484 * src/reader.c (reader): Use it.
16485
16486 2002-06-11 Akim Demaille <akim@epita.fr>
16487
16488 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16489 Adjust all callers.
16490 (scanner_last_string_free): New.
16491
16492 2002-06-11 Akim Demaille <akim@epita.fr>
16493
16494 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16495 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16496 (last_string, YY_OBS_FREE): New.
16497 Use them when returning an ID.
16498
16499 2002-06-11 Akim Demaille <akim@epita.fr>
16500
16501 Have Bison grammars parsed by a Bison grammar.
16502
16503 * src/reader.c, src/reader.h (prologue_augment): New.
16504 * src/reader.c (copy_definition): Remove.
16505
16506 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16507 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16508 (grammar_current_rule_prec_set, grammar_current_rule_check)
16509 (grammar_current_rule_symbol_append)
16510 (grammar_current_rule_action_append): Export.
16511 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16512 (symbol_list_action_append): Remove.
16513 Hook the routines from reader.
16514 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16515 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16516
16517 * src/reader.c (read_declarations): Remove, unused.
16518
16519 * src/parse-gram.y: Handle the epilogue.
16520 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16521 (grammar_start_symbol_set): this.
16522 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16523 * src/reader.c (readgram): Remove, unused.
16524 (reader): Adjust to insert eoftoken and axiom where appropriate.
16525
16526 * src/reader.c (copy_dollar): Replace with...
16527 * src/scan-gram.h (handle_dollar): this.
16528 * src/parse-gram.y: Remove `%thong'.
16529
16530 * src/reader.c (copy_at): Replace with...
16531 * src/scan-gram.h (handle_at): this.
16532
16533 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16534 New.
16535
16536 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16537 time being.
16538
16539 * src/reader.h, src/reader.c (grammar_rule_end): New.
16540
16541 * src/parse.y (current_type, current_class): New.
16542 Implement `%nterm', `%token' support.
16543 Merge `%term' into `%token'.
16544 (string_as_id): New.
16545 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16546 type name.
16547
16548 * src/parse-gram.y: Be sure to handle properly the beginning of
16549 rules.
16550
16551 * src/parse-gram.y: Handle %type.
16552 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16553
16554 * src/parse-gram.y: More directives support.
16555 * src/options.c: No longer handle source directives.
16556
16557 * src/parse-gram.y: Fix %output.
16558
16559 * src/parse-gram.y: Handle %union.
16560 Use the prologue locations.
16561 * src/reader.c (parse_union_decl): Remove.
16562
16563 * src/reader.h, src/reader.c (epilogue_set): New.
16564 * src/parse-gram.y: Use it.
16565
16566 * data/bison.simple, data/bison.c++: b4_stype is now either not
16567 defined, then default to int, or to the contents of %union,
16568 without `union' itself.
16569 Adjust.
16570 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16571
16572 * src/output.c (actions_output): Don't output braces, as they are
16573 already handled by the scanner.
16574
16575 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16576 characters to themselves.
16577
16578 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16579 that the epilogue has a proper #line.
16580
16581 * src/parse-gram.y: Handle precedence/associativity.
16582
16583 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16584 a terminal.
16585 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16586 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16587 at all to define terminals that cannot be emitted.
16588
16589 * src/scan-gram.l: Escape M4 characters.
16590
16591 * src/scan-gram.l: Working properly with escapes in user
16592 strings/characters.
16593
16594 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16595 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16596 grammar.
16597 Use more modest sizes, as for the time being the parser does not
16598 release memory, and therefore the process swallows a huge amount
16599 of memory.
16600
16601 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16602 stricter %token grammar.
16603
16604 * src/symtab.h (associativity): Add `undef_assoc'.
16605 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16606 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16607
16608 * tests/regression.at (Invalid %directive): Remove, as it is now
16609 meaningless.
16610 (Invalid inputs): Adjust to the new error messages.
16611 (Token definitions): The new grammar doesn't allow too many
16612 eccentricities.
16613
16614 * src/lex.h, src/lex.c: Remove.
16615 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16616 (copy_character, copy_string2, copy_string, copy_identifier)
16617 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16618 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16619 (parse_action): Remove.
16620 * po/POTFILES.in: Adjust.
16621
16622 2002-06-11 Akim Demaille <akim@epita.fr>
16623
16624 * src/reader.c (parse_action): Don't store directly into the
16625 rule's action member: return the action as a string.
16626 Don't require `rule_length' as an argument: compute it.
16627 (grammar_current_rule_symbol_append)
16628 (grammar_current_rule_action_append): New, eved out from
16629 (readgram): here.
16630 Remove `action_flag', `rulelength', unused now.
16631
16632 2002-06-11 Akim Demaille <akim@epita.fr>
16633
16634 * src/reader.c (grammar_current_rule_prec_set).
16635 (grammar_current_rule_check): New, eved out from...
16636 (readgram): here.
16637 Remove `xaction', `first_rhs': useless.
16638 * tests/input.at (Type clashes): New.
16639 * tests/existing.at (GNU Cim Grammar): Adjust.
16640
16641 2002-06-11 Akim Demaille <akim@epita.fr>
16642
16643 * src/reader.c (grammar_midrule_action): New, Eved out from
16644 (readgram): here.
16645
16646 2002-06-11 Akim Demaille <akim@epita.fr>
16647
16648 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16649 New.
16650 (readgram): Use them as replacement of inlined code, crule and
16651 crule1.
16652
16653 2002-06-11 Akim Demaille <akim@epita.fr>
16654
16655 * src/reader.c (grammar_end, grammar_symbol_append): New.
16656 (readgram): Use them.
16657 Make the use of `p' as local as possible.
16658
16659 2002-06-10 Akim Demaille <akim@epita.fr>
16660
16661 GCJ's parser requires the tokens to be defined before the prologue.
16662
16663 * data/bison.simple: Output the token definition before the user's
16664 prologue.
16665 * tests/regression.at (Braces parsing, Duplicate string)
16666 (Mixing %token styles): Check the output from bison.
16667 (Early token definitions): New.
16668
16669 2002-06-10 Akim Demaille <akim@epita.fr>
16670
16671 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16672 assigning twice the same user number to a token, so that we can
16673 use it in...
16674 * src/lex.c (lex): here.
16675 Also use `symbol_class_set' instead of hand written code.
16676 * src/reader.c (parse_assoc_decl): Likewise.
16677
16678 2002-06-10 Akim Demaille <akim@epita.fr>
16679
16680 * src/symtab.c, src/symtab.c (symbol_class_set)
16681 (symbol_user_token_number_set): New.
16682 * src/reader.c (parse_token_decl): Use them.
16683 Use a switch instead of ifs.
16684 Use a single argument.
16685
16686 2002-06-10 Akim Demaille <akim@epita.fr>
16687
16688 Remove `%thong' support as it is undocumented, unused, duplicates
16689 `%token's job, and creates useless e-mail traffic with people who
16690 want to know what it is, why it is undocumented, unused, and
16691 duplicates `%token's job.
16692
16693 * src/reader.c (parse_thong_decl): Remove.
16694 * src/options.c (option_table): Remove "thong".
16695 * src/lex.h (tok_thong): Remove.
16696
16697 2002-06-10 Akim Demaille <akim@epita.fr>
16698
16699 * src/symtab.c, src/symtab.c (symbol_type_set)
16700 (symbol_precedence_set): New.
16701 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16702 (value_components_used): Remove, unused.
16703
16704 2002-06-09 Akim Demaille <akim@epita.fr>
16705
16706 Move symbols handling code out of the reader.
16707
16708 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16709 (axiom): Move to...
16710 * src/symtab.h, src/symtab.c: here.
16711
16712 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16713 * src/reader.c (startval): Rename as...
16714 * src/symtab.h, src/symtab.c (startsymbol): this.
16715 * src/reader.c: Adjust.
16716
16717 * src/reader.c (symbol_check_defined, symbol_make_alias)
16718 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16719 (token_translations_init)
16720 Move to...
16721 * src/symtab.c: here.
16722 * src/reader.c (packsymbols): Move to...
16723 * src/symtab.h, src/symtab.c (symbols_pack): here.
16724 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16725 argument.
16726
16727 2002-06-03 Akim Demaille <akim@epita.fr>
16728
16729 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16730 then statements.
16731
16732 2002-06-03 Akim Demaille <akim@epita.fr>
16733
16734 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16735 structs with non literals.
16736 * src/scan-skel.l: never-interactive.
16737 * src/conflicts.c (enum conflict_resolution_e): No trailing
16738 comma.
16739 * src/getargs.c (usage): Split long literal strings.
16740 Reported by Hans Aberg.
16741
16742 2002-05-28 Akim Demaille <akim@epita.fr>
16743
16744 * data/bison.c++: Use C++ ostreams.
16745 (cdebug_): New member.
16746
16747 2002-05-28 Akim Demaille <akim@epita.fr>
16748
16749 * src/output.c (output_skeleton): Be sure to allocate enough room
16750 for `/' _and_ for `\0' in full_skeleton.
16751
16752 2002-05-28 Akim Demaille <akim@epita.fr>
16753
16754 * data/bison.c++: Catch up with bison.simple:
16755 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16756 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16757 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16758 and popping traces.
16759
16760 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16761
16762 * src/output.c (output_skeleton): Put an explicit path in front of
16763 the skeleton file name, rather than relying on the -I directory,
16764 to partially alleviate effects of having a skeleton file lying around
16765 in the current directory.
16766
16767 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16768
16769 * src/conflicts.c (log_resolution): Correct typo:
16770 obstack_printf should be obstack_fgrow1.
16771
16772 2002-05-26 Akim Demaille <akim@epita.fr>
16773
16774 * src/state.h (state_t): `solved_conflicts' is a new member.
16775 * src/LR0.c (new_state): Set it to 0.
16776 * src/conflicts.h, src/conflicts.c (print_conflicts)
16777 (free_conflicts, solve_conflicts): Rename as...
16778 (conflicts_print, conflicts_free, conflicts_solve): these.
16779 Adjust callers.
16780 * src/conflicts.c (enum conflict_resolution_e)
16781 (solved_conflicts_obstack): New, used by...
16782 (log_resolution): this.
16783 Adjust to attach the conflict resolution to each state.
16784 Complete the description with the precedence/associativity
16785 information.
16786 (resolve_sr_conflict): Adjust.
16787 * src/print.c (print_state): Output its solved_conflicts.
16788 * tests/conflicts.at (Unresolved SR Conflicts)
16789 (Solved SR Conflicts): Exercise --report=all.
16790
16791 2002-05-26 Akim Demaille <akim@epita.fr>
16792
16793 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16794 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16795 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16796 (token_number_t, item_number_as_token_number)
16797 (token_number_as_item_number, muscle_insert_token_number_table):
16798 Rename as...
16799 (symbol_number_t, item_number_as_symbol_number)
16800 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16801 these, since it is more appropriate.
16802
16803 2002-05-26 Akim Demaille <akim@epita.fr>
16804
16805 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16806 `Error:' lines.
16807 * data/bison.simple (yystos) [YYDEBUG]: New.
16808 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16809 error recovery.
16810 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16811
16812 2002-05-25 Akim Demaille <akim@epita.fr>
16813
16814 * doc/bison.texinfo (Debugging): Split into...
16815 (Tracing): this new section, its former contents, and...
16816 (Understanding): this new section.
16817 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16818 by...
16819 (report_flag): this.
16820 Adjust all dependencies.
16821 (report_args, report_types, report_argmatch): New.
16822 (usage, getargs): Report/support -r, --report.
16823 * src/options.h
16824 (struct option_table_struct): Rename as..,
16825 (struct option_table_s): this.
16826 Rename the `set_flag' member to `flag' to match with getopt_long's
16827 struct.
16828 * src/options.c (option_table): Split verbose into an entry for
16829 %verbose, and another for --verbose.
16830 Support --report/-r, so remove -r from the obsolete --raw.
16831 * src/print.c: Attach full item sets and lookaheads reports to
16832 report_flag instead of trace_flag.
16833 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16834
16835 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16836 and Paul Eggert <eggert@twinsun.com>
16837
16838 * data/bison.simple (yyparse): Correct error handling to conform to
16839 POSIX and yacc. Specifically, after syntax error is discovered,
16840 do not reduce further before shifting the error token.
16841 Clean up the code a bit by removing the labels yyerrdefault,
16842 yyerrhandle, yyerrpop.
16843 * NEWS: Document the above.
16844
16845 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16846
16847 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16848 type; it isn't always big enough, since it doesn't necessarily
16849 include non-terminals.
16850 (yytranslate): Expand definition of yy_token_number_type, so that
16851 the latter can be removed.
16852 (yy_token_number_type): Remove, only one use.
16853 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16854 don't use TokenNumberType as element type.
16855
16856 * tests/regression.at: Modify expected output to agree with change
16857 to yyr1 and yytranslate.
16858
16859 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16860
16861 * src/reader.c (parse_action): Use copy_character instead of
16862 obstack_1grow.
16863
16864 2002-05-13 Akim Demaille <akim@epita.fr>
16865
16866 * tests/regression.at (Token definitions): Prototype yylex and
16867 yyerror.
16868
16869 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16870
16871 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16872 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16873 32-bit arithmetic.
16874 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16875
16876 2002-05-07 Akim Demaille <akim@epita.fr>
16877
16878 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16879 avoid GCC warnings.
16880
16881 2002-05-07 Akim Demaille <akim@epita.fr>
16882
16883 Kill GCC warnings.
16884
16885 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16886 over the RHS of each rule.
16887 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16888 * src/state.h (state_t): Member `nitems' is unsigned short.
16889 * src/LR0.c (get_state): Adjust.
16890 * src/reader.c (packgram): Likewise.
16891 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16892 `Type'.
16893 (muscle_insert_int_table): Remove, unused.
16894 (prepare_rules): Remove `max'.
16895
16896 2002-05-06 Akim Demaille <akim@epita.fr>
16897
16898 * src/closure.c (print_firsts): Display of the symbol tags.
16899 (bitmatrix_print): Move to...
16900 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16901 here.
16902 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16903
16904 2002-05-06 Akim Demaille <akim@epita.fr>
16905
16906 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16907 hash_do_for_each.
16908
16909 2002-05-06 Akim Demaille <akim@epita.fr>
16910
16911 * src/LR0.c (new_state, get_state): Instead of using the global
16912 `kernel_size' and `kernel_base', have two new arguments:
16913 `core_size' and `core'.
16914 Adjust callers.
16915
16916 2002-05-06 Akim Demaille <akim@epita.fr>
16917
16918 * src/reader.c (packgram): No longer end `ritem' with a 0
16919 sentinel: it is not used.
16920
16921 2002-05-05 Akim Demaille <akim@epita.fr>
16922
16923 New experimental feature: display the lookaheads in the report and
16924 graph.
16925
16926 * src/print (print_core): When --trace-flag, display the rules
16927 lookaheads.
16928 * src/print_graph.c (print_core): Likewise.
16929 Swap the arguments.
16930 Adjust caller.
16931
16932 2002-05-05 Akim Demaille <akim@epita.fr>
16933
16934 * tests/torture.at (Many lookaheads): New test.
16935
16936 2002-05-05 Akim Demaille <akim@epita.fr>
16937
16938 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16939 (GENERATE_MUSCLE_INSERT_TABLE): this.
16940 (output_int_table, output_unsigned_int_table, output_short_table)
16941 (output_token_number_table, output_item_number_table): Replace with...
16942 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16943 (muscle_insert_short_table, muscle_insert_token_number_table)
16944 (muscle_insert_item_number_table): these.
16945 Adjust all callers.
16946 (prepare_tokens): Don't free `translations', since...
16947 * src/reader.h, src/reader.c (grammar_free): do it.
16948 Move to...
16949 * src/gram.h, src/gram.c (grammar_free): here.
16950 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16951 b4_translate_max.
16952
16953 2002-05-05 Akim Demaille <akim@epita.fr>
16954
16955 * src/output.c (output_unsigned_int_table): New.
16956 (prepare_rules): `i' is unsigned.
16957 `prhs', `rline', `r2' are unsigned int.
16958 Rename muscle `rhs_number_max' as `rhs_max'.
16959 Output muscles `prhs_max', `rline_max', and `r2_max'.
16960 Free rline and r1.
16961 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16962 to compute types instead of constant types.
16963 * tests/regression.at (Web2c Actions): Adjust.
16964
16965 2002-05-04 Akim Demaille <akim@epita.fr>
16966
16967 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16968 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16969 Adjust dependencies.
16970 * src/output.c (token_definitions_output): Be sure not to output a
16971 `#define 'a'' when fed with `%token 'a' "a"'.
16972 * tests/regression.at (Token definitions): New.
16973
16974 2002-05-03 Paul Eggert <eggert@twinsun.com>
16975
16976 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16977 for K&R C.
16978
16979 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16980
16981 * Makefile.am (SUBDIRS): Remove intl.
16982 (EXTRA_DIST): Add config/config.rpath.
16983
16984 2002-05-03 Akim Demaille <akim@epita.fr>
16985
16986 * data/bison.simple (m4_if): Don't output empty enums.
16987 And actually, output valid enum definitions :(.
16988
16989 2002-05-03 Akim Demaille <akim@epita.fr>
16990
16991 * configure.bat: Remove, completely obsolete.
16992 * Makefile.am (EXTRA_DIST): Adjust.
16993 Don't distribute config.rpath...
16994 * config/Makefile.am (EXTRA_DIST): Do it.
16995
16996 2002-05-03 Akim Demaille <akim@epita.fr>
16997
16998 * configure.in (GETTEXT_VERSION): New.
16999 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17000
17001 2002-05-03 Akim Demaille <akim@epita.fr>
17002
17003 * data/bison.simple (b4_token_enum): New.
17004 (b4_token_defines): Use it to output tokens both as #define and
17005 enums.
17006 Suggested by Paul Eggert.
17007 * src/output.c (token_definitions_output): Don't output spurious
17008 white spaces.
17009
17010 2002-05-03 Akim Demaille <akim@epita.fr>
17011
17012 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17013
17014 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17015
17016 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17017 Update the stack class, give a try to deque as the default container.
17018
17019 2002-05-02 Akim Demaille <akim@epita.fr>
17020
17021 * data/bison.simple (yyparse): Do not implement @$ = @1.
17022 (YYLLOC_DEFAULT): Adjust to do it.
17023 * doc/bison.texinfo (Location Default Action): Fix.
17024
17025 2002-05-02 Akim Demaille <akim@epita.fr>
17026
17027 * src/reader.c (parse_braces): Merge into...
17028 (parse_action): this.
17029
17030 2002-05-02 Akim Demaille <akim@epita.fr>
17031
17032 * configure.in (ALL_LINGUAS): Remove.
17033 * po/LINGUAS, hr.po: New.
17034
17035 2002-05-02 Akim Demaille <akim@epita.fr>
17036
17037 Remove the so called hairy (semantic) parsers.
17038
17039 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17040 * src/gram.h, src/gram.c (semantic_parser): Remove.
17041 (rule_t): Remove the guard and guard_line members.
17042 * src/lex.h (token_t): remove tok_guard.
17043 * src/options.c (option_table): Remove %guard and %semantic_parser
17044 support.
17045 * src/output.c, src/output.h (guards_output): Remove.
17046 (prepare): Adjust.
17047 (token_definitions_output): Don't output the `T'
17048 tokens (???).
17049 (output_skeleton): Don't output the guards.
17050 * src/files.c, src/files.c (attrsfile): Remove.
17051 * src/reader.c (symbol_list): Remove the guard and guard_line
17052 members.
17053 Adjust dependencies.
17054 (parse_guard): Remove.
17055 * data/bison.hairy: Remove.
17056 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17057 BISON_HAIRY.
17058
17059 2002-05-02 Akim Demaille <akim@epita.fr>
17060
17061 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17062 (parse_guard): Rename the formal argument `stack_offset' as
17063 `rule_length', which is more readable.
17064 Adjust callers.
17065 (copy_at, copy_dollar): Instead of outputting the hard coded
17066 values of $$, $n and so forth, output invocation to b4_lhs_value,
17067 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17068 Note: this patch partially drops `semantic-parser' support: it
17069 always does `rule_length - n', where semantic parsers ought to
17070 always use `-n'.
17071 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17072 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17073
17074 2002-05-02 Akim Demaille <akim@epita.fr>
17075
17076 * configure.in (AC_INIT): Bump to 1.49b.
17077 (AM_INIT_AUTOMAKE): Short invocation.
17078
17079 2002-05-02 Akim Demaille <akim@epita.fr>
17080
17081 Version 1.49a.
17082
17083 2002-05-01 Akim Demaille <akim@epita.fr>
17084
17085 * src/skeleton.h: Remove.
17086
17087 2002-05-01 Akim Demaille <akim@epita.fr>
17088
17089 * src/skeleton.h: Fix the #endif.
17090 Reported by Magnus Fromreide.
17091
17092 2002-04-26 Paul Eggert <eggert@twinsun.com>
17093
17094 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17095 Define if we define YYSTYPE and YYLTYPE, respectively.
17096 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17097
17098 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17099
17100 * src/scan-skel.l: Postprocess quadrigraphs.
17101
17102 * src/reader.c (copy_character): New function, used to output
17103 single characters while replacing `[' and `]' with quadrigraphs, to
17104 avoid troubles with M4 quotes.
17105 (copy_comment): Output characters with copy_character.
17106 (read_additionnal_code): Likewise.
17107 (copy_string2): Likewise.
17108 (copy_definition): Likewise.
17109
17110 * tests/calc.at: Exercise M4 quoting.
17111
17112 2002-04-25 Akim Demaille <akim@epita.fr>
17113
17114 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17115 between `!' and the command.
17116 Reported by Paul Eggert.
17117
17118 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17119
17120 * tests/calc.at: Exercise prologue splitting.
17121
17122 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17123 `b4_post_prologue' instead of `b4_prologue'.
17124
17125 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17126 muscles.
17127 (output): Free pre_prologue_obstack and post_prologue_obstack.
17128 * src/files.h, src/files.c (attrs_obstack): Remove.
17129 (pre_prologue_obstack, post_prologue_obstack): New.
17130 * src/reader.c (copy_definition): Add a parameter to specify the
17131 obstack to fill, instead of using attrs_obstack unconditionally.
17132 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17133 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17134
17135 2002-04-23 Paul Eggert <eggert@twinsun.com>
17136
17137 * data/bison.simple: Remove unnecessary commentary and white
17138 space differences from 1_29-branch.
17139 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17140
17141 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17142 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17143 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17144 constructors or destructors.
17145
17146 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17147
17148 2002-04-23 Akim Demaille <akim@epita.fr>
17149
17150 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17151 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17152 location with columns.
17153 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17154 All reported by Paul Eggert.
17155
17156 2002-04-22 Akim Demaille <akim@epita.fr>
17157
17158 * src/reduce.c (dump_grammar): Move to...
17159 * src/gram.h, src/gram.c (grammar_dump): here.
17160 Be sure to separate long item numbers.
17161 Don't read the members of a rule's prec if its nil.
17162
17163 2002-04-22 Akim Demaille <akim@epita.fr>
17164
17165 * src/output.c (table_size, table_grow): New.
17166 (MAXTABLE): Remove, replace uses with table_size.
17167 (pack_vector): Instead of dying when the table is too big, grow it.
17168
17169 2002-04-22 Akim Demaille <akim@epita.fr>
17170
17171 * data/bison.simple (yyr1): Its type is that of a token number.
17172 * data/bison.c++ (r1_): Likewise.
17173 * tests/regression.at (Web2c Actions): Adjust.
17174
17175 2002-04-22 Akim Demaille <akim@epita.fr>
17176
17177 * src/reader.c (token_translations_init): 256 is now the default
17178 value for the error token, i.e., it will be assigned another
17179 number if the user assigned 256 to one of her tokens.
17180 (reader): Don't force 256 to error.
17181 * doc/bison.texinfo (Symbols): Adjust.
17182 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17183 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17184 etc. instead of 10, 20, 30 (which was used to `jump' over error
17185 (256) and undefined (2)).
17186
17187 2002-04-22 Akim Demaille <akim@epita.fr>
17188
17189 Propagate more token_number_t.
17190
17191 * src/gram.h (token_number_as_item_number)
17192 (item_number_as_token_number): New.
17193 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17194 Use it to create output_item_number_table and
17195 output_token_number_table.
17196 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17197 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17198 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17199 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17200
17201 2002-04-22 Akim Demaille <akim@epita.fr>
17202
17203 * src/output.h, src/output.c (get_lines_number): Remove.
17204
17205 2002-04-19 Akim Demaille <akim@epita.fr>
17206
17207 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17208 as Lex/Flex'.
17209 (Debugging): More details about enabling the debugging features.
17210 (Table of Symbols): Describe $$, $n, @$, and @n.
17211 Suggested by Tim Josling.
17212
17213 2002-04-19 Akim Demaille <akim@epita.fr>
17214
17215 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17216
17217 2002-04-10 Akim Demaille <akim@epita.fr>
17218
17219 * src/system.h: Rely on HAVE_LIMITS_H.
17220 Suggested by Paul Eggert.
17221
17222 2002-04-09 Akim Demaille <akim@epita.fr>
17223
17224 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17225 full stderr, and strip it according to the bison options, instead
17226 of composing the error message from different bits.
17227 This makes it easier to check for several error messages.
17228 Adjust all the invocations.
17229 Add an invocation exercising the error token.
17230 Add an invocation demonstrating a stupid error message.
17231 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17232 Adjust the tests.
17233 Error message are for stderr, not stdout.
17234
17235 2002-04-09 Akim Demaille <akim@epita.fr>
17236
17237 * src/gram.h, src/gram.c (error_token_number): Remove, use
17238 errtoken->number.
17239 * src/reader.c (reader): Don't specify the user token number (2)
17240 for $undefined, as it uselessly prevents using it.
17241 * src/gram.h (token_number_t): Move to...
17242 * src/symtab.h: here.
17243 (state_t.number): Is a token_number_t.
17244 * src/print.c, src/reader.c: Use undeftoken->number instead of
17245 hard coded 2.
17246 (Even though this 2 is not the same as above: the number of the
17247 undeftoken remains being 2, it is its user token number which
17248 might not be 2).
17249 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17250 `user_token_number_max'.
17251 Output `undef_token_number'.
17252 * data/bison.simple, data/bison.c++: Use them.
17253 Be sure to map invalid yylex return values to
17254 `undef_token_number'. This saves us from gratuitous SEGV.
17255
17256 * tests/conflicts.at (Solved SR Conflicts)
17257 (Unresolved SR Conflicts): Adjust.
17258 * tests/regression.at (Web2c Actions): Adjust.
17259
17260 2002-04-08 Akim Demaille <akim@epita.fr>
17261
17262 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17263 Adding #line.
17264 Remove the duplicate `typedefs'.
17265 (RhsNumberType): Fix the declaration and various other typos.
17266 Use __ofile__.
17267 * data/bison.simple: Use __ofile__.
17268 * src/scan-skel.l: Handle __ofile__.
17269
17270 2002-04-08 Akim Demaille <akim@epita.fr>
17271
17272 * src/gram.h (item_number_t): New, the type of item numbers in
17273 RITEM. Note that it must be able to code symbol numbers as
17274 positive number, and the negation of rule numbers as negative
17275 numbers.
17276 Adjust all dependencies (pretty many).
17277 * src/reduce.c (rule): Remove this `short *' pointer: use
17278 item_number_t.
17279 * src/system.h (MINSHORT, MAXSHORT): Remove.
17280 Include `limits.h'.
17281 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17282 (shortcpy): Remove.
17283 (MAXTABLE): Move to...
17284 * src/output.c (MAXTABLE): here.
17285 (prepare_rules): Use output_int_table to output rhs.
17286 * data/bison.simple, data/bison.c++: Adjust.
17287 * tests/torture.at (Big triangle): Move the limit from 254 to
17288 500.
17289 * tests/regression.at (Web2c Actions): Ajust.
17290
17291 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17292 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17293 passes, but produces negative #line number, once fixed, GCC is
17294 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17295 C), it passes.
17296 * src/state.h (state_h): Code input lines on ints, not shorts.
17297
17298 2002-04-08 Akim Demaille <akim@epita.fr>
17299
17300 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17301 and then the grammar.
17302
17303 2002-04-08 Akim Demaille <akim@epita.fr>
17304
17305 * src/system.h: No longer using strndup.
17306
17307 2002-04-07 Akim Demaille <akim@epita.fr>
17308
17309 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17310 * src/output.c (output_table_data): Return the longest number.
17311 (prepare_tokens): Output `token_number_max').
17312 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17313 New.
17314 Use them to define yy_token_number_type/TokenNumberType.
17315 Use this type for yytranslate.
17316 * tests/torture.at (Big triangle): Push the limit from 124 to
17317 253.
17318 * tests/regression.at (Web2c Actions): Adjust.
17319
17320 2002-04-07 Akim Demaille <akim@epita.fr>
17321
17322 * tests/torture.at (Big triangle): New.
17323 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17324 * tests/existing.at: here.
17325
17326 2002-04-07 Akim Demaille <akim@epita.fr>
17327
17328 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17329 nritems.
17330 Adjust dependencies.
17331
17332 2002-04-07 Akim Demaille <akim@epita.fr>
17333
17334 * src/reader.c: Normalize increments to prefix form.
17335
17336 2002-04-07 Akim Demaille <akim@epita.fr>
17337
17338 * src/reader.c, symtab.c: Remove debugging code.
17339
17340 2002-04-07 Akim Demaille <akim@epita.fr>
17341
17342 Rename all the `bucket's as `symbol_t'.
17343
17344 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17345 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17346 * src/symtab.c, src/symtab.h (bucket): Rename as...
17347 (symbol_t): this.
17348 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17349 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17350 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17351 (buckets_new, buckets_free, buckets_do): Rename as...
17352 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17353 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17354 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17355 (symbols_new, symbols_free, symbols_do): these.
17356
17357 2002-04-07 Akim Demaille <akim@epita.fr>
17358
17359 Use lib/hash for the symbol table.
17360
17361 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17362 EOF.
17363 * src/lex.c (lex): Set the `number' member of new terminals.
17364 * src/reader.c (bucket_check_defined, bucket_make_alias)
17365 (bucket_check_alias_consistence, bucket_translation): New.
17366 (reader, grammar_free, readgram, token_translations_init)
17367 (packsymbols): Adjust.
17368 (reader): Number the predefined tokens.
17369 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17370 for predefined tokens.
17371 * src/symtab.h (bucket): Remove all the hash table related
17372 members.
17373 * src/symtab.c (symtab): Replace by...
17374 (bucket_table): this.
17375 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17376 (buckets_new, buckets_do): New.
17377
17378 2002-04-07 Akim Demaille <akim@epita.fr>
17379
17380 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17381 (start_symbol, max_user_token_number, semantic_parser)
17382 (error_token_number): Initialize.
17383 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17384 Initialize.
17385 (reader): Don't.
17386 (errtoken, eoftoken, undeftoken, axiom): Extern.
17387
17388 2002-04-07 Akim Demaille <akim@epita.fr>
17389
17390 * src/gram.h (rule_s): prec and precsym are now pointers
17391 to the bucket giving the priority/associativity.
17392 Member `associativity' removed: useless.
17393 * src/reduce.c, src/conflicts.c: Adjust.
17394
17395 2002-04-07 Akim Demaille <akim@epita.fr>
17396
17397 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17398 Properly escape the symbols' TAG when outputting them.
17399
17400 2002-04-07 Akim Demaille <akim@epita.fr>
17401
17402 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17403
17404 2002-04-07 Akim Demaille <akim@epita.fr>
17405
17406 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17407 (LArule): this, which is an array to rule_t*.
17408 * src/print.c, src/conflicts.c: Adjust.
17409
17410 2002-04-07 Akim Demaille <akim@epita.fr>
17411
17412 * src/gram.h (rule_t): Rename `number' as `user_number'.
17413 `number' is a new member.
17414 Adjust dependencies.
17415 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17416
17417 2002-04-07 Akim Demaille <akim@epita.fr>
17418
17419 As a result of the previous patch, it is no longer needed
17420 to reorder ritem itself.
17421
17422 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17423
17424 2002-04-07 Akim Demaille <akim@epita.fr>
17425
17426 Be sure never to walk through RITEMS, but use only data related to
17427 the rules themselves. RITEMS should be banished.
17428
17429 * src/output.c (output_token_translations): Rename as...
17430 (prepare_tokens): this.
17431 In addition to `translate', prepare the muscles `tname' and
17432 `toknum', which were handled by...
17433 (output_rule_data): this.
17434 Remove, and move the remainder of its outputs into...
17435 (prepare_rules): this new routines, which also merges content from
17436 (output_gram): this.
17437 (prepare_rules): Be sure never to walk through RITEMS.
17438 (output_stos): Rename as...
17439 (prepare_stos): this.
17440 (output): Always invoke prepare_states, after all, just don't use it
17441 in the output if you don't need it.
17442
17443 2002-04-07 Akim Demaille <akim@epita.fr>
17444
17445 * src/LR0.c (new_state): Display `nstates' as the name of the
17446 newly created state.
17447 Adjust to initialize first_state and last_state if needed.
17448 Be sure to distinguish the initial from the final state.
17449 (new_states): Create the itemset of the initial state, and use
17450 new_state.
17451 * src/closure.c (closure): Now that the initial state has its
17452 items properly set, there is no need for a special case when
17453 creating `ruleset'.
17454
17455 As a result, now the rule 0, reducing to $axiom, is visible in the
17456 outputs. Adjust the test suite.
17457
17458 * tests/conflicts.at (Solved SR Conflicts)
17459 (Unresolved SR Conflicts): Adjust.
17460 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17461 * tests/conflicts.at (S/R in initial): New.
17462
17463 2002-04-07 Akim Demaille <akim@epita.fr>
17464
17465 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17466 the RHS of the rules.
17467 * src/output.c (output_gram): Likewise.
17468
17469 2002-04-07 Akim Demaille <akim@epita.fr>
17470
17471 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17472 bucket.
17473 Adjust all dependencies.
17474 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17475 `number' of the buckets too.
17476 * src/gram.h: Include `symtab.h'.
17477 (associativity): Move to...
17478 * src/symtab.h: here.
17479 No longer include `gram.h'.
17480
17481 2002-04-07 Akim Demaille <akim@epita.fr>
17482
17483 * src/gram.h, src/gram.c (rules_rhs_length): New.
17484 (ritem_longest_rhs): Use it.
17485 * src/gram.h (rule_t): `number' is a new member.
17486 * src/reader.c (packgram): Set it.
17487 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17488 the end of `rules', and count them out of `nrules'.
17489 (reduce_output, dump_grammar): Adjust.
17490 * src/print.c (print_grammar): It is no longer needed to check for
17491 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17492 * tests/reduce.at (Reduced Automaton): New test.
17493
17494 2002-04-07 Akim Demaille <akim@epita.fr>
17495
17496 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17497 lacking `+ 1' to nrules, Bison reported as useless a token if it
17498 was used solely to set the precedence of the last rule...
17499
17500 2002-04-07 Akim Demaille <akim@epita.fr>
17501
17502 * data/bison.c++, data/bison.simple: Don't output the current file
17503 name in #line, to avoid useless diffs between two identical
17504 outputs under different names.
17505
17506 2002-04-07 Akim Demaille <akim@epita.fr>
17507
17508 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17509 Normalize loops to using `< nrules + 1', not `<= nrules'.
17510
17511 2002-04-07 Akim Demaille <akim@epita.fr>
17512
17513 * TODO: Update.
17514
17515 2002-04-07 Akim Demaille <akim@epita.fr>
17516
17517 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17518 bucket.value as bucket.number.
17519
17520 2002-04-07 Akim Demaille <akim@epita.fr>
17521
17522 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17523 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17524 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17525 RHS, instead of being an index in RITEMS.
17526
17527 2002-04-04 Paul Eggert <eggert@twinsun.com>
17528
17529 * doc/bison.texinfo: Update copyright date.
17530 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17531 (Symbols): Warn about running Bison in one character set,
17532 but compiling and/or running in an incompatible one.
17533 Warn about character code 256, too.
17534
17535 2002-04-03 Paul Eggert <eggert@twinsun.com>
17536
17537 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17538 YYERROR_VERBOSE is nonzero, not whether it is defined.
17539
17540 Merge changes from bison-1_29-branch.
17541
17542 2002-03-20 Paul Eggert <eggert@twinsun.com>
17543
17544 Merge fixes from Debian bison_1.34-1.diff.
17545
17546 * configure.in (AC_PREREQ): 2.53.
17547
17548 2002-03-20 Akim Demaille <akim@epita.fr>
17549
17550 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17551
17552 2002-03-19 Paul Eggert <eggert@twinsun.com>
17553
17554 * src/bison.simple (YYCOPY): New macro.
17555 (YYSTACK_RELOCATE): Use it.
17556 Remove Type arg; no longer needed. All callers changed.
17557 (yymemcpy): Remove; no longer needed.
17558
17559 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17560 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17561
17562 2002-03-19 Akim Demaille <akim@epita.fr>
17563
17564 Test and fix the #line outputs.
17565
17566 * tests/atlocal.at (GCC): New.
17567 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17568 (Prologue synch line, %union synch line, Postprologue synch line)
17569 (Action synch line, Epilogue synch line): New tests.
17570 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17571 * data/bison.simple, data/bison.c++: Use it.
17572
17573 2002-03-19 Akim Demaille <akim@epita.fr>
17574
17575 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17576 (Solved SR Conflicts, %expect not enough, %expect right)
17577 (%expect too much): Move to...
17578 * tests/conflicts.at: this new file.
17579
17580 2002-03-19 Akim Demaille <akim@epita.fr>
17581
17582 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17583 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17584 that we can move to enums for instance.
17585 * src/output.c (token_definitions_output): Output a list of
17586 `token-name, token-number' instead of the #define.
17587 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17588
17589 2002-03-14 Akim Demaille <akim@epita.fr>
17590
17591 Use Gettext 0.11.1.
17592
17593 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17594
17595 * data/bison.c++: Make the user able to add members to the generated
17596 parser by subclassing.
17597
17598 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17599
17600 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17601 a character.
17602 Reported by Nicolas Tisserand and Nicolas Burrus.
17603
17604 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17605
17606 * src/reader.c: Warn about lacking semi-colons, do not complain.
17607
17608 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17609
17610 * data/bison.c++: Remove a debug line.
17611
17612 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17613
17614 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17615 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17616 provide a default implementation.
17617
17618 2002-03-04 Akim Demaille <akim@epita.fr>
17619
17620 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17621 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17622 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17623 * tests/semantic.at (Parsing Guards): Similarly.
17624 * src/reader.at (readgram): Complain if the last rule is not ended
17625 with a semi-colon.
17626
17627 2002-03-04 Akim Demaille <akim@epita.fr>
17628
17629 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17630 * src/closure.c: here.
17631 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17632 RTC.
17633 * src/warshall.h, src/warshall.c: Remove.
17634 * tests/sets.at (Broken Closure): Adjust.
17635
17636 2002-03-04 Akim Demaille <akim@epita.fr>
17637
17638 * src/output.c (output_skeleton): tempdir is const.
17639 bytes_read is unused.
17640
17641 2002-03-04 Akim Demaille <akim@epita.fr>
17642
17643 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17644 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17645 Update.
17646 From Michael Hayes.
17647
17648 2002-03-04 Akim Demaille <akim@epita.fr>
17649
17650 * src/closure.c (closure): `r' is unused.
17651
17652 2002-03-04 Akim Demaille <akim@epita.fr>
17653
17654 * tests/sets.at (Broken Closure): Add the ending `;'.
17655 * src/reader.at (readgram): Complain if a rule is not ended with a
17656 semi-colon.
17657
17658 2002-03-04 Akim Demaille <akim@epita.fr>
17659
17660 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17661 (count_sr_conflicts): Use bitset_count.
17662 * src/reduce.c (inaccessable_symbols): Ditto.
17663 (bits_size): Remove.
17664 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17665
17666 2002-03-04 Akim Demaille <akim@epita.fr>
17667
17668 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17669 * src/reduce.c: Remove the `bitset_zero's following the
17670 `bitset_create's, as now it is performed by the latter.
17671
17672 2002-03-04 Akim Demaille <akim@epita.fr>
17673
17674 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17675 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17676 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17677 latest sources from Michael.
17678
17679 2002-03-04 Akim Demaille <akim@epita.fr>
17680
17681 * src/output.c (output): Don't free the grammar.
17682 * src/reader.c (grammar_free): New.
17683 * src/main.c (main): Call it and don't free symtab here.
17684
17685 2002-03-04 Akim Demaille <akim@epita.fr>
17686
17687 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17688 before returning.
17689 Reported by Benoit Perrot.
17690
17691 2002-03-04 Akim Demaille <akim@epita.fr>
17692
17693 Use bitset operations when possible, not loops over bits.
17694
17695 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17696 bitset_or.
17697 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17698 * src/reduce.c (useless_nonterminals): Formatting changes.
17699 * src/warshall.c (TC): Use bitset_or.
17700
17701 2002-03-04 Akim Demaille <akim@epita.fr>
17702
17703 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17704 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17705 Ditto.
17706
17707 2002-03-04 Akim Demaille <akim@epita.fr>
17708
17709 * src/lalr.c (F): Now a bitset*.
17710 Adjust all dependencies.
17711
17712 2002-03-04 Akim Demaille <akim@epita.fr>
17713
17714 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17715 Adjust all dependencies.
17716
17717 2002-03-04 Akim Demaille <akim@epita.fr>
17718
17719 * src/L0.c, src/LR0.h (nstates): Be size_t.
17720 Adjust comparisons (signed vs unsigned).
17721 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17722 bitset*.
17723 Adjust all dependencies.
17724
17725 2002-03-04 Akim Demaille <akim@epita.fr>
17726
17727 * src/closure.c (firsts): Now, also a bitset.
17728 Adjust all dependencies.
17729 (varsetsize): Remove, now unused.
17730 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17731
17732 2002-03-04 Akim Demaille <akim@epita.fr>
17733
17734 * src/print.c: Convert to use bitset.h, not hand coded iterations
17735 over ints.
17736
17737 2002-03-04 Akim Demaille <akim@epita.fr>
17738
17739 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17740
17741 2002-03-04 Akim Demaille <akim@epita.fr>
17742
17743 * src/closure.c (ruleset): Be a bitset.
17744 (rulesetsize): Remove.
17745
17746 2002-03-04 Akim Demaille <akim@epita.fr>
17747
17748 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17749 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17750 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17751 * src/closure.c (fderives): Be an array of bitsets.
17752
17753 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17754
17755 * data/bison.c++: Merge the two generated headers. Insert a copyright
17756 notice in each output file.
17757
17758 2002-02-28 Akim Demaille <akim@epita.fr>
17759
17760 * data/bison.c++: Copy the prologue of bison.simple to fetch
17761 useful M4 definitions, such as b4_header_guard.
17762
17763 2002-02-25 Akim Demaille <akim@epita.fr>
17764
17765 * src/getargs.c (version): Give the name of the authors, and use a
17766 translator friendly scheme for the bgr
17767 copyright notice.
17768
17769 2002-02-25 Akim Demaille <akim@epita.fr>
17770
17771 * src/output.c (header_output): Remove, now handled completely via
17772 M4.
17773
17774 2002-02-25 Akim Demaille <akim@epita.fr>
17775
17776 * m4/m4.m4: New, from CVS Autoconf.
17777 * configure.in: Invoke it.
17778 * src/output.c (output_skeleton): Use its result instead of the
17779 hard coded name.
17780
17781 2002-02-25 Akim Demaille <akim@epita.fr>
17782
17783 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17784 Fileutils 4.1.5.
17785 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17786 * src/output.c (output_skeleton): Use mkstemp to create a real
17787 temporary file.
17788 Move the filling of `skeleton' and its muscle to...
17789 (prepare): here.
17790 (output): Move the definition of the prologue muscle to...
17791 (prepare): here.
17792 * src/system.h (DEFAULT_TMPDIR): New.
17793
17794 2002-02-14 Paul Eggert <eggert@twinsun.com>
17795
17796 Remove the support for C++ namespace cleanliness; it was
17797 causing more problems than it was curing, since it didn't work
17798 properly on some nonstandard C++ compilers. This can wait
17799 for a proper C++ parser.
17800
17801 * NEWS: Document this.
17802 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17803 of C++, as it's treated like C now.
17804 * src/bison.simple (YYSTD): Remove.
17805 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17806 Treat C++ just like Standard C instead of trying to support
17807 namespace cleanliness.
17808
17809 2002-02-14 Akim Demaille <akim@epita.fr>
17810
17811 * tests/regression.at (else): Adjust to Andreas' change.
17812
17813 2002-02-14 Akim Demaille <akim@epita.fr>
17814
17815 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17816
17817 2002-02-13 Andreas Schwab <schwab@suse.de>
17818
17819 * src/output.c (output_rule_data): Don't output NULL, it might
17820 not be defined yet.
17821
17822 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17823
17824 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17825 (Copyright notice): Update.
17826
17827 2002-02-11 Akim Demaille <akim@epita.fr>
17828
17829 * tests/regression.at (%nonassoc and eof): Don't include
17830 nonportable headers.
17831
17832 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17833
17834 * data/bison.c++: Correct error recovery. Make the user able to
17835 initialize the starting location.
17836
17837 2002-02-07 Akim Demaille <akim@epita.fr>
17838
17839 * tests/input.at: New.
17840
17841 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17842
17843 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17844 more consistent when naming methods and variables. Put preprocessor
17845 directives around tables only needed for debugging.
17846
17847 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17848
17849 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17850 C++ parsers.
17851 (yy::b4_name::parse): Use print_.
17852
17853 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17854
17855 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17856
17857 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17858
17859 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17860 C++ parsers.
17861 (yy::b4_name::parse): Build verbose error messages, and use error_.
17862
17863 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17864
17865 * data/bison.c++: Fix m4 quoting in comments.
17866
17867 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17868
17869 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17870 not expanded by m4.
17871
17872 2002-02-05 Akim Demaille <akim@epita.fr>
17873
17874 * data/bison.c++: Adjust to the M4 back end.
17875 More is certainly needed.
17876
17877 2002-02-05 Akim Demaille <akim@epita.fr>
17878
17879 Give a try to M4 as a back end.
17880
17881 * lib/readpipe.c: New, from wdiff.
17882 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17883 BISON_HAIRY.
17884 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17885 specific values. Now it is m4 that performs the lookup.
17886 * src/parse-skel.y: Remove.
17887 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17888 * src/output.c (actions_output, guards_output)
17889 (token_definitions_output): No longer keeps track of the output
17890 line number, hence remove the second argument.
17891 (guards_output): Check against the guard member of a rule, not the
17892 action member.
17893 Adjust callers.
17894 (output_skeleton): Don't look for the skeleton location, let m4 do
17895 that.
17896 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17897 file will be used.
17898 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17899 (prepare): Given that for the time being changesyntax is not
17900 usable in M4, rename the muscles using `-' to `_'.
17901 Define `defines_flag', `output_parser_name' and `output_header_name'.
17902 * src/output.h (actions_output, guards_output)
17903 (token_definitions_output): Adjust prototypes.
17904 * src/scan-skel.l: Instead of scanning the skeletons, it now
17905 processes the output of m4: `__oline__' and `#output'.
17906 * data/bison.simple: Adjust to be used by M4(sugar).
17907 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17908 to date.
17909 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17910 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17911 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17912 shamelessly stolen from CVS Autoconf.
17913
17914 2002-02-05 Akim Demaille <akim@epita.fr>
17915
17916 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17917 * configure.in: Check for the declarations of free and malloc.
17918 * src/muscle_tab.c: Adjust.
17919
17920 2002-02-05 Akim Demaille <akim@epita.fr>
17921
17922 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17923 which have no values.
17924
17925 2002-02-05 Akim Demaille <akim@epita.fr>
17926
17927 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17928 * data/: here.
17929
17930 2002-01-29 Paul Eggert <eggert@twinsun.com>
17931
17932 * src/bison.simple (YYSIZE_T): Do not define merely because
17933 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17934 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17935
17936 2002-01-27 Akim Demaille <akim@epita.fr>
17937
17938 Fix `%nonassoc and eof'.
17939
17940 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17941 which were not properly copied! Replace
17942 memcpy (res->errs, src->errs, src->nerrs);
17943 with
17944 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17945 !!!
17946 * tests/regression.at (%nonassoc and eof): Adjust to newest
17947 Autotest: `.' is not in the PATH.
17948
17949 2002-01-27 Akim Demaille <akim@epita.fr>
17950
17951 * tests/sets.at (AT_EXTRACT_SETS): New.
17952 (Nullable): Use it.
17953 (Firsts): New.
17954
17955 2002-01-26 Akim Demaille <akim@epita.fr>
17956
17957 * tests/actions.at, tests/calc.at, tests/headers.at,
17958 * tests/torture.at: Adjust to the newest Autotest which no longer
17959 forces `.' in the PATH.
17960
17961 2002-01-25 Akim Demaille <akim@epita.fr>
17962
17963 * tests/regression.at (%nonassoc and eof): New.
17964 Suggested by Robert Anisko.
17965
17966 2002-01-24 Akim Demaille <akim@epita.fr>
17967
17968 Bison dumps core when trying to complain about broken input files.
17969 Reported by Cris van Pelt.
17970
17971 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17972 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17973 into...
17974 (Invalid inputs): Strengthen: exercise parse_percent_token.
17975
17976 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17977
17978 * src/Makefile.am: Add bison.c++.
17979 * src/bison.c++: New skeleton.
17980
17981 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17982
17983 * po/it.po: New.
17984
17985 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17986
17987 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17988
17989 2002-01-20 Marc Autret <marc@gnu.org>
17990
17991 * src/files.c (compute_output_file_names): Fix
17992
17993 2002-01-20 Marc Autret <marc@gnu.org>
17994
17995 * tests/output.at: New test.
17996 * src/files.c (compute_base_names): Don't map extensions when
17997 the YACC flag is set, use defaults.
17998 Reported by Evgeny Stambulchik.
17999
18000 2002-01-20 Marc Autret <marc@gnu.org>
18001
18002 * src/system.h: Need to define __attribute__ away for non-GCC
18003 compilers as well (i.e., the vendor C compiler).
18004 Suggested by Albert Chin-A-Young.
18005
18006 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18007
18008 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18009 canonical definition.
18010 * src/system.h: Use the canonical definition for PARAMS (avoids
18011 a conflict with the macro from lib/hash.h).
18012
18013 2002-01-11 Akim Demaille <akim@epita.fr>
18014
18015 * configure.in: Use AC_FUNC_STRNLEN.
18016 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18017
18018 2002-01-09 Akim Demaille <akim@epita.fr>
18019
18020 * src/files.c, src/files.h (output_infix): New.
18021 (tab_extension): Remove.
18022 (compute_base_names): Compute the former, drop the latter.
18023 * src/output.c (prepare): Insert the muscles `output-infix', and
18024 `output-suffix'.
18025 * src/parse-skel.y (string, string.1): New.
18026 (section.header): Use it.
18027 (section.yacc): Remove.
18028 (prefix): Remove too.
18029 * src/scan-skel.l: Adjust.
18030 * src/bison.simple, src/bison.hairy: Adjust.
18031
18032 2002-01-09 Akim Demaille <akim@epita.fr>
18033
18034 * configure.in (WERROR_CFLAGS): Compute it.
18035 * src/Makefile.am (CFLAGS): Pass it.
18036 * tests/atlocal.in (CFLAGS): Idem.
18037 * src/files.c: Fix a few warnings.
18038 (get_extension_index): Remove, unused.
18039
18040 2002-01-08 Akim Demaille <akim@epita.fr>
18041
18042 * src/getargs.c (AS_FILE_NAME): New.
18043 (getargs): Use it to convert DOSish file names.
18044 * src/files.c (base_name): Rename as full_base_name to avoid
18045 clashes with `base_name ()'.
18046 (filename_split): New.
18047 (compute_base_names): N-th rewrite, using filename_split.
18048
18049 2002-01-08 Akim Demaille <akim@epita.fr>
18050
18051 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18052 New, stolen from the Fileutils 4.1.
18053 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18054 * configure.in: Check for the presence of memrchr, and of its
18055 prototype.
18056
18057 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18058
18059 * lib/hash.h (__P): Added definition for this macro.
18060 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18061 BUILT_SOURCES, to ensure they are generated first.
18062 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18063 %error-verbose to allow bootstrapping with bison 1.30x.
18064
18065 2002-01-06 Akim Demaille <akim@epita.fr>
18066
18067 * src/reader.c (parse_braces): Don't fetch the next char, the
18068 convention is to fetch on entry.
18069 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18070 'switch' without a following semicolon.
18071 * tests/regression.at (braces parsing): New.
18072
18073 2002-01-06 Akim Demaille <akim@epita.fr>
18074
18075 Bison is dead wrong in its RR conflict reports.
18076
18077 * tests/torture.at (GNU Cim Grammar): New.
18078 * src/conflicts.c (count_rr_conflicts): Fix.
18079
18080 2002-01-06 Akim Demaille <akim@epita.fr>
18081
18082 Creating package.m4 from configure.ac causes too many problems.
18083
18084 * tests/Makefile.am (package.m4): Create it by hand,
18085 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18086
18087 2002-01-06 Akim Demaille <akim@epita.fr>
18088
18089 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18090 skeleton.h.
18091
18092 2002-01-04 Paul Eggert <eggert@twinsun.com>
18093
18094 * doc/bison.texinfo (Debugging):
18095 Remove YYSTDERR; it's no longer defined or used.
18096 Also, s/cstdio.h/cstdio/.
18097
18098 2002-01-03 Akim Demaille <akim@epita.fr>
18099
18100 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18101
18102 2002-01-03 Akim Demaille <akim@epita.fr>
18103
18104 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18105 tracing code to --trace, wait for a better --trace option, with
18106 args.
18107
18108 2002-01-03 Akim Demaille <akim@epita.fr>
18109
18110 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18111 The ISO C++ standard is extremely clear about it: stderr is
18112 considered a macro, not a regular symbol (see table 94 `Header
18113 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18114 Therefore std:: does not apply to it. It still does with fprintf.
18115 Also, s/cstdio.h/cstdio/.
18116
18117 2002-01-03 Akim Demaille <akim@epita.fr>
18118
18119 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18120 for non system headers.
18121
18122 2002-01-02 Akim Demaille <akim@epita.fr>
18123
18124 Equip the skeleton chain with location tracking, runtime trace,
18125 pure parser and scanner.
18126
18127 * src/parse-skel.y: Request a pure parser, locations, and prefix
18128 renaming.
18129 (%union): Having several members with the same type does not help
18130 type mismatches, simplify.
18131 (YYPRINT, yyprint): New.
18132 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18133 (skel_error): this.
18134 Handle locations.
18135 * src/scan-skel.l: Adjust to these changes.
18136 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18137 (LOCATION_PRINT, skel_control_t): New.
18138
18139 2001-12-30 Akim Demaille <akim@epita.fr>
18140
18141 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18142 replace `gb' with BLANKS.
18143 * src/scan-skel.l: Adjust.
18144
18145 2001-12-30 Akim Demaille <akim@epita.fr>
18146
18147 * src/system.h: We don't need nor want bcopy.
18148 Throw away MS-DOS crap: we don't need getpid.
18149 * configure.in: We don't need strndup. It was even causing
18150 problems: because Flex includes the headers *before* us,
18151 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18152 not visible.
18153 * lib/xstrndup.c: New.
18154 * src/scan-skel.l: Use it.
18155 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18156 * src/parse-skel.y: Use %directives instead of #defines.
18157
18158 2001-12-30 Akim Demaille <akim@epita.fr>
18159
18160 * src/skeleton.h: New.
18161 * src/output.c (output_parser, output_master_parser): Remove, dead
18162 code.
18163 * src/output.h (get_lines_number, actions_output, guards_output)
18164 (token_definitions_output): Prototype them.
18165 * src/parse-skel.y: Add the license notice.
18166 Include output.h and skeleton.h.
18167 (process_skeleton): Returns void, and takes a single parameter.
18168 * src/scan-skel.l: Add the license notice.
18169 Include skeleton.h.
18170 Don't use %option yylineno: it seems that then Flex imagines
18171 REJECT has been used, and therefore it won't reallocate its
18172 buffers (which makes no other sense to me than a bug). It results
18173 in warnings for `unused: yy_flex_realloc'.
18174
18175 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18176
18177 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18178 (MUSCLE_INSERT_PREFIX): ...to there.
18179 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18180 (MUSCLE_INSERT_PREFIX): Move from here...
18181
18182 * src/bison.hairy: Add a section directive. Put braces around muscle
18183 names. This parser skeleton is still broken, but Bison should not
18184 choke on a bad muscle 'syntax'.
18185 * src/bison.simple: Add a section directive. Put braces around muscle
18186 names.
18187
18188 * src/files.h (strsuffix, stringappend): Add declarations.
18189 (tab_extension): Add declaration.
18190 (short_base_name): Add declaration.
18191
18192 * src/files.c (strsuffix, stringappend): No longer static. These
18193 functions are used in the skeleton parser.
18194 (tab_extension): New.
18195 (compute_base_names): Use the computations done in this function
18196 to guess if the generated parsers should have '.tab' in their
18197 names.
18198 (short_base_name): No longer static.
18199
18200 * src/output.c (output_skeleton): New.
18201 (output): Disable call to output_master_parser, and give a try to
18202 a new skeleton handling system.
18203 (guards_output, actions_output): No longer static.
18204 (token_definitions_output, get_lines_number): No longer static.
18205
18206 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18207
18208 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18209 parse-skel.y.
18210
18211 * src/parse-skel.y: New file.
18212 * src/scan-skel.l: New file.
18213
18214 2001-12-29 Akim Demaille <akim@epita.fr>
18215
18216 %name-prefix is broken.
18217
18218 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18219 Adjust all dependencies.
18220 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18221 %name-prefix.
18222
18223 Renaming yylval but not yylloc is not consistent. Now we do.
18224
18225 * src/bison.simple: Prefix yylloc if used.
18226 * doc/bison.texinfo (Decl Summary): Document that.
18227
18228 2001-12-29 Akim Demaille <akim@epita.fr>
18229
18230 * doc/bison.texinfo: Promote `%long-directive' over
18231 `%long_directive'.
18232 Remove all references to fixed-output-files, yacc is enough.
18233
18234 2001-12-29 Akim Demaille <akim@epita.fr>
18235
18236 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18237 user prologue. These are defaults.
18238 * tests/actions.at (Mid-rule actions): Make sure the user can
18239 define YYDEBUG and YYERROR_VERBOSE.
18240
18241 2001-12-29 Akim Demaille <akim@epita.fr>
18242
18243 * src/output.c (header_output): Don't forget to export YYLTYPE and
18244 yylloc.
18245 * tests/headers.at (export YYLTYPE): New, make sure it does.
18246 * tests/regression.at (%union and --defines, Invalid CPP headers):
18247 Move to...
18248 * tests/headers.at: here.
18249
18250 2001-12-29 Akim Demaille <akim@epita.fr>
18251
18252 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18253
18254 2001-12-29 Akim Demaille <akim@epita.fr>
18255
18256 * tests/actions.at (Mid-rule actions): Output on a single line
18257 instead of several.
18258
18259 2001-12-29 Akim Demaille <akim@epita.fr>
18260
18261 * doc/bison.texinfo: Formatting changes.
18262
18263 2001-12-29 Akim Demaille <akim@epita.fr>
18264
18265 Don't store the token defs in a muscle, just be ready to output it
18266 on command. Now possible via `symbols'. Fixes a memory leak.
18267
18268 * src/output.c (token_definitions_output): New.
18269 (output_parser, header_output): Use it.
18270 * src/reader.c (symbols_save): Remove.
18271
18272 2001-12-29 Akim Demaille <akim@epita.fr>
18273
18274 * src/bison.simple: Do not provide a default for YYSTYPE and
18275 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18276 default.
18277
18278 2001-12-29 Akim Demaille <akim@epita.fr>
18279
18280 Mid-rule actions are simply... ignored!
18281
18282 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18283 the empty-rule associated to the dummy symbol, not to the host
18284 rule.
18285 * tests/actions.at (Mid-rule actions): New.
18286
18287 2001-12-29 Akim Demaille <akim@epita.fr>
18288
18289 Memory leak.
18290
18291 * src/reader.c (reader): Free grammar.
18292
18293 2001-12-29 Akim Demaille <akim@epita.fr>
18294
18295 Memory leak.
18296
18297 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18298 since it allocates it for each state, although only one is needed.
18299 (allocate_storage): Do it here.
18300
18301 2001-12-29 Akim Demaille <akim@epita.fr>
18302
18303 * src/options.h, src/options.c (create_long_option_table): Rename
18304 as...
18305 (long_option_table_new): this, with a clearer prototype.
18306 (percent_table): Remove, unused,
18307 * src/getargs.c (getargs): Adjust.
18308
18309 2001-12-29 Akim Demaille <akim@epita.fr>
18310
18311 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18312 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18313 as states.
18314
18315 2001-12-29 Akim Demaille <akim@epita.fr>
18316
18317 * src/lalr.c (build_relations): Rename `states' as `states1'.
18318 Sorry, I don't understand exactly what it is, no better name...
18319
18320 2001-12-29 Akim Demaille <akim@epita.fr>
18321
18322 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18323 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18324 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18325 as rules.
18326
18327 2001-12-29 Akim Demaille <akim@epita.fr>
18328
18329 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18330 ago.
18331
18332 2001-12-29 Akim Demaille <akim@epita.fr>
18333
18334 * src/reader.c, src/reader.h (user_toknums): Remove.
18335 Adjust all users to use symbols[i]->user_token_number.
18336
18337 2001-12-29 Akim Demaille <akim@epita.fr>
18338
18339 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18340 Adjust all users to use symbols[i]->prec or ->assoc.
18341
18342 2001-12-29 Akim Demaille <akim@epita.fr>
18343
18344 * src/reader.c, src/reader.h (tags): Remove.
18345 Adjust all users to use symbols[i]->tag.
18346
18347 2001-12-29 Akim Demaille <akim@epita.fr>
18348
18349 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18350 and rule_table.
18351 * src/reader.c (packsymbols): Fill this table.
18352 Drop sprec.
18353 * src/conflicts.c (resolve_sr_conflict): Adjust.
18354 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18355 single table.
18356 Use symbols[i]->tag instead of tags[i].
18357
18358 2001-12-29 Akim Demaille <akim@epita.fr>
18359
18360 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18361 In addition, put a comment in there, to replace...
18362 * tests/regression.at (%union and C comments): Remove.
18363
18364 2001-12-29 Akim Demaille <akim@epita.fr>
18365
18366 * tests/regression.at (Web2c Actions): Blindly move the actual
18367 output as expected output. The contents *seem* right to me, but I
18368 can't pretend reading perfectly parser tables... Nonetheless, all
18369 the other tests pass correctly, the table look OK, even though the
18370 presence of `$axiom' is to be noted: AFAICS it is useless (but
18371 harmless).
18372
18373 2001-12-29 Akim Demaille <akim@epita.fr>
18374
18375 * src/reader.c (readgram): Don't add the rule 0 if there were no
18376 rules read. In other words, add it _after_ having performed
18377 grammar sanity checks.
18378 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18379
18380 2001-12-29 Akim Demaille <akim@epita.fr>
18381
18382 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18383 visible, and some states have now a different number.
18384
18385 2001-12-29 Akim Demaille <akim@epita.fr>
18386
18387 * src/reader.c (readgram): Bind the initial rule's lineno to that
18388 of the first rule.
18389 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18390 (Solved SR Conflicts): Adjust rule 0's line number.
18391
18392 2001-12-29 Akim Demaille <akim@epita.fr>
18393
18394 Fix the `GAWK Grammar' failure.
18395
18396 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18397 the reductions of the first state which was mistakenly confused
18398 with the final state because precisely final_state was initialized
18399 to 0.
18400 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18401 now noticed by Bison.
18402 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18403 have a reduction on $default.
18404
18405 2001-12-29 Akim Demaille <akim@epita.fr>
18406
18407 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18408 rule line numbers.
18409 * src/closure.c (print_closure): Likewise.
18410 * src/derives.c (print_derives): Likewise.
18411 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18412 now.
18413
18414 2001-12-29 Akim Demaille <akim@epita.fr>
18415
18416 * src/lalr.c (lookaheads_print): New.
18417 (lalr): Call it when --trace-flag.
18418 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18419 are dumped.
18420
18421 2001-12-29 Akim Demaille <akim@epita.fr>
18422
18423 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18424 when walking through ritem, even via rule->rhs.
18425 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18426 (useful_production, useless_nonterminals): Likewise.
18427 (reduce_grammar_tables): Likewise, plus update nritems.
18428 * src/nullable.c (set_nullable): Likewise.
18429 * src/lalr.c (build_relations): Likewise.
18430 * tests/sets.at (Nullable): Adjust.
18431 Fortunately, now, the $axiom is no longer nullable.
18432
18433 2001-12-29 Akim Demaille <akim@epita.fr>
18434
18435 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18436 the 0-sentinel.
18437 * src/gram.c (ritem_longest_rhs): Likewise.
18438 * src/reduce.c (nonterminals_reduce): Likewise.
18439 * src/print_graph.c (print_graph): Likewise.
18440 * src/output.c (output_rule_data): Likewise.
18441 * src/nullable.c (set_nullable): Likewise.
18442
18443 2001-12-29 Akim Demaille <akim@epita.fr>
18444
18445 * src/output.c: Comment changes.
18446
18447 2001-12-27 Paul Eggert <eggert@twinsun.com>
18448
18449 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18450 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18451 Sparc, as they were causing more porting problems than the
18452 (minor) performance improvement was worth.
18453
18454 Also, catch up with 1.31's YYSTD.
18455
18456 2001-12-27 Akim Demaille <akim@epita.fr>
18457
18458 * src/output.c (output_gram): Rely on nritems, not the
18459 0-sentinel. See below.
18460 Use -1 as separator, not 0.
18461 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18462 Rely on -1 as separator in yyrhs, instead of 0.
18463 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18464 twice `Now at end of input', therefore there are two lines less to
18465 expect.
18466
18467 2001-12-27 Akim Demaille <akim@epita.fr>
18468
18469 * tests/regression.at (Unresolved SR Conflicts):
18470 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18471 below.
18472
18473 2001-12-27 Akim Demaille <akim@epita.fr>
18474
18475 * src/LR0.c (new_state): Recognize the final state by the fact it
18476 is reached by eoftoken.
18477 (insert_start_shifting_state, insert_eof_shifting_state)
18478 (insert_accepting_state, augment_automaton): Remove, since now
18479 these states are automatically computed from the initial state.
18480 (generate_states): Adjust.
18481 * src/print.c: When reporting a rule number to the user, substract
18482 1, so that the axiom rule is rule 0, and the first user rule is 1.
18483 * src/reduce.c: Likewise.
18484 * src/print_graph.c (print_core): For the time being, just as for
18485 the report, depend upon --trace-flags to dump the full set of
18486 items.
18487 * src/reader.c (readgram): Once the grammar read, insert the rule
18488 0: `$axiom: START-SYMBOL $'.
18489 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18490 number of the states has changed (the final state is no longer
18491 necessarily the last), catch up.
18492
18493 2001-12-27 Akim Demaille <akim@epita.fr>
18494
18495 Try to make the use of the eoftoken valid. Given that its value
18496 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18497 is used instead of > 0 where appropriate, (ii), depend upon nritems
18498 instead of the 0-sentinel.
18499
18500 * src/gram.h, src/gram.c (nritems): New.
18501 Expected to be duplication of nitems, but for the time being...
18502 * src/reader.c (packgram): Assert nritems and nitems are equal.
18503 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18504 * src/closure.c (print_closure, print_fderives): Likewise.
18505 * src/gram.c (ritem_print): Likewise.
18506 * src/print.c (print_core, print_grammar): Likewise.
18507 * src/print_graph.c: Likewise.
18508
18509 2001-12-27 Akim Demaille <akim@epita.fr>
18510
18511 * src/main.c (main): If there are complains after grammar
18512 reductions, then output the report anyway if requested, then die.
18513 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18514 * src/reader.c (eoftoken): New.
18515 (parse_token_decl): If the token being defined has value `0', it
18516 is the eoftoken.
18517 (packsymbols): No longer hack `tags' to insert `$' by hand.
18518 Be sure to preserve the value of the eoftoken.
18519 (reader): Make sure eoftoken is defined.
18520 Initialize nsyms to 0: now eoftoken is created just like the others.
18521 * src/print.c (print_grammar): Don't special case the eof token.
18522 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18523 lie anyway, albeit pleasant.
18524 * tests/calc.at: Exercise error messages with eoftoken.
18525 Change the grammar so that empty input is invalid.
18526 Adjust expectations.
18527 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18528
18529 2001-12-27 Akim Demaille <akim@epita.fr>
18530
18531 * configure.in: Check the protos of strchr ans strspn.
18532 Replace strchr if needed.
18533 * src/system.h: Provide the protos of strchr, strspn and memchr if
18534 missing.
18535 * lib/strchr.c: New.
18536 * src/reader.c (symbols_save): Use strchr.
18537
18538 2001-12-27 Akim Demaille <akim@epita.fr>
18539
18540 * src/print.c, src/print_graph.c (escape): New.
18541 Use it to quote the TAGS outputs.
18542 * src/print_graph.c (print_state): Now errors are in red, and
18543 reductions in green.
18544 Prefer high to wide: output the state number on a line of its own.
18545
18546 2001-12-27 Akim Demaille <akim@epita.fr>
18547
18548 * src/state.h, src/state.c (reductions_new): New.
18549 * src/LR0.c (set_state_table): Let all the states have a
18550 `reductions', even if reduced to 0.
18551 (save_reductions): Adjust.
18552 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18553 * src/print.c (print_reductions, print_actions): Adjust.
18554 * src/output.c (action_row): Adjust.
18555
18556 2001-12-27 Akim Demaille <akim@epita.fr>
18557
18558 * src/state.h, src/state.c (errs_new, errs_dup): New.
18559 * src/LR0.c (set_state_table): Let all the states have an errs,
18560 even if reduced to 0.
18561 * src/print.c (print_errs, print_reductions): Adjust.
18562 * src/output.c (output_actions, action_row): Adjust.
18563 * src/conflicts.c (resolve_sr_conflict): Adjust.
18564
18565 2001-12-27 Akim Demaille <akim@epita.fr>
18566
18567 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18568
18569 2001-12-27 Akim Demaille <akim@epita.fr>
18570
18571 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18572 * src/print.c: here.
18573 (lookaheadset, shiftset): New, used as additional storage by
18574 print_reductions.
18575 (print_results): Adjust.
18576 (print_shifts, print_gotos, print_errs): New, extracted from...
18577 (print_actions): here.
18578 * src/print_graph.c (print_actions): Remove dead code.
18579
18580 2001-12-27 Akim Demaille <akim@epita.fr>
18581
18582 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18583 `$n' and `@n'.
18584
18585 2001-12-27 Akim Demaille <akim@epita.fr>
18586
18587 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18588 (build_relations): Adjust.
18589
18590 2001-12-27 Akim Demaille <akim@epita.fr>
18591
18592 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18593 duplication.
18594
18595 2001-12-27 Akim Demaille <akim@epita.fr>
18596
18597 * src/reader.c (packgram): Catch nitems overflows.
18598
18599 2001-12-27 Akim Demaille <akim@epita.fr>
18600
18601 * src/files.c, src/files.h (guard_obstack): Remove.
18602 * src/output.c (output): Adjust.
18603 * src/reader.c (parse_braces): New, factoring...
18604 (copy_action, copy_guard): these two which are renamed as...
18605 (parse_action, parse_guard): these.
18606 As a voluntary consequence, using braces around guards is now
18607 mandatory.
18608
18609 2001-12-27 Akim Demaille <akim@epita.fr>
18610
18611 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18612 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18613 members.
18614 (symbol_list_new): Adjust.
18615 (copy_action): action_line is the first line, not the last.
18616 (copy_guard): Just as for actions, store the `action' only, not
18617 the switch/case/break flesh.
18618 Don't parse the user action that might follow the guard, let...
18619 (readgram): do it, i.e., now, there can be an action after a
18620 guard.
18621 In other words the guard is just explicitly optional.
18622 (packgram): Adjust.
18623 * src/output.c (guards_output): New.
18624 (output_parser): Call it when needed.
18625 (output): Also free the guard and attrs obstacks.
18626 * src/files.c, src/files.h (obstack_save): Remove.
18627 (output_files): Remove.
18628 As a result, if one needs the former `.act' file, using an
18629 appropriate skeleton which requires actions and guards is now
18630 required.
18631 * src/main.c (main): Adjust.
18632 * tests/semantic.at: New.
18633 * tests/regression.at: Use `input.y' as input file name.
18634 Avoid 8+3 problems by requiring input.c when the test needs the
18635 parser.
18636
18637 2001-12-27 Akim Demaille <akim@epita.fr>
18638
18639 * src/reader.c (symbol_list_new): Be sure to initialize all the
18640 fields.
18641
18642 2001-12-27 Akim Demaille <akim@epita.fr>
18643
18644 All the hacks using a final pseudo state are now useless.
18645
18646 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18647 * src/lalr.c (nLA): New.
18648 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18649 instead of lookaheadsp from the pseudo state (nstate + 1).
18650
18651 2001-12-27 Akim Demaille <akim@epita.fr>
18652
18653 * src/output.c (action_row, token_actions): Use a state_t instead
18654 of a integer, and nlookaheads instead of the following state's
18655 lookaheadsp.
18656
18657 2001-12-27 Akim Demaille <akim@epita.fr>
18658
18659 * src/conflicts.c (log_resolution, flush_shift)
18660 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18661 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18662 (conflicts_print, print_reductions): Use a state_t instead of an
18663 integer when referring to a state.
18664 As much as possible, depend upon nlookaheads, instead of the
18665 `lookaheadsp' member of the following state (since lookaheads of
18666 successive states are successive, the difference between state n + 1
18667 and n served as the number of lookaheads for state n).
18668 * src/lalr.c (add_lookback_edge): Likewise.
18669 * src/print.c (print_core, print_actions, print_state)
18670 (print_results): Likewise.
18671 * src/print_graph.c (print_core, print_actions, print_state)
18672 (print_graph): Likewise.
18673 * src/conflicts.h: Adjust.
18674
18675 2001-12-27 Akim Demaille <akim@epita.fr>
18676
18677 * src/bison.hairy: Formatting/comment changes.
18678 ANSIfy.
18679 Remove `register' indications.
18680 Add plenty of `static'.
18681
18682 2001-12-27 Akim Demaille <akim@epita.fr>
18683
18684 * src/output.c (prepare): Drop the muscle `ntbase' which
18685 duplicates ntokens.
18686 * src/bison.simple: Formatting/comment changes.
18687 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18688 is an undocumented synonym.
18689
18690 2001-12-22 Akim Demaille <akim@epita.fr>
18691
18692 * src/output.c (output_table_data): Change the prototype to use
18693 `int' for array ranges: some invocations do pass an int, not a
18694 short.
18695 Reported by Wayne Green.
18696
18697 2001-12-22 Akim Demaille <akim@epita.fr>
18698
18699 Some actions of web2c.y are improperly triggered.
18700 Reported by Mike Castle.
18701
18702 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18703 * tests/regression.at (Web2c): Rename as...
18704 (Web2c Report): this.
18705 (Web2c Actions): New.
18706
18707 2001-12-22 Akim Demaille <akim@epita.fr>
18708
18709 Reductions in web2c.y are improperly reported.
18710 Reported by Mike Castle.
18711
18712 * src/conflicts.c (print_reductions): Fix.
18713 * tests/regression.at (Web2c): New.
18714
18715 2001-12-18 Akim Demaille <akim@epita.fr>
18716
18717 Some host fail on `assert (!"foo")', which expands to
18718 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18719 Reported by Nelson Beebee.
18720
18721 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18722 `#define it_succeeded 0' and `assert (it_succeeded)'.
18723
18724 2001-12-17 Marc Autret <autret_m@epita.fr>
18725
18726 * src/bison.simple: Don't hard code the skeleton line and filename.
18727 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18728 New line counter 'skeleton_line' (skeleton-line muscle).
18729
18730 2001-12-17 Paul Eggert <eggert@twinsun.com>
18731
18732 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18733 YYDEBUG must be defined to a nonzero value.
18734
18735 * src/bison.simple (yytname): Do not assume that the user defines
18736 YYDEBUG to a properly parenthesized expression.
18737
18738 2001-12-17 Akim Demaille <akim@epita.fr>
18739
18740 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18741 nlookaheads is a new member.
18742 Adjust all users.
18743 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18744 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18745 state.
18746
18747 2001-12-17 Akim Demaille <akim@epita.fr>
18748
18749 * src/files.h, src/files.c (open_files, close_files): Remove.
18750 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18751 let...
18752 * src/reader.c (reader): Do it.
18753
18754 2001-12-17 Akim Demaille <akim@epita.fr>
18755
18756 * src/conflicts.c (print_reductions): Formatting changes.
18757
18758 2001-12-17 Akim Demaille <akim@epita.fr>
18759
18760 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18761 (flush_reduce): New.
18762 (resolve_sr_conflict): Adjust.
18763
18764 2001-12-17 Akim Demaille <akim@epita.fr>
18765
18766 * src/output.c (output_obstack): Be static and rename as...
18767 (format_obstack): this, to avoid any confusion with files.c's
18768 output_obstack.
18769 * src/reader.h (muscle_obstack): Move to...
18770 * src/output.h: here, since it's defined in output.c.
18771
18772 2001-12-17 Akim Demaille <akim@epita.fr>
18773
18774 * src/output.c (action_row, save_column, default_goto)
18775 (sort_actions, matching_state, pack_vector): Better variable
18776 locality.
18777
18778 2001-12-17 Akim Demaille <akim@epita.fr>
18779
18780 * src/output.c: Various formatting changes.
18781
18782 2001-12-17 Akim Demaille <akim@epita.fr>
18783
18784 * src/files.c (output_files): Free the output_obstack.
18785 * src/main.c (main): Call print and print_graph conditionally.
18786 * src/print.c (print): Work unconditionally.
18787 * src/print_graph.c (print_graph): Work unconditionally.
18788 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18789
18790 2001-12-16 Marc Autret <autret_m@epita.fr>
18791
18792 * src/output.c (actions_output): Fix. When we use %no-lines,
18793 there is one less line per action.
18794
18795 2001-12-16 Marc Autret <autret_m@epita.fr>
18796
18797 * src/bison.simple: Remove a useless #line directive.
18798 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18799 * src/output.c (get_lines_number): New.
18800 (output_parser): Adjust, now takes care about the lines of a
18801 output muscles.
18802 Fix line numbering.
18803 (actions_output): Computes the number of lines taken by actions.
18804 (output_master_parser): Insert new skeleton which is the name of
18805 the output parser file name.
18806
18807 2001-12-15 Marc Autret <autret_m@epita.fr>
18808
18809 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18810
18811 2001-12-15 Marc Autret <autret_m@epita.fr>
18812
18813 * src/output.c (output_gram): Keep track of the hairy one.
18814
18815 2001-12-15 Akim Demaille <akim@epita.fr>
18816
18817 Make `make distcheck' work.
18818
18819 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18820 system.h which uses libgettext.h.
18821
18822 2001-12-15 Akim Demaille <akim@epita.fr>
18823
18824 * src/nullable.c (set_nullable): Useless rules must be skipped,
18825 otherwise, since we range over their symbols, we might look at a
18826 nonterminal which no longer ``exists'', i.e., it is not counted in
18827 `nvars', hence we overflow our arrays.
18828
18829 2001-12-15 Akim Demaille <akim@epita.fr>
18830
18831 The header can also be produced directly, without any obstack!
18832 Yahoo!
18833
18834 * src/files.c, src/files.h (defines_obstack): Remove.
18835 (compute_header_macro): Global.
18836 (defines_obstack_save): Remove.
18837 * src/reader.c (parse_union_decl): No longer output to
18838 defines_obstack: its content can be found in the `stype' muscle
18839 anyway.
18840 (output_token_translations): Merge into...
18841 (symbols_output): this.
18842 Rename as...
18843 (symbols_save): this.
18844 (reader): Adjust.
18845 * src/output.c (header_output): New.
18846 (output): Call it.
18847
18848 2001-12-15 Akim Demaille <akim@epita.fr>
18849
18850 * src/reader.c (parse_union_decl): Instead of handling two obstack
18851 simultaneously, use one to define the `stype' muscle, and use the
18852 value of the latter to fill defines_obstack.
18853 (copy_comment): Remove.
18854 (copy_comment2): Work for a single obstack.
18855 Rename as...
18856 (copy_comment): this.
18857
18858 2001-12-15 Akim Demaille <akim@epita.fr>
18859
18860 * src/lex.c, src/lex.h (xgetc): No longer static.
18861 * src/reader.c (parse_union_decl): Revamp.
18862
18863 2001-12-15 Akim Demaille <akim@epita.fr>
18864
18865 Still making progress in separating Bison into (i) input, (ii)
18866 process, (iii) output: now we can directly output the parser file
18867 without using table_obstack at all.
18868
18869 * src/files.c, src/files.h (table_obstack): Bye bye.
18870 (parser_file_name): New.
18871 * src/files.c (compute_output_file_names): Compute it.
18872 * src/output.c (actions_output, output_parser)
18873 (output_master_parser): To a file instead of an obstack.
18874
18875 2001-12-15 Akim Demaille <akim@epita.fr>
18876
18877 Attach actions to rules, instead of pre-outputting them to
18878 actions_obstack.
18879
18880 * src/gram.h (rule_t): action and action_line are new members.
18881 * src/reader.c (symbol_list): Likewise.
18882 (copy_action): Save the actions within the rule.
18883 (packgram): Save them in rule_table.
18884 * src/output.c (actions_output): New.
18885 (output_parser): Use it on `%%actions'.
18886 (output_rule_data): Don't free rule_table.
18887 (output): Do it.
18888 (prepare): Don't save the `action' muscle.
18889 * src/bison.simple: s/%%action/%%actions/.
18890
18891 2001-12-15 Akim Demaille <akim@epita.fr>
18892
18893 * src/reader.c (copy_action): When --yacc, don't append a `;'
18894 to the user action: let it fail if lacking.
18895 Suggested by Arnold Robbins and Tom Tromey.
18896
18897 2001-12-14 Akim Demaille <akim@epita.fr>
18898
18899 * src/lex.c (literalchar): Simply return the char you decoded, non
18900 longer mess around with obstacks and int pointers.
18901 Adjust all callers.
18902
18903 2001-12-14 Akim Demaille <akim@epita.fr>
18904
18905 * src/lex.c (literalchar): Don't escape the special characters,
18906 just decode them, and keep them as char (before, eol was output as
18907 the 2 char string `\n' etc.).
18908 * src/output.c (output_rule_data): Use quotearg to output the
18909 token strings.
18910
18911 2001-12-13 Paul Eggert <eggert@twinsun.com>
18912
18913 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18914 Do not infringe on the global user namespace when using C++.
18915 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18916 All uses of `fprintf' and `stderr' changed.
18917
18918 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18919
18920 2001-12-13 Akim Demaille <akim@epita.fr>
18921
18922 The computation of nullable is broken: it doesn't handle empty
18923 RHS's properly.
18924
18925 * tests/torture.at (GNU AWK Grammar): New.
18926 * tests/sets.at (Nullable): New.
18927 * src/nullable.c (set_nullable): Instead of blindly looping over
18928 `ritems', loop over the rules, and then over their rhs's.
18929
18930 Work around Autotest bugs.
18931
18932 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18933 frame, because Autotest understand lines starting with a `+' as
18934 traces from the shell. Then, they are not processed properly.
18935 Admittedly an Autotest bug, but we don't have time to wait for
18936 Autotest to catch up.
18937 * tests/regression.at (Broken Closure): Adjust to the new table
18938 frames.
18939 Move to...
18940 * tests/sets.at: here.
18941
18942 2001-12-13 Akim Demaille <akim@epita.fr>
18943
18944 * src/closure.c (closure): Use nrules instead of playing tricks
18945 with BITS_PER_WORD.
18946
18947 2001-12-13 Akim Demaille <akim@epita.fr>
18948
18949 * src/print.c (print_actions): Output the handling of `$' as the
18950 traces do: shifting the token EOF. Before EOF was treated as a
18951 nonterminal.
18952 * tests/regression.at: Adjust some tests.
18953 * src/print_graph.c (print_core): Complete the set of items via
18954 closure. The next-to-final and final states are still unsatisfying,
18955 but that's to be addressed elsewhere.
18956 No longer output the rule numbers, but do output the state number.
18957 A single loop for the shifts + gotos is enough, but picked a
18958 distinct color for each.
18959 (print_graph): Initialize and finalize closure.
18960
18961 2001-12-13 Akim Demaille <akim@epita.fr>
18962
18963 * src/reader.c (readgram): Remove dead code, an strip useless
18964 braces.
18965 (get_type): Remove, unused.
18966
18967 2001-12-12 Akim Demaille <akim@epita.fr>
18968
18969 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18970 on that of lib/error.c.
18971
18972 2001-12-12 Akim Demaille <akim@epita.fr>
18973
18974 Some hosts don't like `/' in includes.
18975
18976 * src/system.h: Include libgettext.h without qualifying the path.
18977 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18978 $(top_srcdir).
18979
18980 2001-12-11 Marc Autret <autret_m@epita.fr>
18981
18982 * src/output.c (output_parser): Remove useless muscle.
18983
18984 2001-12-11 Marc Autret <autret_m@epita.fr>
18985
18986 * src/bison.simple: Remove #line just before %%epilogue. It
18987 is now handled in ...
18988 * src/reader.c (read_additionnal_code): Add the output of a
18989 #line for the epilogue.
18990
18991 2001-12-10 Marc Autret <autret_m@epita.fr>
18992
18993 * src/reader.c (copy_definition): Re-use CPP-outed code which
18994 replace precedent remove.
18995 * src/bison.simple: Remove #line before %%prologue because
18996 %%input-line is wrong at this time.
18997
18998 2001-12-10 Marc Autret <autret_m@epita.fr>
18999
19000 * src/reader.c (symbols_output): Clean up.
19001 * src/output.c (output_gram, output): Clean up.
19002
19003 2001-12-10 Akim Demaille <akim@epita.fr>
19004
19005 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19006 * src/LR0.c (set_state_table): here.
19007 * src/lalr.c (lalr): Call it.
19008
19009 2001-12-10 Akim Demaille <akim@epita.fr>
19010
19011 * src/state.h (shifts): Remove the `number' member: shifts are
19012 attached to state, hence no longer need to be labelled with a
19013 state number.
19014
19015 2001-12-10 Akim Demaille <akim@epita.fr>
19016
19017 Now that states have a complete set of members, the linked list of
19018 shifts is useless: just fill directly the state's shifts member.
19019
19020 * src/state.h (shifts): Remove the `next' member.
19021 * src/LR0.c (first_state, last_state): Remove.
19022 Adjust the callers.
19023 (augment_automaton): Don't look for the shifts that must be added
19024 a shift on EOF: it is those of the state we looked for! But now,
19025 since shifts are attached, it is no longer needed to looking
19026 merely by its id: its number.
19027
19028 2001-12-10 Akim Demaille <akim@epita.fr>
19029
19030 * src/LR0.c (augment_automaton): Better variable locality.
19031 Remove an impossible branch: if there is a state corresponding to
19032 the start symbol being shifted, then there is shift for the start
19033 symbol from the initial state.
19034
19035 2001-12-10 Akim Demaille <akim@epita.fr>
19036
19037 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19038 only when appropriate: when insert_start_shifting_state' is not
19039 invoked.
19040 * tests/regression.at (Rule Line Numbers): Adjust.
19041
19042 2001-12-10 Akim Demaille <akim@epita.fr>
19043
19044 * src/LR0.c (augment_automaton): Now that all states have shifts,
19045 merge the two cases addition shifts to the initial state.
19046
19047 2001-12-10 Akim Demaille <akim@epita.fr>
19048
19049 * src/lalr.c (set_state_table): Move to...
19050 * src/LR0.c: here.
19051 * src/lalr.c (lalr): Don't call it...
19052 * src/LR0.c (generate_states): do it.
19053 * src/LR0.h (first_state): Remove, only the table is used.
19054
19055 2001-12-10 Akim Demaille <akim@epita.fr>
19056
19057 * src/LR0.h (first_shift, first_reduction): Remove.
19058 * src/lalr.c: Don't use first_shift: find shifts through the
19059 states.
19060
19061 2001-12-10 Akim Demaille <akim@epita.fr>
19062
19063 * src/LR0.c: Attach shifts to states as soon as they are
19064 computed.
19065 * src/lalr.c (set_state_table): Instead of assigning shifts to
19066 state, just assert that the mapping was properly done.
19067
19068 2001-12-10 Akim Demaille <akim@epita.fr>
19069
19070 * src/LR0.c (insert_start_shift): Rename as...
19071 (insert_start_shifting_state): this.
19072 (insert_eof_shifting_state, insert_accepting_state): New.
19073 (augment_automaton): Adjust.
19074 Better locality of the variables.
19075 When looking if the start_symbol is shifted from the initial
19076 state, using `while (... symbol != start_symbol ...)' sounds
19077 better than `while (... symbol < start_symbol ...)': If fail
19078 to see how the order between symbols could be relevant!
19079
19080 2001-12-10 Akim Demaille <akim@epita.fr>
19081
19082 * src/getargs.h: Don't declare `spec_name_prefix' and
19083 `spec_file_prefix', declared by src/files.h.
19084 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19085 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19086 * src/output.c (prepare): Adjust.
19087 * src/reader.c (symbols_output): Likewise.
19088 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19089
19090 2001-12-10 Akim Demaille <akim@epita.fr>
19091
19092 * src/muscle_tab.c (muscle_init): NULL is a better default than
19093 `"0"'.
19094
19095 2001-12-10 Akim Demaille <akim@epita.fr>
19096
19097 * src/reader.c (reader): Calling symbols_output once is enough.
19098
19099 2001-12-10 Akim Demaille <akim@epita.fr>
19100
19101 Now that states have a complete set of members, the linked list of
19102 reductions is useless: just fill directly the state's reductions
19103 member.
19104
19105 * src/state.h (struct reductions): Remove member `number' and
19106 `next'.
19107 * src/LR0.c (first_reduction, last_reduction): Remove.
19108 (save_reductions): Don't link the new reductions, store them in
19109 this_state.
19110 * src/lalr.c (set_state_table): No need to attach reductions to
19111 states, it's already done.
19112 * src/output.c (output_actions): No longer free the shifts, then
19113 the reductions, then the states: free all the states and their
19114 members.
19115
19116 2001-12-10 Akim Demaille <akim@epita.fr>
19117
19118 * src/options.c (OPTN, DRTV, BOTH): New.
19119 (option_table): Use them.
19120
19121 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19122 the job of system.h.
19123 * src/options.c: Don't include stdio.h and xalloc.h for the same
19124 reasons.
19125
19126 2001-12-10 Akim Demaille <akim@epita.fr>
19127
19128 * src/output.c (output, prepare): Make sure the values of the
19129 muscles `action' and `prologue' are 0-terminated.
19130
19131 2001-12-10 Akim Demaille <akim@epita.fr>
19132
19133 Clean up GCC warnings.
19134
19135 * src/reader.c (copy_action): `buf' is not used.
19136 (parse_skel_decl): Be static.
19137 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19138 * src/options.h (create_long_option_table): Have a real prototype.
19139 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19140 (hash_delete_at): Return const void *.
19141 Adjust casts to preserve the const.
19142
19143 2001-12-10 Akim Demaille <akim@epita.fr>
19144
19145 * configure.in: Require 2.52g.
19146 M4 is not needed, but AUTOM4TE is.
19147 * m4/m4.m4: Remove.
19148 * tests/Makefile.am: Adjust.
19149
19150 2001-12-10 Akim Demaille <akim@epita.fr>
19151
19152 One structure for states is enough, even though theoretically
19153 there are LR(0) states and LALR(1) states.
19154
19155 * src/lalr.h (state_t): Remove.
19156 (state_table): Be state_t **, not state_t *.
19157 * src/state.h (core, CORE_ALLOC): Rename as...
19158 (state_t, STATE_ALLOC): this.
19159 Add the LALR(1) members: shifts, reductions, errs.
19160 * src/LR0.c (state_table): Rename as...
19161 (state_hash): this, to avoid name clashes with the global
19162 `state_table'.
19163 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19164 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19165
19166 2001-12-10 Akim Demaille <akim@epita.fr>
19167
19168 Bison dumps core on bash.y.
19169 Reported by Pascal Bart.
19170
19171 * src/warshall.c (bitmatrix_print): New.
19172 (TC): Use it.
19173 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19174 j must be the outer loop.
19175 * tests/regression.at (Broken Closure): New.
19176
19177 2001-12-05 Akim Demaille <akim@epita.fr>
19178
19179 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19180 its argument.
19181 Reported by Peter Hamorsky.
19182
19183 2001-12-05 Akim Demaille <akim@epita.fr>
19184
19185 * src/conflicts.c (err_table): Remove.
19186 (resolve_sr_conflict): Adjust.
19187 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19188 Rename as...
19189 (state_t.reductions, state_t.shifts): this.
19190
19191 2001-12-05 Akim Demaille <akim@epita.fr>
19192
19193 * src/reduce.c (reduce_grammar_tables): No longer disable the
19194 removal of useless rules via CPP but via `if (0)', so that the
19195 compiler still check the code is valid.
19196 For instance, it should have noticed `rline' no longer exists: use
19197 the `line' member of rule_t.
19198 * src/gram.c (dummy, rline): Remove, unused.
19199
19200 2001-12-05 Akim Demaille <akim@epita.fr>
19201
19202 * src/output.c (pack_vector): Use assert, not berror.
19203 * src/main.c (berror): Remove, unused.
19204
19205 2001-12-05 Akim Demaille <akim@epita.fr>
19206
19207 New experimental feature: if --verbose --trace output all the
19208 items of a state, not only its kernel.
19209
19210 * src/print.c (print_core): If `trace_flag', then invoke closure
19211 before outputting the items of the state (print_core is no longer
19212 a correct name them).
19213 (print_results): Invoke new_closure/free_closure if needed.
19214
19215 2001-12-05 Akim Demaille <akim@epita.fr>
19216
19217 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19218 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19219 (nitemset): for consistency with the rest of the project.
19220
19221 2001-12-05 Akim Demaille <akim@epita.fr>
19222
19223 * src/closure.c (print_closure): Improve.
19224 (closure): Use it for printing input and output.
19225
19226 2001-12-05 Akim Demaille <akim@epita.fr>
19227
19228 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19229 indexed by nonterminals.
19230
19231 2001-12-05 Akim Demaille <akim@epita.fr>
19232
19233 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19234 what it was!).
19235 * src/warshall.h: Remove accidental duplication of the content.
19236
19237 2001-12-05 Akim Demaille <akim@epita.fr>
19238
19239 * src/closure.c (set_fderives): De-obfuscate.
19240
19241 2001-12-05 Akim Demaille <akim@epita.fr>
19242
19243 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19244
19245 2001-12-05 Akim Demaille <akim@epita.fr>
19246
19247 * src/closure.c (set_firsts): De-obfuscate.
19248
19249 2001-12-05 Akim Demaille <akim@epita.fr>
19250
19251 * src/output.c (action_row): De-obfuscate
19252 using the good o' techniques: arrays not pointers, variable
19253 locality, BITISSET, RESETBIT etc.
19254
19255 2001-12-05 Akim Demaille <akim@epita.fr>
19256
19257 Pessimize the code to simplify it: from now on, all the states
19258 have a valid SHIFTS, which NSHIFTS is possibly 0.
19259
19260 * src/LR0.c (shifts_new): Be global and move to..
19261 * src/state.c, src/state.h: here.
19262 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19263 * src/print_graph: Adjust.
19264
19265 2001-12-05 Akim Demaille <akim@epita.fr>
19266
19267 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19268 * src/conflicts.c: Use it.
19269 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19270 incorrectly ``simplified''.
19271
19272 2001-12-05 Akim Demaille <akim@epita.fr>
19273
19274 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19275 using the good o' techniques: arrays not pointers, variable
19276 locality, BITISSET, RESETBIT etc.
19277
19278 2001-12-05 Akim Demaille <akim@epita.fr>
19279
19280 * src/state.h (SHIFT_SYMBOL): New.
19281 * src/conflicts.c: Use it to deobfuscate.
19282
19283 2001-12-05 Akim Demaille <akim@epita.fr>
19284
19285 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19286 (print_reductions): De-obfuscate using the good o' techniques:
19287 arrays not pointers, variable locality, BITISSET.
19288
19289 2001-12-05 Akim Demaille <akim@epita.fr>
19290
19291 * src/conflicts.c (print_reductions): Arrays, not pointers.
19292 Use BITISSET.
19293
19294 2001-12-05 Akim Demaille <akim@epita.fr>
19295
19296 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19297
19298 2001-12-05 Akim Demaille <akim@epita.fr>
19299
19300 * src/conflicts.c (print_reductions): Improve variable locality.
19301
19302 2001-12-05 Akim Demaille <akim@epita.fr>
19303
19304 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19305
19306 2001-12-05 Akim Demaille <akim@epita.fr>
19307
19308 * src/conflicts.c (print_reductions): Improve variable locality.
19309
19310 2001-12-05 Akim Demaille <akim@epita.fr>
19311
19312 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19313 * src/lalr.c: Use them.
19314
19315 2001-12-05 Akim Demaille <akim@epita.fr>
19316
19317 * src/LR0.c (augment_automaton): Formatting changes.
19318 Better variable locality.
19319
19320 2001-12-05 Akim Demaille <akim@epita.fr>
19321
19322 * src/lalr.c (matrix_print): New.
19323 (transpose): Use it.
19324 Use arrays instead of pointers.
19325
19326 2001-12-05 Akim Demaille <akim@epita.fr>
19327
19328 * src/lalr.c (maxrhs): Move to...
19329 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19330 * src/lalr.c (build_relations): Adjust.
19331
19332 2001-12-05 Akim Demaille <akim@epita.fr>
19333
19334 * src/lalr.c (transpose): Free the memory allocated to the
19335 argument, as it is replaced by the results by the unique caller.
19336 (build_relations): Merely invoke transpose: it handles the memory
19337 deallocation.
19338 Improve variable locality.
19339 Avoid variables used as mere abbreviations.
19340 (compute_lookaheads): Use arrays instead of pointers.
19341
19342 2001-12-05 Akim Demaille <akim@epita.fr>
19343
19344 * src/lalr.c (initialize_F): Improve variable locality.
19345 Avoid variables used as mere abbreviations.
19346
19347 2001-12-05 Akim Demaille <akim@epita.fr>
19348
19349 * src/derives.c (print_derives): Display the ruleno.
19350 * src/lalr.c (initialize_F, transpose): Better variable locality
19351 to improve readability.
19352 Avoid variables used as mere abbreviations.
19353
19354 2001-12-05 Akim Demaille <akim@epita.fr>
19355
19356 * src/lalr.c (traverse): Use arrays instead of pointers.
19357
19358 2001-12-05 Akim Demaille <akim@epita.fr>
19359
19360 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19361 the handling of squeue.
19362 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19363
19364 2001-12-05 Akim Demaille <akim@epita.fr>
19365
19366 Because useless nonterminals are now kept alive (instead of being
19367 `destroyed'), we now sometimes examine them, and store information
19368 related to them. Hence we need to know their number, and adjust
19369 memory allocations.
19370
19371 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19372 static.
19373 * src/LR0.c (allocate_itemsets): The memory allocated to
19374 `symbol_count' was used for two different purpose: once to count
19375 the number of occurrences of each symbol, and later reassigned to
19376 `shift_symbol', containing the symbol that can be shifted from a
19377 given state.
19378 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19379 only, and...
19380 (new_itemsets): Allocate `shift_symbol' here.
19381 (allocate_itemsets): symbol_count includes useless nonterminals.
19382 Make room for them.
19383 (free_storage): Use `free', not `XFREE', for pointers that cannot
19384 be null.
19385
19386 2001-12-05 Akim Demaille <akim@epita.fr>
19387
19388 * src/nullable.c (set_nullable): Deobfuscate the handling of
19389 ritem.
19390 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19391
19392 2001-12-05 Akim Demaille <akim@epita.fr>
19393
19394 * src/gram.c, src/gram.h (ritem_print): New.
19395 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19396 (This useless function was defined only to work around VMS linkers
19397 that can't handle compilation units with variables only).
19398 * src/reduce.c (dump_grammar): Use it to trace the construction of
19399 ritem.
19400
19401 2001-12-04 Paul Eggert <eggert@twinsun.com>
19402
19403 * src/bison.simple (union yyalloc): Change member names
19404 to be the same as the stack names.
19405 (yyparse): yyptr is now union yyalloc *, not char *.
19406 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19407 and may generate better code on some machines.
19408 (yystpcpy): Use prototype if __STDC__ is defined, not just
19409 if __cplusplus is defined.
19410
19411 2001-11-30 Akim Demaille <akim@epita.fr>
19412
19413 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19414 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19415 Gettext doesn't compile cleanly, and dies with -Werror.
19416 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19417 Include WARNING_CFLAGS here.
19418 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19419 before being defined.
19420
19421 2001-11-27 Paul Eggert <eggert@twinsun.com>
19422
19423 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19424 First arg is int, not unsigned.
19425 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19426 (SIZE_MAX, UINT_MAX): New macros.
19427 (quotearg_n_options): Abort if N is negative.
19428 Avoid overflow check on hosts where size_t is 64 bits and int
19429 is 32 bits, as overflow is impossible there.
19430 Fix off-by-one typo that caused unnecessary reallocation.
19431
19432 2001-11-29 Paul Eggert <eggert@twinsun.com>
19433
19434 Name space cleanup in generated parser.
19435
19436 * doc/bison.texinfo (Bison Parser): Discuss system headers
19437 and their effect on the user name space.
19438
19439 * src/bison.simple:
19440 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19441 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19442 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19443
19444 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19445 on user names when possible.
19446
19447 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19448 Simplify test for whather <alloca.h> exists.
19449
19450 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19451
19452 (<stdio.h>): Include if YYDEBUG.
19453
19454 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19455 ! defined (yyoverflow) && ! defined (yymemcpy).
19456
19457 (yymemcpy, yyparse): Rename local variables as needed so that
19458 they all begin with 'yy'.
19459
19460 (yystrlen, yystpcpy): New functions.
19461
19462 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19463 All uses changed.
19464
19465 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19466 instead of relying on string.h functions. Use YYSTACK_ALLOC
19467 and YYSTACK_FREE instead of malloc and free.
19468
19469 2001-11-30 Akim Demaille <akim@epita.fr>
19470
19471 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19472 before their first uses.
19473 (YYBISON, YYPURE): Move to the top of the output.
19474
19475 2001-11-30 Akim Demaille <akim@epita.fr>
19476
19477 * tests/reduce.at (Useless Nonterminals): Fix.
19478
19479 2001-11-30 Akim Demaille <akim@epita.fr>
19480
19481 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19482 if body instead of `;' to pacify GCC's warnings.
19483
19484 2001-11-30 Akim Demaille <akim@epita.fr>
19485
19486 Instead of mapping the LHS of unused rules to -1, keep the LHS
19487 valid, but flag the rules as invalid.
19488
19489 * src/gram.h (rule_t): `useful' is a new member.
19490 * src/print.c (print_grammar): Adjust.
19491 * src/derives.c (set_derives): Likewise.
19492 * src/reader.c (packgram, reduce_output): Likewise.
19493 * src/reduce.c (reduce_grammar_tables): Likewise.
19494 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19495
19496 2001-11-30 Akim Demaille <akim@epita.fr>
19497
19498 * src/reduce.c (reduce_output): Formatting changes.
19499 * src/print.c (print_results, print_grammar): Likewise.
19500 * tests/regression.at (Rule Line Numbers)
19501 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19502
19503 2001-11-30 Akim Demaille <akim@epita.fr>
19504
19505 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19506 useless nonterminals, move them at the end of the symbol arrays.
19507 (reduce_output): Adjust.
19508 * tests/reduce.at (Useless Nonterminals): Adjust.
19509
19510 2001-11-30 Akim Demaille <akim@epita.fr>
19511
19512 * src/reduce.c: Various comment/formatting changes.
19513 (nonterminals_reduce): New, extracted from...
19514 (reduce_grammar_tables): here.
19515 (reduce_grammar): Call nonterminals_reduce.
19516
19517 2001-11-29 Paul Eggert <eggert@twinsun.com>
19518
19519 * src/bison.simple (YYSTACK_REALLOC): Remove.
19520 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19521 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19522 New macros.
19523 (union yyalloc): New type.
19524 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19525 an arbitrary restriction on hosts where size_t is wider than int.
19526
19527 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19528 a parser stack overflow. Allocate just one block of memory for all
19529 three stacks, instead of allocating three blocks; this typically is
19530 faster and reduces fragmentation.
19531
19532 Do not limit the number of items in the stack to a value that fits
19533 in 'int', as this is an arbitrary limit on hosts with 64-bit
19534 size_t and 32-bit int.
19535
19536 2001-11-29 Marc Autret <autret_m@epita.fr>
19537
19538 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19539 of defining YYERROR_VERBOSE.
19540 [AT_DATA]: $4 is now out of C declarations in the prologue.
19541
19542 2001-11-28 Marc Autret <autret_m@epita.fr>
19543
19544 * src/reader.c (parse_dquoted_param): New.
19545 (parse_skel_decl): Use it.
19546 * src/lex.h: Add its prototype.
19547 * src/lex.c (literalchar): Become not static.
19548
19549 2001-11-28 Marc Autret <autret_m@epita.fr>
19550
19551 * src/output.h: And put its extern declaration here.
19552 * src/output.c (error_verbose): Define here.
19553 (prepare): Echo name modification.
19554 * src/getargs.h: Clean its extern declaration.
19555 * src/getargs.c (error_verbose_flag): Remove.
19556 (getargs): Remove case 'e'.
19557 * src/options.c (option_table): 'error-verbose' is now seen as simple
19558 percent option.
19559 Include output.h.
19560
19561 * src/reader.c (read_declarations): Remove case tok_include.
19562 (parse_include_decl): Remove.
19563 * src/lex.h (token_t): Remove tok_include.
19564 * src/options.c (option_table): 'include' is now a simple command line
19565 option.
19566
19567 2001-11-28 Marc Autret <autret_m@epita.fr>
19568
19569 * src/bison.simple: Adjust muscle names.
19570 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19571 * src/output.c (prepare): s/_/-/ for the muscles names.
19572 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19573
19574 2001-11-28 Marc Autret <autret_m@epita.fr>
19575
19576 * src/bison.simple: Fix debug.
19577 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19578
19579 2001-11-28 Akim Demaille <akim@epita.fr>
19580
19581 * src/LR0.c (shifts_new): New.
19582 (save_shifts, insert_start_shift, augment_automaton): Use it.
19583
19584 2001-11-28 Akim Demaille <akim@epita.fr>
19585
19586 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19587 keep ruleno only.
19588
19589 2001-11-28 Akim Demaille <akim@epita.fr>
19590
19591 * src/closure.c (closure): Instead of looping over word in array
19592 then bits in words, loop over bits in array.
19593
19594 2001-11-28 Akim Demaille <akim@epita.fr>
19595
19596 * src/closure.c (closure): No longer optimize the special case
19597 where all the bits of `ruleset[r]' are set to 0, to make the code
19598 clearer.
19599
19600 2001-11-28 Akim Demaille <akim@epita.fr>
19601
19602 * src/closure.c (closure): `r' and `c' are new variables, used to
19603 de-obfuscate accesses to RULESET and CORE.
19604
19605 2001-11-28 Akim Demaille <akim@epita.fr>
19606
19607 * src/reduce.c (reduce_print): Use ngettext.
19608 (dump_grammar): Improve the trace accuracy.
19609
19610 2001-11-28 Akim Demaille <akim@epita.fr>
19611
19612 * src/reduce.c (dump_grammar): Don't translate trace messages.
19613
19614 2001-11-28 Akim Demaille <akim@epita.fr>
19615
19616 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19617 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19618 as all tags are free'ed afterwards.
19619 From Enrico Scholz.
19620
19621 2001-11-27 Paul Eggert <eggert@twinsun.com>
19622
19623 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19624 use alloca when we didn't want to, and vice versa.
19625
19626 2001-11-27 Marc Autret <autret_m@epita.fr>
19627
19628 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19629 initialization.
19630 * src/output.c (prepare): Remove its update.
19631
19632 2001-11-27 Marc Autret <autret_m@epita.fr>
19633
19634 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19635 Use %error-verbose.
19636
19637 2001-11-27 Marc Autret <autret_m@epita.fr>
19638
19639 * src/bison.simple: Remove YYERROR_VERBOSE using.
19640 Use %%error_verbose.
19641 (yyparse): Likewise.
19642 * src/output.c (prepare): Give its final value.
19643 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19644 * src/getargs.h: Add its extern declaration.
19645 * src/getargs.c (error_verbose_flag): New int.
19646 (getargs): Update to catch new case.
19647 * src/options.c (option_table): 'error-verbose' is a new option.
19648 (shortopts): Update.
19649
19650 2001-11-27 Akim Demaille <akim@epita.fr>
19651
19652 * src/system.h: Use intl/libgettext.h.
19653 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19654
19655 2001-11-27 Akim Demaille <akim@epita.fr>
19656
19657 * tests/torture.at (Exploding the Stack Size with Malloc):
19658 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19659
19660 2001-11-27 Akim Demaille <akim@epita.fr>
19661
19662 * src/files.c: Include error.h.
19663 Reported by Hans Aberg.
19664
19665 2001-11-26 Marc Autret <autret_m@epita.fr>
19666
19667 * src/reader.c (parse_include_decl): New, not yet implemented.
19668 (read_declarations): Add case tok_include.
19669 * src/getargs.h (include): Add its extern definition.
19670 * src/getargs.c (include): New const char *.
19671 (getargs): Add case '-I'.
19672 * src/options.c (option_table): Add include as command line and
19673 percent option.
19674 * src/lex.h (token_t): Add tok_include.
19675
19676 2001-11-26 Akim Demaille <akim@epita.fr>
19677
19678 * src/reader.c (readgram): Make sure rules for mid-rule actions
19679 have a lineno equal to that of their host rule.
19680 Reported by Hans Aberg.
19681 * tests/regression.at (Rule Line Numbers): New.
19682
19683 2001-11-26 Akim Demaille <akim@epita.fr>
19684
19685 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19686 size_ts.
19687
19688 2001-11-26 Akim Demaille <akim@epita.fr>
19689
19690 * src/complain.c, src/complain.h (error): Remove, provided by
19691 lib/error.[ch].
19692
19693 2001-11-26 Akim Demaille <akim@epita.fr>
19694
19695 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19696 issue an error message.
19697 * tests/regression.at (Invalid %directive): New.
19698 Reported by Hans Aberg.
19699
19700 2001-11-26 Akim Demaille <akim@epita.fr>
19701
19702 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19703 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19704
19705 2001-11-26 Akim Demaille <akim@epita.fr>
19706
19707 * src/conflicts.c (conflicts_print): Don't complain at all when
19708 there are no reduce/reduce conflicts, and as many shift/reduce
19709 conflicts as expected.
19710 * tests/regression.at (%expect right): Adjust.
19711
19712 2001-11-23 Akim Demaille <akim@epita.fr>
19713
19714 * lib/alloca.c: Update, from fileutils.
19715
19716 2001-11-23 Akim Demaille <akim@epita.fr>
19717
19718 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19719
19720 2001-11-23 Akim Demaille <akim@epita.fr>
19721
19722 * src/system.h: Include alloca.h.
19723 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19724
19725 2001-11-23 Akim Demaille <akim@epita.fr>
19726
19727 * src/print_graph.c (print_actions): Remove `rule', unused.
19728 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19729 pacify GCC's signed < unsigned warnings.
19730 * src/closure.c (itemsetsize): Likewise.
19731 * src/reader.c (symbol_list_new): Static.
19732
19733 2001-11-23 Akim Demaille <akim@epita.fr>
19734
19735 Attaching lineno to buckets is stupid, since only one copy of each
19736 symbol is kept, only the line of the first occurrence is kept too.
19737
19738 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19739 * src/reader.c (rline_allocated): Remove, unused.
19740 (symbol_list): Have a `line' member.
19741 (symbol_list_new): New.
19742 (readgram): Use it.
19743 * src/print.c (print_grammar): Output the rule line numbers.
19744 * tests/regression.at (Solved SR Conflicts)
19745 (Unresolved SR Conflicts): Adjust.
19746 Reported by Hans Aberg.
19747
19748 2001-11-22 Marc Autret <autret_m@epita.fr>
19749
19750 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19751
19752 2001-11-22 Marc Autret <autret_m@epita.fr>
19753
19754 * src/muscle_tab.c (muscle_init): Remove initialization of
19755 skeleton muscle.
19756 * src/output.c (output_master_parser): Do it here.
19757
19758 2001-11-20 Akim Demaille <akim@epita.fr>
19759
19760 * po/sv.po: New.
19761 * configure.in (ALL_LINGUAS): Adjust.
19762 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19763 longer contains strings to translate.
19764
19765 2001-11-19 Akim Demaille <akim@epita.fr>
19766
19767 * src/conflicts.c (conflicts_print): Add a missing \n.
19768
19769 2001-11-19 Akim Demaille <akim@epita.fr>
19770
19771 * src/nullable.c (nullable_print): New.
19772 (set_nullable): Call it when tracing.
19773 Better locality of variables.
19774
19775 2001-11-19 Akim Demaille <akim@epita.fr>
19776
19777 * src/print.c (print_actions): Better locality of variables.
19778
19779 2001-11-19 Akim Demaille <akim@epita.fr>
19780
19781 * src/derives.c (print_derives): Fix and enrich.
19782 * src/closure.c (print_fderives): Likewise.
19783
19784 2001-11-19 Akim Demaille <akim@epita.fr>
19785
19786 * src/closure.c (itemsetend): Remove, replaced with...
19787 (itemsetsize): new.
19788
19789 2001-11-19 Akim Demaille <akim@epita.fr>
19790
19791 * src/LR0.c (kernel_end): Remove, replaced with...
19792 (kernel_size): new.
19793
19794 2001-11-19 Akim Demaille <akim@epita.fr>
19795
19796 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19797 to clarify.
19798
19799 2001-11-19 Akim Demaille <akim@epita.fr>
19800
19801 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19802
19803 2001-11-19 Akim Demaille <akim@epita.fr>
19804
19805 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19806 trace messages.
19807 * src/LR0.c: Likewise.
19808 (allocate_itemsets): Use arrays instead of pointers to clarify.
19809
19810 2001-11-19 Akim Demaille <akim@epita.fr>
19811
19812 * src/getargs.c (statistics_flag): Replace with...
19813 (trace_flag): New.
19814 (longopts): Accept --trace instead of --statistics.
19815 * src/getargs.h, src/options.c: Adjust.
19816 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19817 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19818
19819 2001-11-19 Akim Demaille <akim@epita.fr>
19820
19821 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19822 pointers to clarify the code.
19823 (save_reductions, save_shifts): Factor common parts of alternatives.
19824
19825 2001-11-19 Akim Demaille <akim@epita.fr>
19826
19827 * src/LR0.c (new_state, get_state): Complete TRACE code.
19828 * src/closure.c: Include `reader.h' to get `tags', needed by the
19829 trace code.
19830 Rename the conditional DEBUG as TRACE.
19831 Output consistently TRACEs to stderr, not stdout.
19832 * src/derives.c: Likewise.
19833 * src/reduce.c: (inaccessable_symbols): Using if is better style
19834 than goto.
19835 Use `#if TRACE' instead of `#if 0' for tracing code.
19836
19837 2001-11-19 Akim Demaille <akim@epita.fr>
19838
19839 * src/system.h (LIST_FREE, shortcpy): New.
19840 * src/LR0.c: Use them.
19841 * src/output.c (free_itemsets, free_reductions, free_shifts):
19842 Remove, replaced by LIST_FREE.
19843
19844 2001-11-19 Akim Demaille <akim@epita.fr>
19845
19846 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19847 (REDUCTIONS_ALLOC): New.
19848 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19849 allocation.
19850
19851 2001-11-19 Akim Demaille <akim@epita.fr>
19852
19853 * src/LR0.c (new_state): Complete trace code.
19854 * src/nullable.c (set_nullable): Don't translate traces.
19855
19856 2001-11-19 Akim Demaille <akim@epita.fr>
19857
19858 * src/print_graph.c (print_core): Better locality of variables.
19859 * src/print.c (print_core): Likewise.
19860
19861 2001-11-19 Akim Demaille <akim@epita.fr>
19862
19863 * src/vcg.c: You do the output, so you are responsible of the
19864 handling of VCG syntax, in particular: use quotearg.
19865 * src/print_graph.c: Don't.
19866 (print_actions): Don't output the actions as part of the nodes,
19867 since that's the job of the edges.
19868 (print_state): Don't output by hand: fill the node description,
19869 and ask for its output.
19870
19871 2001-11-19 Akim Demaille <akim@epita.fr>
19872
19873 * src/bison.simple (yyparse): When verbosely reporting an error,
19874 no longer put additional quotes around token names.
19875 * tests/calc.at: Adjust.
19876
19877 2001-11-19 Akim Demaille <akim@epita.fr>
19878
19879 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19880 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19881 * src/output.c: Adjust.
19882
19883 2001-11-19 Akim Demaille <akim@epita.fr>
19884
19885 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19886 (rule_t): this.
19887 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19888
19889 2001-11-19 Akim Demaille <akim@epita.fr>
19890
19891 * src/gram.h (rule_t): New.
19892 (rule_table): New.
19893 (rrhs, rlhs): Remove, part of state_t.
19894 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19895 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19896 * src/reader.c, src/reduce.c: Adjust.
19897
19898 2001-11-19 Akim Demaille <akim@epita.fr>
19899
19900 * src/reader.c (symbols_output): New, extracted from...
19901 (packsymbols): Here.
19902 (reader): Call it.
19903
19904 2001-11-19 Akim Demaille <akim@epita.fr>
19905
19906 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19907 (maxrhs): this new function.
19908
19909 2001-11-19 Akim Demaille <akim@epita.fr>
19910
19911 * src/lalr.c (F): New macro to access the variable F.
19912 Adjust.
19913
19914 2001-11-19 Akim Demaille <akim@epita.fr>
19915
19916 * src/lalr.h (LA): New macro to access the variable LA.
19917 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19918 * src/lalr.c: Adjust.
19919
19920 2001-11-19 Akim Demaille <akim@epita.fr>
19921
19922 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19923 (set_state_table): handle the `lookaheads' members.
19924
19925 2001-11-19 Akim Demaille <akim@epita.fr>
19926
19927 * src/lalr.h (lookaheads): Removed array, whose contents is now
19928 a member of...
19929 (state_t): this structure.
19930 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19931 Adjust.
19932
19933 2001-11-19 Akim Demaille <akim@epita.fr>
19934
19935 * src/lalr.h (consistent): Removed array, whose contents is now
19936 a member of...
19937 (state_t): this structure.
19938 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19939 Adjust.
19940
19941 2001-11-19 Akim Demaille <akim@epita.fr>
19942
19943 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19944 contents are now members of...
19945 (state_t): this structure.
19946 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19947 Adjust.
19948
19949 2001-11-19 Akim Demaille <akim@epita.fr>
19950
19951 * src/lalr.h (state_t): New.
19952 (state_table): Be a state_t * instead of a core **.
19953 (accessing_symbol): Remove, part of state_t.
19954 * src/lalr.c: Adjust.
19955 (set_accessing_symbol): Merge into...
19956 (set_state_table): this.
19957 * src/print_graph.c, src/conflicts.c: Adjust.
19958
19959 2001-11-14 Akim Demaille <akim@epita.fr>
19960
19961 * tests/calc.at, tests/output.at, tests/regression.at,
19962 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19963 now the tests are run in private dirs, therefore AC_CLEANUP and
19964 family can be simplified to 0-ary.
19965 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19966 use abs. path to find config.h.
19967 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19968 stderr, there can be way too much random noise.
19969 Instead pass -Werror to GCC and rely on the exit status.
19970 Reported by Wolfram Wagner.
19971
19972 2001-11-14 Akim Demaille <akim@epita.fr>
19973
19974 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19975 defined only if yyoverflow is defined, to avoid `warning: unused
19976 variable `yyvs1''.
19977 Reported by The Test Suite.
19978
19979 2001-11-14 Akim Demaille <akim@epita.fr>
19980
19981 * src/print.c: Include reduce.h.
19982 Reported by Hans Aberg.
19983
19984 2001-11-14 Akim Demaille <akim@epita.fr>
19985
19986 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19987 Revert a previous patch: these are really const.
19988 * src/conflicts.c (conflict_report): Additional useless pair of
19989 braces to pacify GCC's warnings for `if () if () {} else {}'.
19990 * src/lex.c (parse_percent_token): Replace equal_offset with
19991 arg_offset.
19992 arg is const.
19993 Be sure to strdup `arg' when used, since there is no reason for
19994 token_buffer not to change.
19995
19996 2001-11-14 Akim Demaille <akim@epita.fr>
19997
19998 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19999 definition.
20000 * src/main.c (main): Use them.
20001 Suggested by Hans Aberg.
20002
20003 2001-11-12 Akim Demaille <akim@epita.fr>
20004
20005 * src/system.h (ngettext): Now that we use ngettext, be sure to
20006 provide a default definition when NLS are not used.
20007
20008 2001-11-12 Akim Demaille <akim@epita.fr>
20009
20010 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20011 Use @kbd to denote user input.
20012 (Language and Grammar): ANSIfy the example.
20013 Adjust its layout for info/notinfo.
20014 (Location Tracking Calc): Output error messages to stderr.
20015 Output locations in a more GNUtically correct way.
20016 Fix a couple of Englishos.
20017 Adjust @group/@end group pairs.
20018
20019 2001-11-12 Akim Demaille <akim@epita.fr>
20020
20021 %expect was not functioning at all.
20022
20023 * src/conflicts.c (expected_conflicts): Set to -1.
20024 (conflict_report): Use ngettext.
20025 (conflicts_print): Check %expect and make its violation an error.
20026 * doc/bison.texinfo (Expect Decl): Adjust.
20027 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20028 * tests/regression.at (%expect not enough, %expect right)
20029 (%expect too much): New.
20030
20031 2001-11-12 Akim Demaille <akim@epita.fr>
20032
20033 * tests/regression.at (Conflicts): Rename as...
20034 (Unresolved SR Conflicts): this.
20035 (Solved SR Conflicts): New.
20036
20037 2001-11-12 Akim Demaille <akim@epita.fr>
20038
20039 * src/reduce.c (print_results): Rename as...
20040 (reduce_output): This.
20041 Output to OUT, passed as argument, instead of output_obstack.
20042 (dump_grammar): Likewise.
20043 (reduce_free): New.
20044 Also free V1.
20045 (reduce_grammar): No longer call reduce_output, since...
20046 * src/print.c (print_results): do it.
20047 * src/main.c (main): Call reduce_free;
20048
20049 2001-11-12 Akim Demaille <akim@epita.fr>
20050
20051 * src/conflicts.c (print_reductions): Accept OUT as argument.
20052 Output to it, not to output_obstack.
20053 * src/print.c (print_actions): Adjust.
20054
20055 2001-11-12 Akim Demaille <akim@epita.fr>
20056
20057 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20058 the result instead of using...
20059 (src_total, rrc_total, src_count, rrc_count): Remove.
20060 (any_conflicts): Remove.
20061 (print_conflicts): Split into...
20062 (conflicts_print, conflicts_output): New.
20063 * src/conflicts.h: Adjust.
20064 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20065 * src/print.c (print_grammar): Issue `\n' between two rules.
20066 * tests/regression.at (Conflicts): New.
20067 Reported by Tom Lane.
20068
20069 2001-11-12 Akim Demaille <akim@epita.fr>
20070
20071 * tests/regression.at (Invalid input): Remove, duplicate with
20072 ``Invalid input: 1''.
20073
20074 2001-11-12 Akim Demaille <akim@epita.fr>
20075
20076 * tests/torture.at (AT_DATA_STACK_TORTURE)
20077 (Exploding the Stack Size with Alloca)
20078 (Exploding the Stack Size with Malloc): New.
20079
20080 2001-11-12 Akim Demaille <akim@epita.fr>
20081
20082 * src/bison.simple (YYSTACK_REALLOC): New.
20083 (yyparse) [!yyoverflow]: Use it and free the old stack.
20084 Reported by Per Allansson.
20085
20086 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20087
20088 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20089 define CPP macro, which substitute YYSTYPE by yystype.
20090 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20091 with yyltype/YYLTYPE. This allows inclusion of the generated
20092 header within the parser if the compiler, such as GGC, accepts
20093 multiple equivalent #defines.
20094 From Akim.
20095
20096 2001-11-05 Akim Demaille <akim@epita.fr>
20097
20098 * src/reader.c (symbols_output): New, extracted from...
20099 (packsymbols): here.
20100 (reader): Adjust.
20101
20102 2001-11-05 Akim Demaille <akim@epita.fr>
20103
20104 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20105
20106 2001-11-05 Akim Demaille <akim@epita.fr>
20107
20108 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20109 pattern.
20110
20111 2001-11-05 Akim Demaille <akim@epita.fr>
20112
20113 * src/options.h (struct option_table_struct): set_flags is void*.
20114 * src/options.c (longopts): Support `--output' and `%output'.
20115 (usage): Adjust.
20116 * src/lex.h (tok_setopt): Remove, replaced with...
20117 (tok_intopt, tok_stropt): these new guys.
20118 * src/lex.c (getopt.h): Not needed.
20119 (token_buffer, unlexed_token_buffer): Not const.
20120 (percent_table): Promote `-' over `_' in directive names.
20121 Active `%name-prefix', `file-prefix', and `output'.
20122 (parse_percent_token): Accept possible arguments to directives.
20123 Promote `-' over `_' in directive names.
20124
20125 2001-11-04 Akim Demaille <akim@epita.fr>
20126
20127 * doc/bison.texinfo (Decl Summary): Split the list into
20128 `directives for grammars' and `directives for bison'.
20129 Sort'em.
20130 Add description of `%name-prefix', `file-prefix', and `output'.
20131 Promote `-' over `_' in directive names.
20132 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20133 Simplify the description of `--name-prefix'.
20134 Promote `-' over `_' in directive names.
20135 Promote `--output' over `--output-file'.
20136 Fix the description of `--defines'.
20137 * tests/output.at: Exercise %file-prefix and %output.
20138
20139 2001-11-02 Akim Demaille <akim@epita.fr>
20140
20141 * doc/refcard.tex: Update.
20142
20143 2001-11-02 Akim Demaille <akim@epita.fr>
20144
20145 * src/symtab.h (SUNDEF): New.
20146 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20147 stand for `uninitialized', instead of 0.
20148 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20149 * src/lex.c (lex): Adjust.
20150
20151 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20152 Number it 0.
20153 Let yylex return it instead of a plain 0.
20154 Reported by Dick Streefland.
20155
20156 2001-11-02 Akim Demaille <akim@epita.fr>
20157
20158 * tests/regression.at (Mixing %token styles): New test.
20159
20160 2001-11-02 Akim Demaille <akim@epita.fr>
20161
20162 * src/reader.c (parse_thong_decl): Formatting changes.
20163 (token_translations_init): New, extracted from...
20164 (packsymbols): Here.
20165 Adjust.
20166
20167 2001-11-01 Akim Demaille <akim@epita.fr>
20168
20169 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20170 Check that `9foo.y' produces correct cpp guards.
20171 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20172 guards.
20173 Reported by Wwp.
20174
20175 2001-11-01 Akim Demaille <akim@epita.fr>
20176
20177 * tests/regression.at (Invalid input: 2): New.
20178 * src/lex.c (unlexed_token_buffer): New.
20179 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20180 too.
20181 Reported by Wwp.
20182
20183 2001-11-01 Akim Demaille <akim@epita.fr>
20184
20185 * tests/calc.at: Catch up with 1.30.
20186 * configure.in: Bump to 1.49a.
20187 Adjust to newer Autotest.
20188
20189 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20190
20191 * src/conflicts.c: Move global variables rrc_total and src_total ...
20192 (print_conflicts): here.
20193 * src/output.c (output): Free global variable user_toknums.
20194 * src/lex.c (token_obstack): Become static.
20195
20196 2001-10-18 Akim Demaille <akim@epita.fr>
20197
20198 * tests/atlocal.in (GCC): Add.
20199 * tests/calc.at: s/m4_match/m4_bmatch/.
20200 s/m4_patsubst/m4_bpatsubst/.
20201 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20202 * configure.in: AC_SUBST(GCC).
20203
20204 2001-10-14 Marc Autret <autret_m@epita.fr>
20205
20206 * src/options.c (create_long_option_table): Fix.
20207
20208 2001-10-10 Akim Demaille <akim@epita.fr>
20209
20210 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20211
20212 2001-10-04 Akim Demaille <akim@epita.fr>
20213
20214 * src/reader.c (parse_union_decl): Push the caracters in
20215 union_obstack, not attrs_obstack.
20216
20217 2001-10-04 Akim Demaille <akim@epita.fr>
20218
20219 Merge in the branch 1.29.
20220
20221 * src/reader.c (packsymbols): Use a temporary obstack for
20222 `%%tokendef', since output_stack is already used elsewhere.
20223
20224 2001-10-02 Akim Demaille <akim@epita.fr>
20225
20226 Bump 1.29d.
20227
20228 2001-10-02 Akim Demaille <akim@epita.fr>
20229
20230 Version 1.29c.
20231
20232 2001-10-02 Akim Demaille <akim@epita.fr>
20233
20234 * tests/regression.at (Invalid CPP headers): New.
20235 From Alexander Belopolsky.
20236 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20237
20238 2001-10-02 Akim Demaille <akim@epita.fr>
20239
20240 * tests/regression.at (Invalid input): New.
20241 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20242 Reported by Shura.
20243
20244 2001-10-02 Akim Demaille <akim@epita.fr>
20245
20246 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20247
20248 2001-10-02 Akim Demaille <akim@epita.fr>
20249
20250 * src/output.c (output_parser): Assert `skeleton'.
20251 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20252 systems.
20253 From Shura.
20254
20255 2001-10-01 Marc Autret <autret_m@epita.fr>
20256
20257 * src/lex.h: Echo modifications.
20258 * src/lex.c (unlex): Parameter is now token_t.
20259 From Hans Aberg.
20260
20261 2001-10-01 Marc Autret <autret_m@epita.fr>
20262
20263 * src/main.c: Include lex.h.
20264 From Hans Aberg.
20265
20266 2001-09-29 Akim Demaille <akim@epita.fr>
20267
20268 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20269
20270 2001-09-28 Akim Demaille <akim@epita.fr>
20271
20272 * tests/testsuite.at: Update to newer Autotest.
20273 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20274
20275 2001-09-27 Akim Demaille <akim@epita.fr>
20276
20277 Position independent wrapper.
20278
20279 * tests/bison: Remove.
20280 * tests/bison.in: New.
20281 * configure.in: Adjust.
20282
20283 2001-09-27 Paul Eggert <eggert@twinsun.com>
20284
20285 Port quotearg fixes from tar 1.13.24.
20286
20287 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20288 tm to be declared.
20289 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20290 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20291
20292 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20293 * m4/mbrtowc.m4: New file.
20294 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20295 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20296
20297 2001-09-27 Akim Demaille <akim@epita.fr>
20298
20299 Bump to 1.29c.
20300
20301 2001-09-27 Akim Demaille <akim@epita.fr>
20302
20303 Version 1.29b.
20304
20305 2001-09-25 Akim Demaille <akim@epita.fr>
20306
20307 * src/system.h: Include `xalloc.h'.
20308 Remove it from the C files.
20309 * src/files.c (output_files): Free the obstacks.
20310 * src/lex.c (init_lex): Rename as...
20311 (lex_init): this.
20312 (lex_free): New.
20313 * src/main.c (main): Use it.
20314
20315 2001-09-24 Marc Autret <autret_m@epita.fr>
20316
20317 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20318 to output informations in fout (FILE*).
20319 (open_graph, close_graph): Likewise.
20320 (output_graph, output_edge, output_node): Likewise.
20321 * src/vcg.h: Update function prototypes.
20322 * src/print_graph.c (print_graph): Open output graph file.
20323 (print_actions): Adjust.
20324 * src/files.h: Remove extern declaration.
20325 * src/files.c: Remove graph_obstack declaration.
20326 (open_files): Remove graph_obstack initialization.
20327 (output_files): Remove graph_obstack saving.
20328
20329 2001-09-24 Marc Autret <autret_m@epita.fr>
20330
20331 * src/files.c (compute_output_file_names): Fix.
20332
20333 2001-09-24 Marc Autret <autret_m@epita.fr>,
20334 Akim Demaille <akim@epita.fr>
20335
20336 * src/reader.c (reader): Remove call to free_symtab ().
20337 * src/main.c (main): Call it here.
20338 Include symtab.h.
20339 * src/conflicts.c (initialize_conflicts): Rename as...
20340 (solve_conflicts): this.
20341 * src/print.c (print_core, print_actions, print_state)
20342 (print_grammar): Dump to a file instead a `output_obstack'.
20343 (print_results): Dump `output_obstack', and then proceed with the
20344 FILE *.
20345 * src/files.c (compute_output_file_names, close_files): New.
20346 (output_files): Adjust.
20347 * src/main.c (main): Adjust.
20348
20349 2001-09-23 Marc Autret <autret_m@epita.fr>
20350
20351 * src/files.c (compute_header_macro): Computes header macro name
20352 from spec_defines_file when given.
20353
20354 2001-09-23 Marc Autret <autret_m@epita.fr>
20355
20356 * src/files.c (output_files): Add default extensions.
20357
20358 2001-09-22 Akim Demaille <akim@epita.fr>
20359
20360 * src/conflicts.c (finalize_conflicts): Rename as...
20361 (free_conflicts): this.
20362
20363 2001-09-22 Akim Demaille <akim@epita.fr>
20364
20365 * src/gram.c (gram_free): Rename back as...
20366 (dummy): this.
20367 (output_token_translations): Free `token_translations'.
20368 * src/symtab.c (free_symtab): Free the tag field.
20369
20370 2001-09-22 Akim Demaille <akim@epita.fr>
20371
20372 Remove `translations' as it is always set to true.
20373
20374 * src/gram.h: Adjust.
20375 * src/reader.c (packsymbols, parse_token_decl): Adjust
20376 * src/print.c (print_grammar): Adjust.
20377 * src/output.c (output_token_translations): Adjust.
20378 * src/lex.c (lex): Adjust.
20379 * src/gram.c: Be sure the set pointers to NULL.
20380 (dummy): Rename as...
20381 (gram_free): this.
20382
20383 2001-09-22 Akim Demaille <akim@epita.fr>
20384
20385 * configure.in: Invoke AM_LIB_DMALLOC.
20386 * src/system.h: Use dmalloc.
20387 * src/LR0.c: Be sure to have pointers initialized to NULL.
20388 (allocate_itemsets): Allocate kernel_items only if needed.
20389
20390 2001-09-22 Akim Demaille <akim@epita.fr>
20391
20392 * configure.in: Bump to 1.29b.
20393 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20394 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20395 need xmalloc.c in calc.y.
20396 From Pascal Bart.
20397
20398 2001-09-21 Akim Demaille <akim@epita.fr>
20399
20400 Version 1.29a.
20401 * Makefile.maint, config/config.guess, config/config.sub,
20402 * config/missing: Update from masters.
20403 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20404 upon package.m4.
20405 * configure.in (ALL_LINGUAS): Add `tr'.
20406
20407 2001-09-21 Akim Demaille <akim@epita.fr>
20408
20409 * tests/Makefile.am (package.m4): Move to...
20410 ($(srcdir)/$(TESTSUITE)): here.
20411
20412 2001-09-20 Akim Demaille <akim@epita.fr>
20413
20414 * src/complain.c: No longer try to be standalone: use system.h.
20415 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20416 * src/complain.h: Likewise.
20417 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20418 Remove the unused variable `n'.
20419 From Albert Chin-A-Young.
20420
20421 2001-09-18 Marc Autret <autret_m@epita.fr>
20422
20423 * doc/bison.1: Update.
20424 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20425 descriptions.
20426 (Option Cross Key): Update.
20427 Add --graph.
20428
20429 2001-09-18 Marc Autret <autret_m@epita.fr>
20430
20431 * tests/regression.at: New test (comment in %union).
20432
20433 2001-09-18 Marc Autret <autret_m@epita.fr>
20434
20435 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20436 do that.
20437 Reported by Keith Browne.
20438
20439 2001-09-18 Marc Autret <autret_m@epita.fr>
20440
20441 * tests/output.at: Add tests for --defines and --graph.
20442
20443 2001-09-18 Marc Autret <autret_m@epita.fr>
20444
20445 * tests/output.at: Removes tests of %{header,src}_extension features.
20446
20447 2001-09-18 Akim Demaille <akim@epita.fr>
20448
20449 * tests/Makefile.am (package.m4): New.
20450 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20451 (_AT_CHECK_CALC_ERROR): Likewise.
20452 Factor the `, ' part of verbose error messages.
20453
20454 2001-09-18 Marc Autret <autret_m@epita.fr>
20455
20456 * src/getargs.c (longopts): Declare --defines and --graph as options
20457 with optional arguments.
20458 * src/files.h: Add extern declarations.
20459 * src/files.c (spec_graph_file, spec_defines_file): New.
20460 (output_files): Update.
20461 Remove CPP-outed code.
20462
20463 2001-09-18 Marc Autret <autret_m@epita.fr>
20464
20465 Turn off %{source,header}_extension feature.
20466
20467 * src/files.c (compute_exts_from_gf): Update.
20468 (compute_exts_from_src): Update.
20469 (output_files): CPP-out useless code.
20470 * src/files.h: Remove {header,source}_extension extern declarations.
20471 * src/reader.c (parse_dquoted_param): CPP-out.
20472 (parse_header_extension_decl): Remove.
20473 (parse_source_extension_decl): Remove.
20474 (read_declarations): Remove cases tok_{hdrext,srcext}.
20475 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20476 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20477
20478 2001-09-10 Akim Demaille <akim@epita.fr>
20479
20480 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20481 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20482 (AT_CHECK_OUTPUT): this.
20483 Merely check ls' exit status, its output is useless.
20484
20485 2001-09-10 Akim Demaille <akim@epita.fr>
20486
20487 * tests/calc.at: Use m4_match.
20488 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20489
20490 2001-09-10 Marc Autret <autret_m@epita.fr>,
20491 Akim Demaille <akim@epita.fr>
20492
20493 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20494 enum color_e.
20495 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20496 to `normal'.
20497 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20498 * src/lex.h: Adjust prototype.
20499 (token_t): Add `tok_undef'.
20500 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20501 (parse_percent_token): Now returns token_t.
20502 Add default statement in switch.
20503 (lex): Separate `c' as an input variable, from the token_t result
20504 part.
20505 (unlexed): Is a token_t.
20506
20507 2001-09-10 Akim Demaille <akim@epita.fr>
20508
20509 * configure.in: Bump to 1.29a.
20510
20511 2001-09-07 Akim Demaille <akim@epita.fr>
20512
20513 Version 1.29.
20514
20515 2001-08-30 Akim Demaille <akim@epita.fr>
20516
20517 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20518 * m4/atconfig.m4: Remove.
20519 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20520 * tests/bison: New.
20521 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20522 m4_if, m4_patsubst, and m4_regexp.
20523 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20524 `input' file instead of echo.
20525
20526 2001-08-29 Akim Demaille <akim@epita.fr>
20527
20528 Bump to 1.28e.
20529
20530 2001-08-29 Akim Demaille <akim@epita.fr>
20531
20532 Version 1.28d.
20533
20534 2001-08-29 Paul Eggert <eggert@twinsun.com>
20535
20536 * src/bison.simple (yyparse): Don't take the address of an
20537 item before the start of an array, as that doesn't conform to
20538 the C Standard.
20539
20540 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20541
20542 * doc/bison.texinfo (Location Tracking Calc): New node.
20543
20544 2001-08-29 Paul Eggert <eggert@twinsun.com>
20545
20546 * src/output.c (output): Do not define const, as this now
20547 causes more problems than it cures.
20548
20549 2001-08-29 Akim Demaille <akim@epita.fr>
20550
20551 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20552 the nodes.
20553 Be sure to tag the `detailmenu'.
20554
20555 2001-08-29 Akim Demaille <akim@epita.fr>
20556
20557 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20558 download in a tmp dir.
20559
20560 2001-08-28 Marc Autret <autret_m@epita.fr>
20561
20562 * config/depcomp: New file.
20563
20564 2001-08-28 Marc Autret <autret_m@epita.fr>
20565
20566 * doc/bison.1 (mandoc): Adjust.
20567 From Juan Manuel Guerrero.
20568
20569 2001-08-28 Marc Autret <autret_m@epita.fr>
20570
20571 * src/print_graph.c (print_state): Fix.
20572
20573 2001-08-27 Marc Autret <autret_m@epita.fr>
20574
20575 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20576 char * members.
20577 Echo modifications to the functions prototypes.
20578 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20579
20580 2001-08-27 Marc Autret <autret_m@epita.fr>
20581
20582 * src/vcg.c: Include `xalloc.h'.
20583 (add_colorentry): New.
20584 (add_classname): New.
20585 (add_infoname): New.
20586 * src/vcg.h: Add new prototypes.
20587
20588 2001-08-27 Akim Demaille <akim@epita.fr>
20589
20590 * Makefile.maint: Sync. again with CVS Autoconf.
20591
20592 2001-08-27 Akim Demaille <akim@epita.fr>
20593
20594 * Makefile.maint: Formatting changes.
20595 (po-update, cvs-update, update): New targets.
20596 (AMTAR): Remove.
20597
20598 2001-08-27 Akim Demaille <akim@epita.fr>
20599
20600 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20601 * Makefile.maint: Sync. with CVS Autoconf.
20602
20603 2001-08-27 Marc Autret <autret_m@epita.fr>
20604
20605 * src/vcg.h (struct infoname_s): New.
20606 (struct colorentry_s): New.
20607 (graph_s): New fields {vertical,horizontal}_order in structure.
20608 Add `infoname' field.
20609 Add `colorentry' field;
20610 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20611 (G_HORIZONTAL_ORDER): New.
20612 (G_INFONAME): New.
20613 (G_COLORENTRY): New.
20614 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20615 Add output of `infoname'.
20616 Add output of `colorentry'.
20617
20618 2001-08-27 Marc Autret <autret_m@epita.fr>
20619
20620 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20621 This one shadowed a global parameter.
20622
20623 2001-08-24 Marc Autret <autret_m@epita.fr>
20624
20625 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20626 instead of `unsigned'.
20627 (print_state): Do not call obstack_object_size () in obstack_grow ()
20628 to avoid macro variables shadowing.
20629
20630 2001-08-23 Marc Autret <autret_m@epita.fr>
20631
20632 * src/lex.c (percent_table): Typo: s/naem/name/.
20633 Add graph option.
20634 Normalize new options declarations.
20635
20636 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20637
20638 * tests/suite.at: Exercise %header_extension and %source_extension.
20639
20640 2001-08-16 Marc Autret <autret_m@epita.fr>
20641
20642 * src/reader.c (parse_dquoted_param): New.
20643 (parse_header_extension_decl): Use it.
20644 (parse_source_extension_decl): Likewise.
20645
20646 2001-08-16 Marc Autret <autret_m@epita.fr>
20647
20648 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20649 (get_xxxx_str): Use assert () instead of complain ().
20650 Remove return invokations in default cases.
20651 (get_decision_str): Modify default behaviour. Remove second argument.
20652 Echo modifications on calls.
20653 (output_graph): Fix.
20654
20655 2001-08-16 Marc Autret <autret_m@epita.fr>
20656
20657 * src/getargs.c (usage): Update with ``-g, --graph''.
20658
20659 2001-08-16 Marc Autret <autret_m@epita.fr>
20660
20661 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20662 (Option Cross Key): Likewise.
20663 * doc/bison.1: Update.
20664
20665 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20666
20667 * src/output.c (output_master_parser): Don't finish action_obstack.
20668 (output_parser): Don't care about the muscle action, here.
20669 (prepare): Copy the action_obstack in the action muscle.
20670 (output): Free action_obstack.
20671
20672 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20673
20674 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20675 will contain `%union' declaration.
20676 (parse_union_decl): Delete #line directive output.
20677 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20678 informations about %union.
20679 (parse_union_decl): Copy the union_obstack in the muscle stype.
20680 * src/bison.simple: Add new #line directive.
20681 Add typdef %%stype YYSTYPE.
20682
20683 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20684
20685 * src/bison.simple: Add new `#line' directive.
20686
20687 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20688
20689 * src/bison.simple: New `#line' directive.
20690 * src/output.c (output_parser): Support new dynamic muscle input_line.
20691
20692 2001-09-22 Marc Autret <autret_m@epita.fr>
20693
20694 * src/output.c (output_master_parser): New.
20695 (output_parser): Be more re-entrant.
20696
20697 2001-09-21 Marc Autret <autret_m@epita.fr>
20698
20699 * src/reader.c (copy_definition, parse_union_decl): Update and use
20700 `linef' muscle.
20701 (copy_action): Likewise.
20702 Use obstack_1grow ().
20703 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20704
20705 2001-09-21 Marc Autret <autret_m@epita.fr>
20706
20707 * src/options.c (option_table): Adjust.
20708 * src/lex.c (parse_percent_token): Fix.
20709
20710 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20711
20712 * src/options.c (symtab.h): Include it, need by lex.h.
20713
20714 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20715
20716 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20717 is now an option_table_struct*.
20718 (option_strcmp): New function option_strcmp.
20719 (parse_percent_token): Call option_strcmp.
20720 * src/getargs.c (xalloc.h, options.h): Include it.
20721 (getargs): Call create_long_option_table.
20722 (getargs): Free longopts at the end of the function.
20723 (shortopts): Move in options.c.
20724 * src/options.c (create_long_option_table): New function. Convert
20725 information from option_table to option structure.
20726 * src/reader.c (options.h): Include it.
20727
20728 * src/Makefile.am: Adjust.
20729 * src/options.c (option_table): Create from longopts and percent_table.
20730 * src/getargs.c (longopts): Delete.
20731 * src/lex.c (struct percent_table_struct): Delete.
20732 (percent_table): Delete.
20733 (options.h): Include it.
20734 * src/options.c: Create.
20735 * src/options.h: Create.
20736 Declare enum opt_access_e.
20737 Define struct option_table_struct.
20738
20739 2001-09-20 Marc Autret <autret_m@epita.fr>
20740
20741 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20742 sections of Bison.
20743
20744 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20745
20746 * src/bison.simple: s/%%filename/%%skeleton.
20747 * src/muscle_tab.c (getargs.h): Include it.
20748 (muscle_init): Insert new muscle skeleton.
20749
20750 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20751
20752 * src/output.c (output_parser): Delete unused variable actions_dumped.
20753
20754 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20755
20756 * src/output.c (output): Delete call to reader_output_yylsp.
20757 * src/reader.c (reader): Likewise.
20758 * src/reader.h: Delete declaration of reader_output_yylsp.
20759
20760 2001-09-02 Marc Autret <autret_m@epita.fr>
20761
20762 * src/reader.c: Include muscle_tab.h.
20763 (parse_union_decl): Update.
20764 (parse_macro_decl): Rename parse_muscle_decl.
20765 Update to use renamed functions and variable.
20766 (read_declarations, copy_action, read_additionnal_code, : Updated
20767 with correct variables and functions names.
20768 (packsymbols, reader): Likewise.
20769
20770 * src/reader.h (muscle_obstack): Extern declaration update.
20771
20772 * src/output.c: Include muscle_tab.h
20773 In all functions using macro_insert, change by using muscle_insert ().
20774 (macro_obstack): Rename muscle_obstack.
20775 Echo modifications in the whole file.
20776 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20777 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20778 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20779
20780 * src/muscle_tab.h: Update double inclusion macros.
20781 (macro_entry_s): Rename muscle_entry_s.
20782 Update prototypes.
20783
20784 * src/muscle_tab.c: Include muscle_tab.h.
20785 Rename macro_tabble to muscle_table.
20786 (mhash1, mhash2, mcmp): Use muscle_entry.
20787 (macro_init): Rename muscle_init. Update.
20788 (macro_insert): Rename muscle_insert. Update.
20789 (macro_find): Rename muscle_find. Update.
20790
20791 * src/main.c: Include muscle_tab.h.
20792 (main): Call muscle_init ().
20793 * src/Makefile.am (bison_SOURCES): Echo modifications.
20794
20795 2001-09-02 Marc Autret <autret_m@epita.fr>
20796
20797 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20798
20799 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20800
20801 2001-09-02 Marc Autret <autret_m@epita.fr>
20802
20803 * src/macrotab.c, src/macrotab.h: Remove.
20804
20805 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20806
20807 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20808 filename.
20809
20810 2001-09-01 Marc Autret <autret_m@epita.fr>
20811
20812 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20813 to an explicit value to activate the feature. We do it here.
20814
20815 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20816
20817 * src/output.c (prepare): Delete the `filename' muscule insertion.
20818 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20819 (parse_union_decl): Likewise.
20820 * src/macrotab.c (macro_init): Initialize filename by infile.
20821
20822 2001-08-31 Marc Autret <autret_m@epita.fr>
20823
20824 * src/bison.simple (YYLSP_NEEDED): New definition.
20825 * src/output.c (prepare): Add macro insertion of `locations_flag'
20826
20827 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20828
20829 * src/output.c (prepare): Delete insertion of previous muscles,
20830 and insert the `prefix' muscles.
20831 * src/macrotab.c (macro_init): Likewise.
20832 (macro_init): Initialization prefix directive by `yy'.
20833 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20834 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20835 yylval, yydebug, yyerror, yynerrs and yyparse.
20836 New directive `#define' to substitute yydebug, ... with option
20837 name_prefix.
20838
20839 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20840
20841 * src/main.c (main): Standardize.
20842 * src/output.c (output_table_data, output_parser): Likewise.
20843 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20844
20845 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20846
20847 * src/reader.c (read_additionnal_code): Rename %%user_code to
20848 %%epilogue.
20849 * src/output.c (output): Rename %%declarations to %%prologue.
20850 * src/bison.simple: Echo modifications.
20851
20852 2001-08-31 Marc Autret <autret_m@epita.fr>
20853
20854 * src/reader.c (readgram): CleanUp.
20855 (output_token_defines): Likewise.
20856 (packsymbols): Likewise.
20857 (reader): Likewise.
20858 * src/output.c (output): CPP-out useless code.
20859
20860 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20861
20862 * src/reader.c (reader): Delete obsolete call to function
20863 output_trailers and output_headers.
20864 * src/output.h: Remove obsolete functions prototypes of output_headers
20865 and output_trailers.
20866
20867 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20868
20869 * src/main.c: Include macrotab.h.
20870 * src/macrotab.h (macro_entry_s): Constify fields.
20871 Adjust functions prototypes.
20872 * src/macrotab.c (macro_insert): Constify key and value.
20873 (macro_find): Constify key.
20874 (macro_insert): Include 'xalloc.h'
20875 (macro_insert): Use XMALLOC.
20876 (macro_find): Constify return value.
20877 * src/output.c (output_table_data): Rename table to table_data.
20878 (output_parser): Constify macro_key, macro_value.
20879
20880 2001-08-30 Marc Autret <autret_m@epita.fr>
20881
20882 * src/reader.c (parse_skel_decl): New.
20883 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20884 * src/lex.h (token_t): New token `tok_skel'.
20885 * src/lex.c (percent_table): Add skeleton option entry.
20886 Standardize.
20887
20888 2001-08-29 Marc Autret <autret_m@epita.fr>
20889
20890 * src/bison.simple: Add %%user_code directive at the end.
20891 * src/reader.c (read_additionnal_code): New.
20892 (reader): Use it.
20893 * src/output.c (output_program): Remove.
20894 (output): Update.
20895
20896 2001-08-28 Marc Autret <autret_m@epita.fr>
20897
20898 * src/output.c (output_actions): Clean up.
20899 (output_gram): CPP-out useless code.
20900 * src/reader.c (reader): Clean up, CPP-out useless code.
20901
20902 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20903
20904 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20905 directive.
20906 * src/bison.simple: Add `%%definitions'.
20907
20908 2001-08-28 Marc Autret <autret_m@epita.fr>
20909
20910 * config/depcomp: New file.
20911
20912 2001-08-27 Paul Eggert <eggert@twinsun.com>
20913
20914 * src/bison.simple (yyparse): Don't take the address of an
20915 item before the start of an array, as that doesn't conform to
20916 the C Standard.
20917
20918 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20919
20920 * src/output.c (output): Remove the initialization of the macro
20921 obstack. It was done too late here.
20922
20923 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20924 completely wrong.
20925 (reader): Initialize the macro obstack here, since we need it to grow
20926 '%define' directives.
20927
20928 * src/reader.h: Declare the macro obstack as extern.
20929
20930 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20931
20932 * src/output.c (output_parser): Fix. Store single '%' characters in
20933 the output obstack instead of throwing them away.
20934
20935 2001-08-27 Akim Demaille <akim@epita.fr>
20936
20937 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20938
20939 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20940
20941 * lib/Makefile.am: Adjust.
20942
20943 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20944
20945 * src/bison.simple: Update and add '%%' directives.
20946
20947 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20948
20949 * src/reader.c (reader): Remove calls to 'output_headers' and
20950 'output_trailers'. Remove some C output.
20951 (readgram): Disable a piece of code that was writing a default
20952 definition for 'YYSTYPE'.
20953 (reader_output_yylsp): Remove.
20954 (packsymbols): Output token defintions to a macro.
20955 (copy_definition): Disable C output.
20956
20957 * src/reader.c (parse_macro_decl): New function used to parse macro
20958 declarations.
20959 (copy_string2): Put the body of copy_string into this new function.
20960 Add a parameter to let the caller choose whether he wants to copy the
20961 string delimiters or not.
20962 (copy_string): Be a simple call to copy_string2 with the last argument
20963 bound to true.
20964 (read_declarations): Add case for macro definition.
20965 (copy_identifier): New.
20966 (parse_macro_decl): Read macro identifiers using copy_identifier
20967 rather than lex.
20968
20969 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20970
20971 * src/output.c (prepare): Add prefixed names.
20972 (output_parser): Output semantic actions.
20973 (output_parser): Fix bug on '%%line' directives.
20974
20975 * src/output.c (output_headers): Remove. The C code printed by this
20976 function should now be in the skeletons.
20977 (output_trailers): Remove.
20978 (output): Disable call to 'reader_output_yylsp'.
20979 (output_rule_data): Do not output tables to the table obstack.
20980
20981 * src/output.c: Remove some C dedicated output.
20982 Improve the use of macro and output obstacks.
20983 (output_defines): Remove.
20984
20985 * src/output.c (output_token_translations): Associate 'translate'
20986 table with a macro. No output to the table obstack.
20987 (output_gram): Same for 'rhs' and 'prhs'.
20988 (output_stos): Same for 'stos'.
20989 (output_rule_data): Same for 'r1' and 'r2'.
20990 (token_actions): Same for 'defact'.
20991 (goto_actions): Same for 'defgoto'.
20992 (output_base): Same for 'pact' and 'pgoto'.
20993 (output_table): Same for 'table'.
20994 (output_check): Same for 'check'.
20995
20996 * src/output.c (output_table_data): New function.
20997 (output_short_table): Remove.
20998 (output_short_or_char_table): Remove.
20999
21000 * src/output.c (output_parser): Replace most of the skeleton copy code
21001 with something new. Skeletons are now processed character by character
21002 rather than line by line, and Bison looks for '%%' macros. This is the
21003 first step in making Bison's output process (a lot) more flexible.
21004 (output_parser): Use the macro table.
21005
21006 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21007
21008 * src/main.c (main): Initialize the macro table.
21009
21010 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21011
21012 * src/lex.c (percent_table): Add tok_define.
21013 * src/lex.h: Add tok_define.
21014
21015 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21016
21017 * src/macrotab.c: New file.
21018 * src/macrotab.h: New file.
21019 * src/Makefile.am: Update.
21020
21021 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21022
21023 * lib/hash.c: New file.
21024 * lib/hash.h: New file.
21025 * lib/Makefile.am: Update.
21026
21027 2001-08-15 Akim Demaille <akim@epita.fr>
21028
21029 Version 1.28c.
21030
21031 2001-08-15 Marc Autret <autret_m@epita.fr>
21032
21033 * src/reader.c (readgram): Indent output macro YYSTYPE.
21034 (packsymbols): Likewise.
21035 (output_token_defines): Likewise.
21036 * src/files.c: Standardize.
21037 (compute_header_macro): New.
21038 (defines_obstack_save): New. Use compute_header_macro.
21039 (output_files): Update. Use defines_obstack_save.
21040
21041 2001-08-15 Akim Demaille <akim@epita.fr>
21042
21043 * doc/bison.texinfo (Table of Symbols): Document
21044 YYSTACK_USE_ALLOCA.
21045
21046 2001-08-15 Akim Demaille <akim@epita.fr>
21047
21048 * missing: Update from CVS Automake.
21049 * config/config.guess, config/config.sub, config/texinfo.tex:
21050 Update from gnu.org.
21051
21052 2001-08-15 Akim Demaille <akim@epita.fr>
21053
21054 * Makefile.maint: Sync with CVS Autoconf.
21055
21056 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21057
21058 * doc/bison.texinfo: Include GNU Free Documentation License from
21059 `fdl.texi'.
21060 * doc/fdl.texi: Add to package.
21061
21062 2001-08-14 Marc Autret <autret_m@epita.fr>
21063
21064 Turn on %{source,header}_extension features.
21065
21066 * src/lex.c (percent_table): Un-CPP out header_extension and
21067 source_extension.
21068 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21069 (compute_exts_from_src): Remove conditions. It restores priorities
21070 between options.
21071
21072 2001-08-14 Marc Autret <autret_m@epita.fr>
21073
21074 * src/files.c (compute_base_names): Add extensions computing when
21075 `--file-prefix' used.
21076 Standardize function calls.
21077
21078 2001-08-13 Marc Autret <autret_m@epita.fr>
21079
21080 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21081 defining it (defined but null disables alloca).
21082
21083 2001-08-13 Marc Autret <autret_m@epita.fr>
21084
21085 * src/bison.simple (_yy_memcpy): CPP reformat.
21086
21087 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21088
21089 * tests/atconfig.in (CPPFLAGS): Fix.
21090
21091 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21092
21093 * doc/bison.texinfo: Include GNU General Public License from
21094 `gpl.texi'.
21095 * doc/gpl.texi: Add to package.
21096
21097 2001-08-10 Marc Autret <autret_m@epita.fr>
21098
21099 * src/print_graph.h: Fix.
21100 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21101
21102 2001-08-10 Akim Demaille <akim@epita.fr>
21103
21104 * src/system.h: Provide default declarations for stpcpy, strndup,
21105 and strnlen.
21106
21107 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21108
21109 * doc/bison.texinfo (Locations): Update @$ stuff.
21110
21111 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21112
21113 * src/bison.simple (YYLLOC_DEFAULT): Update.
21114 (yyparse): Adjust.
21115
21116 2001-08-08 Marc Autret <autret_m@epita.fr>
21117
21118 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21119 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21120 Reported by Fabrice Bauzac.
21121
21122 2001-08-08 Marc Autret <autret_m@epita.fr>
21123
21124 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21125 * src/vcg.c (output_node): Fix.
21126 * src/vcg.h: Cleanup.
21127 * src/print_graph.c: Add comments.
21128 (node_output_size): New global variable. Simplify the formatting of
21129 the VCG graph output.
21130 (print_actions): Unused code is now used. It notifies the final state
21131 and no action states in the VCG graph. It also give the reduce actions.
21132 The `shift and goto' edges are red and the `go to state' edges are
21133 blue.
21134 Get the current node name and node_obstack by argument.
21135 (node_obstack): New variable.
21136 (print_state): Manage node_obstack.
21137 (print_core): Use node_obstack given by argument.
21138 A node is not only computed here but in print_actions also.
21139 (print_graph): CPP out useless code instead of commenting it.
21140
21141 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21142
21143 * tests/atconfig.in (CPPFLAGS): Fix.
21144
21145 2001-08-07 Akim Demaille <akim@epita.fr>
21146
21147 * src/print_graph.c (quote): New.
21148 (print_core): Use it.
21149
21150 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21151
21152 * src/vcg.c (complain.h): Include it.
21153 Unepitaize `return' invocations.
21154 [NDEBUG] (main): Remove.
21155 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21156 * src/files.c (open_files): Initialize graph_obstack.
21157 * src/print_graph.c (print_actions): CPP out useless code.
21158 (print_core): Don't output the last `\n' in labels.
21159 Use `quote'.
21160 * src/files.c (output_files): Output the VCG file.
21161 * src/main.c (main): Invoke print_graph ();
21162
21163 2001-08-06 Marc Autret <autret_m@epita.fr>
21164
21165 Automaton VCG graph output.
21166 Using option ``-g'' or long option ``--graph'', you can generate
21167 a gram_filename.vcg file containing a VCG description of the LALR (1)
21168 automaton of your grammar.
21169
21170 * src/main.c: Call to print_graph() function.
21171 * src/getargs.h: Update.
21172 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21173 (graph_flag): New flag.
21174 (longopts): Update.
21175 (getargs): Add case `g'.
21176 * src/files.c (graph_obstack): New obstack struct.
21177 (open_files): Initialize new obstack.
21178 (output_files): Saves graph_obstack if required.
21179 * src/files.h (graph_obstack): New extern declaration.
21180 * src/Makefile.am: Add new source files.
21181
21182 2001-08-06 Marc Autret <autret_m@epita.fr>
21183
21184 * src/print_graph.c, src/print_graph.h (graph): New.
21185 * src/vcg.h: New file.
21186 * src/vcg.c: New file, VCG graph handling.
21187
21188 2001-08-06 Marc Autret <autret_m@epita.fr>
21189
21190 Add of %source_extension and %header_extension which specify
21191 the source or/and the header output file extension.
21192
21193 * src/files.c (compute_base_names): Remove initialisation of
21194 src_extension and header_extension.
21195 (compute_exts_from_gf): Update.
21196 (compute_exts_from_src): Update.
21197 (output_files): Update.
21198 * src/reader.c (parse_header_extension_decl): New.
21199 (parse_source_extension_decl): New.
21200 (read_declarations): New case statements for the new tokens.
21201 * src/lex.c (percent_table): Add entries for %source_extension
21202 and %header_extension.
21203 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21204
21205 2001-08-06 Marc Autret <autret_m@epita.fr>
21206
21207 * configure.in: Bump to 1.28c.
21208 * doc/bison.texinfo: Texinfo thingies.
21209
21210 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21211
21212 * tests/atconfig.in (CPPFLAGS): Add.
21213 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21214
21215 2001-08-03 Akim Demaille <akim@epita.fr>
21216
21217 Version 1.28b.
21218
21219 2001-08-03 Akim Demaille <akim@epita.fr>
21220
21221 * tests/Makefile.am (check-local): Ship testsuite.
21222 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21223 Include `string.h'.
21224
21225 2001-08-03 Akim Demaille <akim@epita.fr>
21226
21227 * configure.in: Try using -Wformat when compiling.
21228
21229 2001-08-03 Akim Demaille <akim@epita.fr>
21230
21231 * configure.in: Bump to 1.28b.
21232
21233 2001-08-03 Akim Demaille <akim@epita.fr>
21234
21235 * src/complain.c: Adjust strerror_r portability issues.
21236
21237 2001-08-03 Akim Demaille <akim@epita.fr>
21238
21239 Version 1.28a.
21240
21241 2001-08-03 Akim Demaille <akim@epita.fr>
21242
21243 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21244 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21245 * src/getargs.c: Include complain.h.
21246 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21247 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21248
21249 2001-08-03 Akim Demaille <akim@epita.fr>
21250
21251 * src/reader.c (readgram): Display hidden chars in error messages.
21252
21253 2001-08-03 Akim Demaille <akim@epita.fr>
21254
21255 Update to gettext 0.10.39.
21256
21257 2001-08-03 Akim Demaille <akim@epita.fr>
21258
21259 * lib/strspn.c: New.
21260
21261 2001-08-01 Marc Autret <autret_m@epita.fr>
21262
21263 * doc/bison.texinfo: Update.
21264 * doc/bison.1 (mandoc): Update.
21265 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21266 * src/files.c: Support output files extensions computing.
21267 (src_extension): New static variable.
21268 (header_extension): New static variable.
21269 (tr): New function.
21270 (get_extension_index): New function, gets the index of an extension
21271 filename in a string.
21272 (compute_exts_from_gf): New function, computes extensions from the
21273 grammar file extension.
21274 (compute_exts_from_src): New functions, computes extensions from the
21275 C source file extension, file given by ``-o'' option.
21276 (compute_base_names): Update.
21277 (output_files): Update.
21278
21279 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21280
21281 * doc/bison.texi: Document @$.
21282 (Locations): New section.
21283
21284 2001-07-18 Akim Demaille <akim@epita.fr>
21285
21286 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21287 * config/prev-version.txt, config/move-if-change: New.
21288 * Makefile.am: Adjust.
21289
21290 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21291
21292 * src/bison.simple (yyparse): Suppress warning `comparaison
21293 between signed and unsigned'.
21294
21295 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21296
21297 * src/getargs.h (raw_flag): Remove.
21298 * src/getargs.c: Die on `-r'/`--raw'.
21299 * src/lex.c (parse_percent_token): Die on `%raw'.
21300 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21301 * tests/calc.at: Suppress test with option `--raw'.
21302
21303 2001-07-14 Akim Demaille <akim@epita.fr>
21304
21305 * config/: New.
21306 * configure.in: Require Autoconf 2.50.
21307 Update to gettext 0.10.38.
21308
21309 2001-03-16 Akim Demaille <akim@epita.fr>
21310
21311 * doc/bison.texinfo: ANSIfy the examples.
21312
21313 2001-03-16 Akim Demaille <akim@epita.fr>
21314
21315 * getargs.c (skeleton): New variable.
21316 (longopts): --skeleton is a new option.
21317 (shortopts, getargs): -S is a new option.
21318 * getargs.h: Declare skeleton.
21319 * output.c (output_parser): Use it.
21320
21321 2001-03-16 Akim Demaille <akim@epita.fr>
21322
21323 * m4/strerror_r.m4: New.
21324 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21325 * lib/error.h, lib/error.c: Update.
21326
21327 2001-03-16 Akim Demaille <akim@epita.fr>
21328
21329 * src/getargs.c (longopts): Clean up.
21330
21331 2001-02-21 Akim Demaille <akim@epita.fr>
21332
21333 * src/reader.c (gensym): `gensym_count' is your own.
21334 Use a static buf to create the symbol name, as token_buffer is no
21335 longer a buffer.
21336
21337 2001-02-08 Akim Demaille <akim@epita.fr>
21338
21339 * src/conflicts.c (conflict_report): Be sure not to append to res
21340 between two calls, which could happen if both first sprintf were
21341 skipped, but not the first cp += strlen.
21342
21343 2001-02-08 Akim Demaille <akim@epita.fr>
21344
21345 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21346 New, from fileutils 4.0.37.
21347 * configure.in: Require Autoconf 2.49c. I took some time before
21348 making this decision. This is the only way out for portability
21349 issues in Bison, it would mean way too much duplicate effort to
21350 import in Bison features implemented in 2.49c since 2.13.
21351 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21352
21353 2001-02-02 Akim Demaille <akim@epita.fr>
21354
21355 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21356 * lib/xalloc.h, lib/xmalloc.c: Update.
21357
21358 2001-01-19 Akim Demaille <akim@epita.fr>
21359
21360 Get rid of the ad hoc handling of token_buffer in the scanner: use
21361 the obstacks.
21362
21363 * src/lex.c (token_obstack): New.
21364 (init_lex): Initialize it. No longer call...
21365 (grow_token_buffer): this. Remove it.
21366 Adjust all the places which used it to use the obstack.
21367
21368 2001-01-19 Akim Demaille <akim@epita.fr>
21369
21370 * src/lex.h: Rename all the tokens:
21371 s/\bENDFILE\b/tok_eof/g;
21372 s/\bIDENTIFIER\b/tok_identifier/g;
21373 etc.
21374 Let them be enums, not #define, to ease debugging.
21375 Adjust all the code.
21376
21377 2001-01-18 Akim Demaille <akim@epita.fr>
21378
21379 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21380 * src/lex.c (maxtoken, grow_token_buffer): Static.
21381
21382 2001-01-18 Akim Demaille <akim@epita.fr>
21383
21384 Since we now use obstacks, more % directives can be enabled.
21385
21386 * src/lex.c (percent_table): Also accept `%yacc',
21387 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21388 `%debug'.
21389 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21390 instead of returning a token.
21391 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21392 * src/reader.c (read_declarations): Adjust.
21393 * src/files.c (open_files): Don't call `compute_base_names', don't
21394 compute `attrsfile' since they depend upon data which might be
21395 *in* the input file now.
21396 (output_files): Do it here.
21397 * src/output.c (output_headers): Document the fact that this patch
21398 introduces a guaranteed SEGV for semantic parsers.
21399 * doc/bison.texinfo: Document them.
21400 * tests/suite.at: Exercise these %options.
21401
21402 2000-12-20 Akim Demaille <akim@epita.fr>
21403
21404 Also handle the output file (--verbose) with obstacks.
21405
21406 * files.c (foutput): Remove.
21407 (output_obstack): New.
21408 Adjust all dependencies.
21409 * src/conflicts.c: Return a string.
21410 * src/system.h (obstack_grow_string): Rename as...
21411 (obstack_sgrow): this. Be ready to work with non literals.
21412 (obstack_fgrow4): New.
21413
21414 2000-12-20 Akim Demaille <akim@epita.fr>
21415
21416 * src/files.c (open_files): Fix the computation of short_base_name
21417 in the case of `-o foo.tab.c'.
21418
21419 2000-12-20 Akim Demaille <akim@epita.fr>
21420
21421 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21422 (copy_dollar): Now that everything uses obstacks, get rid of the
21423 FILE * parameters.
21424
21425 2000-12-20 Akim Demaille <akim@epita.fr>
21426
21427 * src/files.c (open_files): Actually the `.output' file is based
21428 on the short_base_name, not base_name.
21429 * tests/suite.at (Checking output file names): Adjust.
21430
21431 2000-12-20 Akim Demaille <akim@epita.fr>
21432
21433 * src/bison.s1: Remove, we now use directly...
21434 * src/bison.simple: this.
21435 * src/Makefile.am: Use pkgdata instead of data.
21436
21437 2000-12-20 Akim Demaille <akim@epita.fr>
21438
21439 * src/files.c (guard_obstack): New.
21440 (open_files): Initialize it.
21441 (output_files): Dump it...
21442 * src/files.h: Export it.
21443 * src/reader.c (copy_guard): Use it.
21444
21445 2000-12-19 Akim Demaille <akim@epita.fr>
21446
21447 * src/files.c (outfile, defsfile, actfile): Removed as global
21448 vars.
21449 (open_files): Don't compute them.
21450 (output_files): Adjust.
21451 (base_name, short_base_name): Be global.
21452 Adjust dependencies.
21453
21454 2000-12-19 Akim Demaille <akim@epita.fr>
21455
21456 * src/files.c (strsuffix): New.
21457 (stringappend): Be just like strcat but allocate.
21458 (base_names): Eve out from open_files.
21459 Try to simplify the rather hairy computation of base_name and
21460 short_base_name.
21461 (open_files): Use it.
21462 * tests/suite.at (Checking output file names): New test.
21463
21464 2000-12-19 Akim Demaille <akim@epita.fr>
21465
21466 * src/system.h (obstack_grow_literal_string): Rename as...
21467 (obstack_grow_string): this.
21468 * src/output.c (output_parser): Recognize `%% actions' instead of
21469 `$'.
21470 * src/bison.s1: s/$/%% actions/.
21471 * src/bison.hairy: Likewise.
21472
21473 2000-12-19 Akim Demaille <akim@epita.fr>
21474
21475 * src/output.c (output_parser): Compute the `#line' lines when
21476 there are.
21477 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21478 Suggested by Hans Aberg.
21479
21480 2000-12-19 Akim Demaille <akim@epita.fr>
21481
21482 Let the handling of the skeleton files be local to the procedures
21483 that use it.
21484
21485 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21486 longer static.
21487 (fparser, open_extra_files): Remove.
21488 (open_files, output_files): Don't take care of fparser.
21489 * src/files.h: Adjust.
21490 * src/output.c (output_parser): Open and close the file to the
21491 skeleton.
21492 * src/reader.c (read_declarations): When %semantic_parser, open
21493 fguard.
21494
21495 2000-12-19 Akim Demaille <akim@epita.fr>
21496
21497 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21498 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21499
21500 2000-12-19 Akim Demaille <akim@epita.fr>
21501
21502 * src/files.c (open_files): Yipee! We no longer need all the code
21503 looking for `/tmp' since we have no tmp file.
21504
21505 2000-12-19 Akim Demaille <akim@epita.fr>
21506
21507 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21508 New macros.
21509 * src/files.c (open_files): Less dependency on MSDOS etc.
21510
21511 2000-12-14 Akim Demaille <akim@epita.fr>
21512
21513 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21514 Provide a default definition.
21515 Use it when executing the default @ action.
21516 * src/reader.c (reader_output_yylsp): No longer include
21517 `timestamp' and `text' in the default YYLTYPE.
21518
21519 2000-12-12 Akim Demaille <akim@epita.fr>
21520
21521 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21522 (copy_guard): Quote the file names.
21523 Reported by Laurent Mascherpa.
21524
21525 2000-12-12 Akim Demaille <akim@epita.fr>
21526
21527 * src/output.c (output_headers, output_program, output): Be sure
21528 to escape special characters when outputting filenames.
21529 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21530 (output_headers): Don't depend on them, Use ACTSTR.
21531
21532 2000-11-17 Akim Demaille <akim@epita.fr>
21533
21534 * lib/obstack.h: Formatting changes.
21535 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21536 prevents type checking.
21537 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21538 cast the value to (void *): assigning a `foo *' to a `void *'
21539 variable is valid.
21540 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21541 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21542 append characters.
21543
21544 2000-11-17 Akim Demaille <akim@epita.fr>
21545
21546 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21547 as...
21548 (suite.m4, regression.m4, calc.m4): these.
21549 * tests/atgeneral.m4: Update from CVS Autoconf.
21550
21551 2000-11-17 Akim Demaille <akim@epita.fr>
21552
21553 * tests/regression.m4 (%union and --defines): New test,
21554 demonstrating a current bug in the obstack implementation.
21555
21556 2000-11-17 Akim Demaille <akim@epita.fr>
21557
21558 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21559 macros.
21560 Use them to declare the variables which are global or local to
21561 `yyparse'.
21562
21563 2000-11-17 Akim Demaille <akim@epita.fr>
21564
21565 * acconfig.h: Remove, no longer used.
21566
21567 2000-11-07 Akim Demaille <akim@epita.fr>
21568
21569 * src: s/Copyright (C)/Copyright/g.
21570
21571 2000-11-07 Akim Demaille <akim@epita.fr>
21572
21573 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21574 defining.
21575 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21576
21577 2000-11-07 Akim Demaille <akim@epita.fr>
21578
21579 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21580 Merge in a single CPP if/else.
21581
21582 2000-11-07 Akim Demaille <akim@epita.fr>
21583
21584 * src/output.c (output): Remove useless variables.
21585 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21586 argument `data' for consistency with the prototypes.
21587 Qualify it `const'.
21588 (obstack_copy, obstack_copy0): Rename the second argument as
21589 `address' for consistency. Qualify it `const'.
21590 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21591 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21592 `const' their input argument (`data' or `address').
21593 Adjust the corresponding macros to include `const' in casts.
21594
21595 2000-11-03 Akim Demaille <akim@epita.fr>
21596
21597 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21598 s/PFILE1/BISON_HAIRY/.
21599 Adjust dependencies.
21600
21601 2000-11-03 Akim Demaille <akim@epita.fr>
21602
21603 For some reason, this was not applied.
21604
21605 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21606 `unlink': it's no longer used.
21607
21608 2000-11-03 Akim Demaille <akim@epita.fr>
21609
21610 * src/files.c (skeleton_find): New function, eved out of...
21611 (open_files, open_extra_files): here.
21612
21613 2000-11-03 Akim Demaille <akim@epita.fr>
21614
21615 Don't use `atexit'.
21616
21617 * src/files.c (obstack_save): New function.
21618 (done): Rename as...
21619 (output_files): this.
21620 Use `obstack_save'.
21621 * src/main.c (main): Don't use `atexit' to register `done', since
21622 it no longer has to remove tmp files, just call `output_files'
21623 when there are no errors.
21624
21625 2000-11-02 Akim Demaille <akim@epita.fr>
21626
21627 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21628 `unlink': it's no longer used.
21629 * src/files.h: Formatting changes.
21630
21631 2000-11-02 Akim Demaille <akim@epita.fr>
21632
21633 Remove the last uses of mktemp and unlink/delete.
21634
21635 * src/files.c (fdefines, ftable): Removed.
21636 (defines_ostack, table_obstack): New.
21637 Adjust dependencies of the former into uses of the latter.
21638 * src/output.c (output_short_or_char_table, output_short_table):
21639 Convert to using obstacks.
21640 * src/reader.c (copy_comment2): Accept one FILE * and two
21641 obstacks.
21642 (output_token_defines, reader_output_yylsp): Use obstacks.
21643 * src/system.h (obstack_fgrow3): New.
21644 * po/POTFILES.in: Adjust.
21645
21646 2000-11-01 Akim Demaille <akim@epita.fr>
21647
21648 Change each use of `fattrs' into a use of `attrs_obstack'.
21649
21650 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21651 * src/files.c (fattrs): Remove.
21652 (attrs_obstack): New.
21653 Adjust all dependencies.
21654 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21655
21656 2000-11-01 Akim Demaille <akim@epita.fr>
21657
21658 Introduce obstacks.
21659 Change each use of `faction' into a use of `action_obstack'.
21660
21661 * lib/obstack.h, lib/obstack.c: New files.
21662 * src/files.c (faction): Remove.
21663 (action_obstack): New.
21664 Adjust all dependencies.
21665
21666 2000-10-20 Akim Demaille <akim@epita.fr>
21667
21668 * lib/quote.h (PARAMS): New macro. Use it.
21669
21670 2000-10-16 Akim Demaille <akim@epita.fr>
21671
21672 * src/output.c (output_short_or_char_table): New function.
21673 (output_short_table, output_token_translations): Use it.
21674 (goto_actions): Use output_short_table.
21675
21676 2000-10-16 Akim Demaille <akim@epita.fr>
21677
21678 * src/symtab.c (bucket_new): New function.
21679 (getsym): Use it.
21680
21681 * src/output.c (output_short_table): New argument to display the
21682 comment associated with the table.
21683 Adjust dependencies.
21684 (output_gram): Use it.
21685 (output_rule_data): Nicer output layout for YYTNAME.
21686
21687 2000-10-16 Akim Demaille <akim@epita.fr>
21688
21689 * src/lex.c (read_typename): New function.
21690 (lex): Use it.
21691 * src/reader.c (copy_dollar): Likewise.
21692
21693 2000-10-16 Akim Demaille <akim@epita.fr>
21694
21695 * src/reader.c (copy_comment2): Expect the input stream to be on
21696 the `/' which is suspected to open a comment, instead of being
21697 called after `//' or `/*' was read.
21698 (copy_comment, copy_definition, parse_union_decl, copy_action)
21699 (copy_guard): Adjust.
21700
21701 2000-10-16 Akim Demaille <akim@epita.fr>
21702
21703 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21704 `read_signed_integer'.
21705
21706 2000-10-16 Akim Demaille <akim@epita.fr>
21707
21708 * src/reader.c (copy_dollar): New function.
21709 (copy_guard, copy_action): Use it.
21710
21711 2000-10-16 Akim Demaille <akim@epita.fr>
21712
21713 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21714 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21715 New files, from Fileutils 4.0.27.
21716 * src/main.c (printable_version): Remove.
21717 * src/lex.c, src/reader.c: Use `quote'.
21718
21719 2000-10-04 Akim Demaille <akim@epita.fr>
21720
21721 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21722
21723 2000-10-04 Akim Demaille <akim@epita.fr>
21724
21725 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21726
21727 2000-10-04 Akim Demaille <akim@epita.fr>
21728
21729 When a literal string is used to define two different tokens,
21730 `bison -v' segfaults.
21731 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21732
21733 * tests/regression.m4: New file.
21734 Include the core of the sample provided by Piotr Gackiewicz.
21735 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21736 properly.
21737
21738 2000-10-04 Akim Demaille <akim@epita.fr>
21739
21740 * src/reader.c (parse_expect_decl): Keep `count' within the size
21741 of `buffer'.
21742 From Neil Booth.
21743
21744 2000-10-02 Paul Eggert <eggert@twinsun.com>
21745
21746 * bison.s1 (yyparse): Assign the default value
21747 unconditionally, to avoid a GCC warning and make the parser a
21748 tad smaller.
21749
21750 2000-10-02 Akim Demaille <akim@epita.fr>
21751
21752 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21753 options.
21754
21755 2000-10-02 Akim Demaille <akim@epita.fr>
21756
21757 * src/derives.c, src/print.c, src/reduce.c: To ease the
21758 translation, move some `\n' out of the translated strings.
21759
21760 2000-10-02 Akim Demaille <akim@epita.fr>
21761
21762 The location tracking mechanism is precious for parse error
21763 messages. Nevertheless, it is enabled only when `@n' is used in
21764 the grammar, which is a different issue (you can use it in error
21765 message, but not in the grammar per se). Therefore, there should
21766 be another means to enable it.
21767
21768 * src/getargs.c (getargs): Support `--locations'.
21769 (usage): Report it.
21770 * src/getargs.h (locationsflag): Export it.
21771 * src/lex.c (percent_table): Support `%locations'.
21772 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21773 with `locationsflag'.
21774 * doc/bison.texinfo: Document `--locations' and `%locations'.
21775 Sort the options.
21776 * tests/calc.m4: Test it.
21777
21778 For regularity of the names, replace each
21779 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21780 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21781 In addition replace each `flag' with `_flag'.
21782
21783 2000-10-02 Akim Demaille <akim@epita.fr>
21784
21785 Also test parse error messages, including with YYERROR_VERBOSE.
21786
21787 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21788 associative).
21789 Use it to check the computations.
21790 Use it to check `nonassoc' is honored.
21791 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21792 `--yyerror-verbose'.
21793 (_AT_CHECK_CALC): Adjust to this option.
21794 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21795
21796 2000-10-02 Akim Demaille <akim@epita.fr>
21797
21798 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21799 the latter demonstrates a flaw in the handling of non debugging
21800 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21801 was used in order to simplify:
21802
21803 #if YYDEBUG
21804 if (yydebug)
21805 {
21806 ...
21807 }
21808 #endif
21809
21810 into
21811
21812 if (yydebug)
21813 {
21814 ...
21815 }
21816
21817 unfortunately this leads to a CPP conflict when
21818 `--name-prefix=foo' is used since it produces `#define yydebug
21819 foodebug'.
21820
21821 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21822 (YYDPRINTF): New macro.
21823 Spread its use.
21824 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21825 the bison options.
21826 Also test `--verbose', `--defines' and `--name-prefix'.
21827
21828 2000-10-02 Akim Demaille <akim@epita.fr>
21829
21830 Improve the readability of the produced parsers.
21831
21832 * src/bison.s1: Formatting changes.
21833 Improve the comment related to the `$' mark.
21834 (yydefault): Don't fall through to `yyresume': `goto' there.
21835 * src/output.c (output_parser): When the `$' is met, skip the end
21836 of its line.
21837 New variable, `number_of_dollar_signs', to check there's exactly
21838 one `$' in the parser skeleton.
21839
21840 2000-10-02 Akim Demaille <akim@epita.fr>
21841
21842 * lib/xstrdup.c: New file, from the fileutils.
21843 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21844 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21845 instead of strlen + xmalloc + strcpy.
21846 * src/symtab.c (copys): Remove, use xstrdup instead.
21847
21848 2000-10-02 Akim Demaille <akim@epita.fr>
21849
21850 * src/gram.h (associativity): New enum type which replaces the
21851 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21852 `right_assoc', `left_assoc' and `non_assoc'.
21853 Adjust all dependencies.
21854 * src/reader.c: Formatting changes.
21855 (LTYPESTR): Don't define it, use it as a literal in
21856 `reader_output_yylsp'.
21857 * src/symtab.h (symbol_class): New enum type which replaces the
21858 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21859 `sunknown', `stoken and `snterm'.
21860
21861 2000-10-02 Akim Demaille <akim@epita.fr>
21862
21863 * src/getargs.c (fixed_outfiles): Rename as...
21864 (yaccflag): for consistency and accuracy.
21865 Adjust dependencies.
21866
21867 2000-10-02 Akim Demaille <akim@epita.fr>
21868
21869 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21870 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21871 difficult and introduced a lot of core dump. It turns out that
21872 Bison used an implementation of `xmalloc' based on `calloc', and
21873 at various places it does depend upon the initialization to 0. I
21874 have not tried to isolate the pertinent places, and all the former
21875 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21876 someone should address this issue.
21877
21878 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21879 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21880 files.
21881 Adjust dependencies.
21882 * src/warshall.h: New file.
21883 Propagate.
21884
21885 2000-10-02 Akim Demaille <akim@epita.fr>
21886
21887 Various anti-`extern in *.c' changes.
21888
21889 * src/system.h: Include `assert.h'.
21890
21891 2000-10-02 Akim Demaille <akim@epita.fr>
21892
21893 * src/state.h (nstates, final_state, first_state, first_shift)
21894 (first_reduction): Move their exportation from here...
21895 * src/LR0.h: to here.
21896 Adjust dependencies.
21897 * src/getargs.c (statisticsflag): New variable.
21898 Add support for `--statistics'.
21899 Adjust dependencies.
21900
21901 Remove a lot of now useless `extern' statements in most files.
21902
21903 2000-10-02 Akim Demaille <akim@epita.fr>
21904
21905 * src/LR0.h: New file.
21906 Propagate its use.
21907
21908 2000-10-02 Akim Demaille <akim@epita.fr>
21909
21910 * src/print.h: New file.
21911 Propagate its use.
21912 * src/print.c: Formatting and ordering changes.
21913 (verbose, terse): Replace with...
21914 (print_results): this new function.
21915 Adjust dependencies.
21916
21917 2000-10-02 Akim Demaille <akim@epita.fr>
21918
21919 * src/conflicts.c (conflict_report): New function.
21920 (conflict_log, verbose_conflict_log): Replace with...
21921 (print_conflicts): this function.
21922 Adjust dependencies.
21923 * src/conflicts.h: New file.
21924 Propagate its inclusion.
21925
21926 2000-10-02 Akim Demaille <akim@epita.fr>
21927
21928 * src/nullable.h: New file.
21929 Propagate its inclusion.
21930 * src/nullable.c: Formatting changes.
21931
21932 2000-10-02 Akim Demaille <akim@epita.fr>
21933
21934 * src/reduce.h: New file.
21935 Propagate its inclusion.
21936 * src/reduce.c: Topological sort and other formatting changes.
21937 (bool, TRUE, FALSE): Move their definition to...
21938 * src/system.h: here.
21939
21940 2000-10-02 Akim Demaille <akim@epita.fr>
21941
21942 * src/files.c: Formatting changes.
21943 (tryopen, tryclose, openfiles): Rename as...
21944 (xfopen, xfclose, open_files): this.
21945 (stringappend): static.
21946 * src/files.h: Complete the list of exported symbols.
21947 Propagate its use.
21948
21949 2000-10-02 Akim Demaille <akim@epita.fr>
21950
21951 * src/reader.h: New file.
21952 Propagate its use instead of tedious list of `extern' and
21953 prototypes.
21954 * src/reader.c: Formatting changes, topological sort,
21955 s/register//.
21956
21957 2000-10-02 Akim Demaille <akim@epita.fr>
21958
21959 * src/lex.h: Prototype `lex.c' exported functions.
21960 * src/reader.c: Adjust.
21961 * src/lex.c: Formatting changes.
21962 (safegetc): Rename as...
21963 (xgetc): this.
21964
21965 2000-10-02 Akim Demaille <akim@epita.fr>
21966
21967 * src/lalr.h: New file.
21968 Propagate its inclusion instead of prototypes and `extern'.
21969 * src/lalr.c: Formatting changes, topological sorting etc.
21970
21971 2000-10-02 Akim Demaille <akim@epita.fr>
21972
21973 * src/output.c (token_actions): Introduce a temporary array,
21974 YYDEFACT, that makes it possible for this function to use
21975 output_short_table.
21976
21977 2000-10-02 Akim Demaille <akim@epita.fr>
21978
21979 `user_toknums' is output as a `short[]' in `output.c', while it is
21980 defined as a `int[]' in `reader.c'. For consistency with the
21981 other output tables, `user_toknums' is now defined as a table of
21982 shorts.
21983
21984 * src/reader.c (user_toknums): Be a short table instead of an int
21985 table.
21986 Adjust dependencies.
21987
21988 Factor the short table outputs.
21989
21990 * src/output.c (output_short_table): New function.
21991 * src/output.c (output_gram, output_stos, output_rule_data)
21992 (output_base, output_table, output_check): Use it.
21993
21994 2000-10-02 Akim Demaille <akim@epita.fr>
21995
21996 * src/output.c (output): Topological sort of the functions, in
21997 order to get rid of the `static' prototypes.
21998 No longer use `register'.
21999 * src/output.h: New file.
22000 Propagate its inclusion in files explicitly prototyping functions
22001 from output.c.
22002
22003 2000-09-21 Akim Demaille <akim@epita.fr>
22004
22005 * src/atgeneral.m4: Update from Autoconf.
22006
22007 2000-09-21 Akim Demaille <akim@epita.fr>
22008
22009 * src/closure.h: New file.
22010 * src/closure.c: Formatting changes, topological sort over the
22011 functions, use of closure.h.
22012 (initialize_closure, finalize_closure): Rename as...
22013 (new_closure, free_closure): these. Adjust dependencies.
22014 * src/LR0.c: Formatting changes, topological sort, use of
22015 cloture.h.
22016 (initialize_states): Rename as...
22017 (new_states): this.
22018 * src/Makefile.am (noinst_HEADERS): Adjust.
22019
22020 2000-09-20 Akim Demaille <akim@epita.fr>
22021
22022 * src/acconfig.h: Don't protect config.h against multiple
22023 inclusion.
22024 Don't define PARAMS.
22025 * src/system.h: Define PARAMS.
22026 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22027 purpose of config.h. system.h must not try to fix wrong
22028 definitions in config.h.
22029
22030 2000-09-20 Akim Demaille <akim@epita.fr>
22031
22032 * src/derives.h: New file.
22033 * src/main.c, src/derives.h: Use it.
22034 Formatting changes.
22035 * src/Makefile.am (noinst_HEADERS): Adjust.
22036
22037 2000-09-20 Akim Demaille <akim@epita.fr>
22038
22039 * tests/atgeneral.m4: Update from Autoconf.
22040 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22041 (AT_CHECK_CALC): New macros.
22042 Use these macros to test bison with options `', `--raw',
22043 `--debug', `--yacc', `--yacc --debug'.
22044
22045 2000-09-19 Akim Demaille <akim@epita.fr>
22046
22047 * src/output.c: Formatting changes.
22048 * src/machine.h: Remove, leaving its contents in...
22049 * src/system.h: here.
22050 Include stdio.h.
22051 Adjust all dependencies on stdio.h and machine.h.
22052 * src/getargs.h: New file.
22053 Let all `extern' declarations about getargs.c be replaced with
22054 inclusion of `getargs.h'.
22055 * src/Makefile.am (noinst_HEADERS): Adjust.
22056
22057 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22058 scope.
22059 (yyerror): Returns void, not int.
22060 * doc/bison.texinfo: Formatting changes.
22061
22062 2000-09-19 Akim Demaille <akim@epita.fr>
22063
22064 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22065 portable.
22066
22067 2000-09-18 Akim Demaille <akim@epita.fr>
22068
22069 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22070 * src/Makefile.am (INCLUDES): Don't.
22071 Be ready to fetch headers in lib/.
22072
22073 2000-09-18 Akim Demaille <akim@epita.fr>
22074
22075 * doc/bison.texinfo: Update the copyright.
22076 ANSIfy and GNUify the examples.
22077 Remove the old menu.
22078
22079 2000-09-18 Akim Demaille <akim@epita.fr>
22080
22081 First set of tests: use the `calc' example from the documentation.
22082
22083 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22084 is defined only when YYDEBUG is.
22085 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22086 * src/files.c (tryopen, tryclose): Formatting changes.
22087 Move to the top and be static.
22088 * src/reader.c (read_signed_integer): Likewise.
22089 * tests/calc.m4: New file.
22090 * Makefile.am, suite.m4: Adjust.
22091 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22092
22093 2000-09-18 Akim Demaille <akim@epita.fr>
22094
22095 Add support for an Autotest test suite for Bison.
22096
22097 * m4/m4.m4, m4/atconfig.m4: New files.
22098 * m4/Makefile.am (EXTRA_DIST): Adjust.
22099 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22100 files.
22101 * src/getargs.c: Display a more standard --version message.
22102 * src/reader.c (reader): Formatting changes.
22103 No longer depend upon VERSION_STRING.
22104 * configure.in: No longer use `dnl'.
22105 Set up the test suite and the new directory `tests/.
22106 (VERSION_STRING): Remove.
22107
22108 2000-04-14 Akim Demaille <akim@epita.fr>
22109
22110 * src/reader.c (copy_comment2): New function, same as former
22111 `copy_comment', but outputs into two FILE *.
22112 (copy_comment): Use it.
22113 (parse_union_decl): Use it.
22114 (get_type, parse_start_decl): Use the same `invalid' message.
22115 (parse_start_decl, parse_union_decl): Use the same `multiple'
22116 message.
22117 (parse_union_decl, copy_guard, copy_action): Use the same
22118 `unmatched' message.
22119 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22120
22121 2000-03-31 Akim Demaille <akim@epita.fr>
22122
22123 * src/files.c (tryopen, tryclose): Move to the top.
22124 Be static.
22125
22126 2000-03-31 Akim Demaille <akim@epita.fr>
22127
22128 * src/main.c (main): Don't call `done', exit does it.
22129
22130 2000-03-31 Akim Demaille <akim@epita.fr>
22131
22132 * allocate.c: s/return (foo)/return foo/.
22133 * lalr.c: Likewise.
22134 * LR0.c: Likewise.
22135 * output.c: Likewise.
22136 * reader.c: Likewise.
22137 * symtab.c: Likewise.
22138 * vmsgetargs.c: Likewise.
22139
22140 2000-03-31 Akim Demaille <akim@epita.fr>
22141
22142 Clean up the error reporting functions.
22143
22144 * src/report.c: New file.
22145 * src/report.h: Likewise.
22146 * src/Makefile.am: Adjust.
22147 * m4/error.m4: New file.
22148 * m4/Makefile.am: Adjust.
22149 * configure.in (jm_PREREQ_ERROR): Call it.
22150 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22151 Remove.
22152 (fatal, fatals): Remove. All callers use complain.c::fatal.
22153 (warn, warni, warns, warnss, warnss): Remove. All callers use
22154 complain.c::complain.
22155 (toomany): Remove, use fatal instead.
22156 * src/files.c (done): No argument, use complain_message_count.
22157 * src/main.c (main): Register `done' to `atexit'.
22158
22159 * src/getargs.c (usage): More `fputs', less `fprintf'.
22160
22161 2000-03-28 Akim Demaille <akim@epita.fr>
22162
22163 * lib/: New directory.
22164 * Makefile.am (SUBDIRS): Adjust.
22165 * configure.in: Adjust.
22166 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22167 useless.
22168 * src/alloca.c: Moved to lib/.
22169 * src/getopt.c: Likewise.
22170 * src/getopt1.c: Likewise.
22171 * src/getopt.h: Likewise.
22172 * src/ansi2knr.c: Likewise.
22173 * src/ansi2knr.1: Likewise.
22174 * src/Makefile.am: Adjust.
22175 * lib/Makefile.am: New file.
22176
22177 2000-03-28 Akim Demaille <akim@epita.fr>
22178
22179 * src/getargs.c (usage): Refresh the help message.
22180
22181 2000-03-17 Akim Demaille <akim@epita.fr>
22182
22183 * src/getopt1.c: Updated from textutils 2.0e
22184 * src/getopt.c: Likewise.
22185 * src/getopt.h: Likewise.
22186
22187 2000-03-17 Akim Demaille <akim@epita.fr>
22188
22189 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22190 the file name, not the whole `#line LINE FILE'.
22191
22192 2000-03-17 Akim Demaille <akim@epita.fr>
22193
22194 On syntax errors, report the token on which we choked.
22195
22196 * src/bison.s1 (yyparse): In the label yyerrlab, when
22197 YYERROR_VERBOSE, add yychar in msg.
22198
22199 2000-03-17 Akim Demaille <akim@epita.fr>
22200
22201 * src/reader.c (copy_at): New function.
22202 (copy_guard): Use it.
22203 (copy_action): Use it.
22204
22205 2000-03-17 Akim Demaille <akim@epita.fr>
22206
22207 Be kind to translators, save some useless translations.
22208
22209 * src/main.c (banner): New function.
22210 (fatal_banner): Use it.
22211 (warn_banner): Use it.
22212
22213 2000-03-17 Akim Demaille <akim@epita.fr>
22214
22215 * src/reader.c (copy_definition): Use copy_string and
22216 copy_comment. Removed now unused `match', `ended',
22217 `cplus_comment'.
22218 (copy_comment, copy_string): Moved, to be visible from
22219 copy_definition.
22220
22221 2000-03-17 Akim Demaille <akim@epita.fr>
22222
22223 * src/reader.c (copy_string): Declare `static inline'. No
22224 problems with inline, since it is checked by configure.
22225 (copy_comment): Likewise.
22226
22227 2000-03-17 Akim Demaille <akim@epita.fr>
22228
22229 * src/reader.c (packsymbols): Formatting changes.
22230
22231 2000-03-17 Akim Demaille <akim@epita.fr>
22232
22233 * src/reader.c (copy_comment): New function, factored out from:
22234 (copy_action): Use it. Removed now unused `match', `ended',
22235 `cplus_comment'.
22236 (copy_guard): Likewise.
22237
22238 2000-03-17 Akim Demaille <akim@epita.fr>
22239
22240 * src/reader.c (copy_string): New function, factored out from:
22241 (copy_action): Use it.
22242 (copy_guard): Likewise.
22243
22244 2000-03-17 Akim Demaille <akim@epita.fr>
22245
22246 Change the handling of @s so that they behave exactly like $s.
22247 There is now a pseudo variable @$ (readble and writable), location
22248 of the lhs of the rule (by default ranging from the location of
22249 the first symbol of the rhs, to the location of the last symbol,
22250 or, if the rhs is empty, YYLLOC).
22251
22252 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22253 yyval.
22254 (yyparse): When providing a default semantic action, provide a
22255 default location action.
22256 (after the $): No longer change `*YYLSP', just stack YYLOC the
22257 same way you stack YYVAL.
22258 * src/reader.c (read_declarations): Use warns.
22259 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22260 (copy_action, case '@'): Likewise.
22261 Use a standard error message, to save useless work from
22262 translators.
22263
22264 2000-03-17 Akim Demaille <akim@epita.fr>
22265
22266 * src/bison.s1: Formatting and cosmetics changes.
22267 * src/reader.c: Likewise.
22268 Update the Copyright notice.
22269
22270 2000-03-17 Akim Demaille <akim@epita.fr>
22271
22272 * src/bison.s1 (#line): All set to `#line' only, since the
22273 Makefile now handles them.
22274
22275 2000-03-16 Akim Demaille <akim@epita.fr>
22276
22277 * src/output.c (output_rule_data): Output the documentation of
22278 some of the tables.
22279 (Copyright notice): Update.
22280 Formatting changes.
22281
22282 2000-03-16 Akim Demaille <akim@epita.fr>
22283
22284 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22285 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22286 One `#if YYDEBUG' remains, since it uses variables which are
22287 defined only if `YYDEBUG != 0'.
22288
22289 2000-03-16 Akim Demaille <akim@epita.fr>
22290
22291 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22292 and related variables so that the similarities are highlighted.
22293
22294 2000-03-16 Akim Demaille <akim@epita.fr>
22295
22296 * src/bison.s1: Properly indent CPP directives.
22297
22298 2000-03-16 Akim Demaille <akim@epita.fr>
22299
22300 * src/bison.s1: Properly indent the `alloca' CPP section.
22301
22302 2000-03-16 Akim Demaille <akim@epita.fr>
22303
22304 Do not hard code values of directories in `configure.in'.
22305 Update the `configure' tool chain.
22306
22307 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22308 src/makefile.am.
22309 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22310 (AC_OUTPUT): Add m4/Makefile.
22311 Bump to bison 1.28a, 1.29 has never been released.
22312 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22313 handled via src/Makefile.am.
22314 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22315 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22316 autoheader.
22317 * Makefile.am (SUBDIRS): Add m4.
22318 (ACLOCAL_AM_FLAGS): New variable.
22319 (AUTOMAKE_OPTIONS): Add check-news.
22320 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22321 the proper line number and file name.
22322 (DEFS): Propagate the location of bison library files and of the
22323 locale files.
22324 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22325 builddir.
22326 * acinclude.m4: Remove, replaced by the directory m4.
22327 * m4/Makefile.am (EXTRA_DIST): New variable.
22328 * m4/gettext.m4: New file, from the fileutils.
22329 * m4/lcmessage.m4: Likewise
22330 * m4/progtest.m4: Likewise.
22331 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22332
22333 2000-03-10 Akim Demaille <akim@epita.fr>
22334
22335 * src/closure.c:
22336 Formatting changes of various comments.
22337 Respect the GNU coding standards at various places.
22338 Don't use `_()' when no translation is needed.
22339
22340 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22341
22342 * src/files.c:
22343 OS/2 honors TMPDIR environment variable.
22344
22345 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22346
22347 * doc/bison.texinfo: Tweaked spelling and grammar.
22348 Updated ISBN.
22349 Removed reference to price of printed copy.
22350 Mention BISON_SIMPLE and BISON_HAIRY.
22351
22352 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22353
22354 * configure.in, NEWS:
22355 Bison 1.29 released.
22356
22357 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22358
22359 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22360 Added reference card.
22361
22362 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22363
22364 * po/ru.po: Added Russian translation.
22365
22366 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22367
22368 * configure.in: Added Russian translation.
22369
22370 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22371
22372 * configure.in, NEWS, README:
22373 Released version 1.28.
22374
22375 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22376
22377 * src/system.h:
22378 Squashed redefinition warning on some systems.
22379
22380 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22381 Have configure build version string instead of relying on ANSI string
22382 concatentation.
22383
22384 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22385
22386 * po/POTFILES.in: Got rid of version.c.
22387
22388 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22389
22390 * acconfig.h, configure.in:
22391 Have configure build version string instead of relying on ANSI string
22392 concatentation.
22393
22394 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22395
22396 * doc/bison.1:
22397 Dropped mention of `+' for long-named options.
22398
22399 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22400
22401 * src/files.c: Added <unistd.h> for unlink().
22402
22403 * src/Makefile.am, src/system.h:
22404 I18n fixes.
22405
22406 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22407
22408 * README: Added a FAQ list.
22409
22410 * configure.in, acconfig.h:
22411 I18n fixes.
22412
22413 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22414
22415 * doc/FAQ, doc/Makefile.am:
22416 Added a FAQ list.
22417
22418 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22419
22420 * src/alloc.h, src/symtab.h, src/version.c:
22421 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22422
22423 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22424
22425 * src/.cvsignore, src/Makefile.am:
22426 Reorganized: sources in `src', documentation in `doc'.
22427
22428 * src/lex.c (literalchar):
22429 fixed the code for escaping double quotes (thanks
22430 Jonathan Czisny.)
22431
22432 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22433
22434 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22435 Adjusted paths to reflect directory reorganization.
22436
22437 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22438
22439 * doc/.cvsignore, doc/Makefile.am:
22440 Reorganized: sources in `src', documentation in `doc'.
22441
22442 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22443
22444 * configure.in:
22445 Updated AC_INIT file to reflect directory reorganization.
22446
22447 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22448 Reorganized: sources in `src', documentation in `doc'.
22449
22450 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22451
22452 * src/allocate.c:
22453 Don't declare calloc() and realloc() if not necessary.
22454
22455 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22456
22457 * configure.in, acconfig.h, acinclude.m4:
22458 Don't declare calloc() and realloc() if not necessary.
22459
22460 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22461
22462 * po/.cvsignore: Added i18n support.
22463
22464 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22465
22466 * acconfig.h, configure.in, Makefile.am:
22467 Added i18n support.
22468
22469 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22470
22471 * src/bison.s1: Fixed #line numbers.
22472
22473 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22474
22475 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22476 Added PO files from Translation Project.
22477
22478 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22479
22480 * Makefile.am:
22481 Added support for non-ANSI compilers (ansi2knr).
22482
22483 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22484
22485 * configure.in: Bumped version number to 1.27.
22486
22487 * Makefile.am:
22488 Added `bison.simple' to list of files removed by `make distclean'.
22489
22490 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22491
22492 * src/files.c, src/files.h:
22493 Defined locations of parser files in config.h instead of Makefile.
22494
22495 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22496
22497 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22498 Defined locations of parser files in config.h instead of Makefile.
22499
22500 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22501
22502 * Makefile.am:
22503 Removed inappropriate use of $< macro.
22504
22505 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22506
22507 * po/Makefile.in.in, po/POTFILES.in:
22508 Add `po' directory skeleton.
22509
22510 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22511
22512 * README: Document help-bison list.
22513
22514 * configure.in: Add check for mkstemp().
22515
22516 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22517
22518 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22519 Hush a few compiler warnings.
22520
22521 * src/files.c:
22522 Add tryclose(), which verifies that fclose was successful.
22523 Hush a couple of compiler warnings.
22524
22525 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22526
22527 * Makefile.am, OChangeLog:
22528 ChangeLog is now automatically generated. Include the old version as
22529 OChangeLog.
22530
22531 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22532
22533 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
22534 Update FSF address.
22535
22536 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22537
22538 * doc/bison.texinfo: Fix formatting glitch.
22539
22540 * doc/bison.texinfo: Update FSF address.
22541
22542 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22543
22544 * acconfig.h: Update FSF address.
22545
22546 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22547
22548 * src/system.h:
22549 Don't define PACKAGE here, since config.h defines it.
22550
22551 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22552
22553 * src/reader.c: Update copyright date.
22554
22555 * src/main.c:
22556 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22557 favor of output directly to stderr (avoids buffer overruns).
22558
22559 * src/reader.c: Some checks for premature EOF.
22560
22561 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
22562 Use prototypes if the compiler understands them.
22563
22564 * src/files.c: Honor TMPDIR on Unix hosts.
22565 Use prototypes if the compiler understands them.
22566
22567 * src/reader.c:
22568 Fix a couple of buffer overrun bugs.
22569 Use prototypes if the compiler understands them.
22570
22571 * src/system.h: Include unistd.h and ctype.h.
22572 Use #ifdef instead of #if for NLS symbols.
22573
22574 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22575
22576 * doc/bison.texinfo:
22577 Delete comment "consider using @set for edition number, etc..." since
22578 we now are doing so.
22579
22580 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22581
22582 * configure.in:
22583 Use prototypes if the compiler understands them.
22584
22585 * NEWS: Document 1.26 highlights.
22586
22587 * Makefile.am: Require Automake 1.3 or later.
22588
22589 * acconfig.h:
22590 Use prototypes if the compiler understands them.
22591
22592 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22593
22594 * src/version.c:
22595 Use VERSION symbol from automake for version number.
22596
22597 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22598
22599 * acconfig.h, configure.in, version.cin:
22600 Use VERSION symbol from automake for version number.
22601
22602 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22603
22604 * Makefile.am:
22605 Distribute original version of simple parser (bison.s1), not built
22606 version (bison.simple).
22607
22608 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22609
22610 * doc/bison.texinfo: Add info dir entry.
22611
22612 * doc/bison.texinfo:
22613 Let automake put version number into documentation.
22614
22615 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22616
22617 * src/bison.cld, src/build.com, src/vmshlp.mar:
22618 Add non-RCS files from /gd/gnu/bison.
22619
22620 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22621
22622 * doc/bison.1:
22623 Document the BISON_HAIRY and BISON_SIMPLE variables.
22624
22625 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22626
22627 * src/version.c: Build version.c automatically.
22628
22629 * src/reader.c:
22630 Fix token numbering (used to start at 258, not 257).
22631
22632 * src/system.h: Include config.h.
22633
22634 * src/getargs.c: Update bug report address.
22635
22636 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22637 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22638
22639 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22640
22641 * Makefile.am:
22642 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22643
22644 * configure.in, version.cin:
22645 Build version.c automatically.
22646
22647 * AUTHORS: Add AUTHORS file.
22648
22649 * README: Update bug report address.
22650
22651 * bison.simple:
22652 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22653
22654 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22655 Add automake stuff.
22656
22657 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22658
22659 * doc/bison.texinfo: Clean up some formatting.
22660
22661 1998-05-05 Richard Stallman <rms@gnu.org>
22662
22663 * doc/bison.texinfo:
22664 Explain better why to make a pure parser.
22665
22666 1998-01-05 Richard Stallman <rms@gnu.org>
22667
22668 * src/files.c (openfiles):
22669 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22670 find a temporary directory, if possible. Do not unlink files while
22671 they are open.
22672
22673 1997-08-25 Richard Stallman <rms@gnu.org>
22674
22675 * src/reader.c (stack_offset;):
22676 Change some warni to warns.
22677
22678 * src/lex.c (literalchar): Use warns, not warni.
22679
22680 1997-06-28 Richard Stallman <rms@gnu.org>
22681
22682 * src/bison.s1: Add a Bison version comment.
22683
22684 * src/main.c (fatal, warn, berror):
22685 Use program_name.
22686
22687 1997-06-28 Richard Stallman <rms@gnu.org>
22688
22689 * Makefile.in (bison_version): New variable.
22690 (dist): Use that variable.
22691 (bison.s1): Substitute the Bison version into bison.simple.
22692
22693 * bison.simple: Add a Bison version comment.
22694
22695 1997-06-18 Richard Stallman <rms@gnu.org>
22696
22697 * src/main.c (fatal, warn, berror):
22698 Make error messages standard.
22699 (toomany): Improve error message text.
22700
22701 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
22702 new.h renamed to alloc.h.
22703
22704 1997-06-18 Richard Stallman <rms@gnu.org>
22705
22706 * Makefile.in: new.h renamed to alloc.h.
22707
22708 1997-05-24 Richard Stallman <rms@gnu.org>
22709
22710 * src/lex.c (literalchar):
22711 Fix the code for escaping \, " and '.
22712
22713 (lex): Avoid trouble when there are many chars
22714 to discard in a char literal with just several chars in it.
22715
22716 1997-05-17 Richard Stallman <rms@gnu.org>
22717
22718 * src/bison.s1:
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.
22725
22726 1997-05-17 Richard Stallman <rms@gnu.org>
22727
22728 * bison.simple:
22729 Use malloc, if using alloca is troublesome.
22730 (YYSTACK_USE_ALLOCA): New flag macro.
22731 Define it for some systems and compilers.
22732 (YYSTACK_ALLOC): New macro.
22733 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22734 If it was malloc'd, free it.
22735
22736 1997-04-23 Richard Stallman <rms@gnu.org>
22737
22738 * src/bison.s1:
22739 (alloca) [__hpux]: Always define as __builtin_alloca.
22740
22741 1997-04-23 Richard Stallman <rms@gnu.org>
22742
22743 * bison.simple:
22744 (alloca) [__hpux]: Always define as __builtin_alloca.
22745
22746 1997-04-22 Richard Stallman <rms@gnu.org>
22747
22748 * src/bison.s1:
22749 [__hpux]: Include alloca.h (right for HPUX 10)
22750 instead of declaring alloca (right for HPUX 9).
22751
22752 * src/bison.s1 (__yy_memcpy):
22753 Declare arg `count' as unsigned int.
22754 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22755
22756 1997-04-22 Richard Stallman <rms@gnu.org>
22757
22758 * bison.simple:
22759 [__hpux]: Include alloca.h (right for HPUX 10)
22760 instead of declaring alloca (right for HPUX 9).
22761
22762 * bison.simple (__yy_memcpy):
22763 Declare arg `count' as unsigned int.
22764 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22765
22766 1997-01-03 Richard Stallman <rms@gnu.org>
22767
22768 * src/allocate.c: [__STDC__ or _MSC_VER]:
22769 Declare calloc and realloc to return void *.
22770
22771 1997-01-02 Richard Stallman <rms@gnu.org>
22772
22773 * src/system.h:
22774 [_MSC_VER]: Include stdlib.h and process.h.
22775 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22776
22777 * src/main.c (main): Return FAILURE as a value.
22778 (printable_version): Declare arg as int, not char.
22779
22780 1997-01-02 Richard Stallman <rms@gnu.org>
22781
22782 * Makefile.in (dist):
22783 Explicitly check for symlinks, and copy them.
22784
22785 1996-12-19 Richard Stallman <rms@gnu.org>
22786
22787 * src/files.c:
22788 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22789
22790 1996-12-18 Paul Eggert <eggert@gnu.org>
22791
22792 * src/bison.s1 (yyparse):
22793 If __GNUC__ and YYPARSE_PARAM are both defined,
22794 declare yyparse to have a void * argument.
22795
22796 1996-12-18 Paul Eggert <eggert@gnu.org>
22797
22798 * bison.simple (yyparse):
22799 If __GNUC__ and YYPARSE_PARAM are both defined,
22800 declare yyparse to have a void * argument.
22801
22802 1996-12-17 Richard Stallman <rms@gnu.org>
22803
22804 * src/reduce.c (nbits): Add some casts.
22805
22806 1996-08-12 Richard Stallman <rms@gnu.org>
22807
22808 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22809
22810 1996-08-12 Richard Stallman <rms@gnu.org>
22811
22812 * bison.simple: Test _MSDOS as well as _MSDOS_.
22813
22814 1996-07-31 Richard Stallman <rms@gnu.org>
22815
22816 * src/bison.s1:
22817 [__sun && __i386]: Include alloca.h.
22818
22819 1996-07-31 Richard Stallman <rms@gnu.org>
22820
22821 * bison.simple:
22822 [__sun && __i386]: Include alloca.h.
22823
22824 1996-07-30 Richard Stallman <rms@gnu.org>
22825
22826 * src/bison.s1: Comment change.
22827
22828 * src/bison.s1: Test _MSDOS_, not MSDOS.
22829
22830 1996-07-30 Richard Stallman <rms@gnu.org>
22831
22832 * bison.simple: Comment change.
22833
22834 * bison.simple: Test _MSDOS_, not MSDOS.
22835
22836 1996-06-01 Richard Stallman <rms@gnu.org>
22837
22838 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
22839 Insert `_' macro around many string constants.
22840
22841 * src/main.c:
22842 Insert `_' macro around many string constants.
22843
22844 (main): Call setlocale, bindtextdomain and textdomain.
22845
22846 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22847 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22848 [ENABLE_NLS]: Include libintl.h.
22849 [ENABLE_NLS] (gettext): Define.
22850 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22851 (N_, PACKAGE, LOCALEDIR): New macros.
22852
22853 1996-06-01 Richard Stallman <rms@gnu.org>
22854
22855 * POTFILES.in: New file.
22856
22857 * Makefile.in (allocate.o):
22858 Define target explicitly.
22859
22860 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22861 (LDFLAGS): Set to @LDFLAGS@.
22862 (configure): Run autoconf only if preceding `cd' succeeds.
22863 (bison.s1): Redirect output to temporary file then move the
22864 temporary to the target, rather than redirecting directly to bison.s1.
22865 (clean): Remove config.status and config.log.
22866 (distclean): Don't remove config.status here.
22867
22868 1996-05-12 Richard Stallman <rms@gnu.org>
22869
22870 * src/bison.s1:
22871 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22872
22873 1996-05-12 Richard Stallman <rms@gnu.org>
22874
22875 * bison.simple:
22876 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22877
22878 1996-05-11 Richard Stallman <rms@gnu.org>
22879
22880 * src/bison.s1 (__yy_memcpy):
22881 Really reorder the args, as was supposedly done on Feb 14 1995.
22882 (yyparse): Calls changed accordingly.
22883
22884 1996-05-11 Richard Stallman <rms@gnu.org>
22885
22886 * Makefile.in (dist): Don't use $(srcdir).
22887
22888 * bison.simple (__yy_memcpy):
22889 Really reorder the args, as was supposedly done on Feb 14 1995.
22890 (yyparse): Calls changed accordingly.
22891
22892 1996-01-27 Richard Stallman <rms@gnu.org>
22893
22894 * src/output.c (output_rule_data):
22895 Test YYERROR_VERBOSE in the conditional
22896 around the definition of ttyname.
22897
22898 1995-12-29 Richard Stallman <rms@gnu.org>
22899
22900 * src/bison.s1:
22901 Fix line numbers in #line commands.
22902
22903 1995-12-29 Richard Stallman <rms@gnu.org>
22904
22905 * bison.simple:
22906 Fix line numbers in #line commands.
22907
22908 1995-12-27 Richard Stallman <rms@gnu.org>
22909
22910 * src/bison.s1 (YYPARSE_PARAM_DECL):
22911 In C++, make it always null.
22912 (YYPARSE_PARAM_ARG): New macro.
22913 (yyparse): Use YYPARSE_PARAM_ARG.
22914
22915 1995-12-27 Richard Stallman <rms@gnu.org>
22916
22917 * bison.simple (YYPARSE_PARAM_DECL):
22918 In C++, make it always null.
22919 (YYPARSE_PARAM_ARG): New macro.
22920 (yyparse): Use YYPARSE_PARAM_ARG.
22921
22922 1995-11-29 Richard Stallman <rms@gnu.org>
22923
22924 * doc/bison.texinfo:
22925 Describe literal string tokens, %raw, %no_lines, %token_table.
22926
22927 1995-11-29 Daniel Hagerty <hag@gnu.org>
22928
22929 * doc/bison.texinfo: Fixed update date
22930
22931 1995-10-16 Richard Stallman <rms@gnu.org>
22932
22933 * src/version.c: Version 1.25.
22934
22935 1995-10-16 Richard Stallman <rms@gnu.org>
22936
22937 * NEWS: *** empty log message ***
22938
22939 1995-10-16 Richard Stallman <rms@gnu.org>
22940
22941 * doc/bison.1, doc/bison.rnh:
22942 Add new options.
22943
22944 1995-10-15 Richard Stallman <rms@gnu.org>
22945
22946 * src/vmsgetargs.c, src/getargs.c:
22947 Added -n, -k, and -raw switches.
22948 (noparserflag, toknumflag, rawtoknumflag): New variables.
22949
22950 * src/symtab.h (SALIAS):
22951 New #define for adding aliases to %token.
22952 (struct bucket): Added `alias' field.
22953
22954 * src/reduce.c (reduce_grammar):
22955 Revise error message.
22956 (print_notices): Remove final `.' from error message.
22957
22958 * src/reader.c (reader_output_yylsp):
22959 New function.
22960 (readgram): Use `#if 0' around code that accepted %command
22961 inside grammar rules: The documentation doesn't allow it,
22962 and it will fail since the %command processors scan for the next %.
22963 (parse_token_decl): Extended the %token
22964 declaration to allow a multi-character symbol as an alias.
22965 (parse_thong_decl): New function.
22966 (read_declarations): Added %thong declarations.
22967 (read_declarations): Handle NOOP to deal with allowing
22968 % declarations as another means to specify the flags.
22969 (readgram): Allow %prec prior to semantics embedded in a rule.
22970 (skip_to_char, read_declarations, copy_definition)
22971 (parse_token_decl, parse_start_decl, parse_type_decl)
22972 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22973 (get_type_name, copy_guard, copy_action, readgram)
22974 (get_type, packsymbols): Revised most error messages.
22975 Changed `fatal' to `warnxxx' to avoid aborting for error.
22976 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22977 (read_declarations): Improve the error message for
22978 an invalid character. Do not abort.
22979 (read_declarations, copy_guard, copy_action): Use
22980 printable_version to avoid unprintable characters in printed output.
22981 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22982 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22983 Allow the type of a non-terminal can be given
22984 more than once, as long as all specifications give the same type.
22985
22986 * src/output.c:
22987 (output_headers, output_trailers, output, output_gram)
22988 (output_rule_data): Implement noparserflag variable.
22989 Implement toknumflag variable.
22990 (output): Call reader_output_yylsp to output LTYPESTR.
22991
22992 * src/main.c (main):
22993 If reader sees an error, don't process the grammar.
22994 (fatals): Updated to not use VARARGS1.
22995 (printable_version, int_to_string, warn, warni, warns, warnss)
22996 (warnsss): New error reporting functions. Avoid abort for error.
22997
22998 * src/lex.h:
22999 Added THONG and NOOP for alias processing.
23000 Added SETOPT for the new code that allows setting options with %flags.
23001
23002 * src/lex.c:
23003 Include getopt.h. Add some extern decls.
23004 (safegetc): New function to deal with EOF gracefully.
23005 (literalchar); new function to deal with reading \ escapes.
23006 (lex): Use literalchar.
23007 (lex): Implemented "..." tokens.
23008 (literalchar, lex, parse_percent_token): Made tokenbuffer
23009 always contain the token. This includes growing the token
23010 buffer while reading an integer.
23011 (parse_percent_token): Replaced if-else statement with percent_table.
23012 (parse_percent_token): Added % declarations as another
23013 way to specify the flags -n, -l, and -r. Also added hooks for
23014 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23015 major changes to files.c.
23016 (lex) Retain in the incoming stream a character following
23017 an incorrect '/'.
23018 (skip_white_space, lex): Revised most error messages
23019 and changed fatal to warn to avoid aborting.
23020 (percent_table): Added %thong declarations.
23021
23022 * src/gram.h: Comment changes.
23023
23024 * src/files.c (openfiles, open_extra_files, done):
23025 Add faction flag
23026 and actfile file. Handle noparserflag. Both for -n switch.
23027
23028 * src/conflicts.c (resolve_sr_conflict):
23029 Remove use of alloca.
23030
23031 1995-06-01 Jim Meyering <meyering@gnu.org>
23032
23033 * doc/bison.texinfo: *** empty log message ***
23034
23035 1995-05-06 Richard Stallman <rms@gnu.org>
23036
23037 * src/bison.s1: Comment change.
23038
23039 1995-05-06 Richard Stallman <rms@gnu.org>
23040
23041 * bison.simple: Comment change.
23042
23043 1995-05-03 Richard Stallman <rms@gnu.org>
23044
23045 * src/version.c: Version now 1.24.
23046
23047 * src/bison.s1: Change distribution terms.
23048
23049 * src/version.c: Version now 1.23.
23050
23051 1995-05-03 Richard Stallman <rms@gnu.org>
23052
23053 * doc/bison.texinfo:
23054 Rewrite "Conditions for Using Bison".
23055 Update version to 1.24.
23056
23057 1995-05-03 Richard Stallman <rms@gnu.org>
23058
23059 * bison.simple: Change distribution terms.
23060
23061 1995-02-23 Richard Stallman <rms@gnu.org>
23062
23063 * src/files.c: Test __VMS_POSIX as well as VMS.
23064
23065 1995-02-14 Jim Meyering <meyering@gnu.org>
23066
23067 * src/bison.s1 (__yy_memcpy):
23068 Renamed from __yy_bcopy to avoid
23069 confusion. Reverse FROM and TO arguments to be consistent with
23070 those of memcpy.
23071
23072 1995-02-14 Jim Meyering <meyering@gnu.org>
23073
23074 * bison.simple (__yy_memcpy):
23075 Renamed from __yy_bcopy to avoid
23076 confusion. Reverse FROM and TO arguments to be consistent with
23077 those of memcpy.
23078
23079 1994-11-10 David J. MacKenzie <djm@gnu.org>
23080
23081 * NEWS: reformat
23082
23083 * NEWS: New file.
23084
23085 * Makefile.in (DISTFILES): Include NEWS.
23086
23087 * Makefile.in (DISTFILES):
23088 Include install-sh, not install.sh.
23089
23090 * configure.in: Update to Autoconf v2 macro names.
23091
23092 1994-10-05 David J. MacKenzie <djm@gnu.org>
23093
23094 * Makefile.in: fix typo
23095
23096 * Makefile.in (prefix, exec_prefix):
23097 Let configure set them.
23098
23099 1994-09-28 David J. MacKenzie <djm@gnu.org>
23100
23101 * Makefile.in: Set datadir to $(prefix)/share.
23102
23103 1994-09-15 Richard Stallman <rms@gnu.org>
23104
23105 * src/bison.s1:
23106 Update copyright notice and GPL version.
23107
23108 1994-09-15 Richard Stallman <rms@gnu.org>
23109
23110 * bison.simple:
23111 Update copyright notice and GPL version.
23112
23113 1994-07-12 Richard Stallman <rms@gnu.org>
23114
23115 * src/reduce.c, src/reader.c:
23116 entered into RCS
23117
23118 1994-05-05 David J. MacKenzie <djm@gnu.org>
23119
23120 * Makefile.in: entered into RCS
23121
23122 1994-03-26 Richard Stallman <rms@gnu.org>
23123
23124 * src/bison.s1: entered into RCS
23125
23126 1994-03-26 Richard Stallman <rms@gnu.org>
23127
23128 * bison.simple: entered into RCS
23129
23130 1994-03-25 Richard Stallman <rms@gnu.org>
23131
23132 * src/main.c: entered into RCS
23133
23134 1994-03-24 Richard Stallman <rms@gnu.org>
23135
23136 * src/conflicts.c: entered into RCS
23137
23138 1994-01-02 Richard Stallman <rms@gnu.org>
23139
23140 * Makefile.in: *** empty log message ***
23141
23142 1993-11-21 Richard Stallman <rms@gnu.org>
23143
23144 * src/bison.s1: *** empty log message ***
23145
23146 1993-11-21 Richard Stallman <rms@gnu.org>
23147
23148 * doc/bison.texinfo: entered into RCS
23149
23150 * doc/bison.texinfo: *** empty log message ***
23151
23152 1993-11-21 Richard Stallman <rms@gnu.org>
23153
23154 * bison.simple: *** empty log message ***
23155
23156 1993-10-25 David J. MacKenzie <djm@gnu.org>
23157
23158 * doc/bison.texinfo: *** empty log message ***
23159
23160 1993-10-19 Richard Stallman <rms@gnu.org>
23161
23162 * src/bison.s1: *** empty log message ***
23163
23164 1993-10-19 Richard Stallman <rms@gnu.org>
23165
23166 * bison.simple: *** empty log message ***
23167
23168 1993-10-14 Richard Stallman <rms@gnu.org>
23169
23170 * src/bison.s1: *** empty log message ***
23171
23172 1993-10-14 Richard Stallman <rms@gnu.org>
23173
23174 * bison.simple: *** empty log message ***
23175
23176 1993-09-14 David J. MacKenzie <djm@gnu.org>
23177
23178 * doc/bison.texinfo: *** empty log message ***
23179
23180 1993-09-13 Noah Friedman <friedman@gnu.org>
23181
23182 * Makefile.in: *** empty log message ***
23183
23184 1993-09-10 Richard Stallman <rms@gnu.org>
23185
23186 * src/conflicts.c: *** empty log message ***
23187
23188 * src/system.h: entered into RCS
23189
23190 1993-09-10 Richard Stallman <rms@gnu.org>
23191
23192 * doc/bison.1: entered into RCS
23193
23194 1993-09-06 Noah Friedman <friedman@gnu.org>
23195
23196 * src/version.c: entered into RCS
23197
23198 1993-09-06 Noah Friedman <friedman@gnu.org>
23199
23200 * Makefile.in: *** empty log message ***
23201
23202 1993-07-30 David J. MacKenzie <djm@gnu.org>
23203
23204 * Makefile.in: *** empty log message ***
23205
23206 1993-07-24 Richard Stallman <rms@gnu.org>
23207
23208 * src/bison.s1: *** empty log message ***
23209
23210 1993-07-24 Richard Stallman <rms@gnu.org>
23211
23212 * bison.simple: *** empty log message ***
23213
23214 1993-07-08 David J. MacKenzie <djm@gnu.org>
23215
23216 * Makefile.in: *** empty log message ***
23217
23218 1993-07-04 Richard Stallman <rms@gnu.org>
23219
23220 * src/bison.s1: *** empty log message ***
23221
23222 1993-07-04 Richard Stallman <rms@gnu.org>
23223
23224 * bison.simple: *** empty log message ***
23225
23226 1993-06-26 David J. MacKenzie <djm@gnu.org>
23227
23228 * src/getargs.c: entered into RCS
23229
23230 1993-06-26 David J. MacKenzie <djm@gnu.org>
23231
23232 * doc/bison.texinfo: *** empty log message ***
23233
23234 * doc/bison.1: New file.
23235
23236 1993-06-25 Richard Stallman <rms@gnu.org>
23237
23238 * src/getargs.c: New file.
23239
23240 1993-06-16 Richard Stallman <rms@gnu.org>
23241
23242 * src/bison.s1: *** empty log message ***
23243
23244 1993-06-16 Richard Stallman <rms@gnu.org>
23245
23246 * bison.simple: *** empty log message ***
23247
23248 1993-06-03 Richard Stallman <rms@gnu.org>
23249
23250 * src/bison.s1: New file.
23251
23252 1993-06-03 Richard Stallman <rms@gnu.org>
23253
23254 * doc/bison.texinfo: *** empty log message ***
23255
23256 1993-06-03 Richard Stallman <rms@gnu.org>
23257
23258 * bison.simple: New file.
23259
23260 1993-05-19 Richard Stallman <rms@gnu.org>
23261
23262 * doc/bison.texinfo: New file.
23263
23264 1993-05-07 Noah Friedman <friedman@gnu.org>
23265
23266 * Makefile.in: *** empty log message ***
23267
23268 1993-04-28 Noah Friedman <friedman@gnu.org>
23269
23270 * src/reader.c: *** empty log message ***
23271
23272 1993-04-23 Noah Friedman <friedman@gnu.org>
23273
23274 * src/alloc.h: entered into RCS
23275
23276 1993-04-20 David J. MacKenzie <djm@gnu.org>
23277
23278 * src/version.c: *** empty log message ***
23279
23280 * src/files.c, src/allocate.c:
23281 entered into RCS
23282
23283 * src/reader.c: *** empty log message ***
23284
23285 * src/lex.c: entered into RCS
23286
23287 * src/conflicts.c: New file.
23288
23289 * src/symtab.c: entered into RCS
23290
23291 * src/alloc.h: New file.
23292
23293 * src/LR0.c: entered into RCS
23294
23295 1993-04-18 Noah Friedman <friedman@gnu.org>
23296
23297 * src/reader.c: New file.
23298
23299 * src/version.c: *** empty log message ***
23300
23301 1993-04-18 Noah Friedman <friedman@gnu.org>
23302
23303 * Makefile.in: *** empty log message ***
23304
23305 1993-04-17 Noah Friedman <friedman@gnu.org>
23306
23307 * Makefile.in: *** empty log message ***
23308
23309 1993-04-15 Richard Stallman <rms@gnu.org>
23310
23311 * src/main.c, src/files.c:
23312 New file.
23313
23314 1993-04-15 Noah Friedman <friedman@gnu.org>
23315
23316 * configure.in: entered into RCS
23317
23318 * configure.in: *** empty log message ***
23319
23320 * configure.in: New file.
23321
23322 1993-04-14 Richard Stallman <rms@gnu.org>
23323
23324 * Makefile.in: New file.
23325
23326 1993-04-13 Richard Stallman <rms@gnu.org>
23327
23328 * src/version.c: New file.
23329
23330 1993-03-25 Richard Stallman <rms@gnu.org>
23331
23332 * src/output.c: entered into RCS
23333
23334 1992-09-25 Richard Stallman <rms@gnu.org>
23335
23336 * configure.bat: entered into RCS
23337
23338 1992-06-22 Richard Stallman <rms@gnu.org>
23339
23340 * src/vmsgetargs.c: entered into RCS
23341
23342 1992-06-22 Richard Stallman <rms@gnu.org>
23343
23344 * doc/bison.rnh: entered into RCS
23345
23346 1992-04-20 David J. MacKenzie <djm@gnu.org>
23347
23348 * README: entered into RCS
23349
23350 1992-01-22 Richard Stallman <rms@gnu.org>
23351
23352 * src/machine.h: entered into RCS
23353
23354 1991-12-21 Richard Stallman <rms@gnu.org>
23355
23356 * src/lalr.c, src/closure.c:
23357 entered into RCS
23358
23359 1991-12-20 Richard Stallman <rms@gnu.org>
23360
23361 * src/state.h: entered into RCS
23362
23363 1991-12-18 Richard Stallman <rms@gnu.org>
23364
23365 * src/print.c, src/nullable.c, src/derives.c:
23366 entered into RCS
23367
23368 1991-11-03 David J. MacKenzie <djm@gnu.org>
23369
23370 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23371 entered into RCS
23372
23373 1988-09-09 Richard Stallman <rms@gnu.org>
23374
23375 * src/bison.hairy: entered into RCS
23376
23377 1987-12-16 Richard Stallman <rms@gnu.org>
23378
23379 * REFERENCES: entered into RCS
23380
23381
23382 -----
23383
23384 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23385 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23386 2008, 2009, 2010 Free Software Foundation, Inc.
23387
23388 Copying and distribution of this file, with or without
23389 modification, are permitted provided the copyright notice and this
23390 notice are preserved.