]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Do not use date ranges in copyright notices.
[bison.git] / ChangeLog
... / ...
CommitLineData
12010-06-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 Do not use date ranges in copyright notices.
4 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
5
6 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
7 * TODO, bootstrap, bootstrap.conf:
8 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
9 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
10 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
11 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
12 * data/lalr1.java, data/local.mk, data/location.cc:
13 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
14 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
15 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
16 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
17 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
18 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
19 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
20 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
21 * examples/calc++/Makefile.am, examples/extexi:
22 * examples/local.mk, lib/abitset.c, lib/abitset.h:
23 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
24 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
25 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
26 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
27 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
28 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
29 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
30 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
31 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
32 * src/AnnotationList.c, src/AnnotationList.h:
33 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
34 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
35 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
36 * src/complain.h, src/conflicts.c, src/conflicts.h:
37 * src/derives.c, src/derives.h, src/files.c, src/files.h:
38 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
39 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
40 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
41 * src/location.c, src/location.h, src/main.c:
42 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
43 * src/named-ref.h, src/nullable.c, src/nullable.h:
44 * src/output.c, src/output.h, src/parse-gram.y:
45 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
46 * src/print_graph.c, src/print_graph.h, src/reader.c:
47 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
48 * src/relation.h, src/scan-code.h, src/scan-code.l:
49 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
50 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
51 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
52 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
53 * tests/actions.at, tests/atlocal.in, tests/c++.at:
54 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
55 * tests/existing.at, tests/glr-regression.at:
56 * tests/headers.at, tests/input.at, tests/java.at:
57 * tests/local.at, tests/local.mk, tests/named-refs.at:
58 * tests/output.at, tests/push.at, tests/reduce.at:
59 * tests/regression.at, tests/sets.at, tests/skeletons.at:
60 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
61 Don't use date ranges in copyright notices.
62
632010-05-11 Akim Demaille <demaille@gostai.com>
64
65 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
66 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
67 header file to the implementation file, after the user %code
68 sections.
69 * NEWS (2.5): Document this.
70
712010-05-11 Akim Demaille <demaille@gostai.com>
72
73 doc: please Emacs.
74 * doc/bison.texinfo (Local Variables): Move this after the
75 LocalWords, since the latter are looked for in the whole document,
76 while the former are looked for only at its end.
77 Require american spell checking.
78
792010-05-10 Akim Demaille <demaille@gostai.com>
80
81 doc: fix lalr1.cc documentation.
82 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
83 (C++ Bison Interface): Fix lalr1.cc skeleton name.
84 (C++ Parser Interface): Fix semantic_type and location_type names.
85 Document yy::parser::token.
86 Reported by Jerry Quinn.
87
882010-05-10 Akim Demaille <demaille@gostai.com>
89
90 c++: use YYRHSLOC.
91 * data/lalr1.cc (YYRHSLOC): New.
92 (YYLLOC_DEFAULT): Use it.
93 * data/glr.cc: If location_type was user defined, do not include
94 location.hh, and do not produce location.hh and position.hh.
95 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
96 Check that glr.cc supports user defined location_type.
97 * NEWS: Document this.
98
992010-05-07 Akim Demaille <demaille@gostai.com>
100
101 doc: fix typo.
102 * tests/synclines.at: here.
103
1042010-05-04 Akim Demaille <demaille@gostai.com>
105
106 tests: enhance AT_SYNCLINES_COMPILE.
107 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
108 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
109 taken care of in AT_SYNCLINES_COMPILE.
110
1112010-05-04 Akim Demaille <demaille@gostai.com>
112
113 lalr1.cc: don't generate location.hh when location_type is defined
114 * data/bison.m4 (b4_percent_define_get): Accept a default value.
115 * data/c++.m4: Do not provide a default value for the %define
116 variable location_type, rather, use b4_percent_define_get with a
117 default argument where its value is needed.
118 * data/lalr1.cc: Do not load location.cc (which outputs both
119 location.hh and position.hh) if the user defined location_type.
120 Do not include location.hh either.
121
1222010-05-04 Akim Demaille <demaille@gostai.com>
123
124 lalr1.cc: minor refactoring.
125 * data/lalr1.cc: Don't issue empty namespaces.
126
1272010-05-04 Akim Demaille <demaille@gostai.com>
128
129 tests: fix %printer.
130 Currently, there is no check that %printer ... <foo> (nor
131 %destructor) is about an existing <foo> type. This C++ test had
132 it wrong (<::std::string> vs. <std::string>).
133
134 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
135 pretty-printing of lists into something better for parser traces.
136 Update the expected output.
137 Fix correspondance between %type/%token and %printer.
138
1392010-05-04 Akim Demaille <demaille@gostai.com>
140
141 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
142 * tests/calc.at (Span): Instead of begin/end, as in the built-in
143 location class, use first and last.
144 Define YYLLOC_DEFAULT to adjust to these changes.
145 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
146 location_type changes.
147
1482010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
149
150 tests: fix maintainer-xml-check.
151 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
152 Update output to include comments now produced by --graph.
153 (xsl:template match="automaton"): As for --graph, name the
154 digraph after the grammar file.
155 * src/print-xml.c (escape_bufs): Enlarge array.
156 (print_xml): Add bug-report and url attributes to
157 bison-xml-report element.
158
1592010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
160
161 In DOT output, convert from "/*" comments to "//" comments.
162 This handles the possibility that a "*/" might appear in
163 variable portions of those comments at some point in the future.
164 * src/graphviz.c (start_graph): Implement.
165
1662010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
167
168 Document that undefined %prec identifier warnings will remain.
169 * NEWS (2.4.3): Here.
170 (2.4.2): Here.
171
1722010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
173
174 Revert 2009-12-30 change for undefined %prec token complaints.
175 That is, keep them as warnings because that should be sufficient
176 to satisfy POSIX without creating backward compatibility issues.
177 Suggested by Richard Stallman at
178 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
179 * NEWS (2.5): Remove mention of complaint.
180 * src/reader.c (grammar_rule_check): Convert complaint back to
181 warning.
182 * tests/input.at (%prec's token must be defined): Update.
183
1842010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
185
186 build: don't require src/bison during bootstrap.
187 Suggested by Eric Blake at
188 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
189 * bootstrap.conf (bootstrap_epilogue): New function to make sure
190 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
191
1922010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
193
194 i18n: fix untranslatable string.
195 Reported by Goran Uddeborg at
196 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
197 * src/muscle-tab.c (muscle_percent_define_insert): Here.
198
1992010-04-13 Akim Demaille <demaille@gostai.com>
200
201 tests: calc: minor refactoring.
202 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
203
2042010-04-13 Akim Demaille <demaille@gostai.com>
205
206 tests: calc: simplify location management.
207 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
208 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
209 define the appropriate AT_LOC accessors.
210 * tests/calc.at: Use AT_LOC accessors.
211
2122010-04-13 Akim Demaille <demaille@gostai.com>
213
214 test location_type.
215 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
216 Define AT_LOCATION_TYPE_IF.
217 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
218 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
219 used, provide a user location type and use it.
220 (Simple LALR1 C++ Calculator): Add a test case for location_type.
221
2222010-04-13 Akim Demaille <demaille@gostai.com>
223
224 tests: check fclose's return value.
225 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
226
2272010-04-13 Akim Demaille <demaille@gostai.com>
228
229 tests: don't depend on the actual location type.
230 * tests/calc.at: Use yy::parser::location_type rather than
231 yy::location, since the former is always right, and might point to
232 another type than the latter.
233
2342010-04-13 Akim Demaille <demaille@gostai.com>
235
236 formatting changes.
237 * tests/calc.at: Formatting changes.
238
2392010-04-13 Akim Demaille <demaille@gostai.com>
240
241 lalr1.cc: remove useless forward declaration.
242 * data/lalr1.cc: Include location.hh before stack.hh.
243 Remove the useless forward declarations of position and location.
244 Reported by Chris Morley.
245 * data/glr.cc: Likewise.
246
2472010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
248
249 * NEWS (2.4.3): Mention fix for Sun Studio C++.
250
2512010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
252
253 tests: fix for newer Sun Studio C++.
254 Reported by Dagobert Michelsen at
255 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
256 * THANKS (Dagobert Michelsen): Add.
257 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
258 Autoconf macro for handling the restrict keyword.
259 * gnulib: Update to latest, which no longer overrides that macro
260 from Autoconf.
261
2622010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
263
264 portability: fix pointer arithmetic to conform to C standard.
265 Reported by Tys Lefering at
266 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
267 This fix is already implemented in glr.c and does not apply to
268 lalr1.java.
269 * data/lalr1.cc (yy::parser::parse): Increase size of
270 yyerror_range and adjust subscripting so you don't have to
271 subtract one from the beginning of the array.
272 * data/yacc.c (b4_declare_parser_state_variables,
273 yyparse, yypush_parse): Likewise.
274
2752010-04-05 Akim Demaille <demaille@gostai.com>
276
277 remove useless include.
278 * src/graphviz.h: Don't include stdbool.h.
279
2802010-04-05 Akim Demaille <demaille@gostai.com>
281
282 graph: sign the output file.
283 * src/graphviz.c (start_graph): Issue comments about Bison.
284 Suggested by Tys Lefering.
285
2862010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
287
288 portability: fix test suite for GCC 4.5's new #error message.
289 Reported by Tys Lefering at
290 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
291 * NEWS (2.4.3): Mention.
292 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
293
2942010-03-30 Akim Demaille <demaille@gostai.com>
295
296 fix comments.
297 * src/graphviz.h: Add missing license notice.
298 Document.
299
3002010-03-25 Akim Demaille <demaille@gostai.com>
301
302 tests: fix 250: parse.error=verbose overflow.
303 * tests/regression.at (parse.error=verbose overflow): Avoid the
304 double inclusion of stdlib.h as it triggers hard errors.
305
3062010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
307
308 portability: fix for BSD make.
309 Reported by Johan van Selst at
310 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
311 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
312 this dependency list as in package.m4's target rule.
313
3142010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
315
316 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
317 Reported by Johan van Selst at
318 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
319 * NEWS (2.4.3): New.
320 * THANKS (Johan van Selst): Add.
321 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
322 targets so that gnulib's new c++defs.h is matched.
323 * gnulib: Update to latest.
324
3252010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
326
327 maint: update for changes to gnulib's announce-gen.
328 * HACKING (Announce): RELEASE_TYPE=major must now be written
329 RELEASE_TYPE=stable.
330
3312010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
332
333 Version 2.4.2.
334 * NEWS (2.4.2): Set version and date. For the recent test suite
335 portability fixes, don't be so optimistic about their success
336 given the lack of feedback on the affected platforms.
337
3382010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
339
340 tests: fix maintainer-xml-check for recent changes.
341 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
342 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
343 output file whose name conflicts with a previous output file
344 is now never generated.
345
3462010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
347
348 portability: fix several issues with M4 subprocess.
349
350 M4's output pipe was not being drained upon fatal errors during
351 scan_skel. As a result, broken-pipe messages from M4 were seen
352 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
353 failure in the test suite. The problem was that, on platforms
354 where the default disposition for SIGPIPE is ignore instead of
355 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
356 then reported it. However, there's some sort of race condition,
357 because the new test group occasionally succeeded.
358 Reported by Albert Chin at
359 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
360
361 There were also problems with the test suite livelocking on
362 Tru64 5.1b. Reported by Didier Godefroy at
363 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
364 Switching to create_pipe_bidi suggested by Akim Demaille.
365
366 To attempt to solve both of these problems, switch to gnulib's
367 create_pipe_bidi and register M4 process as a slave. Along the
368 way, clean up file name conflict handling, which was affected by
369 the broken-pipe problem before the switch.
370 * NEWS (2.4.2): Document.
371 * THANKS (Didier Godefroy): Add.
372 * bootstrap.conf (gnulib_modules): Add pipe.
373 * gnulib: Update to latest to make sure we have all the latest
374 fixes.
375 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
376 subpipe.c.
377 * po/POTFILES.in (lib/subpipe.c): Remove.
378 * src/files.c (compute_output_file_names): Update invocations
379 of output_file_name_check.
380 (output_file_name_check): In the case that the grammar file
381 would be overwritten, use complain instead of fatal, but replace
382 the output file name with /dev/null. Use the /dev/null solution
383 for the case of two conflicting output files as well because it
384 seems safer in case Bison one day tries to open both files at
385 the same time.
386 * src/files.h (output_file_name_check): Update prototype.
387 * src/output.c (output_skeleton): Use create_pipe_bidi and
388 wait_subprocess. Assert that scan_skel completely drains the
389 pipe.
390 * src/scan-skel.l (at_directive_perform): Update
391 output_file_name_check invocation.
392 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
393 grammar file actually isn't overwritten.
394 (Conflicting output files: -o foo.y): Update expected output.
395 * tests/skeletons.at (Fatal errors but M4 continues producing
396 output): New test group.
397
3982010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
399
400 Update POTFILES.
401 * HACKING (Release Procedure): Add reminder about keeping
402 POTFILES files up-to-date.
403 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
404
4052010-02-01 Joel E. Denny <jdenny@clemson.edu>
406
407 Code cleanup.
408 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
409 which is already defined in atconfig.
410
4112010-01-22 Joel E. Denny <jdenny@clemson.edu>
412
413 tests: fix missing include caught by g++ 4.4.1.
414 Reported by Tys Lefering.
415 * HACKING (Release checks): Add note about trying a recent GCC.
416 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
417 cstdlib for abort.
418 (_AT_DATA_EXPECT2_Y): Likewise.
419
4202010-01-21 Joel E. Denny <jdenny@clemson.edu>
421
422 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
423
4242010-01-21 Joel E. Denny <jdenny@clemson.edu>
425
426 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
427 * HACKING (Release Procedure): Update notes on copyright years.
428 * Makefile.am (update-package-copyright-year): New target rule.
429 * build-aux/update-package-copyright-year: New file.
430 * cfg.mk (update-copyright): Add update-package-copyright-year
431 as a dependency.
432
4332010-01-19 Joel E. Denny <jdenny@clemson.edu>
434
435 * bootstrap: Import improvements from latest gnulib.
436
4372010-01-19 Joel E. Denny <jdenny@clemson.edu>
438
439 build: require Automake 1.11.1 to avoid a security flaw.
440 * HACKING (Release Procedure): Don't document Automake security
441 flaw here.
442 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
443 why here.
444
4452010-01-19 Joel E. Denny <jdenny@clemson.edu>
446
447 gnulib: update to latest.
448
4492010-01-19 Joel E. Denny <jdenny@clemson.edu>
450
451 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
452
4532010-01-15 Joel E. Denny <jdenny@clemson.edu>
454
455 Thank the developer of the initial push parser implementation.
456 This unfortunate oversight is several years old.
457 * THANKS (Odd Arild Olsen): Add.
458
4592010-01-04 Joel E. Denny <jdenny@clemson.edu>
460
461 Fix some comments concerning LR(0) versus LALR(1).
462
463 Stop equating LR(0) with nondeterminism and LALR(1) with
464 determinism. That is, if all states are consistent, then LR(0)
465 tables are deterministic. On the other hand, LALR(1) tables
466 might be nondeterministic before conflict resolution, and GLR
467 permits LALR(1) tables to remain nondeterministic.
468 * src/LR0.c, src/LR0.h: Here.
469 * src/lalr.c, src/lalr.h: Here.
470 * src/main.c (main): Here.
471 * src/state.c, src/state.h: Here.
472
473 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
474 parser tables.
475
4762010-01-04 Joel E. Denny <jdenny@clemson.edu>
477
478 maint: run "make update-copyright"
479
4802009-12-30 Joel E. Denny <jdenny@clemson.edu>
481
482 POSIX: complain if %prec's token was not defined.
483 * NEWS (2.5): Document.
484 * src/reader.c (grammar_rule_check): Convert warning to
485 complaint.
486 * tests/input.at (%prec's token must be defined): Update.
487
4882009-12-30 Joel E. Denny <jdenny@clemson.edu>
489
490 POSIX: warn if %prec's token was not defined.
491 Reported by Florian Krohm at
492 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
493 * NEWS (2.4.2): Document.
494 * src/reader.c (grammar_rule_check): Implement.
495 (grammar_current_rule_prec_set): Add comments explaining that we
496 here assume a %prec identifier is a token, but we still manage
497 to support POSIX.
498 * tests/input.at (%prec's token must be defined): New test
499 group.
500
5012009-12-31 Joel E. Denny <jdenny@clemson.edu>
502
503 * HACKING (Release Procedure): Recommend a secure automake.
504
5052009-12-29 Joel E. Denny <jdenny@clemson.edu>
506
507 portability: `<' and `>' are not always defined on addresses.
508 Specifically, don't sort objects by their memory addresses when
509 they're not allocated in the same array or other object. Though
510 I haven't found a test case where that fails on my platform, C
511 says the behavior is undefined.
512 * src/AnnotationList.c (AnnotationList__insertInto): Remove
513 FIXME. Use new id field of InadequacyList nodes rather than
514 their memory addresses when sorting.
515 (AnnotationList__compute_from_inadequacies): Add
516 inadequacy_list_node_count argument to pass to
517 InadequacyList__new_conflict.
518 * src/AnnotationList.h
519 (AnnotationList__compute_from_inadequacies): Update prototype
520 and documentation for new argument.
521 * src/InadequacyList.c (InadequacyList__new_conflict): Add
522 node_count argument and use it to assign a unique ID.
523 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
524 (InadequacyList): Add id field.
525 (InadequacyList__new_conflict): Update prototype and
526 documentation for new argument.
527 * src/ielr.c (ielr_compute_annotation_lists): Update
528 AnnotationList__compute_from_inadequacies invocation.
529
5302009-12-20 Joel E. Denny <jdenny@clemson.edu>
531
532 Fix handling of yychar manipulation in user semantic actions.
533 The problem was that yacc.c didn't always update the yychar
534 translation afterwards. However, other skeletons appear to be
535 fine. glr.c appears to already translate yychar before every
536 use. lalr1.cc does not define yychar and does not document its
537 replacement, yyla, for users. It does provide yyclearin, but
538 that does not manipulate yyla and thus requires no translation
539 update. In lalr1.java, yychar is out of scope during semantic
540 actions.
541 * NEWS (2.5): Document.
542 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
543 yytoken here.
544 (yyparse, yypush_parse): Instead, translate before every use of
545 yytoken, and add comments explaining this approach.
546 * tests/actions.at (Destroying lookahead assigned by semantic
547 action): New test group checking that translation happens before
548 lookahead destructor calls at parser return. Previously,
549 incorrect destructors were called.
550 * tests/conflicts.at (parse.error=verbose and consistent
551 errors): New test group checking that translation happens at
552 syntax error detection before the associated verbose error
553 message and the associated lookahead destructor calls. While
554 the destructor call is fixed by this patch, the verbose error
555 message is currently incorrect due to another bug (see
556 comments in test group), so this is an expected failure for now.
557
5582009-12-21 Joel E. Denny <jdenny@clemson.edu>
559
560 YYFAIL: warn about uses and remove from lalr1.java.
561 * NEWS (2.5): Document.
562 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
563 and make it private. Update all uses.
564 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
565
5662009-12-21 Joel E. Denny <jdenny@clemson.edu>
567
568 YYFAIL: deprecate.
569 * NEWS (2.4.2): Document deprecation and the phase-out plan.
570 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
571 deprecation.
572 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
573 YYFAIL from GCC cpp's -Wunused-macros.
574 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
575 documentation.
576 (LocalWords): Remove YYFAIL.
577
5782009-12-20 Joel E. Denny <jdenny@clemson.edu>
579
580 tests: cleanup.
581 * tests/c++.at (Syntax error discarding no lookahead): Don't
582 ignore stderr. Instead, eliminate remaining warnings.
583
5842009-12-18 Joel E. Denny <jdenny@clemson.edu>
585
586 lalr1.cc: don't discard non-existent lookahead on syntax error.
587 * data/lalr1.cc (parser::parse): Check yyempty first.
588 * tests/c++.at (Syntax error discarding no lookahead): New test
589 group.
590
5912009-12-17 Joel E. Denny <jdenny@clemson.edu>
592
593 Code cleanup.
594 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
595 function, which is no longer used.
596
5972009-12-16 Joel E. Denny <jdenny@clemson.edu>
598
599 Add gcc's -Wundef to test suite and fix another warning from it.
600 * NEWS (2.4.2): Update description of -Wundef fix.
601 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
602 (WARN_CFLAGS_TEST): New substitution.
603 * data/glr.c: Avoid warning about __STRICT_ANSI__.
604 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
605 WARN_CFLAGS.
606 (NO_WERROR_CFLAGS): Likewise.
607 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
608
6092009-12-16 Joel E. Denny <jdenny@clemson.edu>
610
611 * data/yacc.c: Reformat m4 a little.
612
6132009-12-16 Joel E. Denny <jdenny@clemson.edu>
614
615 Document gcc -Wundef fix.
616 * NEWS (2.4.2): Here.
617 * THANKS (Jonathan Nieder): Add.
618
6192009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
620
621 Simplify y.tab.c when location tracking is disabled.
622 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
623 tracking is not enabled. Instead, unconditionally define
624 YY_LOCATION_PRINT as a no-op for backward compatibility.
625
6262009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
627
628 Avoid warnings from gcc -Wundef y.tab.c.
629 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
630 defined before using them.
631 * data/lalr1.cc: Likewise.
632 * data/yacc.c: Likewise.
633
6342009-12-15 Joel E. Denny <jdenny@clemson.edu>
635
636 autoconf: update to latest for fix of M4 detection.
637 Reported by Eric Blake.
638 * submodules/autoconf: Update.
639
6402009-12-15 Joel E. Denny <jdenny@clemson.edu>
641
642 portability: use -DGNULIB_POSIXCHECK.
643 Reported by Eric Blake. See discussions at
644 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
645 and
646 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
647 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
648 * bootstrap.conf (gnulib_modules): Add all the printf modules
649 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
650 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
651 (excluded_files): Remove m4/printf-posix.m4.
652 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
653 lib/libbison.a so gnulib libraries can be linked.
654
6552009-12-15 Joel E. Denny <jdenny@clemson.edu>
656
657 gnulib: update for fix of fprintf-posix, which we'll use soon.
658 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
659 targets so that gnulib's new arg-nonnull.h and link-warning.h
660 are matched.
661 * gnulib: Update.
662
6632009-12-14 Joel E. Denny <jdenny@clemson.edu>
664
665 Enable assertion output and --disable-assert for configure.
666 * bootstrap.conf (gnulib_modules): Add assert module.
667 * src/system.h (aver): Define as assert, and summarize the
668 discussion on this issue.
669
6702009-12-14 Joel E. Denny <jdenny@clemson.edu>
671
672 Expand GLR acronym in summary of Bison.
673 Based on discussion with Akim Demaille starting at
674 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
675 * doc/bison.texinfo (Introduction): Here.
676 * src/getargs.c (usage): Here.
677
6782009-10-03 Alex Rozenman <rozenman@gmail.com>
679
680 Document named references.
681 * doc/bison.texinfo (Actions): Add new example and xref to
682 Using Named References node.
683 (Using Named References): New node.
684
6852009-10-16 Joel E. Denny <jdenny@clemson.edu>
686
687 cleanup.
688 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
689 of char*.
690 (Sbitset__isEmpty): Use Sbitset instead of char*.
691 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
692 instead of char. This helps to avoid casting errors.
693 (Sbitset__or): Use Sbitset instead of char*.
694
6952009-10-16 Joel E. Denny <jdenny@clemson.edu>
696
697 portability: don't assume 8-bit bytes.
698 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
699 * src/Sbitset.h (Sbitset__nbytes): Here.
700 (Sbitset__byteAddress): Here.
701 (Sbitset__bit_mask): Here.
702 (Sbitset__last_byte_mask): Here.
703 (Sbitset__ones): Here.
704 (SBITSET__FOR_EACH): Here.
705
7062009-10-11 Joel E. Denny <jdenny@clemson.edu>
707
708 portability: use va_start and va_end in the same function.
709 * src/complain.c (error_message): Move va_end from here...
710 (ERROR_MESSAGE): ... to here.
711
7122009-10-08 Joel E. Denny <jdenny@clemson.edu>
713
714 * data/bison.m4: Update comments for rename to muscle-tab.h.
715
7162009-10-07 Joel E. Denny <jdenny@clemson.edu>
717
718 Minor code cleanup.
719 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
720 replace all uses with UNIQSTR_CONCAT.
721 * src/uniqstr.c (uniqstr_vsprintf): New function.
722 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
723 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
724 macros.
725
7262009-10-06 Joel E. Denny <jdenny@clemson.edu>
727
728 * TODO (Complaint submessage indentation): New.
729
7302009-10-04 Joel E. Denny <jdenny@clemson.edu>
731
732 Minor code cleanup.
733 * src/parse-gram.y: Clean up sorting of declarations.
734 Use types to simplify %printer declarations where possible.
735 Provide %printer for BRACKETED_ID and symbol.prec.
736 * src/symtab.c: Whitespace change.
737
7382009-10-04 Joel E. Denny <jdenny@clemson.edu>
739
740 tests: skip tests of file names that platform does not support.
741 Reported by Michael Raskin at
742 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
743 * THANKS (Michael Raskin): Add.
744 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
745 to fail at least for file names containing ":" or "\".
746
7472009-09-23 Joel E. Denny <jdenny@clemson.edu>
748
749 yysyntax_error: avoid duplicate lookahead collection.
750 Except when memory reallocation is required, this change
751 eliminates the need to invoke yysyntax_error twice and thus to
752 repeat the collection of lookaheads. It also prepares for
753 future extensions that will make those repetitions more
754 expensive and that will require additional memory management in
755 yysyntax_error. Finally, it fixes an obscure bug already
756 exercised in the test suite.
757 * data/yacc.c (yysyntax_error): Add arguments for message
758 buffer variables stored in the parser. Instead of size, return
759 status similar to yyparse status but indicating success of
760 message creation. Other than the actual reallocation of the
761 message buffer, import and clean up memory management code
762 from...
763 (yyparse, yypush_parse): ... here.
764 * tests/regression.at (parse.error=verbose overflow): No longer
765 an expected failure.
766
7672009-09-23 Joel E. Denny <jdenny@clemson.edu>
768
769 yysyntax_error: test memory management more.
770 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
771 * tests/regression.at (parse.error=verbose and
772 YYSTACK_USE_ALLOCA): New test group.
773 (parse.error=verbose overflow): New test group that reveals an
774 obscure bug. Expected fail for now.
775
7762009-10-04 Joel E. Denny <jdenny@clemson.edu>
777
778 benchmarks: use %debug consistently among grammars.
779 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
780 %debug by default. It can affect the timings even if yydebug=0.
781 (generate_grammar_calc): For consistency with other grammars,
782 use YYDEBUG environment variable to set yydebug.
783
7842009-10-03 Joel E. Denny <jdenny@clemson.edu>
785
786 Remove dead code.
787 * src/symtab.c (symbol_pack): Here because every symbol's number
788 is always defined by this time.
789
7902009-10-03 Alex Rozenman <rozenman@gmail.com>
791
792 Add additional space after periods in NEWS.
793 * NEWS (2.5): here.
794
7952009-09-29 Joel E. Denny <jdenny@clemson.edu>
796
797 Use the correct conversion specifier for size_t.
798 Reported by Jim Meyering.
799 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
800 because Sbitset__Index is size_t.
801 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
802
8032009-09-27 Joel E. Denny <jdenny@clemson.edu>
804
805 tests: don't abuse AT_BISON_CHECK.
806 * tests/regression.at (parse-gram.y: LALR = IELR): Move
807 additional shell commands outside of AT_BISON_CHECK.
808
8092009-09-26 Joel E. Denny <jdenny@clemson.edu>
810
811 tests: check that parse-gram.y's IELR and LALR are identical.
812 * tests/atlocal.in (abs_top_srcdir): New shell variable.
813 * tests/regression.at (parse-gram.y: LALR = IELR): New test
814 group.
815
8162009-09-19 Alex Rozenman <rozenman@gmail.com>
817
818 Keep sub-messages aligned. Fix strings for translation.
819 * src/location.h (location_print): Add return value.
820 * src/location.c (location_print): Return number of printed
821 characters.
822 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
823 new functions.
824 * src/complain.cpp (indent_ptr): New static variable.
825 (error_message, complain_at_indent, warn_at_indent): Implement
826 the alignment mechanism.
827 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
828 for translations. Use new alignment mechanism.
829 * tests/named-ref.at: Adjust test-cases.
830 * NEWS (2.5): Add an announcement about named references.
831
8322009-09-17 Akim Demaille <demaille@gostai.com>
833
834 doc: fixes.
835 * doc/bison.texinfo: here.
836 Reported by Alex Rozenman.
837
8382009-09-16 Akim Demaille <demaille@gostai.com>
839
840 doc: lalr1.cc and variants.
841 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
842 "variant" %define variables.
843 (C++ Semantic Values): Split into...
844 (C++ Unions, C++ Variants): these.
845 The latter is new.
846 (C++ Parser Interface): Fix type names.
847 Document parser::syntax_error.
848 Document the fact that locations are not mandatory.
849 (C++ Scanner Interface): Split into...
850 (Split Symbols, Complete Symbols): these.
851 The later is new.
852 (Calc++ Parsing Driver): Use variants.
853 Add more comments.
854 Adjust style.
855 (Calc++ Parser): Declare all the tokens, no
856 longer accept raw characters.
857 Remove %union.
858 Adjust types and printers.
859 Remove destructors.
860 (Calc++ Scanner): Use make_<SYMBOL> functions.
861 Use strerror in error message.
862
8632009-09-16 Akim Demaille <demaille@gostai.com>
864
865 doc: spell checking.
866 * doc/bison.texinfo: here.
867
8682009-09-16 Akim Demaille <demaille@gostai.com>
869
870 doc: comment changes.
871 * doc/bison.texinfo: Comment changes.
872
8732009-09-16 Akim Demaille <demaille@gostai.com>
874
875 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
876 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
877 constructor to take a token_type instead of the (internal) symbol
878 number.
879 Call yytranslate_.
880 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
881 don't call yytranslate_ here.
882
8832009-09-16 Akim Demaille <demaille@gostai.com>
884
885 TODO: statistics.
886 * TODO (Figures): New.
887
8882009-09-13 Joel E. Denny <jdenny@clemson.edu>
889
890 tests: clean up push.at test group titles.
891 * tests/push.at: Remove "Push Parsing: " from test group titles
892 because these are already under the banner "Push Parsing Tests".
893
8942009-09-12 Alex Rozenman <rozenman@gmail.com>
895
896 Provide an additional sub-message for clarity.
897 Add "symbol not found in production" error message when
898 an "invalid reference" is detected in named references
899 resolution.
900 * src/scan-code.l: Update "invalid reference" case.
901 * tests/named-ref.at: Adjust test-cases.
902
9032009-09-10 Joel E. Denny <jdenny@clemson.edu>
904
905 Clean up yacc.c a little.
906 * data/yacc.c: Clean up M4 for readability, and make output
907 whitespace more consistent. For the main parse function
908 comment, instead of saying "yyparse or yypush_parse", say either
909 "yyparse" or "yypush_parse" depending on which it actually is.
910
9112009-09-10 Joel E. Denny <jdenny@clemson.edu>
912
913 Fix --enable-gcc-warnings.
914 * src/parse-gram.y (%printer <param>): Handle param_none.
915
9162009-09-09 Akim Demaille <demaille@gostai.com>
917
918 lalr1.cc: syntax_error as exceptions.
919 It is common to use sort of factories in the user actions. These
920 factories may check some "syntactic" constraints that are not
921 enforced by the grammar itself. This is possible using YYERROR
922 within the action itself. Provide the user with a means to throw
923 a syntax_error exception.
924
925 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
926 Declare and define yy::parser::syntax_error.
927 * data/lalr1.cc: Include stdexcept.
928 (yy::parser::parse): Wrap the user action within a try/catch.
929 * data/glr.cc: Include stdexcept.
930
9312009-09-09 Akim Demaille <demaille@gostai.com>
932
933 lalr1.cc: add missing "inline".
934 * data/c++.m4 (b4_public_types_define): Add missing inline to
935 implementations provided in headers.
936
9372009-09-09 Akim Demaille <demaille@gostai.com>
938
939 %param: documentation.
940 * NEWS (2.6): Document %param, %lex-param, and %parse-param
941 changes.
942 * doc/bison.texinfo: Document that %lex-param and %parse-param
943 are n-ary.
944 Changes some examples to demonstrate it.
945 (Calc++ Parser): Use %param.
946
9472009-09-09 Akim Demaille <demaille@gostai.com>
948
949 Regen.
950
9512009-09-09 Akim Demaille <demaille@gostai.com>
952
953 style changes.
954 * src/parse-gram.y (add_param): Scope changes.
955
9562009-09-09 Akim Demaille <demaille@gostai.com>
957
958 %parse: support several arguments.
959 * src/parse-gram.y (current_param): New.
960 (param_type): Add param_none.
961 (params): New nonterminal.
962 Use it.
963
9642009-09-09 Akim Demaille <demaille@gostai.com>
965
966 Regen.
967
9682009-09-09 Akim Demaille <demaille@gostai.com>
969
970 %param.
971 Provide a means to factor lex-param and parse-param common
972 declarations.
973
974 * src/parse-gram.y (param_type): New.
975 Define a %printer for it.
976 (add_param): Use it.
977 (%parse-param, %lex-param): Merge into...
978 (%parse): this new token.
979 Adjust the grammar to use it.
980 * src/scan-gram.l (RETURN_VALUE): New.
981 (RETURN_PERCENT_FLAG): Use it.
982 (RETURN_PERCENT_PARAM): New.
983 Use it to support %parse-param, %lex-param and %param.
984
9852009-09-03 Joel E. Denny <jdenny@clemson.edu>
986
987 Use aver not assert.
988 * src/output.c: Don't include assert.h.
989 (output_skeleton): Use aver not assert.
990 * src/system.h (aver): In documentation of why, add links to
991 Paul Eggert's explanations in the mailing lists.
992
9932009-09-05 Alex Rozenman <rozenman@gmail.com>
994
995 Use "Unresolved reference" error message when no symbols were found
996 in a symbolic reference resolution. Remove .expr and -expr from
997 the shown reference when the reference is unresolved.
998 * src/scan-code.l: Change the error message, adjust location columns,
999 rename variable "exact_mode" to "explicit_bracketing".
1000 * tests/named-ref.at: Adjust existing tests and add a new one.
1001
10022009-09-04 Akim Demaille <demaille@gostai.com>
1003
1004 Adjust synclines in src/parse-gram.[ch].
1005 * tests/bison.in: Do some magic (including working around issues
1006 with ylwrap) when this wrapper is used to compile
1007 src/parse-gram.y.
1008
10092009-09-03 Joel E. Denny <jdenny@clemson.edu>
1010
1011 Complain about unused %define variables and %code qualifiers.
1012 * NEWS (2.5): Document.
1013 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1014 * doc/bison.texinfo (Decl Summary): Document complaint, and
1015 improve %define documentation a little otherwise.
1016 * tests/input.at (Reject unused %code qualifiers): Update.
1017 (%define errors): Update.
1018 (%define, --define, --force-define): Update.
1019 (%define backward compatibility): Update.
1020 (Unused %define api.pure): Update.
1021 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1022
10232009-09-03 Joel E. Denny <jdenny@clemson.edu>
1024
1025 Don't suppress warnings about unused parse.error.
1026 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1027 %define variable parse.error unless b4_error_verbose_flag is
1028 actually expanded in a skeleton.
1029
10302009-09-03 Akim Demaille <demaille@gostai.com>
1031
1032 * NEWS (2.4.2): Add "Internationalization" item.
1033
10342009-09-03 Akim Demaille <demaille@gostai.com>
1035
1036 bootstrap: fix/improve find_tool.
1037 * bootstrap (find_tool): Improve error messages.
1038 Fix typo about find_tool_names.
1039
10402009-08-29 Joel E. Denny <jdenny@clemson.edu>
1041
1042 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1043 See
1044 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1045 * src/scan-code.h (code_props_rule_action_init): Rename
1046 named_ref arg to name so it doesn't shadow named_ref type. This
1047 makes it consistent with the function definition in scan-code.l
1048 anyway.
1049
10502009-08-28 Joel E. Denny <jdenny@clemson.edu>
1051
1052 %define: accept unquoted values.
1053 * NEWS (2.5): Group all %define changes together, and document
1054 this one. Remove quotes in IELR and canonical LR entry.
1055 * doc/bison.texinfo: Remove quotes in most examples throughout.
1056 (Decl Summary): Update %define documentation.
1057 (Table of Symbols): Likewise.
1058 * src/ielr.c (LrType): Update documentation.
1059 * src/parse-gram.y (content.opt): Add production for ID.
1060 * tests/actions.at: Remove quotes in most tests.
1061 * tests/calc.at: Likewise.
1062 * tests/existing.at: Likewise.
1063 * tests/input.at: Likewise.
1064 * tests/local.at: Likewise.
1065 * tests/push.at: Likewise.
1066 * tests/reduce.at: Likewise.
1067 * tests/torture.at: Likewise.
1068
10692009-08-28 Joel E. Denny <jdenny@clemson.edu>
1070
1071 %define lr.type: make values lowercase IDs.
1072 That is, "LALR" => "lalr", "IELR" => "ielr", and
1073 "canonical LR" => "canonical-lr".
1074 * NEWS (2.5): Update documentation.
1075 * doc/bison.texinfo (Decl Summary): Likewise.
1076 * src/ielr.c (ielr): Use new values.
1077 * src/ielr.h (ielr): Update documentation.
1078 * src/reader.c (prepare_percent_define_front_end_variables): Use
1079 and validate new values.
1080 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1081 grammars.
1082 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1083
10842009-08-27 Eric Blake <ebb9@byu.net>
1085
1086 scan-gram: avoid portability trap with ctype usage.
1087 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1088 Avoid compiler warning.
1089
10902009-08-27 Joel E. Denny <jdenny@clemson.edu>
1091
1092 tests: use perl for printing special sequences to files.
1093 And skip tests if perl is not available. This is better than
1094 playing tricks with shell portability. Suggested by Akim
1095 Demaille.
1096 * tests/input.at (Bad character literals): Use it here for
1097 omitting final newlines.
1098 (Bad escapes in literals): Use it here for special characters.
1099
11002009-08-26 Joel E. Denny <jdenny@clemson.edu>
1101
1102 tests: show a use of %define lr.default-reductions "consistent"
1103 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1104 prevents the omission of expected tokens for %error-verbose.
1105
11062009-08-26 Akim Demaille <demaille@gostai.com>
1107
1108 tests: portability fix.
1109 * tests/input.at (Bad escapes in literals): Don't expect "echo
1110 '\0'" to output \ then 0.
1111
11122009-08-26 Joel E. Denny <jdenny@clemson.edu>
1113
1114 Actually handle the yytable zero value correctly this time.
1115 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1116 zero values in the YYTABLE comments.
1117 * data/glr.c (yytable_value_is_error): Don't check for zero
1118 value.
1119 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1120 * data/yacc.c (yytable_value_is_error): Likewise.
1121 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1122 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1123 * src/tables.h: In header comments, explain why it's useless to
1124 check for a zero value in yytable.
1125
11262009-08-25 Joel E. Denny <jdenny@clemson.edu>
1127
1128 More fixes related to last two patches.
1129 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
1130 comments: zero indicates syntax error not default action.
1131 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1132 defined.
1133 * data/glr.c (yyis_pact_ninf): Rename to...
1134 (yypact_value_is_default): ... this.
1135 (yyisDefaultedState): Update for rename.
1136 (yyis_table_ninf): Rename to...
1137 (yytable_value_is_error): ... this, and check for value zero
1138 besides just YYTABLE_NINF.
1139 (yygetLRActions): Check for default value from yypact. It
1140 appears that this check is always performed before this function
1141 is invoked, and so adding the check here is probably redundant.
1142 However, the code may evolve after this subtlety is forgotten.
1143 Also, update for rename to yytable_value_is_error. Because that
1144 macro now checks for zero, a different but equivalent branch of
1145 the if-then-else here is evaluated.
1146 (yyreportSyntaxError): Update for rename to
1147 yytable_value_is_error. The zero condition was mishandled
1148 before.
1149 (yyrecoverSyntaxError): Update for renames. No behavioral
1150 changes.
1151 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1152 New function.
1153 (yy_table_value_is_error_): New function.
1154 (parse): Use new functions where possible. No behavioral
1155 changes.
1156 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1157 The zero condition was mishandled before.
1158 * data/yacc.c (yyis_pact_ninf): Rename to...
1159 (yypact_value_is_default): ... this.
1160 (yyis_table_ninf): Rename to...
1161 (yytable_value_is_error): ... this, and check for value zero
1162 besides just YYTABLE_NINF.
1163 (yysyntax_error): Update for rename to yytable_value_is_error.
1164 The zero condition was mishandled before.
1165 (yyparse): Update for renames. No behavioral changes.
1166 * src/tables.h: Improve comments about yypact, yytable, etc.
1167 more. Most importantly, say yytable value of zero means syntax
1168 error not default action.
1169
11702009-08-25 Joel E. Denny <jdenny@clemson.edu>
1171
1172 Fix %error-verbose for conflicts resolved by %nonassoc.
1173 * NEWS (2.5): Document.
1174 * data/glr.c (yyreportSyntaxError): Fix this by checking
1175 yyis_table_ninf.
1176 * data/yacc.c (yysyntax_error): Likewise.
1177 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1178 yytable_ninf_.
1179 * data/lalr1.java (yysyntax_error): Likewise.
1180 * tests/conflicts.at (%nonassoc and eof): Update expected output
1181 and remove FIXME.
1182
11832009-08-25 Joel E. Denny <jdenny@clemson.edu>
1184
1185 Some code and documentation improvements.
1186 * data/c.m4 (b4_table_value_equals): New macro to capture
1187 some repeated code.
1188 * data/glr.c (yyis_pact_ninf): Use it here.
1189 (yyis_table_ninf): Likewise.
1190 (yyreportSyntaxError): Improve internal comments.
1191 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1192 Use it everywhere possible.
1193 (yyis_table_ninf): Likewise.
1194 (yysyntax_error): Improve internal comments.
1195 * data/lalr1.cc (yysyntax_error_): Likewise.
1196 * data/lalr1.java (yysyntax_error): Likewise.
1197 * src/tables.h: Improve comments about yypact, yytable, etc.
1198
11992009-08-21 Joel E. Denny <jdenny@clemson.edu>
1200
1201 Use locale when quoting.
1202 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1203 quote rather than implementing quoting here.
1204
12052009-08-20 Eric Blake <ebb9@byu.net>
1206
1207 Make previous patch more robust.
1208 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1209 argmatch.h.
1210 (output_skeleton): Use it.
1211 Suggested by Akim Demaille.
1212
1213 Import latest m4/m4.m4.
1214 * submodules/autoconf: Update to autoconf 2.64.
1215 * configure.ac (M4_GNU_OPTION): New define.
1216 * src/output.c (output_skeleton): Use it to resolve FIXME.
1217 * NEWS: Mention this.
1218
12192009-08-19 Joel E. Denny <jdenny@clemson.edu>
1220
1221 Fix complaints about escape sequences.
1222 Discussed starting at
1223 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1224 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1225 For a \0 and similar escape sequences meaning the null
1226 character, report an invalid escape sequence instead of an
1227 invalid null character because the latter does not actually
1228 appear in the user's input.
1229 In all escape sequence complaints, don't escape the initial
1230 backslash, and don't quote when the sequence appears at the end
1231 of the complaint line unless there's whitespace that quotearg
1232 won't escape.
1233 Consistently say "invalid" not "unrecognized".
1234 Consistently prefer "empty character literal" over "extra
1235 characters in character literal" warning for invalid escape
1236 sequences; that is, consistently discard those sequences.
1237 * tests/input.at (Bad escapes in literals): New.
1238
12392009-08-19 Akim Demaille <demaille@gostai.com>
1240
1241 doc: fixes.
1242 * doc/bison.texinfo: Fix minor Texinfo errors.
1243
12442009-08-19 Akim Demaille <demaille@gostai.com>
1245
1246 tests: distcc compliance.
1247 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
1248 error messages from the output.
1249
12502009-08-19 Akim Demaille <demaille@gostai.com>
1251
1252 variables: simplify the upgrade of namespace into api.namespace.
1253
1254 This patch simplifies "variables: rename namespace as
1255 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
1256 Suggested by Joel E. Denny in
1257 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
1258
1259 * src/muscle-tab.c (muscle_percent_variable_update): New.
1260 (muscle_percent_define_insert): Use it in replacement of the
1261 previous tr invocation.
1262 Remove variable_tr, no longer needed.
1263 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1264 Remove.
1265 * data/c++.m4: No longer handle namespace -> api.namespace.
1266 * tests/input.at (%define backward compatibility): Check that
1267 namespace is treated as api.namespace.
1268
12692009-08-19 Akim Demaille <demaille@gostai.com>
1270
1271 doc: %initial-action to initialize yylloc.
1272 Reported by Bill Allombert.
1273 * doc/bison.texinfo: Set fill-column to 76.
1274 (Location Type): Document the use of %initial-action to initialize
1275 yylloc.
1276
12772009-08-19 Akim Demaille <demaille@gostai.com>
1278
1279 lalr1.cc: use state_type.
1280 * data/lalr1.cc (yysyntax_error_): Use state_type.
1281 Move argument names into yy*.
1282
12832009-08-19 Akim Demaille <demaille@gostai.com>
1284
1285 lalr1.cc: get rid of yyparse's yystate.
1286 yystate and yystack_[0].state are equal, keep only the latter.
1287 The former was also used as a temporary variable to compute the
1288 post-reduction state. Move this computation into an auxiliary
1289 function.
1290
1291 * data/glr.c (yyLRgotoState): Fuse variable definition and first
1292 assignment.
1293 * data/lalr1.cc (yy_lr_goto_state_): New.
1294 (yyparse): Use it.
1295 Replace remaining uses of yystate by yystate_[0].state.
1296 Remove the former.
1297
12982009-08-19 Akim Demaille <demaille@gostai.com>
1299
1300 lalr1.cc: destroy $$ when YYERROR is called.
1301 * data/lalr1.cc (yyreduce): Compute the resulting state before
1302 running the user action so that yylhs is a valid symbol.
1303 (yyerrorlab): Since yylhs is complete (it knows its type), we can
1304 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
1305 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
1306
13072009-08-18 Joel E. Denny <jdenny@clemson.edu>
1308
1309 maint: update for gnulib's recent update-copyright changes
1310 * gnulib: Update.
1311 * .x-update-copyright (COPYING): Add as it's no longer implied
1312 when .x-update-copyright is present.
1313 * cfg.mk (update-copyright-local): Remove, now ignored.
1314 (update-copyright): Declare update-b4-copyright as a dependency.
1315
13162009-08-17 Akim Demaille <demaille@gostai.com>
1317
1318 build: require gettext 0.17.
1319
1320 Suggested by Bruno Haible.
1321 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1322 * configure.ac: require gettext 0.17 to ensure compatibility with
1323 gnulib.
1324
13252009-08-17 Akim Demaille <demaille@gostai.com>
1326
1327 build: lower gettext requirements.
1328
1329 Bison was uselessly requiring the formatstring macros from
1330 gettext, which resulted in mo files not being installed on systems
1331 that perfectly supported Bison mo files. Lower the requirement.
1332 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1333
1334 * configure.ac: Require need-ngettext instead of
1335 need-formatstring-macros.
1336 Reported by Martin Jabocs.
1337 Suggested by Bruno Haible.
1338 * INSTALL: Restructure.
1339 (Internationalization): New.
1340
13412009-08-14 Joel E. Denny <jdenny@clemson.edu>
1342
1343 maint: fix use of copyright year intervals.
1344 * gnulib: Update.
1345 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1346 as now recommended in gnulib/NEWS.
1347 * build-aux/update-b4-copyright: Fix.
1348 * cfg.mk (update-copyright-env): Configure update-copyright.
1349
13502009-08-13 Joel E. Denny <jdenny@clemson.edu>
1351
1352 Make it easier to write deterministic tests.
1353 Continues Akim's work from his 2009-06-10 commits.
1354 * src/reader.c (check_and_convert_grammar): Don't add any
1355 symbols after the first symbols_do invocation.
1356 * src/symtab.c (symbols_sorted): New static global.
1357 (user_token_number_redeclaration): Update comments.
1358 (symbol_from_uniqstr): If a new symbol is being created, assert
1359 that symbols_sorted hasn't been allocated yet.
1360 (symbols_free): Free symbols_sorted.
1361 (symbols_cmp, symbols_cmp_qsort): New functions.
1362 (symbols_do): Sort symbol_table into symbols_sorted on first
1363 invocation.
1364 * tests/input.at (Numbered tokens): Recombine tests now that the
1365 output should be deterministic across multiple numbers.
1366
13672009-08-12 Akim Demaille <demaille@gostai.com>
1368
1369 tests: GCC 4.5 compliance.
1370 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1371 messages about #error.
1372
13732009-08-12 Akim Demaille <demaille@gostai.com>
1374
1375 build: fix the generation of the documentation.
1376 Some of our targets use "bison --help", but they can't depend on
1377 "bison" itself (to avoid additional requirements on the user), so
1378 they used to call "make src/bison" in the commands. Then
1379 concurrent builds may fail: one make might be aiming one of its
1380 jobs at compiling src/bison, and another job at generating the man
1381 page. If the latter is faster than the former, then we have two
1382 makes that concurrently try to compile src/bison.
1383
1384 This might also be a more convincing explanation for the failure
1385 described in the patch "build: fix paths".
1386
1387 * Makefile.am (SUFFIXES): Initialize.
1388 * build-aux/move-if-change: New, symlink to gnulib's.
1389 * build-aux/local.mk: Ship it.
1390 * doc/common.x: Remove, merged into...
1391 * doc/bison.x: here.
1392 * doc/local.mk (doc/bison.help): New.
1393 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1394 Use src/bison.
1395 (.x.1): Replace with...
1396 (doc/bison.1): this explicit, simpler, target.
1397 (common_dep): Remove, inlined where appropriate.
1398 (SUFFIXES, PREPATH): Remove, unused.
1399
14002009-08-12 Akim Demaille <demaille@gostai.com>
1401
1402 gnulib: improve prefixing.
1403 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1404 change the value of...
1405 (gl_LIBOBJS): this.
1406 Adjust more variables.
1407 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1408 gl_LIBOBJS.
1409 (prefix): Also transform rules whose targets have slashes.
1410 Use $prefix liberally.
1411 Map @MKDIR_P@ to $(MKDIR_P).
1412 Prefix directories that are mkdir'd.
1413
14142009-08-12 Akim Demaille <demaille@gostai.com>
1415
1416 build: fix paths.
1417 When using $(top_builddir) inconsistently, Make (including GNU
1418 Make) is sometimes confused. As a result it may want to build
1419 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1420 file, different names) concurrently, which, amusingly enough,
1421 might end with:
1422
1423 ranlib lib/libbison.a
1424 ranlib lib/libbison.a
1425 make[2]: *** [lib/libbison.a] Segmentation fault
1426
1427 on OS X.
1428
1429 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1430 needed.
1431
14322009-08-12 Akim Demaille <demaille@gostai.com>
1433
1434 distcheck: fix.
1435
1436 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1437
14382009-08-10 Joel E. Denny <jdenny@clemson.edu>
1439
1440 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1441
14422009-08-10 Joel E. Denny <jdenny@clemson.edu>
1443
1444 Miscellaneous code readability improvements.
1445
1446 * src/reader.c (reader): Move %define front-end variable
1447 defaults and checking into...
1448 (prepare_percent_define_front_end_variables): ... this new
1449 function.
1450
1451 * src/scan-gram.l (INITIAL): For consistency with string
1452 literals, don't store open quote on character literal. It's
1453 discarded before returning anyway.
1454 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1455 Make length test more readable, and make the character stored
1456 for an empty literal more obvious while consistent with the
1457 previous behavior.
1458
1459 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1460 USER_NUMBER_HAS_STRING_ALIAS throughout.
1461 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1462 that is repeated in symtab.h. Improve argument names to make it
1463 clear which side of the symbol-string alias pair is which.
1464 (symbol_check_alias_consistency): Improve local variable names
1465 for the same purpose.
1466 * src/symtab.h (struct symbol): Make comments about aliases
1467 clearer.
1468 (symbol_make_alias): Improve comments and argument name.
1469 * src/output.c (token_definitions_output): Update for rename to
1470 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1471
14722009-08-08 Alex Rozenman <rozenman@gmail.com>
1473
1474 Convert "misleading reference" messages to warnings.
1475 * src/scan-code.l: New function 'show_sub_messages', more
1476 factoring.
1477 * tests/named-ref.at: Adjust tests.
1478
14792009-08-06 Joel E. Denny <jdenny@clemson.edu>
1480
1481 maint: run "make update-copyright"
1482
14832009-08-06 Joel E. Denny <jdenny@clemson.edu>
1484
1485 maint: make update-b4-copyright easier to use
1486 * build-aux/update-b4-copyright: In warnings, report line
1487 numbers rather than character positions.
1488 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1489 that update-copyright runs it.
1490 * gnulib: Update.
1491
14922009-08-05 Joel E. Denny <jdenny@clemson.edu>
1493
1494 maint: clean up update-b4-copyright code
1495 * build-aux/update-b4-copyright: Do not accept 2-digit
1496 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1497 Don't accept a `[' in a b4_copyright argument.
1498 Format code more consistently.
1499 Don't assume b4*copyright never occurs.
1500
15012009-08-04 Joel E. Denny <jdenny@clemson.edu>
1502
1503 maint: automate b4_copyright updates.
1504 * Makefile.am (update-b4-copyright): New target rule.
1505 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1506 * build-aux/update-b4-copyright: New.
1507 * data/yacc.c: Remove stray characters around b4_copyright
1508 invocations.
1509
15102009-08-04 Joel E. Denny <jdenny@clemson.edu>
1511
1512 maint: automate annual package-wide copyright-year update.
1513 * .x-update-copyright: New.
1514 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1515 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1516 update-copyright. Remove gnumakefile, which is implied by
1517 maintainer-makefile.
1518 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1519 * gnulib: Update.
1520 * maint.mk: Remove, now copied from gnulib.
1521 * examples/extexi: Add missing "(C)" in copyright statement so
1522 update-copyright can recognize it.
1523 * src/LR0.h: Likewise.
1524 * src/print.h: Likewise.
1525 * src/print_graph.h: Likewise.
1526 * src/gram.c: Add missing comma in copyright statement.
1527 * src/gram.h: Likewise.
1528
15292009-08-04 Joel E. Denny <jdenny@clemson.edu>
1530
1531 Fix "make distcheck".
1532 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1533 of just calc.stamp.
1534
15352009-08-01 Joel E. Denny <jdenny@clemson.edu>
1536
1537 Pacify "gcc -Wunused" for the input function from Flex.
1538 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1539 and later.
1540 * src/scan-code.l: Add "%option noinput", which I cannot find in
1541 the Flex manual, but which Flex has supported since at least as
1542 far back as 2.5.4. However, if any of our developers still use
1543 Flex 2.5.4, they'll need to stop configuring with
1544 --enable-gcc-warnings because "%option noinput" didn't work
1545 correctly until Flex 2.5.6.
1546 * src/scan-gram.l: Likewise.
1547 * src/scan-skel.l: Likewise.
1548
15492009-07-31 Alex Rozenman <rozenman@gmail.com>
1550
1551 Fix --enable-gcc-warnings problems.
1552 * src/reader.c: Adjust variable names.
1553 * src/scan-code.l: Fix prototypes and adjust names.
1554 * src/named-ref.c: Remove redundant "if".
1555
15562009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1557
1558 Fix a --enable-gcc-warnings problem.
1559 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1560 variable.
1561
15622009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1563
1564 Warn about character literals not of length one.
1565 * NEWS (2.5): Document.
1566 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1567 the length.
1568 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1569 * tests/input.at (Bad character literals): New test group.
1570
15712009-07-24 Alex Rozenman <rozenman@gmail.com>
1572
1573 Fix some memory leaks.
1574 * src/named-ref.c: Add a pointer check (named_ref_free).
1575 * src/scan-code.l: New function (variant_table_free). Called in
1576 code_scanner_free.
1577 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1578
15792009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1580
1581 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1582
15832009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 Some M4 cleanup in the testsuite.
1586 Suggested by Eric Blake at
1587 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1588 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1589 complicate the code by distinguishing between a missing value
1590 and an empty string value for an optional argument. This fix is
1591 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1592 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1593 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1594 arguments are not needed because of the following changes.
1595 Fix stale comments.
1596 Bison developers should use GNU M4 and should not use
1597 POSIXLY_CORRECT when building the test suite, so do not
1598 complicate the code by avoiding $10 and above.
1599 Do not quote an empty string value for an optional argument, and
1600 do not distinguish between a missing value and an empty string
1601 value.
1602
16032009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1604
1605 Revert unnecessary column realignment in --help output.
1606 Reported by Akim Demaille at
1607 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1608 * src/getargs.c (usage): Here.
1609
16102009-07-04 Alex Rozenman <rozenman@gmail.com>
1611
1612 Alphabetical order in src/local.mk.
1613 * src/local.mk: Adjust.
1614
16152009-07-04 Alex Rozenman <rozenman@gmail.com>
1616
1617 Style changes and factoring.
1618 * src/named-ref.h: Add comments.
1619 * src/parse-gram.y: Readability and style changes.
1620 * src/reader.c: Factoring: assign_named_ref function.
1621 * src/scan-code.l: Factoring and style changes. Rename
1622 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1623 Use "unsigned" type for variant index. Improve readablity.
1624 * src/scan-gram.l: Change error messages and add comments.
1625 * src/symlist.h: symbol_list_null: New function decl.
1626 * src/symlist.c: symbol_list_null: Implement here.
1627 * tests/named-refs.at: Adjust for new error messages.
1628
16292009-06-29 Eric Blake <ebb9@byu.net>
1630
1631 scan-code: avoid compiler warnings
1632 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1633
16342009-06-29 Akim Demaille <demaille@gostai.com>
1635
1636 build: avoid concurrent extraction of calc++.
1637 * examples/calc++/Makefile.am (calc.stamp): New.
1638 Depend on it to create the sources of calc++ so that concurrent
1639 builds don't launch several "extexi" in parallel.
1640 Not only this is inefficient, this also builds incorrect sources
1641 with several extractions mixed together.
1642
16432009-06-29 Akim Demaille <demaille@gostai.com>
1644
1645 parse.error: fix.
1646 * data/bison.m4: Move code related to specific variables after the
1647 definition of the variable-maintaining macros so that we don't
1648 "invoke" b4_percent_define_check_values before it is defined.
1649
16502009-06-29 Akim Demaille <demaille@gostai.com>
1651
1652 variables: parse.error
1653
1654 Implement, document, and test the replacement of %error-verbose
1655 by %define parse.error "verbose".
1656 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1657 values of the parse.error variable.
1658 Make "simple" its default value.
1659 Check the valid values.
1660 * src/parse-gram.y: Use %define parse.error.
1661 (PERCENT_ERROR_VERBOSE): New token.
1662 Support it.
1663 * src/scan-gram.l: Support %error-verbose.
1664
1665 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1666 %define error-verbose by that of %define parse.error.
1667 * NEWS: Document it.
1668
1669 * tests/actions.at, tests/calc.at: Use parse.error instead of
1670 %error-verbose.
1671
16722009-06-27 Alex Rozenman <rozenman@gmail.com>
1673
1674 Implement support for named symbol references.
1675 * src/parse-gram.y: Add new syntax (named_ref.opt).
1676 * src/reader.c: Store named refs in symbol lists.
1677 * src/reader.h: New argument for symbol_append and
1678 action_append functions.
1679 * src/scan-code.h: Add new field (named_ref) into
1680 code_props data structure. Keeps named ref of midrule
1681 actions.
1682 * src/scan-code.l: Support for named refs in semantic
1683 action code. New function 'parse_named_ref'.
1684 * src/scan-gram.l: Support bracketed id.
1685 * src/symlist.c: Store named refs in symbol lists.
1686 * src/symlist.h: New field in symbol list: named_ref.
1687 * src/named-ref.h: New file, a struct for named_ref.
1688 * src/named-ref.cp: New file, named_ref_new function.
1689 * src/local.mk: Add two new files.
1690 * tests/testsuite.at: Include new test group:
1691 * tests/named-refs.at: this new file.
1692
16932009-06-25 Akim Demaille <demaille@gostai.com>
1694
1695 hash: check insertion for memory exhaustion.
1696 * src/uniqstr.c (uniqstr_new): New.
1697
16982009-06-24 Akim Demaille <demaille@gostai.com>
1699
1700 variables: rename namespace as api.namespace.
1701 Discussed in
1702 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1703
1704 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1705 New.
1706 (b4_percent_define_use): New.
1707 Use it where applicable.
1708 * data/c++.m4: Replace uses of the variable "namespace" by
1709 "api.namespace".
1710 Default the latter to the former.
1711 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1712 obsolete.
1713 Document api.namespace.
1714 Use @samp to document %define uses, keep @code for identifiers.
1715 * NEWS: Likewise.
1716 * tests/c++.at, tests/input.at: Test api.namespace instead of
1717 namespace. (The tests passed with namespace.)
1718
17192009-06-11 Akim Demaille <demaille@gostai.com>
1720
1721 style changes.
1722 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1723 * src/print-xml.c: Style changes.
1724 * tests/conflicts.at: Comment changes.
1725
17262009-06-11 Akim Demaille <demaille@gostai.com>
1727
1728 xml: beware of user strings used to give a %prec to rules.
1729 * tests/conflicts.at (%prec with user strings): New.
1730 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1731 XML output.
1732
17332009-06-11 Akim Demaille <demaille@gostai.com>
1734
1735 hash: check insertion for memory exhaustion.
1736 * src/muscle-tab.c (muscle_insert, muscle_grow)
1737 * src/state.c (state_hash_insert): Check the return value of
1738 hash_insert.
1739
17402009-06-11 Akim Demaille <demaille@gostai.com>
1741
1742 tests: honor TESTSUITEFLAGS in every check target.
1743 * tests/local.mk (RUN_TESTSUITE): New.
1744 (check-local, installcheck-local, maintainer-check-g++)
1745 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1746
17472009-06-10 Akim Demaille <demaille@gostai.com>
1748
1749 deterministic test suite.
1750 Some consistency checks on symbols are performed after all the
1751 symbols were read, by an iteration over the symbol table. This
1752 traversal is nondeterministic, which can be a problem for test
1753 cases.
1754 Avoid this.
1755 Addresses another form of nondeterminism reported by Joel E. Denny.
1756 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1757
1758 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1759 test in two.
1760 Use different file names for the three tests to make the
1761 maintenance easier.
1762
17632009-06-10 Akim Demaille <demaille@gostai.com>
1764
1765 gnulib: update.
1766 * gnulib: Update to latest.
1767 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1768 * m4/.gitignore: Regen.
1769 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1770 Call xalloc_die on hash_insert failures.
1771 Requested by the new __warn_unused_result__ attribute of
1772 hash_insert.
1773
17742009-06-10 Akim Demaille <demaille@gostai.com>
1775
1776 deterministic user-token-number redeclaration errors.
1777 Address nondeterminism reported by Joel E. Denny.
1778 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1779
1780 * src/uniqstr.h: Comment changes.
1781 * src/location.h (boundary_cmp, location_cmp): New.
1782 * src/symtab.c (user_token_number_redeclaration): New.
1783 (symbol_translation): Use it.
1784 * tests/input.at (Numbered tokens): Adjust the expected output.
1785
17862009-05-25 Akim Demaille <demaille@gostai.com>
1787
1788 build: avoid ignored errors.
1789 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1790 errors, they pollute the output.
1791
17922009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1793
1794 Convert multiple variable definition warnings to complaints.
1795 * NEWS (2.5): Add a new entry for that change.
1796 * doc/bison.texinfo (Decl Summary): Update %define entry.
1797 (Bison Options): Update -D/--define/-F/--force-define entry.
1798 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1799 * src/muscle-tab.h (muscle_percent_define_insert): Update
1800 comments.
1801 * tests/input.at (`%define errors'): Update.
1802 (`%define, --define, --force-define'): Update.
1803
18042009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1805
1806 -F/--force-define and relative %define/-D/--define priorities.
1807 * NEWS (2.5): Add documentation to -D/--define entry.
1808 * build-aux/cross-options.pl: Hard-code association of
1809 --force-define with %define.
1810 * doc/bison.texinfo (Decl Summary): In %define entry,
1811 cross-reference command-line options.
1812 (Bison Options): Add documentation to -D/--define entry.
1813 (Option Cross Key): Widen column for --force-define row.
1814 * src/getargs.c (usage): Document -F/--force-define. Realign
1815 options in output.
1816 (short_options, long_options, getargs): Parse -F/--force-define,
1817 and update muscle_percent_define_insert invocations.
1818 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1819 (muscle_percent_define_insert): Add argument with that type.
1820 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1821 -F/--force-define behavior and priorities.
1822 (muscle_percent_define_ensure): Update
1823 muscle_percent_define_insert invocation.
1824 * src/parse-gram.y (prologue_declaration): Update
1825 muscle_percent_define_insert invocations.
1826 * tests/input.at (`%define, --define'): Rename to...
1827 (`%define, --define, --force-define'): ... this and extend.
1828
18292009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1830
1831 Update some comments to make sense for -D.
1832 * data/bison.m4 (b4_check_user_names): In header comments, say
1833 "user occurrence" instead of "grammar occurrence".
1834 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1835 (muscle_percent_code_grow): Likewise just for consistency.
1836
18372009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1838
1839 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1840
18412009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1842
1843 Handle a trailing `:' in a user-supplied C++ namespace better.
1844 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1845 among the closing braces here. This fix might make the
1846 generated code easier to debug, but otherwise it should be
1847 insignificant because a trailing `:' is a C++ error already.
1848
18492009-05-19 Akim Demaille <demaille@gostai.com>
1850
1851 remove useless variable.
1852 * src/getargs.c (skeleton_arg): Remove now useless variable.
1853 Should help the compiler see that this printf-like call is sane.
1854
18552009-05-15 Akim Demaille <demaille@gostai.com>
1856
1857 Rename token.prefix as api.tokens.prefix.
1858 Discussed here.
1859 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1860
1861 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1862 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1863 (token.prefix): Rename as...
1864 (api.tokens.prefix): this.
1865
18662009-05-11 Akim Demaille <demaille@gostai.com>
1867
1868 doc: use C++ headers.
1869 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1870 headers.
1871
18722009-05-11 Akim Demaille <demaille@gostai.com>
1873
1874 doc: token.prefix
1875 * doc/bison.simple (Decl Summary): Document token.prefix.
1876 (Calc++ Parser): Various fixes.
1877 Formatting changes.
1878 Use token.prefix.
1879 Introduce a macro TOKEN to shorten the code and make it more
1880 readable.
1881 (Calc++ Scanner): Adjust.
1882 * NEWS (Variable token.prefix): New.
1883
18842009-05-04 Akim Demaille <demaille@gostai.com>
1885
1886 bison: catch bad symbol names.
1887 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1888 * tests/input.at: Adjust.
1889
18902009-05-04 Akim Demaille <demaille@gostai.com>
1891
1892 identifiers: dashes are letters.
1893 Dashes can now start identifiers (symbols and directives).
1894
1895 * src/scan-gram.l ({letter}): Add dash.
1896 ({id}): Remove it.
1897 * tests/input.at (Symbols): Adjust.
1898 Remove stray comment.
1899 * tests/regression.at (Invalid inputs): Adjust error message.
1900 * doc/bison.texinfo (Symbols): Update.
1901
19022009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1903
1904 Declare %code to be a permanent feature.
1905 * NEWS (2.4.2): Here.
1906 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1907 experimental.
1908 (Decl Summary): Likewise.
1909
19102009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1911
1912 Convert underscores to dashes in some %define variable names.
1913 For now, just api.push-pull and lr.keep-unreachable-states.
1914 Maintain old names for backward compatibility.
1915 * NEWS (2.5): Document.
1916 * data/c.m4 (b4_identification): Update comment.
1917 * data/yacc.c: Update access.
1918 * doc/bison.texinfo: Update.
1919 * etc/bench.pl.in (bench_push_parser): Update use.
1920 * src/files.c (tr): Move to...
1921 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1922 think of a better place to expose it. My logic is that, for all
1923 uses of tr so far, command-line arguments can be involved, and
1924 getargs.h is already included.
1925 * src/main.c (main): Update access.
1926 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1927 variable names to new variable names before assigning value.
1928 * src/reader.c (reader): Update setting default.
1929 * tests/calc.at: Update uses.
1930 * tests/conflicts.at (Unreachable States After Conflict
1931 Resolution): Update use.
1932 * tests/input.at (%define enum variables): Update use.
1933 (%define backward compatibility): New test group.
1934 * tests/push.at: Update uses.
1935 * tests/reduce.at: Update uses.
1936 * tests/torture.at: Update uses.
1937
19382009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1939
1940 Set all front-end %define defaults in one place.
1941 * src/main.c (main): Move lr.keep_unreachable_states default...
1942 * src/reader.c (reader): ... to here.
1943
19442009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1945
1946 Rename lr.default_reductions to lr.default-reductions.
1947 * NEWS (2.5): Here.
1948 * doc/bison.texinfo: Here.
1949 * src/lalr.c (initialize_LA): Here.
1950 * src/print.c (print_reductions): Here.
1951 * src/reader.c (reader): Here.
1952 * src/tables.c (action_row): Here.
1953 * tests/input.at (%define enum variables): Here.
1954 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1955
19562009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1957
1958 Pacify ./configure --enable-gcc-warnings.
1959 * tests/input.at (Symbols): Prototype yyerror and yylex.
1960
19612009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1962
1963 Document how `%define "var" "value"' is not M4-friendly.
1964 * src/parse-gram.y (variable): In comments here.
1965
19662009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 Clean up recent patches a little.
1969 Reported by Akim Demaille.
1970 * doc/bison.texinfo (Understanding): Fix typos.
1971 * src/print.c (print_reductions): Don't use negated variable.
1972
19732009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1974
1975 List accepted values for a %define enum variable with an invalid value.
1976 Suggested by Akim Demaille at
1977 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1978 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1979 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1980 * tests/input.at (%define lr.default_reductions invalid values): Merge
1981 into...
1982 (%define enum variables): ... here, and update output.
1983
19842009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1985
1986 Rename "default rule" to "default reduction".
1987 This includes changing variable names in code, changing
1988 comments, and renaming %define lr.default_rules to %define
1989 lr.default_reductions.
1990 * NEWS (2.5): Update IELR documentation.
1991 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1992 documentation.
1993 * data/glr.c, data/lalr1.java: Sync copyright dates.
1994 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1995 and lr.type documentation. Make some other wording
1996 improvements.
1997 (Glossary): Adjust cross-references and Default Reduction
1998 definition.
1999 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2000 Remove a confusing comment pointed out by Akim Demaille.
2001 (initialize_LA): Adjust code.
2002 * src/print-xml.c (print_reductions): Adjust code.
2003 * src/print.c (print_reductions): Adjust code.
2004 * src/reader.c (reader): Adjust code.
2005 * src/tables.c (action_row): Adjust code.
2006 (token_actions): Adjust code.
2007 * src/tables.h: Adjust YYDEFACT documentation.
2008 * tests/input.at (%define lr.default_rules invalid values):
2009 Rename test group to...
2010 (%define lr.default_reductions invalid values): ... this, and
2011 update grammar file and expected output.
2012 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2013 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2014
20152009-04-21 Akim Demaille <demaille@gostai.com>
2016
2017 tests: check the use of dashes and periods in symbols.
2018 * tests/input.at (Symbol): New test group.
2019
20202009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2021
2022 Document %define lr.type and lr.default_rules.
2023 * NEWS (2.5): Add an entry.
2024 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2025 besides just LALR(1) and GLR(1).
2026 * doc/bison.texinfo (Introduction): Likewise.
2027 (Language and Grammar): Bison is no longer limited to LALR(1)
2028 restrictions.
2029 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2030 when trying to distinguish from GLR. Talk about LR(1) grammars
2031 rather than LALR(1) grammars.
2032 (Decl Summary): In %define api.push_pull entry, say it applies
2033 to deterministic parsers in C rather than LALR(1) parsers in C.
2034 Add lr.default_rules entry.
2035 Add lr.type entry.
2036 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2037 restrictions.
2038 (Generalized LR Parsing): Same changes as for the previous GLR
2039 section.
2040 (Memory Management): Say deterministic rather than LALR(1).
2041 (Understanding): Correct some bison output.
2042 Index discussion of "accepting state".
2043 Say deterministic rather than LALR(1).
2044 (Bison Options): In --yacc entry, say deterministic rather than
2045 LALR(1).
2046 In --report, --graph, and --xml entries, just don't mention
2047 LALR(1).
2048 (C++ Parsers): Say deterministic rather than LALR(1).
2049 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2050 (Glossary): Add Accepting State, Consistent State, Default Rule,
2051 and IELR(1) definitions.
2052 In Generalized LR (GLR) definition, make same changes as in
2053 previous GLR sections.
2054 In LALR(1) definition, say Bison uses LALR(1) by default rather
2055 than implying Bison is limited to LALR(1).
2056 (LocalWords): Add IELR.
2057
20582009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 Finish implementing %define lr.type.
2061 Its value can be "LALR", "IELR", or "canonical LR".
2062 * lib/timevar.def (TV_IELR_PHASE1): New var.
2063 (TV_IELR_PHASE2): New var.
2064 (TV_IELR_PHASE3): New var.
2065 (TV_IELR_PHASE4): New var.
2066 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2067 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2068 Sbitset.h, ielr.h, and ielr.c.
2069 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2070 trace_types): Add trace_ielr.
2071 * src/lalr.h, src/lalr.c (ngotos): Export it.
2072 (F): Rename to...
2073 (goto_follows): ... this, update all uses, and export it.
2074 (set_goto_map): Export it.
2075 (map_goto): Export it.
2076 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2077 handled in ielr.
2078 (initialize_LA): Export it. Move lookback allocation to...
2079 (lalr): ... here because, for canonical LR, initialize_LA must
2080 be invoked but lookback and much of the rest of LALR isn't
2081 needed.
2082 * main.c (main): Instead of lalr, invoke ielr, which invokes
2083 lalr.
2084 * src/reader.c (reader): Default lr.type to "LALR".
2085 Default lr.default_rules to "accepting" if lr.type is "canonical
2086 LR". Leave the default as "all" otherwise.
2087 Check for a valid lr.type value.
2088 * src/state.h, src/state.c (struct state_list): Add state_list
2089 member.
2090 (state_new): Initialize state_list member to NULL.
2091 (state_new_isocore): New function, exported.
2092 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2093 exercises all values of lr.type.
2094 (GNU AWK Grammar): Rename test group to...
2095 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2096 AT_TEST_EXISTING_GRAMMAR.
2097 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2098 (GNU pic Grammar): Rename test group to...
2099 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2100 AT_TEST_EXISTING_GRAMMAR.
2101 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2102 all values of lr.type.
2103 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2104 (Lane Split): Likewise.
2105 (Complex Lane Split): Likewise.
2106 (Split During Added Lookahead Propagation): Likewise.
2107
21082009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2109
2110 Add new files for IELR and canonical LR implementation.
2111 * src/AnnotationList.c: New.
2112 * src/AnnotationList.h: New.
2113 * src/InadequacyList.c: New.
2114 * src/InadequacyList.h: New.
2115 * src/Sbitset.c: New.
2116 * src/Sbitset.h: New.
2117 * src/ielr.c: New.
2118 * src/ielr.h: New.
2119
21202009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 Implement %define lr.default_rules.
2123 Its value describes the states that are permitted to contain
2124 default rules: "all", "consistent", or "accepting".
2125 * src/reader.c (reader): Default lr.default_rules to "all".
2126 Check for a valid lr.default_rules value.
2127 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2128 is "accepting", then only mark the accepting state as
2129 consistent.
2130 (initialize_LA): Tell state_lookahead_tokens_count whether
2131 lr.default_rules is "accepting".
2132 * src/tables.c (action_row): If lr.default_rules is not "all",
2133 then disable default rules in inconsistent states.
2134 * src/print.c (print_reductions): Use this opportunity to
2135 perform some assertions about whether lr.default_rules was
2136 obeyed correctly.
2137 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2138 helps with checking the parser tables for a grammar.
2139 * tests/input.at (%define lr.default_rules invalid values): New
2140 test group.
2141 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2142 AT_TEST_TABLES_AND_PARSE.
2143 (`no %define lr.default_rules'): New test group generated by
2144 AT_TEST_LR_DEFAULT_RULES.
2145 (`%define lr.default_rules "all"'): Likewise.
2146 (`%define lr.default_rules "consistent"'): Likewise.
2147 (`%define lr.default_rules "accepting"'): Likewise.
2148
21492009-04-20 Akim Demaille <demaille@gostai.com>
2150
2151 Formatting change.
2152
21532009-04-20 Akim Demaille <demaille@gostai.com>
2154
2155 bison: factoring.
2156 * src/output.c (token_definitions_output): Use symbol_id_get
2157 instead of duplicating its logic.
2158 * TODO (YYERRCODE): Extend.
2159
21602009-04-20 Akim Demaille <demaille@gostai.com>
2161
2162 variables: prefer error-verbose to error_verbose.
2163 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
2164 instead of error_verbose.
2165 * src/scan-gram.l (%error-verbose): Map to the error-verbose
2166 variable.
2167 * doc/bison.texinfo: Promote %define error-verbose instead of
2168 %error-verbose.
2169 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
2170
21712009-04-15 Akim Demaille <demaille@gostai.com>
2172
2173 variables: accept dashes.
2174 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
2175 underscores.
2176 * src/scan-gram.l ({id}): Also accept dashes after the initial
2177 letter.
2178 ({directive}): Use {id}.
2179 * src/parse-gram.y: Comment and formatting changes.
2180 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2181 symbols.
2182 * src/complain.h, src/complain.c (yacc_at): New.
2183 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2184 symbol names.
2185 * src/output.c (token_definitions_output): Do not #define token
2186 names with dashes.
2187
21882009-04-20 Akim Demaille <demaille@gostai.com>
2189
2190 Consistently refer to Yacc, not YACC.
2191 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2192
21932009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2194
2195 Pacify make maintainer-check-posix.
2196 * tests/input.at (%define, --define): Move bison command-line
2197 options before grammar file name.
2198
21992009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 Document semicolon warnings.
2202 * NEWS (2.5): Here.
2203
22042009-04-14 Akim Demaille <demaille@gostai.com>
2205
2206 variables: use `parse.assert' instead of `assert'.
2207 * TODO (assert): Remove.
2208 * data/bison.m4 (b4_assert_if): Replace with...
2209 (b4_parse_assert_if): this.
2210 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
2211 * doc/bison.texinfo (Decl Summary): Document parse.assert.
2212
22132009-04-14 Akim Demaille <demaille@gostai.com>
2214
2215 variables: use `parse.trace' instead of `debug'.
2216 * src/getargs.c (getargs): Map -t to %define trace.parse.
2217 * src/scan-gram.l (%debug): Map to %define trace.parse.
2218 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
2219 names to `_' in macro names.
2220 (b4_debug_if): Replace with...
2221 (b4_parse_trace_if): this.
2222 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2223 * data/yacc.c: Adjust.
2224 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
2225 Use @code to label the variable list.
2226 Document the variable parse.trace.
2227 (Tracing): Promote the parse.trace variable.
2228 * TODO: %printer is not documented.
2229
22302009-04-14 Akim Demaille <demaille@gostai.com>
2231
2232 doc: minor fixes.
2233 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2234 (Table of Symbols): Remove duplicate entry for %debug.
2235
22362009-04-10 Eric Blake <ebb9@byu.net>
2237
2238 submodules: update to latest
2239 * submodules/autoconf: Use latest upstream Autoconf.
2240
22412009-04-06 Eric Blake <ebb9@byu.net>
2242
2243 Work around autoconf 2.63b bug in testsuite.
2244 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2245 autoconf bug related to # in test.
2246
22472009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2248
2249 * NEWS (2.5): New section. Describe new -D/--define feature.
2250
22512009-04-06 Akim Demaille <demaille@gostai.com>
2252
2253 Regen.
2254 * src/parse-gram.h, src/parse-gram.c: Regen.
2255
22562009-04-06 Akim Demaille <demaille@gostai.com>
2257
2258 rename muscle_tab.* as muscle-tab.* for consistency.
2259 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
2260 * src/muscle-tab.h, src/muscle-tab.c: these.
2261 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
2262 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
2263
22642009-04-06 Akim Demaille <demaille@gostai.com>
2265
2266 Makefile: introduce $(BISON).
2267 * src/local.mk (BISON): New.
2268 (YACC): Use it.
2269
22702009-04-06 Akim Demaille <demaille@gostai.com>
2271
2272 parser: handle %locations as %define locations.
2273 * src/getargs.h, src/getargs.c (locations_flag): Remove.
2274 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
2275 to set "locations" to true.
2276 * src/output.c (prepare): Don't output "locations".
2277 * src/scan-gram.l (%locations): Handle it as a %<flag>.
2278 * src/parse-gram.y: It's no longer a token.
2279 Don't handle it.
2280 * data/bison.m4 (b4_locations_if): Define it with
2281 b4_percent_define_if_define.
2282 * data/c.m4, data/glr.cc: Adjust.
2283
22842009-04-06 Akim Demaille <demaille@gostai.com>
2285
2286 Regen.
2287 * src/parse-gram.c: Regen.
2288
22892009-04-06 Akim Demaille <demaille@gostai.com>
2290
2291 muscle: factor the handling of obsolete of obsolete directives.
2292 Suggested by Joel E. Denny.
2293
2294 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
2295 New, extracted from...
2296 * src/parse-gram.y (prologue_declaration: pure-parser): here.
2297 Remove it.
2298 (prologue_declaration: "%<flag>"): Use
2299 muscle_percent_define_ensure.
2300 (%error-verbose, %pure-parser): No longer tokens.
2301 * src/scan-gram.l (pure-parser): Return as a %<flag>.
2302
23032009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2304
2305 Fix options documentation.
2306 * build-aux/cross-options.pl: As in --help output, write optional
2307 arguments as [=ARG] not =[ARG].
2308 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2309
23102009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2311
2312 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2313 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2314 requirements for a correct m4 are stricter.
2315 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
2316 * configure.ac: Update to use AC_PROG_GNU_M4.
2317 Reported by Eric Blake.
2318
23192009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2320
2321 Help with updating web manual.
2322 * HACKING: Incorporate instructions from gnulib/doc/README.
2323 * bootstrap.conf (gnulib_modules): Add gendocs.
2324
23252009-04-03 Akim Demaille <demaille@gostai.com>
2326
2327 Regen.
2328 * src/parse-gram.h, src/parse-gram.c: Regen.
2329
23302009-04-03 Akim Demaille <demaille@gostai.com>
2331
2332 Factor %FLAG at scan level.
2333 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
2334 definitions and associated rules, replaced by....
2335 (PERCENT_FLAG): this new token type, and rule.
2336 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
2337 Use it for %debug and %error-verbose.
2338
23392009-04-03 Akim Demaille <demaille@gostai.com>
2340
2341 Regen.
2342 * src/parse-gram.h, src/parse-gram.c: Regen.
2343
23442009-04-03 Akim Demaille <demaille@gostai.com>
2345
2346 Treat %debug as %define debug.
2347 * data/bison.m4 (b4_debug_if): New.
2348 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2349 * data/lalr1.java: Use it instead of b4_debug_flag.
2350 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2351 * src/output.c (prepare): Don't output it.
2352 * src/parse-gram.y: Treat %debug as %define debug.
2353
23542009-04-03 Akim Demaille <demaille@gostai.com>
2355
2356 Treat %error-verbose as %define error_verbose.
2357 This allows to pass -Derror_verbose on the command line. Better
2358 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2359 ERROR_VERBOSE being defined as false or true.
2360 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2361 on b4_percent_define_ifdef, for does not check the defined value,
2362 but only whether the symbol is defined, rely on
2363 b4_percent_define_flag_if, so that a value of "false" is processed
2364 as a false.
2365 If not defined, define the flag to "false".
2366 (b4_error_verbose_if): New.
2367 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2368 b4_error_verbose_flag.
2369 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2370 * src/output.c (prepare): Don't output it.
2371 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2372
23732009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2374
2375 Fix strange %define locations for default values.
2376 Reported by Akim Demaille at
2377 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2378 and discussed again starting at
2379 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2380 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2381 because location information is bogus.
2382 Use angle brackets to delimit fake file name because square brackets
2383 look like underexpanded m4. Choose a better fake file name.
2384 Use negative line numbers.
2385 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2386 * src/location.c (location_print): If line for a boundary is negative,
2387 only print that boundary's file name.
2388 * src/location.h: Document that.
2389 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2390 defaults): Update output.
2391
23922009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2393
2394 Pacify ./configure --enable-gcc-warnings.
2395 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2396 in lib won't compile with it.
2397 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2398
23992009-03-31 Akim Demaille <demaille@gostai.com>
2400
2401 bootstrap: --help to stdout.
2402 * bootstrap (usage): Don't send --help to stderr.
2403 Use a here doc instead of a long string.
2404
24052009-03-31 Akim Demaille <demaille@gostai.com>
2406
2407 bootstrap: README-hacking no longer exists
2408 * bootstrap (checkout_only_file): Set to HACKING.
2409
24102009-03-26 Akim Demaille <demaille@gostai.com>
2411
2412 doc: merge HACKING and README-hacking.
2413 Two files is confusing.
2414 Reported by Alexandre Duret-Lutz.
2415
2416 * README-hacking: Merge into...
2417 * HACKING (Working from the repository): here.
2418
24192009-03-26 Akim Demaille <demaille@gostai.com>
2420
2421 doc: update README-hacking.
2422 * README-hacking: We now use git and git submodules.
2423 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2424
24252009-03-26 Akim Demaille <demaille@gostai.com>
2426
2427 lalr1.cc: avoid GCC 4.3 warnings.
2428 GCC 4.3 now warns about "a || b && c" and asks for explicit
2429 parentheses.
2430 Reported by Alexandre Duret-Lutz.
2431 * data/location.cc: Update copyright years.
2432 (Position::operator==): Use parens to make precedence explicit.
2433 Compare lines and columns first, as they are more likely to be
2434 different, and they are faster to compare.
2435
24362009-03-26 Akim Demaille <demaille@gostai.com>
2437
2438 gnulib: update.
2439 * gnulib: Update to latest.
2440 * src/local.mk (AM_CFLAGS): Move to...
2441 * Makefile.am: here.
2442 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2443 AM_CFLAGS.
2444
24452009-03-02 Akim Demaille <demaille@gostai.com>
2446
2447 Comment changes.
2448
24492009-03-02 Akim Demaille <demaille@gostai.com>
2450
2451 Share b4_yytranslate_define.
2452 * data/lalr1.cc (b4_yytranslate_define): Move to...
2453 * data/c++.m4: here.
2454
24552009-03-02 Akim Demaille <demaille@gostai.com>
2456
2457 Use locations in the variant example.
2458 Yes, this obfuscates the point of this example, variants only.
2459 But glr.cc cannot work (yet?) without locations. This change
2460 makes it easier to use this example with glr.cc.
2461
2462 * examples/variant.yy (assert): %define it.
2463 (locations): Request them.
2464 (yylex): Bind the location to the stage.
2465
24662009-03-02 Akim Demaille <demaille@gostai.com>
2467
2468 Dub make_TOKEN as a public type interface.
2469 * data/c++.m4 (b4_symbol_constructor_declare)
2470 (b4_symbol_constructor_define): New empty stubs.
2471 (b4_public_types_declare, b4_public_types_define): Use them.
2472 * data/lalr1.cc (b4_symbol_constructor_declare)
2473 (b4_symbol_constructor_declare_)
2474 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2475 Move to...
2476 * data/variant.hh: here.
2477 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2478 needed.
2479 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2480 b4_symbol_constructor_declare, as it is now done by
2481 b4_public_types_define and b4_public_types_declare.
2482
24832009-03-02 Akim Demaille <demaille@gostai.com>
2484
2485 Coding style changes.
2486 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2487 (b4_symbol_constructor_declarations)
2488 (b4_symbol_constructor_definition_)
2489 (b4_symbol_constructor_definitions)
2490 (b4_yytranslate_definition): Rename as...
2491 (b4_symbol_constructor_declare_)
2492 (b4_symbol_constructor_declare)
2493 (b4_symbol_constructor_define_)
2494 (b4_symbol_constructor_define)
2495 (b4_yytranslate_define): these.
2496 * data/variant.hh (b4_variant_definition): Rename as...
2497 (b4_variant_define): this.
2498
24992009-03-02 Akim Demaille <demaille@gostai.com>
2500
2501 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2502 * data/bison.m4 (b4_percent_define_if_define): New.
2503 * data/c++.m4 (b4_variant_if): Move to...
2504 * data/bison.m4: Here, using b4_percent_define_if_define.
2505 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2506 * data/bison.m4: Here, using b4_percent_define_if_define.
2507
25082009-03-02 Akim Demaille <demaille@gostai.com>
2509
2510 Dub symbol_type_base as a public type.
2511 * data/c++.m4 (b4_public_types_declare): Now define
2512 symbol_type_base and symbol_type.
2513 (b4_public_types_define): New.
2514 In both cases, the definitions are taken verbatim from lalr1.cc.
2515 * data/lalr1.cc: Adjust.
2516
25172009-03-02 Akim Demaille <demaille@gostai.com>
2518
2519 b4_public_types_declare.
2520 * data/c++.m4 (b4_public_types_declare): New.
2521 * data/glr.cc, data/lalr1.cc: Use it.
2522
25232009-03-02 Akim Demaille <demaille@gostai.com>
2524
2525 b4_semantic_type_declare.
2526 * data/c++.m4 (b4_semantic_type_declare): New.
2527 Factors and generalizes what was in glr.cc and lalr1.cc.
2528 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2529 variants.
2530 * data/lalr1.cc, data/glr.cc: Use it.
2531
25322009-02-26 Akim Demaille <demaille@gostai.com>
2533
2534 Upgrade gnulib.
2535 * gnulib: Upgrade from master.
2536 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2537 Regen.
2538
25392009-02-25 Akim Demaille <demaille@gostai.com>
2540
2541 Remove useless arguments.
2542 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2543 relevant.
2544
25452009-02-25 Akim Demaille <demaille@gostai.com>
2546
2547 Comment changes.
2548 * data/lalr1.cc: here.
2549
25502009-02-25 Akim Demaille <demaille@gostai.com>
2551
2552 Fix glr.cc's debug level handling.
2553 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2554 glr.c which is used.
2555 (debug_level, set_debug_level): Adjust.
2556
25572009-02-25 Akim Demaille <demaille@gostai.com>
2558
2559 Copyright years.
2560 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2561
25622009-02-25 Akim Demaille <demaille@gostai.com>
2563
2564 Style changes.
2565 * etc/bench.pl.in (generate_grammar_list): Consitently use
2566 location_type, not yy::location.
2567
25682009-02-25 Akim Demaille <demaille@gostai.com>
2569
2570 Comment change.
2571 * data/lalr1.cc: here.
2572
25732009-02-19 Akim Demaille <demaille@gostai.com>
2574
2575 Make yyparser::error public.
2576 * data/lalr1.cc: here.
2577 There is no good reason to keep it private (and it is convenient
2578 to use it from the scanner for instance). It is already public in
2579 glr.cc.
2580
25812009-02-19 Akim Demaille <demaille@gostai.com>
2582
2583 Comment changes.
2584 * data/glr.cc: here.
2585
25862009-02-19 Akim Demaille <demaille@gostai.com>
2587
2588 Remove trailing blanks.
2589 The epilogue has its own ending \n, no need to add another.
2590
2591 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2592 epilogue.
2593 * data/glr.cc: dnl when extending the epilogue.
2594 Remove stray "private:".
2595
25962009-02-19 Akim Demaille <demaille@gostai.com>
2597
2598 Use b4_c_modern.
2599 * data/c.m4 (b4_c_function_decl): Here.
2600
26012009-02-19 Akim Demaille <demaille@gostai.com>
2602
2603 Comment changes.
2604 * data/lalr1.cc: here.
2605
26062009-02-19 Akim Demaille <demaille@gostai.com>
2607
2608 Extract variant.hh
2609 * data/variant.hh: New, extracted from...
2610 * data/lalr1.cc: here.
2611 Adjust.
2612 * data/local.mk: Adjust.
2613
26142009-02-19 Akim Demaille <demaille@gostai.com>
2615
2616 Extract stack.hh from lalr1.cc.
2617 * data/stack.hh: New.
2618 * data/lalr1.cc: Extract from here.
2619 * data/local.mk: Adjust.
2620
26212009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 Add reminder about uploading public key to keys.gnupg.net.
2624 * HACKING (Release Procedure): Here.
2625
26262009-01-28 Akim Demaille <demaille@gostai.com>
2627
2628 * NEWS: Update information about 2.4.1 and 2.4.2.
2629
26302008-11-04 Akim Demaille <demaille@gostai.com>
2631
2632 Reformat NEWS.
2633 * NEWS: Use more outline-mode markup.
2634 Suggested by Jim Meyering.
2635
26362009-01-08 Akim Demaille <demaille@gostai.com>
2637
2638 Fix grep portability issues.
2639 Grep on Solaris does not support -q.
2640 Reported by Summum Bonum.
2641
2642 * NEWS: Add a stub for 2.4.2.
2643 * THANKS: Add Summum Bonum.
2644 * tests/atlocal.in (EGREP): New.
2645 (CC, CXX, XSLTPROC): Make it possible to override them via
2646 envvars.
2647 * tests/java.at: Use $EGREP instead of egrep.
2648 Use AT_CHECK's ignore instead of grep's -q.
2649
26502008-12-11 Akim Demaille <demaille@gostai.com>
2651
2652 Pass the token type to yysyntax_error.
2653 * data/yacc.c (yysyntax_error): Take the transated token instead
2654 of the raw number.
2655 Adjust callers.
2656 * TODO: Update.
2657
26582008-12-11 Akim Demaille <demaille@gostai.com>
2659
2660 Formatting changes.
2661 * data/glr.c: Formatting changes.
2662
26632008-12-11 Akim Demaille <demaille@gostai.com>
2664
2665 Propagate i18n changes into glr.c.
2666 * TODO: Update.
2667 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2668 building the error message format dynamically.
2669 * data/lalr1.java: Formatting changes.
2670
26712008-12-11 Akim Demaille <demaille@gostai.com>
2672
2673 Use testsuite -C.
2674 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2675 Solves problems when top_srcdir is an absolute path.
2676 Suggested by Eric Blake.
2677 * configure.ac: Require Autoconf 2.62.
2678
26792008-12-11 Akim Demaille <demaille@gostai.com>
2680
2681 Simplify the i18n of the error messages.
2682 * data/lalr1.cc: Comment changes.
2683 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2684 lalr1.cc instead of building dynamically the format string.
2685
26862008-12-08 Akim Demaille <demaille@gostai.com>
2687
2688 Fix portability issue in the test suite.
2689 * tests/local.at (AT_MATCHES_CHECK): New.
2690 Based on Perl instead of Sed. Sed has too many portability
2691 pitfalls, not ever Sed is GNU Sed.
2692 * tests/actions.at (Fix user actions without a trailing semicolon):
2693 Use it.
2694
26952008-12-08 Akim Demaille <demaille@gostai.com>
2696
2697 Update data/README.
2698 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2699
27002008-12-08 Akim Demaille <demaille@gostai.com>
2701
2702 Install autoconf as a submodule to get m4sugar.
2703 * .gitmodules: Add submodules/autoconf.
2704 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2705 submodules/autoconf.
2706
27072008-12-08 Akim Demaille <demaille@gostai.com>
2708
2709 Test token.prefix in all the skeletons.
2710 * data/java.m4 (b4_token_enum): Use the token.prefix.
2711 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2712 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2713 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2714 * tests/java.at: Comment changes.
2715 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2716 (Java parser class and package names): Add token.prefix check.
2717
27182008-12-08 Akim Demaille <demaille@gostai.com>
2719
2720 Fix regeneration of atconfig.
2721 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2722 remove it: now that there is no tests/Makefile.am, the top-level
2723 Makefile properly updates atconfig when needed.
2724
27252008-12-07 Di-an Jan <dianj@freeshell.org>
2726
2727 Implement the FIXME that ends an user action with a semicolon
2728 if it seems necessary.
2729 * src/scan-code.l (flex rules section): Flag cpp directive from
2730 any `#' to the first unescaped end-of-line. Semicolon is not
2731 needed after `;', `{', '}', or cpp directives and is needed after
2732 any other token (whitespaces and comments have no effect).
2733 * tests/actions.at (Fix user actions without a trailing semicolon):
2734 New test.
2735 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2736 to make user actions complete statements.
2737 Adjust column numbers in error messages.
2738 * tests/regression.at (Fix user actions without a trailing semicolon):
2739 Remove. Covered by new test.
2740
27412008-12-07 Akim Demaille <demaille@gostai.com>
2742
2743 Update gnulib.
2744 * gnulib: Update from master.
2745
27462008-12-05 Eric Blake <ebb9@byu.net>
2747
2748 Avoid compiler warning.
2749 * src/output.c (muscle_insert_item_number_table): Delete unused
2750 function.
2751
27522008-12-02 Eric Blake <ebb9@byu.net>
2753
2754 Build testsuite with newer autoconf.
2755 * tests/output.at (m4_expand): Don't override in newer autoconf,
2756 where the underlying implementation changed.
2757 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2758 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2759 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2760 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2761 since some of them contain unbalanced ')'.
2762
27632008-12-01 Akim Demaille <demaille@gostai.com>
2764
2765 Use b4_symbol for printers and destructors everywhere.
2766 * data/bison.m4 (b4_symbol_action_location): New.
2767 * data/c.m4 (b4_symbol_actions): Remove.
2768 Adjust all callers to use by b4_symbol_foreach and the corresponding
2769 b4_symbol_printer/destructor macro.
2770 * data/glr.cc: Adjust.
2771 * data/lalr1.java: Adjust the %destructor sanity check.
2772 * src/output.c (symbol_code_props_output): Remove, we no longer
2773 need the b4_symbol_printers/destructors tables.
2774
27752008-12-01 Akim Demaille <demaille@gostai.com>
2776
2777 Use b4_symbol_case_.
2778 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2779 b4_symbol_case_.
2780
27812008-12-01 Akim Demaille <demaille@gostai.com>
2782
2783 Move b4_symbol based macro to bison.m4.
2784 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2785 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2786 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2787 (b4_type_foreach): Move to...
2788 * data/bison.m4: Here.
2789 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2790 b4_symbol_value_template instead of b4_symbol_value.
2791
27922008-12-01 Akim Demaille <demaille@gostai.com>
2793
2794 b4_symbol/type_foreach.
2795 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2796 Use them.
2797
27982008-12-01 Akim Demaille <demaille@gostai.com>
2799
2800 Use the symbol properties to output the printer/destructor for lalr1.cc.
2801 Instead of defining complex list of tuples to define various
2802 properties of the symbols, we now prefer to define symbols as
2803 "structs" in m4: using the symbol key (its number), and the
2804 property name, b4_symbol gives it value. Use this to handle
2805 destructors and printers.
2806
2807 * src/output.c (CODE_PROP): New.
2808 (prepare_symbol_definitions): Use it to define the printer and
2809 destructor related attributes of the symbols.
2810 * data/lalr1.cc (b4_symbol_actions): Rename as...
2811 (b4_symbol_action): this.
2812 Use b4_symbol instead of 6 arguments.
2813 (b4_symbol_printer, b4_symbol_destructor): New.
2814 Use them instead of b4_symbol_actions.
2815
28162008-12-01 Akim Demaille <demaille@gostai.com>
2817
2818 Avoid capturing variables too easily.
2819 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2820 v__ and p__ instead of v and p.
2821
28222008-12-01 Akim Demaille <demaille@gostai.com>
2823
2824 Remove spurious empty line before syncline.
2825 * data/bison.m4 (b4_syncline): Don't output an empty line before
2826 the output.
2827
28282008-11-26 Akim Demaille <demaille@gostai.com>
2829
2830 Convert lib/Makefile.am into lib/local.mk.
2831 The real problem is rather gnulib.mk, which itself is extracted
2832 from a Makefile.am that gnulib expects to the "recursive". The
2833 tool prefix-gnulib-mk converts such a gnulib.mk to be
2834 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2835
2836 * etc/prefix-gnulib-mk: New.
2837 * bootstrap (slurp): Use it to convert further gnulib.mk.
2838 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2839 are deeper.
2840 * lib/Makefile.am: Rename as...
2841 * lib/local.mk: this.
2842 Adjust to be prefixed.
2843 * Makefile.am, configure.ac: Adjust.
2844 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2845
28462008-11-26 Akim Demaille <demaille@gostai.com>
2847
2848 s/_FLAGS/FLAGS/.
2849 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2850 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2851 Reported by Eric Blake.
2852
28532008-11-26 Akim Demaille <demaille@gostai.com>
2854
2855 Use b4_parser_tables_define in glr.cc.
2856 * data/glr.c: Use b4_parser_tables_define instead of defining the
2857 (deterministic integral) tables by hand.
2858
28592008-11-26 Akim Demaille <demaille@gostai.com>
2860
2861 Use b4_parser_tables_define in Java.
2862 * data/java.m4 (b4_typed_parser_table): Rename as...
2863 (b4_typed_parser_table_define): this, for consistency.
2864 Accept a comment as $4.
2865 Move $2 into yy*_.
2866 (b4_integral_parser_table): Rename as...
2867 (b4_integral_parser_table_define): this.
2868 * data/lalr1.java: Adjust all uses.
2869 Use b4_parser_tables_define instead of generation by hand.
2870
28712008-11-26 Akim Demaille <demaille@gostai.com>
2872
2873 Prepare the convergence bw C style and Java table generation.
2874 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2875 (b4_tables_define): Rename as...
2876 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2877 (b4_parser_tables_define): these.
2878 * data/c.m4 (b4_table_define): Rename as...
2879 (b4_integral_parser_table_define): this.
2880 * data/lalr1.cc: Adjust.
2881 (b4_table_define, b4_table_declare): Rename as...
2882 (b4_integral_parser_table_define)
2883 (b4_integral_parser_table_declare): these.
2884 (yyrline_): Move the comment where it is actually used.
2885 * data/yacc.c: Adjust.
2886 (yyrline): Use b4_integral_parser_table_define.
2887
28882008-11-26 Akim Demaille <demaille@gostai.com>
2889
2890 Regen.
2891 * src/parse-gram.h, src/parse-gram.c: Regen.
2892
28932008-11-26 Akim Demaille <demaille@gostai.com>
2894
2895 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2896 * data/lalr1.cc (b4_tables_map): Move to...
2897 * data/bison.m4: here.
2898 Update the comment for yytable during the flight.
2899 (b4_tables_declare, b4_tables_define): New.
2900 * data/lalr1.cc: Use them.
2901 * data/c.m4 (b4_table_define): New.
2902 * data/yacc.c: Use b4_tables_define instead of output the tables
2903 by hand.
2904 * tests/regression.at (Web2c Actions): Adjust the expected output,
2905 the order of the tables changed.
2906
29072008-11-26 Akim Demaille <demaille@gostai.com>
2908
2909 Get rid of (yy)rhs and (yy)prhs.
2910 These tables are no longer needed in the parsers, and they don't seem to
2911 be useful. They are not documented either.
2912
2913 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2914 Adjust the computation of (yy)r2.
2915
29162008-11-26 Akim Demaille <demaille@gostai.com>
2917
2918 Rule length is unsigned.
2919 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2920
29212008-11-26 Akim Demaille <demaille@gostai.com>
2922
2923 Get rid of lalr1-split.cc.
2924 It was no longer maintainer.
2925
2926 * data/lalr1-split.cc: Remove.
2927 * etc/bench.pl.in (bench_fusion_parser): Remove.
2928 Adjust.
2929
29302008-11-26 Akim Demaille <demaille@gostai.com>
2931
2932 Use yy* consistently.
2933 * data/glr.c: Now that yyrhs no longer exists as a global
2934 variable, rename local "rhs" variables into "yyrhs" for
2935 consistency.
2936
29372008-11-25 Akim Demaille <demaille@gostai.com>
2938
2939 Get rid of yyrhs and yyprhs in glr.c.
2940 * data/glr.c (yyrhs, yyprhs): Remove.
2941 Instead, use the state stack and yystos.
2942
29432008-11-25 Akim Demaille <demaille@gostai.com>
2944
2945 Flag glr tests.
2946 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2947 as an Autotest keyword.
2948
29492008-11-25 Akim Demaille <demaille@gostai.com>
2950
2951 Prefer TESTSUITE_FLAGS.
2952 TESTSUITEFLAGS is barely readable.
2953
2954 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2955 for backward compatibility.
2956 Use the former instead of the latter.
2957
29582008-11-25 Akim Demaille <demaille@gostai.com>
2959
2960 Get rid of yyrhs and yyprhs in larl1.java.
2961 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2962 (yy_reduce_print): Rather, use yystos_ and the state stack.
2963
29642008-11-25 Akim Demaille <demaille@gostai.com>
2965
2966 Formatting changes.
2967
29682008-11-25 Akim Demaille <demaille@gostai.com>
2969
2970 Get rid of yyrhs and yyprhs in yacc.c.
2971 They were used to get the symbol types, given a rule number, when
2972 displaying the top of the stack before a reduction. But the
2973 symbol type is available from the state stack. This has two be
2974 benefits: two tables less in the parser (making it smaller), and a
2975 more consistent use of the three stacks which will help to fuse
2976 them.
2977
2978 * data/yacc.c (yyprhs, yyrhs): Remove.
2979 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2980 (yy_reduce_print): Take yyssp as argument.
2981 Use it, together with yystos, to get the symbol type.
2982 * tests/regression.at (Web2c Report): Remove these tables from the
2983 expected output.
2984
29852008-11-25 Akim Demaille <demaille@gostai.com>
2986
2987 b4_tables_map.
2988 The point is to factor the generation of the tables across skeletons.
2989 This is language dependant.
2990
2991 * data/c.m4 (b4_comment_): New.
2992 Should be usable to define how to generate tables independently of
2993 the language.
2994 (b4_c_comment): New.
2995 (b4_comment): Bounce to b4_c_comment.
2996 Now support $2 = [PREFIX] for indentation.
2997 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2998 there is no comment.
2999 Indent it properly when there is one.
3000 Output the ending semicolon.
3001 (b4_table_define): Space changes.
3002 Output the ending semicolon.
3003 (b4_tables_map): New.
3004 Use it twice instead of declaring and defining the (integral)
3005 tables by hand.
3006
30072008-11-25 Akim Demaille <demaille@gostai.com>
3008
3009 b4_table_declare.
3010 * data/lalr1.cc (b4_table_declare): New.
3011 Use it to declare the tables defined with b4_table_define.
3012 (b4_table_define): Declare a third arg to match b4_table_declare
3013 signature.
3014 Move all the comments around invocations of b4_table_define into
3015 the invocations itselves.
3016 Move things around to have the order for declarations and
3017 definitions.
3018
30192008-11-25 Akim Demaille <demaille@gostai.com>
3020
3021 Formatting changes.
3022 * data/lalr1.java: here.
3023
30242008-11-25 Akim Demaille <demaille@gostai.com>
3025
3026 b4_args is more general than only C++.
3027 * data/lalr1.cc (b4_args, _b4_args): Move to...
3028 * data/bison.m4: here.
3029
30302008-11-21 Di-an Jan <dianj@freeshell.org>
3031
3032 Implement no-XXX arguments for --warnings, --report, --trace.
3033 * src/getargs.c (flags_argmatch): Handles no-XXX.
3034 Fix typo in doxygen comment.
3035
30362008-11-21 Akim Demaille <demaille@gostai.com>
3037
3038 Display the changes in cross-options.texi.
3039 * build-aux/cross-options.pl ($sep): New, to separate items.
3040 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3041 changes.
3042
30432008-11-20 Di-an Jan <dianj@freeshell.org>
3044
3045 Improves options in the manual.
3046 * doc/bison.texinfo (-g, -x): Add space before argument.
3047 (Option Cross Key): Implement FIXME: listing directives also.
3048 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3049 (Short Option): Special case -d. Put arguments inside @option.
3050 (Bison Directive): Add column, automatically extracted from
3051 src/scan-gram.l (actual name passed as the first argument)
3052 with special case for %define.
3053 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3054 to build-aux/cross-options.pl.
3055 * src/getargs.c (usage): Document limitations of cross-options.pl.
3056 * src/scan-gram.l: Likewise.
3057
30582008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Fix unexpanded macros in GLR defines file.
3061 Reported by Csaba Raduly at
3062 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3063 * THANKS (Csaba Raduly): Add.
3064 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3065 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3066 lexer in a separate module that includes the defines file.
3067 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3068 source.
3069 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3070 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3071 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3072 (AT_DATA_SOURCE_PROLOGUE): New.
3073 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3074 (AT_DATA_SOURCE): New.
3075 (AT_FULL_COMPILE): Extend to support an additional source file.
3076
30772008-11-18 Akim Demaille <demaille@gostai.com>
3078
3079 More TODO.
3080 * TODO: More short term issues.
3081
30822008-11-18 Akim Demaille <demaille@gostai.com>
3083
3084 Regen.
3085 * src/parse-gram.h, src/parse-gram.c: Regen.
3086
30872008-11-18 Akim Demaille <demaille@gostai.com>
3088
3089 Use b4_subtract where possible.
3090 * data/lalr1.cc (b4_subtract): Move to...
3091 * data/bison.m4: here.
3092 * data/glr.c (b4_rhs_data): Use it.
3093 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3094
30952008-11-18 Akim Demaille <demaille@gostai.com>
3096
3097 Remove incorrect mode specification.
3098 * data/glr.cc: Don't pretend it's C code.
3099
31002008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3101
3102 Simplify last patch slightly.
3103 * src/getargs.c (getargs): Here.
3104
31052008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3106
3107 Fix last warning from --enable-gcc-warnings.
3108 * src/getargs.c (getargs): Don't assign const address to non-const
3109 pointer.
3110
31112008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3112
3113 Don't let maintainer-*-check targets force a version update.
3114 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3115 handled.
3116
31172008-11-17 Di-an Jan <dianj@freeshell.org>
3118
3119 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3120 Align menus. Adjust word wrapping. Use node names for menu names.
3121 (Examples): Don't abbreviate node names.
3122 (LocalWords): Remove abbreviations.
3123 (Copying): Make description a sentence.
3124 (Java Action Features): Remove period to match the rest of menu.
3125
31262008-11-17 Di-an Jan <dianj@freeshell.org>
3127
3128 Handles several --enable-gcc-warnings.
3129 * src/getargs.c (command_line_location): Set parameters to void.
3130 * src/output.c (symbol_type_name_cmp): Make static.
3131 (symbols_by_type_name): Set parameters to void.
3132 (symbol_definitions_output): Remove unused parameter. Rename as...
3133 (prepare_symbol_definitions): this.
3134 (muscles_output): Move symbol_definitions_output to...
3135 (output): here as prepare_symbol_definitions.
3136 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
3137 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
3138
31392008-11-17 Di-an Jan <dianj@freeshell.org>
3140
3141 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
3142 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
3143
31442008-11-16 Akim Demaille <demaille@gostai.com>
3145
3146 Add missing $(EXEEXT).
3147 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
3148 "src/bison$(EXEEXT)".
3149 Reported by Di-an Jan.
3150
31512008-11-15 Akim Demaille <demaille@gostai.com>
3152
3153 * TODO: Update.
3154
31552008-11-15 Akim Demaille <demaille@gostai.com>
3156
3157 Formatting changes.
3158 * tests/input.at: here.
3159
31602008-11-15 Akim Demaille <demaille@gostai.com>
3161
3162 Remove duplicate header inclusion.
3163 * src/LR0.c: here.
3164
31652008-11-15 Akim Demaille <demaille@gostai.com>
3166
3167 * src/parse-gram.h, src/parse-gram.c: Regen.
3168
31692008-11-15 Akim Demaille <demaille@gostai.com>
3170
3171 Support parametric types.
3172
3173 There are two issues to handle: first scanning nested angle
3174 bracket pairs to support types such as std::pair< std::string,
3175 std::list<std::string> > >.
3176
3177 Another issue is to address idiosyncracies of C++: do not glue two
3178 closing angle brackets together (otherwise it's operator>>), and
3179 avoid sticking blindly a TYPE to the opening <, as it can result
3180 in '<:' which is a digraph for '['.
3181
3182 * src/scan-gram.l (brace_level): Rename as...
3183 (nesting): this.
3184 (SC_TAG): New.
3185 Implement support for complex tags.
3186 (tag): Accept
3187 , but not <.
3188 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
3189 (b4_symbol_variant): Leave space around types as parameters.
3190 * examples/variant.yy: Use nested template types and leading ::.
3191 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
3192 Rename as...
3193 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
3194 * tests/c++.at: Test parametric types.
3195
31962008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3197
3198 Test token.prefix.
3199 This is not sufficient, but we test at least that the make_SYMBOL
3200 interface is not affected by token.prefix. A more general test
3201 will be implemented when the support of token.prefix is generalized
3202 to more skeletons.
3203
3204 * tests/c++.at: One more variant test, using token.prefix.
3205
32062008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3207
3208 Test the make_TOKEN interface.
3209 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
3210 Factor the common code in yylex.
3211 Use it to test "%define lex_symbol".
3212
32132008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3214
3215 Formatting change.
3216
32172008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
3218
3219 Simplify code for variants bench marks.
3220 * etc/bench.pl.in (&generate_grammar_list): Define and use
3221 location_type.
3222 Factor the common code in yylex.
3223
32242008-11-15 Akim Demaille <demaille@gostai.com>
3225
3226 Better error message.
3227 * bootstrap (find_tool): Fix the error message.
3228
32292008-11-15 Akim Demaille <demaille@gostai.com>
3230
3231 Update variant.yy to newest interface.
3232 * examples/variant.yy: Define lex_symbol.
3233 Adjust.
3234
32352008-11-15 Akim Demaille <demaille@gostai.com>
3236
3237 Don't use locations in variant.yy.
3238 * examples/variant.yy: Adjust to not using locations.
3239
32402008-11-15 Akim Demaille <demaille@gostai.com>
3241
3242 Comment changes.
3243 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
3244 comments for the license.
3245
32462008-11-15 Akim Demaille <demaille@gostai.com>
3247
3248 Remove tests/Makefile.am.
3249 * tests/Makefile.am: Rename as...
3250 * tests/local.mk: this.
3251 * Makefile.am, configure.ac: Adjust.
3252 * Makefile.am (DISTCLEANFILES): Define.
3253 (maintainer-check, maintainer-xml-check, maintainer-push-check):
3254 Remove, we no longer need to bounce to the real targets.
3255
32562008-11-15 Akim Demaille <demaille@gostai.com>
3257
3258 Comment changes.
3259
32602008-11-15 Akim Demaille <demaille@gostai.com>
3261
3262 djgpp/local.mk.
3263 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
3264 * djgpp/local.mk: this new file.
3265
32662008-11-15 Akim Demaille <demaille@gostai.com>
3267
3268 Remove doc/Makefile.am.
3269 * doc/Makefile.am: Rename as...
3270 * doc/local.mk: this.
3271 Adjust paths
3272 * Makefile.am, configure.ac: Adjust.
3273 * Makefile.am (MOSTLYCLEANFILES): New.
3274 * src/local.mk: Adjust.
3275
32762008-11-15 Akim Demaille <demaille@gostai.com>
3277
3278 Move sc_tight_scope into maint.mk.
3279 It does not work, and I don't know how it was supposed to work: it
3280 seems to be looking for sources in the build tree. I just moved
3281 it at a better place, fixing it is still required.
3282
3283 * src/local.mk (echo): Remove.
3284 (sc_tight_scope): Move to...
3285 * maint.mk: here.
3286
32872008-11-15 Akim Demaille <demaille@gostai.com>
3288
3289 Regen.
3290 * src/parse-gram.h, src/parse-gram.h: Regen.
3291
32922008-11-15 Akim Demaille <demaille@gostai.com>
3293
3294 Remove src/Makefile.am.
3295 * src/Makefile.am: Rename as...
3296 * src/local.mk: this.
3297 Prefix all the paths with src/.
3298 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
3299 (AM_CPPFLAGS): Find find in builddir/src.
3300 (YACC): Move the flags into...
3301 (AM_YFLAGS): here.
3302 * maint.mk (sc_tight_scope): Disable.
3303 It used to bounce to the version in src/Makefile.am which is now
3304 part of this very Makefile.
3305 * Makefile.am, configure.ac: Adjust.
3306 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
3307 include "..." to find files "here": we are no longer in src/, so
3308 qualify the includes with src/.
3309 * doc/Makefile.am (PREPATH): No longer include the top_builddir
3310 prefix.
3311 (.x.1): Adjust to be able to create src/foo from the top level
3312 Makefile, instead of going bounce to src/Makefile the creation of
3313 foo.
3314
33152008-11-15 Akim Demaille <demaille@gostai.com>
3316
3317 Remove useless variable.
3318 * doc/Makefile.am (srcsrcdir): Remove.
3319
33202008-11-15 Akim Demaille <demaille@gostai.com>
3321
3322 Remove data/Makefile.am.
3323 * data/Makefile.am: Rename as...
3324 * data/local.mk: this.
3325 Adjust paths.
3326 * Makefile.am, configure.ac: Adjust.
3327
33282008-11-15 Akim Demaille <demaille@gostai.com>
3329
3330 Remove etc/Makefile.am.
3331 * etc/Makefile.am: Rename as...
3332 * etc/local.mk: this.
3333 Adjust.
3334 * Makefile.am, configure.ac: Adjust.
3335
33362008-11-15 Akim Demaille <demaille@gostai.com>
3337
3338 Remove examples/local.mk.
3339 examples/calc++/Makefile.am might be interesting to keep as is, since
3340 it is an example in itself.
3341
3342 * examples/Makefile.am: Rename as...
3343 * examples/local.mk: this.
3344 Adjust.
3345 * Makefile.am, configure.ac: Adjust.
3346
33472008-11-15 Akim Demaille <demaille@gostai.com>
3348
3349 Remove build-aux/Makefile.am.
3350 Recursive Makefiles are really way too slow, let's get rid of some of
3351 them.
3352
3353 * build-aux/Makefile.am: Rename as...
3354 * build-aux/local.mk: this.
3355 Adjust paths.
3356 * Makefile.am, configure.ac: Adjust.
3357
33582008-11-15 Akim Demaille <demaille@gostai.com>
3359
3360 Provide convenience constructors for locations and positions.
3361 * data/location.cc (position::position): Accept file, line and
3362 column as arguments with default values.
3363 Always qualify initial line and column literals as unsigned.
3364 (location::location): Provide convenience constructors.
3365
33662008-11-15 Akim Demaille <demaille@gostai.com>
3367
3368 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3369 token type.
3370 Using template buys us nothing, and makes it uselessly complex to
3371 construct a symbol. Besides, it could not be generalized to other
3372 languages, while make_FOO would work in C/Java etc.
3373
3374 * data/lalr1.cc (b4_symbol_): New.
3375 (b4_symbol): Use it.
3376 (b4_symbol_constructor_declaration_)
3377 (b4_symbol_constructor_definition_): Instead of generating
3378 specializations of an overloaded template function, just generate
3379 several functions whose names are forged from the token names
3380 without the token.prefix.
3381 (b4_symbol_constructor_declarations): Generate them for all the
3382 symbols, not just by class of symbol type, now that instead of
3383 specializing a function template by the token, we generate a
3384 function named after the token.
3385 (b4_symbol_constructor_specialization_)
3386 (b4_symbol_constructor_specializations): Remove.
3387 * etc/bench.pl.in: Adjust to this new API.
3388
33892008-11-13 Akim Demaille <demaille@gostai.com>
3390
3391 %define token.prefix.
3392 Provide a means to add a prefix to the name of the tokens as
3393 output in the generated files. Because of name clashes, it is
3394 good to have such a prefix such as TOK_ that protects from names
3395 such as EOF, FILE etc. But it clutters the grammar itself.
3396
3397 * data/bison.m4 (token.prefix): Empty by default.
3398 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3399 * data/lalr1.cc (b4_symbol): Ditto.
3400
34012008-11-13 Akim Demaille <demaille@gostai.com>
3402
3403 Compute at M4 time some of the subtractions.
3404 * data/lalr1.cc (b4_subtract): New.
3405 (b4_rhs_data): Use it.
3406
34072008-11-13 Akim Demaille <demaille@gostai.com>
3408
3409 symbol::token.
3410 This allows the user to get the type of a token returned by yylex.
3411
3412 * data/lalr1.cc (symbol::token): New.
3413 (yytoknum_): Define when %define lex_symbol, independently of
3414 %debug.
3415 (yytoken_number_): Move into...
3416 (symbol::token): here, since that's the only use.
3417 The other one is YYPRINT which was not officially supported
3418 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3419 array under a different name (yytoknum).
3420
34212008-11-13 Akim Demaille <demaille@gostai.com>
3422
3423 YYERRCODE.
3424 * TODO (YYERRCODE): Mention the case of $undef.
3425
34262008-11-13 Akim Demaille <demaille@gostai.com>
3427
3428 TODO: YYPRINT.
3429 * TODO (YYPRINT): New.
3430
34312008-11-13 Akim Demaille <demaille@gostai.com>
3432
3433 Comment changes.
3434 * data/lalr1.cc, data/yacc.c: Fix the description of the
3435 yytranslate and yytoknum tables.
3436
34372008-11-13 Akim Demaille <demaille@gostai.com>
3438
3439 Define make_symbol in the header.
3440 To reach good performances these functions should be inlined (yet
3441 this is to measure precisely). To this end they must be available
3442 to the caller.
3443
3444 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3445 location_type with the class name.
3446 Since will now be output in the header, declare "inline".
3447 No longer use b4_symbol_constructor_specializations, but
3448 b4_symbol_constructor_definitions in the header.
3449 Don't call it in the *.cc file.
3450
34512008-11-13 Akim Demaille <demaille@gostai.com>
3452
3453 Define yytranslate in the header for lex_symbol.
3454 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3455 into the header file when using %define lex_symbol.
3456 (yytranslate_): Declare inline.
3457
34582008-11-13 Akim Demaille <demaille@gostai.com>
3459
3460 Define the constructors of symbol_type in
3461 b4_symbol_constructor_definitions.
3462 The constructors are called by the make_symbol functions, which a
3463 forthcoming patch will move elsewhere. Hence the interest of
3464 putting them together.
3465
3466 The stack_symbol_type does not need to be moved, it is used only
3467 by the parser.
3468
3469 * data/lalr1.cc: Move symbol_type and symbol_base_type
3470 constructors into...
3471 (b4_symbol_constructor_definitions): here.
3472 Adjust.
3473
34742008-11-13 Akim Demaille <demaille@gostai.com>
3475
3476 Make it easier to move the definition of yytranslate_.
3477 Forthcoming changes will make it possible to use yytranslate_
3478 from outside the parser implementation file.
3479
3480 * data/lalr1.cc (b4_yytranslate_definition): New.
3481 Use it.
3482
34832008-11-13 Akim Demaille <demaille@gostai.com>
3484
3485 Remove useless class specification.
3486 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3487 to refer to the class name to use a type defined by the class for
3488 arguments of member functions.
3489
34902008-11-13 Akim Demaille <demaille@gostai.com>
3491
3492 Finer input type for yytranslate.
3493 This patch is debatable: the tradition expects yylex to return an int
3494 which happens to correspond to token_number (which is an enum). This
3495 allows for instance to return characters (such as '*' etc.). But this
3496 goes against the stronger typing I am trying to have with the new
3497 lex interface which return a symbol_type. So in this case, feed
3498 yytranslate_ with a token_type.
3499
3500 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3501 expect a token_type.
3502
35032008-11-13 Akim Demaille <demaille@gostai.com>
3504
3505 Honor lex-params in %define lex_symbol mode.
3506 * data/lalr1.cc: Use b4_lex_param.
3507
35082008-11-13 Akim Demaille <demaille@gostai.com>
3509
3510 Simplify names.
3511 * src/output.c (symbol_definitions_output): Rename symbol
3512 attributes type_name and has_type_name as type and has_type.
3513 * data/lalr1.cc: Adjust uses.
3514
35152008-11-13 Akim Demaille <demaille@gostai.com>
3516
3517 Use b4_type_names for the union type.
3518 The union used to compute the size of the variant used to iterate
3519 over the type of all the symbols, with a lot of redundancy. Now
3520 iterate over the lists of symbols having the same type-name.
3521
3522 * data/lalr1.cc (b4_char_sizeof_): New.
3523 (b4_char_sizeof): Use it.
3524 Adjust to be called with a list of numbers instead of a single
3525 number.
3526 Adjust its caller for new-line issues.
3527
35282008-11-13 Akim Demaille <demaille@gostai.com>
3529
3530 Define the "identifier" of a symbol.
3531 Symbols may have several string representations, for instance if
3532 they have an alias. What I call its "id" is a string that can be
3533 used as an identifier. May not exist.
3534
3535 Currently the symbols which have the "tag_is_id" flag set are
3536 those that don't have an alias. Look harder for the id.
3537
3538 * src/output.c (is_identifier): Move to...
3539 * src/symtab.c (is_identifier): here.
3540 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3541 * src/output.c (symbol_definitions_output): Use it to define "id"
3542 and "has_id".
3543 Remove the definition of "tag_is_id".
3544 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3545 "tag_is_id" were used to produce code.
3546 We still use "tag" for documentation.
3547
35482008-11-11 Akim Demaille <demaille@gostai.com>
3549
3550 Locations are no longer required by lalr1.cc.
3551 * data/lalr1.cc (_b4_args, b4_args): New.
3552 Adjust all uses of locations to make them optional.
3553 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3554 (AT_CHECK_NAMESPACE): Check the use of locations.
3555 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3556 without locations with lalr1.cc.
3557 Test these cases.
3558 * tests/output.at: Check lalr1.cc with and without location
3559 support.
3560 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3561 Don't use locations.
3562
35632008-11-11 Akim Demaille <demaille@gostai.com>
3564
3565 AT_FULL_COMPILE.
3566 * tests/local.at (AT_FULL_COMPILE): New.
3567 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3568
35692008-11-11 Akim Demaille <demaille@gostai.com>
3570
3571 Support parens in calc++.
3572 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3573 * examples/calc++/test (run): Check the expected output.
3574 Adjust callers.
3575 Check parens too.
3576
35772008-11-11 Akim Demaille <demaille@gostai.com>
3578
3579 Simplify lalr1.cc since %defines is mandatory.
3580 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3581
35822008-11-11 Akim Demaille <demaille@gostai.com>
3583
3584 TODO: yyfmt.
3585 * TODO (yysyntax_error): New item.
3586
35872008-11-11 Akim Demaille <demaille@gostai.com>
3588
3589 Prefer M4 to CPP.
3590 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3591 YYERROR_VERBOSE.
3592
35932008-11-11 Akim Demaille <demaille@gostai.com>
3594
3595 Support i18n of the parse error messages.
3596 * TODO (lalr1.cc/I18n): Remove.
3597 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3598 error messages, as done in yacc.c.
3599 Stay within the yy* pseudo namespace.
3600
36012008-11-11 Akim Demaille <demaille@gostai.com>
3602
3603 More TODO.
3604 * TODO (single stack, yysyntax_error): New.
3605
36062008-11-11 Akim Demaille <demaille@gostai.com>
3607
3608 Make it possible to return a symbol_type from yylex.
3609 * data/lalr1.cc (b4_lex_symbol_if): New.
3610 (parse): When lex_symbol is defined, expected yylex to return the
3611 complete lookahead.
3612 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3613 yylex interface.
3614 (bench_variant_parser): Exercise it.
3615
36162008-11-11 Akim Demaille <demaille@gostai.com>
3617
3618 Remove useless bench case.
3619 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3620 no longer used.
3621
36222008-11-11 Akim Demaille <demaille@gostai.com>
3623
3624 Improve display of directives.
3625 * etc/bench.pl.in (parse_term): Don't add useless eol.
3626
36272008-11-11 Akim Demaille <demaille@gostai.com>
3628
3629 Use string_cast in the bench.
3630 * etc/bench.pl.in (generate_grammar_list): Define and use
3631 string_cast.
3632
36332008-11-11 Akim Demaille <demaille@gostai.com>
3634
3635 Replace yychar with a Boolean.
3636 * data/lalr1.cc (parse::yychar): Replace by...
3637 (parse::yyempty): this.
3638
36392008-11-11 Akim Demaille <demaille@gostai.com>
3640
3641 Factor the tables.
3642 * TODO: New item.
3643
36442008-11-11 Akim Demaille <demaille@gostai.com>
3645
3646 Let yytranslate handle the eof case.
3647 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3648 Adjust callers.
3649 No longer expect yychar to be equal to yyeof_, rather, test the
3650 lookahead's (translated) kind.
3651
36522008-11-11 Akim Demaille <demaille@gostai.com>
3653
3654 yychar cannot be empty in yyerrlab.
3655 * TODO (yychar == yyempty_): New.
3656 * data/lalr1.cc: Remove the handling of this case.
3657 This eases forthcoming changes related to yychar and yytranslate.
3658
36592008-11-11 Akim Demaille <demaille@gostai.com>
3660
3661 Bench: syntactic sugar for %define/#define.
3662 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3663 (&bench_push_parser, bench_variant_parser): Use this feature.
3664 (&eat): New.
3665 Use it.
3666
36672008-11-11 Akim Demaille <demaille@gostai.com>
3668
3669 Less memory pressure on the "list" bench.
3670 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3671 the values, to limit memory pressure.
3672
36732008-11-11 Akim Demaille <demaille@gostai.com>
3674
3675 Introduce make_symbol.
3676 make_symbol provides a means to construct a full symbol (kind,
3677 value, location) in a single shot. It is meant to be a Symbol
3678 constructor, parameterized by the symbol kind so that overloading
3679 would prevent incorrect kind/value pairs. Unfortunately
3680 parameterized constructors do not work well in C++ (unless the
3681 parameter also appears as an argument, which is not acceptable),
3682 hence the use of a function instead of a constructor.
3683
3684 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3685 (b4_symbol_constructor_declarations)
3686 (b4_symbol_constructor_specialization_)
3687 (b4_symbol_constructor_specializations)
3688 (b4_symbol_constructor_definition_)
3689 (b4_symbol_constructor_definitions): New.
3690 Use them where appropriate to generate declaration, declaration of
3691 the specializations, and implementations of the templated
3692 overloaded function "make_symbol".
3693 (variant::variant): Always define a default ctor.
3694 Also provide a copy ctor.
3695 (symbol_base_type, symbol_type): New ctor overloads for value-less
3696 symbols.
3697 (symbol_type): Now public, so that functions such as yylex can use
3698 it.
3699
37002008-11-11 Akim Demaille <demaille@gostai.com>
3701
3702 Inform m4 whether a tag is a valid id.
3703 * src/output.c (is_identifier): New.
3704 (symbol_definitions_output): Use it to define tag_is_id.
3705 But maybe this should be done at m4 level?
3706
37072008-11-11 Akim Demaille <demaille@gostai.com>
3708
3709 Test 214 was failing: it greps with a pattern containing [ ]*
3710 which obviously meant to catch spaces and tabs, but contained only
3711 spaces. Tabulations in sources are a nuisance, so to simplify the
3712 matter, get rid of all the tabulations in the Java sources. The
3713 other skeletons will be treated equally later.
3714
3715 * data/java.m4, data/lalr1.java: Untabify.
3716 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3717 tabulations are no longer generated.
3718
37192008-11-11 Paolo Bonzini <bonzini@gnu.org>
3720
3721 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3722 * configure.ac: Adjust usage.
3723 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3724 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3725 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3726
37272008-11-10 Di-an Jan <dianj@freeshell.org>
3728
3729 Workaround Java's ``code too large'' problem for parser tables
3730 in most cases, by using one function per initialization.
3731 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3732 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3733 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3734 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3735 (yytname_): Use b4_typed_parser_table.
3736 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3737 ``code too large'' error.
3738
37392008-11-10 Di-an Jan <dianj@freeshell.org>
3740
3741 * NEWS: Document them.
3742
3743 General Java skeleton improvements.
3744 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3745 using gcj < 4.3 in the testsuite, according to comments in
3746 gnulib/m4/javacomp.m4.
3747 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3748 location_type, position_type): Remove extraneous brackets from
3749 b4_percent_define_default.
3750 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3751 m4_define and m4_define_default.
3752 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3753 which marks the end of user code with appropriate syncline, like all
3754 the other skeletons.
3755 (b4_user_post_prologue): Add. Don't silently drop.
3756 (yylex): Remove.
3757 (parse): Inline yylex.
3758 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3759 (%{...%}): Fix typo of %code imports.
3760 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3761
3762 Support annotations on parser class with %define annotations.
3763 * data/lalr1.java (annotations): Add to parser class modifier.
3764 * doc/bison.texinfo (Java Parser Interface): Document
3765 %define annotations.
3766 (Java Declarations Summary): Document %define annotations.
3767 * tests/java.at (Java parser class modifiers): Test annotations.
3768
3769 Do not generate code for %error-verbose unless requested.
3770 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3771 Make private. Make conditional on %error-verbose.
3772 (getErrorVerbose, setErrorVerbose): New.
3773 (yytnamerr_): Make conditional on %error-verbose.
3774 (yysyntax_error): Make some code conditional on %error-verbose.
3775 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3776 about %error-verbose having no effect.
3777 (getErrorVerbose, setErrorVerbose): Document.
3778
3779 Move constants for token names to Lexer interface.
3780 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3781 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3782 (parse): Qualify EOF to Lexer.EOF.
3783 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3784 EOF and token names to Java Lexer Interface.
3785 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3786
3787 Make yyerror public.
3788 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3789 (yyerror): Change to public. Add Javadoc comments. Use longer
3790 parameter names. Make the body rather than the declarator
3791 conditional on %locations.
3792 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3793
3794 Allow user to add code to the constructor with %code init.
3795 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3796 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3797 Add %code init to the front of the constructor body.
3798 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3799 and %define init_throws.
3800 (Java Declarations Summary): Document %code init and
3801 %define init_throws.
3802 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3803 (Java constructor init and init_throws): Add tests.
3804
38052008-11-10 Akim Demaille <demaille@gostai.com>
3806
3807 Update TODO.
3808 * TODO (-D): is implemented.
3809 (associativity): Same precedence must have the same associativity.
3810 For instance, how can a * b / c be parsed if * is %left and / is
3811 %right?
3812 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3813
38142008-11-10 Akim Demaille <demaille@gostai.com>
3815
3816 Formatting changes.
3817
38182008-11-10 Akim Demaille <demaille@gostai.com>
3819
3820 More information about the symbols.
3821 * src/output.c (type_names_output): Document all the symbols,
3822 including those that don't have a type-name.
3823 (symbol_definitions_output): Define "is_token" and
3824 "has_type_name".
3825 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3826 type-name, now that they are defined too in b4_type_names.
3827
38282008-11-10 Akim Demaille <demaille@gostai.com>
3829
3830 Regen.
3831
38322008-11-10 Akim Demaille <demaille@gostai.com>
3833
3834 Make parser::yytranslate static.
3835 Small speedup (1%) on the list grammar. And makes yytranslate_
3836 available in non member functions.
3837
3838 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3839 function.
3840
38412008-11-10 Akim Demaille <demaille@gostai.com>
3842
3843 Avoid trailing spaces.
3844 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3845 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3846 they can be empty, and anyway this incorrectly indents the first
3847 action.
3848
38492008-11-10 Akim Demaille <demaille@gostai.com>
3850
3851 Comment changes.
3852
38532008-11-10 Akim Demaille <demaille@gostai.com>
3854
3855 Use "enum" for integral constants.
3856 This is just nicer to read, I observed no speedup.
3857
3858 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3859 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3860 (yyuser_token_number_max_, yyundef_token_): Move into...
3861 (yytranslate_): here.
3862
38632008-11-10 Akim Demaille <demaille@gostai.com>
3864
3865 Shortcuts in bench directives.
3866 * etc/bench.pl.in (parse_dirs): New.
3867 Use it.
3868 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3869 Create the benches in "benches/".
3870
38712008-11-10 Akim Demaille <demaille@gostai.com>
3872
3873 Formatting changes.
3874 * data/lalr1.cc: here.
3875
38762008-11-10 Akim Demaille <demaille@gostai.com>
3877
3878 Adjust verbose message to using emacs.
3879 * etc/bench.pl.in: Inform compilation-mode when we change the
3880 directory.
3881 (generate_grammar_list): Recognize %define "variant" in addition
3882 to %define variant.
3883
38842008-11-10 Akim Demaille <demaille@gostai.com>
3885
3886 Classify symbols by type-name.
3887 * src/uniqstr.h (UNIQSTR_CMP): New.
3888 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3889 (type_names_output): New.
3890 (muscles_output): Use it.
3891 * data/lalr1.cc (b4_symbol_action_): Remove.
3892 (b4_symbol_case_, b4_type_action_): New.
3893 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3894
38952008-11-10 Akim Demaille <demaille@gostai.com>
3896
3897 Change the handling of the symbols in the skeletons.
3898 Before we were using tables which lines were the symbols and which
3899 columns were things like number, tag, type-name etc. It is was
3900 difficult to extend: each time a column was added, all the numbers had
3901 to be updated (you asked for colon $2, not for "tag"). Also, it was
3902 hard to filter these tables when only a subset of the symbols (say the
3903 tokens, or the nterms, or the tokens that have and external number
3904 *and* a type-name) was of interest.
3905
3906 Now instead of monolithic tables, we define one macro per cell. For
3907 instance "b4_symbol(0, tag)" is a macro name which contents is
3908 self-decriptive. The macro "b4_symbol" provides easier access to
3909 these cells.
3910
3911 * src/output.c (type_names_output): Remove.
3912 (symbol_numbers_output, symbol_definitions_output): New.
3913 (muscles_output): Call them.
3914 (prepare_symbols): Define b4_symbols_number.
3915
39162008-11-10 Akim Demaille <demaille@gostai.com>
3917
3918 --trace=muscles
3919 * src/getargs.h, src/getargs.c (trace_muscle): New.
3920 (trace_types, trace_args): Support it.
3921 * src/output.c (output_skeleton): Use it.
3922
39232008-11-10 Akim Demaille <demaille@gostai.com>
3924
3925 muscles_output.
3926 * src/output.c (muscles_output): New, extracted from...
3927 (output_skeleton): here.
3928 Adjust.
3929
39302008-11-10 Akim Demaille <demaille@gostai.com>
3931
3932 Formatting changes.
3933
39342008-11-10 Akim Demaille <demaille@gostai.com>
3935
3936 Update the variant example.
3937 * examples/variant.yy: Formatting changes.
3938 One stage build.
3939
39402008-11-10 Akim Demaille <demaille@gostai.com>
3941
3942 Support constructor with an argument.
3943 This improves the "list" bench by 2%.
3944
3945 * data/lalr1.cc (variant::build): Add an overloaded version with
3946 an argument.
3947 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3948
39492008-11-10 Akim Demaille <demaille@gostai.com>
3950
3951 Test variants.
3952 * tests/c++.at (AT_CHECK_VARIANTS): New.
3953 Use it with and without %define assert.
3954
39552008-11-10 Akim Demaille <demaille@gostai.com>
3956
3957 Add %precedence support.
3958 Unfortunately it is not possible to reuse the %prec directive. This
3959 is because to please POSIX, we do not require to end the rules with a
3960 semicolon. As a result,
3961
3962 foo: bar %prec baz
3963
3964 is ambiguous: either a rule which precedence is that of baz, or a rule,
3965 and then a declaration of the precedence of the token baz.
3966
3967 * doc/bison.texinfo: Document %precedence.
3968 (Precedence Only): New.
3969 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3970 * src/conflicts.c (resolve_sr_conflict): Support it.
3971 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3972 Parse it.
3973 * tests/calc.at: Use %precedence for NEG.
3974 * tests/conflicts.at (%precedence does not suffice)
3975 (%precedence suffices): New tests.
3976
39772008-11-09 Akim Demaille <demaille@gostai.com>
3978
3979 Make benches in a sub dirs.
3980 * etc/bench.pl.in ($dir): New.
3981 Use it.
3982 Check the use of constructors with an argument.
3983 (bench_variant_parser): Fix.
3984
39852008-11-09 Akim Demaille <demaille@gostai.com>
3986
3987 fix eof condition
3988
39892008-11-09 Akim Demaille <demaille@gostai.com>
3990
3991 Fix --help.
3992
39932008-11-09 Akim Demaille <demaille@gostai.com>
3994
3995 Require the generation of parse-gram.output.
3996 * src/Makefile.am (YACC): Pass --report=all.
3997
39982008-11-09 Akim Demaille <demaille@gostai.com>
3999
4000 Formatting changes.
4001
40022008-11-09 Akim Demaille <demaille@gostai.com>
4003
4004 Update TODO.
4005 * TODO: Remove obsolete items.
4006 Update others.
4007
40082008-11-09 Akim Demaille <demaille@gostai.com>
4009
4010 Enhance bench.pl.
4011 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4012 (@token, $grammar, $bench): New.
4013 (generate_grammar_variant): Rename as...
4014 (generate_grammar_list): this.
4015 (generate_grammar): Adjust.
4016 (bench_grammar): Rename as...
4017 (bench): this.
4018 Use it in the various bench-marking routines.
4019 (-b, -g): New options.
4020
40212008-11-09 Akim Demaille <demaille@gostai.com>
4022
4023 Use a static hierarchy for symbols in the C++ parser.
4024 * data/lalr1.cc (symbol_base_type, symbol_type)
4025 (stack_symbol_type): Make it a static hierarchy.
4026 Adjust dependencies.
4027
40282008-11-09 Akim Demaille <demaille@gostai.com>
4029
4030 bench.pl -d, --directive.
4031 * etc/bench.pl.in (@directive): New.
4032 (&bench_grammar): Use it.
4033 (&bench_list_grammar): New, to provide access to the "variant"
4034 grammar.
4035 Use it.
4036 (getopts): Support -d, --directive.
4037
40382008-11-09 Akim Demaille <demaille@gostai.com>
4039
4040 Use inline for small operations.
4041 * data/lalr1.cc (symbol_base_type, symbol_type)
4042 (stack_symbol_type): Declare constructor and other operations as
4043 inline.
4044 (yy_destroy_): Inline.
4045
40462008-11-09 Akim Demaille <demaille@gostai.com>
4047
4048 Introduce a hierarchy for symbols.
4049 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4050 (data_type): Rename as...
4051 (stack_symbol_type): this.
4052 Derive from symbol_base_type.
4053 (yy_symbol_value_print_): Merge into...
4054 (yy_symbol_print_): this.
4055 Rename as...
4056 (yy_print_): this.
4057 (yydestruct_): Rename as...
4058 (yy_destroy_): this.
4059 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4060 (parser::parse): yyla is now of symbol_type.
4061 Use its type member instead of yytoken.
4062
40632008-11-09 Akim Demaille <demaille@gostai.com>
4064
4065 Rename data_type and stack_symbol_type.
4066 * data/lalr1.cc (data_type): Rename as...
4067 (stack_symbol_type): this.
4068
40692008-11-09 Akim Demaille <demaille@gostai.com>
4070
4071 Handle semantic value and location together.
4072 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4073 yydata.value and yydata.location.
4074 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4075 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4076 single arg.
4077 Adjust all callers.
4078 (yydestruct_): New overload for a stack symbol.
4079
40802008-11-09 Akim Demaille <demaille@gostai.com>
4081
4082 Push a complete symbol, not connected parts.
4083 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4084 state, value and location.
4085 Adjust callers.
4086
40872008-11-09 Akim Demaille <demaille@gostai.com>
4088
4089 Agregate yylval and yylloc.
4090 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4091 (parser::yyla): this.
4092
40932008-11-09 Akim Demaille <demaille@gostai.com>
4094
4095 Rely on the state stack to display reduction traces.
4096 To display rhs symbols before a reduction, we used information
4097 about the rule reduced, which required the tables yyrhs and
4098 yyprhs. Now use rely only on the state stack to get the same
4099 information.
4100
4101 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4102 Use them.
4103 (parser::yyrhs_, parser::yyprhs_): Remove.
4104 (parser::yy_reduce_print_): Use the state stack.
4105
41062008-11-09 Akim Demaille <demaille@gostai.com>
4107
4108 Fuse yyval and yyloc into yylhs.
4109 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4110 yylhs.
4111 (parse): Replace yyval and yyloc with yylhs.value and
4112 yylhs.location.
4113 After a user action, compute yylhs.state earlier.
4114 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4115 fresh error_token.
4116
41172008-11-09 Di-an Jan <dianj@freeshell.org>
4118
4119 Remove unused variable.
4120 * src/output.c (type_names_output): Remove unused variable sep.
4121
41222008-11-09 Paolo Bonzini <bonzini@gnu.org>
4123
4124 Change tests/output.at quoting.
4125 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
4126 expanding arguments.
4127
41282008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4129
4130 Don't add a semicolon to actions for %skeleton or %language.
4131 It breaks Java test cases as reported by Akim Demaille.
4132 * src/scan-code.l: Implement.
4133
41342008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
4135
4136 Clean up %skeleton and %language priority implementation.
4137 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
4138 remove static qualifier because others will soon need to see it.
4139 (language_prio): Likewise.
4140 (getargs): Use command_line_prio rather than 0.
4141 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
4142 enum fields.
4143 (skeleton_prio): Extern it.
4144 (language_prio): Extern it.
4145 * src/parse-gram.y: Use grammar_prio rather than 1.
4146
41472008-11-07 Akim Demaille <demaille@gostai.com>
4148
4149 Moving push traces into yypush_.
4150 * data/lalr1.cc (yypush_): Now takes a optional trace message.
4151 Adjust all uses.
4152
41532008-11-07 Akim Demaille <demaille@gostai.com>
4154
4155 The single-stack C++ parser is now the standard one.
4156 * data/lalr1.cc: Rename as...
4157 * data/lalr1-split.cc: this.
4158 * data/lalr1-fusion.cc: Rename as...
4159 * data/lalr1.cc: this.
4160 * etc/bench.pl.in: Adjust.
4161
41622008-11-07 Akim Demaille <demaille@gostai.com>
4163
4164 Avoid empty-if warnings.
4165 Reported by Quentin Hocquet.
4166
4167 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
4168 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
4169
41702008-11-07 Akim Demaille <demaille@gostai.com>
4171
4172 Pass command line location to skeleton_arg and language_argmatch.
4173 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
4174 The location argument is now mandatory.
4175 Adjust all dependencies.
4176 (getargs): Use command_line_location.
4177
41782008-11-07 Akim Demaille <demaille@gostai.com>
4179
4180 -D, --define.
4181 * src/getargs.c (usage): Document -D.
4182 Fix help string for --locations.
4183 (command_line_location): New.
4184 (short_options, long_options, getargs): Support -D, --define.
4185 (getargs): Move -d support at the right place.
4186 * doc/bison.texinfo (Bison Options): Update.
4187 * tests/input.at (%define, --define): New.
4188
41892008-11-07 Akim Demaille <demaille@gostai.com>
4190
4191 Initialize the muscle table before parsing the command line.
4192 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
4193 (getargs): Define file_name.
4194 * src/main.c (main): Initialize muscle_tab before calling
4195 getargs.
4196 * src/muscle_tab.c (muscle_init): No longer define file_name, as
4197 its value is not available yet.
4198
41992008-11-07 Akim Demaille <demaille@gostai.com>
4200
4201 Locations without columns for command line arguments.
4202 * src/location.c (location_print): Don't display negative columns.
4203 * src/location.h: Document this.
4204
42052008-11-07 Akim Demaille <demaille@gostai.com>
4206
4207 Fix --help.
4208 * src/getargs.c (usage): Fix help string for -W.
4209
42102008-11-07 Akim Demaille <demaille@gostai.com>
4211
4212 Handle more general types of option arguments.
4213 * build-aux/cross-options.pl: The argument ends at the first
4214 space, not the first non-symbol character.
4215 Use @var for each word appearing the argument description.
4216
42172008-11-07 Akim Demaille <demaille@gostai.com>
4218
4219 Destroy the variants that remain on the stack in case of error.
4220 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
4221 destructor.
4222 Display the value only if yymsg is nonnull.
4223 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
4224
42252008-11-07 Akim Demaille <demaille@gostai.com>
4226
4227 Add "%define assert" to variants.
4228 This is used to help the user catch cases where some value gets
4229 ovewritten by a new one. This should not happen, as this will
4230 probably leak.
4231
4232 Unfortunately this uncovered a bug in the C++ parser itself: the
4233 lookahead value was not destroyed between two calls to yylex. For
4234 instance if the previous lookahead was a std::string, and then an int,
4235 then the value of the std::string was correctly taken (i.e., the
4236 lookahead was now an empty string), but std::string structure itself
4237 was not reclaimed.
4238
4239 This is now done in variant::build(other&) (which is used to take the
4240 value of the lookahead): other is not only stolen from its value, it
4241 is also destroyed. This incurs a new performance penalty of a few
4242 percent, and union becomes faster again.
4243
4244 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
4245 (b4_variant_if): New.
4246 (variant::built): New.
4247 Use it whereever the status of the variant changes.
4248 * etc/bench.pl.in: Check the penalty of %define assert.
4249
42502008-11-07 Akim Demaille <demaille@gostai.com>
4251
4252 Use "%define variant" in bench.pl.
4253 * etc/bench.pl.in: No longer use the pseudo directive %variants,
4254 just use %define variants.
4255
42562008-11-07 Akim Demaille <demaille@gostai.com>
4257
4258 Regen.
4259 * src/parse-gram.h, src/parse-gram.c: Regen.
4260
42612008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
4262
4263 Fix user actions without a trailing semicolon.
4264 Reported by Sergei Steshenko at
4265 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
4266 * THANKS (Sergei Steshenko): Add.
4267 * src/scan-code.l (SC_RULE_ACTION): Fix it.
4268 * tests/regression.at (Fix user actions without a trailing semicolon):
4269 New test case.
4270
42712008-11-04 Akim Demaille <demaille@gostai.com>
4272
4273 Use b4_copyright_years.
4274 * data/yacc.c (b4_copyright_years): New.
4275 Fix its value according to the comments in the file.
4276 Use it and undefine it.
4277
42782008-11-04 Akim Demaille <demaille@gostai.com>
4279
4280 Formatting changes.
4281 * data/lalr1-fusion.cc, src/parse-gram.y: here.
4282
42832008-11-04 Akim Demaille <demaille@gostai.com>
4284
4285 Formatting changes.
4286 * data/lalr1-fusion.cc: here.
4287
42882008-11-04 Akim Demaille <demaille@gostai.com>
4289
4290 Use strict on bench.pl.
4291 * etc/bench.pl.in (&run, &generate_grammar): New.
4292 Rename the grammar generating functions for consistency.
4293 Change the interface so that the list of benches to run is passed
4294 as (optionless) arguments.
4295 (&compile): Use &run.
4296
42972008-11-04 Akim Demaille <demaille@gostai.com>
4298
4299 Remove spurious initial empty lines.
4300 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
4301 * data/yacc.c: End the @output lines with an @.
4302
43032008-11-04 Akim Demaille <demaille@gostai.com>
4304
4305 Improve the display of sizes.
4306 * etc/bench.p.in: Higher precision.
4307 Sort by decreasing size.
4308
43092008-11-04 Akim Demaille <demaille@gostai.com>
4310
4311 Don't memcpy C++ structures.
4312 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
4313 arguments.
4314 (variant::build): New overload for
4315 copy-construction-that-destroys.
4316 (variant::swap): New.
4317 (parser::yypush_): Use it in variant mode.
4318
43192008-11-04 Akim Demaille <demaille@gostai.com>
4320
4321 Better defaults for bench.pl.
4322 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
4323 default values.
4324 Adjust &verbose uses.
4325 (-q, --quiet): New.
4326
43272008-11-04 Akim Demaille <demaille@gostai.com>
4328
4329 Make variant.yy more complex.
4330 std::list cannot be copied via memcpy, they are more demanding than
4331 std::string. Use one std::list to strengthen the test.
4332
4333 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
4334 Adjust.
4335 Create a list of strings, instead of a single large string.
4336
43372008-11-04 Akim Demaille <demaille@gostai.com>
4338
4339 bench.pl --bench.
4340 * etc/bench.pl.in (--bench, $bench): New.
4341
43422008-11-04 Akim Demaille <demaille@gostai.com>
4343
4344 Sort methods.
4345 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4346 Define it after as().
4347
43482008-11-04 Akim Demaille <demaille@gostai.com>
4349
4350 Useless parens.
4351 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4352
43532008-11-04 Akim Demaille <demaille@gostai.com>
4354
4355 Issue missing synclines after user actions.
4356 * data/c.m4 (b4_case): Issue synclines on the output file.
4357
43582008-11-04 Akim Demaille <demaille@gostai.com>
4359
4360 Remove trailing empty line.
4361 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4362 epilogue.
4363
43642008-11-04 Akim Demaille <demaille@gostai.com>
4365
4366 Fix output of copyright years.
4367 * data/bison.m4 (b4_copyright): Fix the indentation of the
4368 copyright year paragraph.
4369 Use b4_copyright_years when no years are given.
4370 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4371 (b4_copyright_years): New.
4372 Use it.
4373
43742008-11-04 Akim Demaille <demaille@gostai.com>
4375
4376 Avoid the spurious initial empty line.
4377 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4378 the end of @output request to suppress the empty line that
4379 results.
4380
43812008-11-04 Akim Demaille <demaille@gostai.com>
4382
4383 Remove parser::rhs_number_type.
4384 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4385 (yyrhs_): Use b4_table_define.
4386
43872008-11-04 Akim Demaille <demaille@gostai.com>
4388
4389 Fix iteration type.
4390 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4391
43922008-11-04 Akim Demaille <demaille@gostai.com>
4393
4394 Factor the declaration of the integer tables.
4395 * data/lalr1-fusion.cc (b4_table_define): New.
4396 Use it.
4397
43982008-11-03 Akim Demaille <demaille@gostai.com>
4399
4400 Fix indentation of tables in lalr1.cc
4401 * data/lalr1-fusion.cc: Fix the indentation.
4402
44032008-11-03 Akim Demaille <demaille@gostai.com>
4404
4405 Destroy the lhs symbols after reduction.
4406 * data/lalr1-fusion.cc (parse): After the user action, when in
4407 variant mode, destroy the lhs symbols.
4408
44092008-11-03 Akim Demaille <demaille@gostai.com>
4410
4411 Simplify yysyntax_error_ use.
4412 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4413 type, but make it unnamed in the declaration when it is not used.
4414
44152008-11-03 Akim Demaille <demaille@gostai.com>
4416
4417 Let yy::variant::build return an lvalue.
4418 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4419 object.
4420
44212008-11-03 Akim Demaille <demaille@gostai.com>
4422
4423 Define yy::variant only when needed.
4424 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4425 used.
4426
44272008-11-03 Akim Demaille <demaille@gostai.com>
4428
4429 Bench the three-stack lalr1.cc.
4430 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4431 one-stack one.
4432
44332008-11-03 Akim Demaille <demaille@gostai.com>
4434
4435 Fail on parse error in calc++.
4436 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4437 status.
4438 * examples/calc++/test ($me, $number, $exit, run): New.
4439 Use them to propagate errors to the exit status.
4440
44412008-11-03 Akim Demaille <demaille@gostai.com>
4442
4443 Don't specify the skeleton twice in the example.
4444 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4445 file does what is needed.
4446
44472008-11-03 Akim Demaille <demaille@gostai.com>
4448
4449 bench: Improve output.
4450 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4451
44522008-11-03 Akim Demaille <demaille@gostai.com>
4453
4454 bench: check impact of %debug on variants.
4455 * etc/bench.pl.in (variant_grammar): Fix the computation of
4456 $variant.
4457 Generate a grammar file that can work with or without %debug.
4458 Do use the @directive.
4459 (bench_variant_parser): Check impact of %debug.
4460 (@directives): Rename all the occurrences to...
4461 (@directive): this, for consistency.
4462
44632008-11-03 Akim Demaille <demaille@gostai.com>
4464
4465 bench: report the size too.
4466 * etc/bench.pl.in ($iterations): Defaults to -3.
4467 (&bench_grammar): Require hireswallclock.
4468 Compute and display the size of the result.
4469 More comments.
4470
44712008-11-03 Akim Demaille <demaille@gostai.com>
4472
4473 bench: More use of the verbosity level.
4474 * etc/bench.pl.in ($verbose, &verbose): New.
4475 Use them.
4476 More POD documentation.
4477
44782008-11-03 Akim Demaille <demaille@gostai.com>
4479
4480 bench.pl: a command line interface
4481 * etc/bench.pl.in: More doc.
4482 Some fixes in the documentation.
4483 ($cflags, $iterations, &help, &getopt): New.
4484 Use them.
4485 (&variant_grammar): Let the number of stages be 10 times what is
4486 specified.
4487
44882008-11-03 Akim Demaille <demaille@gostai.com>
4489
4490 Bench the use of Boost.Variants.
4491 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4492 New.
4493 (&compile): Be ready to compile C++ parsers.
4494 (&bench_push_parser): Move debug information to the outermost
4495 level.
4496 * THANKS: Add Michiel De Wilde.
4497
44982008-11-03 Akim Demaille <demaille@gostai.com>
4499
4500 bench.pl: Pass directives as a list instead of as a string.
4501 * etc/bench.pl.in (&directives): New.
4502 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4503 directives.
4504 (&triangular_grammar): Do use the directives (were ignored).
4505 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4506 directives.
4507
45082008-11-03 Akim Demaille <demaille@gostai.com>
4509
4510 Improve genericity of bench.pl.
4511 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4512 argument.
4513 (&bench_push_parser): New.
4514 Call it.
4515
45162008-11-03 Akim Demaille <demaille@gostai.com>
4517
4518 Add documentation to bench.pl.
4519 * etc/bench.pl.in: Comment changes.
4520
45212008-11-03 Akim Demaille <demaille@gostai.com>
4522
4523 Fuse the three stacks into a single one.
4524
4525 In order to make it easy to perform benchmarks to ensure that
4526 there are no performance loss, lalr1.cc is forked into
4527 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4528 lalr1.cc.
4529
4530 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4531 exercized by the test suite, the user must install a symbolic link
4532 from lalr1.cc to it.
4533
4534 Instead of having three stacks (state, value, location), use a
4535 stack of triples. This considerably simplifies the code (and it
4536 will be easier not to require locations as currently does the C++
4537 parser), and also gives a 10% speedup according to
4538 etc/bench (probably mainly since memory allocation is done once
4539 instead of three times).
4540
4541 Another motivation is to make it easier to destruct properly
4542 semantic values: now that they are bound to their state (hence
4543 symbol type) it will be easier to call the appropriate destructor.
4544
4545 These changes should probably benefit the C parser too.
4546
4547 * data/lalr1.cc: Copy as...
4548 * data/lalr1-fusion.cc: this new file.
4549 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4550 from c++.m4.
4551 (state_stack_type, semantic_stack_type, location_stack_type)
4552 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4553 (data_type, stack_type, yystack_): New.
4554 (YYLLOC_DEFAULT, yypush_): Adjust.
4555 (yyerror_range): Now based on data_type, not location_type.
4556
45572008-11-03 Akim Demaille <demaille@gostai.com>
4558
4559 Push the state, value, and location at the same time.
4560 This is needed to prepare a forthcoming patch that fuses the three
4561 stacks into one.
4562
4563 * data/lalr1.cc (parser::yypush_): New.
4564 (parser::yynewstate): Change the semantics: instead of arriving to
4565 this label when value and location have been pushed, but yystate
4566 is to be pushed on the state stack, now the three of them must
4567 have been pushed before. yystate still must be the new state.
4568 This allows to use yypush_ everywhere instead of individual
4569 handling of the stacks.
4570
45712008-11-03 Akim Demaille <demaille@gostai.com>
4572
4573 Prefer references to pointers.
4574 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4575 definition to use references instead of pointers.
4576 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4577 Take the value and location as references.
4578 Adjust callers.
4579
45802008-11-03 Akim Demaille <demaille@gostai.com>
4581
4582 stack::size instead of stack::height.
4583 * data/lalr1.cc (stack::height): Rename as...
4584 (stack::size): this.
4585 Fix the output type.
4586 Comment changes.
4587
45882008-11-03 Akim Demaille <demaille@gostai.com>
4589
4590 Use variants to support objects as semantic values.
4591 This patch was inspired by work by Michiel De Wilde. But he used
4592 Boost variants which (i) requires Boost on the user side, (ii) is
4593 slow, and (iii) has useless overhead (the parser knows the type of
4594 the semantic value there is no reason to duplicate this
4595 information as Boost.Variants do).
4596
4597 This implementation reserves a buffer large enough to store the
4598 largest objects. yy::variant implements this buffer. It was
4599 implemented with Quentin Hocquet.
4600
4601 * src/output.c (type_names_output): New.
4602 (output_skeleton): Invoke it.
4603 * data/c++.m4 (b4_variant_if): New.
4604 (b4_symbol_value): If needed, provide a definition for variants.
4605 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4606 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4607 (b4_char_sizeof, yy::variant): New.
4608 (parser::parse): If variants are requested, define
4609 parser::union_type, parser::variant, change the definition of
4610 semantic_type, construct $$ before running the user action instead
4611 of performing a default $$ = $1.
4612 * examples/variant.yy: New.
4613 Based on an example by Michiel De Wilde.
4614
46152008-11-03 Akim Demaille <demaille@gostai.com>
4616
4617 Parameterize the extraction of semantic values.
4618 To make future changes easier, no longer rely on ".TYPE" being the
4619 way to get a semantic value.
4620
4621 * data/c.m4 (b4_symbol_value): New.
4622 Use it.
4623 * data/c++.m4, data/yacc.c: Use it.
4624 * data/glr.c: Use b4_symbol_value.
4625 (b4_rhs_data): New.
4626 Use it.
4627
46282008-11-03 Akim Demaille <demaille@gostai.com>
4629
4630 Prepare easier M4 changes.
4631 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4632 future changes.
4633
46342008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4635
4636 Initiate further development.
4637 * NEWS: Create an empty section for new entries.
4638 * gnulib: Update submodule to HEAD.
4639
46402008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4641
4642 * NEWS: Version 2.4.
4643
46442008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4645
4646 Prepare for next release.
4647 * NEWS: Briefly mention changes since 2.3b.
4648 * README: Say GNU m4 1.4.6, which we've been requiring in release
4649 announcements already, not 1.4.3, which breaks the build.
4650
46512008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4652
4653 Say %language is experimental.
4654 We're thinking of extending it's effect on output file naming. See the
4655 thread at
4656 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4657 * NEWS: Say it's experimental.
4658 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4659 recommend it over %skeleton for now.
4660 (Bison Options): Likewise.
4661 (C++ Bison Interface): Use %skeleton not %language.
4662 (Calc++ Parser): Use %skeleton not %language.
4663 * src/getargs.c (usage): Say it's experimental.
4664
46652008-11-01 Di-an Jan <dianj@freeshell.org>
4666 Paolo Bonzini <bonzini@gnu.org>
4667
4668 Support all Java parser class modifiers.
4669 * data/java.m4 (b4_percent_define_get3): New.
4670 (b4_final_if, b4_strictfp_if): New.
4671 * data/lalr1.java (final, strictfp, extends, implements): Support.
4672 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4673 documentation.
4674 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4675 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4676 (AT_CHECK_JAVA_GREP): New.
4677 (Java parser class modifiers): New test.
4678 (Java parser class extends and implements): New test.
4679
4680 Model exception propagation better with throws and lex_throws.
4681 * data/java.m4 (b4_list2): New.
4682 (throws): Change default.
4683 * data/lalr1.java (yyaction): Add throws.
4684 (parse): Add lex_throws in addition to throws.
4685 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4686 * tests/java.at (Java throws specifications): New test.
4687
4688 Improve documentation for Java parsers.
4689 * doc/bison.texinfo (Java Parsers): Add subsections.
4690 Don't quote first argument of %define.
4691 (Java Bison Interface): Document output files. Move documentation
4692 of parser class and merge into Java Parser Interface. Document
4693 features that error out. Document directives with no effect.
4694 Move note about Javadoc higher.
4695 (Java Semantic Values): Explicitly mention stype.
4696 Document that generic types cannot be used.
4697 (Java Location Values): Use @deftypeivar. Document constructors.
4698 Correct return value for toString.
4699 (Java Parser Interface): List undocumented constants/fields.
4700 Move documentation of fields added by %parse-param closer to list
4701 of members. Document that token names are added as fields.
4702 Document constructors accurately. Remove error method.
4703 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4704 Interface. Describe %code lexer and yylex accutately.
4705 Remove documentation that does not match the code.
4706 (Java Action Features): New.
4707 (Java Differences): Add reference. Add item on semantic values.
4708 Add note about @{ ... @}. Clarify %% epilogue placement.
4709 (Java Declarations Summary): New.
4710
4711 Fix Java skeleton.
4712 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4713 (b4_remove_comma): Quote test argument.
4714 (b4_identification): Remove "bison" field.
4715 * tests/java.at (Java parser class and package names): New test.
4716 (Java %parse-param and %lex-param): New test.
4717 (Java stype, position_class and location_class): New test.
4718
47192008-10-31 Di-an Jan <dianj@freeshell.org>
4720
4721 * data/lalr1.jave: Update copyright years.
4722 (YYParser): Correct name of "generated from" file in Javadoc:
4723 use b4_file_name instead of @ofile@.
4724 (Location constructor): Correct Javadoc parameter name.
4725 (yylloc): Add missing opening m4 quote after b4_location_if.
4726 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4727 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4728 (YYParser constructor): Correct Javadoc parameter name.
4729
47302008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4731
4732 Always put auxiliary code files in the same dir as other output files.
4733 * src/files.c (compute_file_name_parts): When the user specifies
4734 --output but not --file-prefix, extract the directory prefix from the
4735 file prefix not from the grammar file name. This affects the location
4736 of files like location.hh generated by the C++ skeleton. The includes
4737 in the other output files require this fix.
4738 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4739 for expected output files.
4740 (Output files): Add a test for the above.
4741
47422008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4743
4744 * gnulib: Update submodule to HEAD.
4745
47462008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4747
4748 Update copyright year.
4749 * src/files.c: Here.
4750
47512008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4752
4753 Don't overwrite the input file.
4754 * src/files.c (output_file_name_check): Fatal error if using input file
4755 for output.
4756 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4757 argument.
4758 (Conflicting output files): Add test.
4759
47602008-10-28 Akim Demaille <demaille@gostai.com>
4761
4762 Space changes.
4763 * data/lalr1.cc: Formatting changes.
4764
47652008-10-28 Akim Demaille <demaille@gostai.com>
4766
4767 Don't define debugging functions when !YYDEBUG.
4768 * data/lalr1.cc (debug_stream, set_debug_stream)
4769 (debug_level_type, debug_level, set_debug_level): Don't
4770 declare them when YYDEBUG is not defined.
4771 The implementation are already YYDEBUG-aware.
4772
47732008-10-28 Akim Demaille <demaille@gostai.com>
4774
4775 Prefer "continue" for empty loop bodies.
4776 * etc/bench.pl.in: Use "continue" instead of {}.
4777
47782008-10-28 Akim Demaille <demaille@gostai.com>
4779
4780 Space and comments changes.
4781 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4782 * data/c.m4, data/lalr1.cc: Space changes.
4783
47842008-10-28 Akim Demaille <demaille@gostai.com>
4785
4786 Make gnulib a submodule.
4787 * gnulib: New.
4788 * .gitmodules (gnulib): New.
4789
47902008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4791
4792 Fix yyerror_range for user-defined location type in C++. Reported by
4793 Georg Sauthoff at
4794 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4795 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4796 * THANKS (Georg Sauthoff): Add.
4797
47982008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4799
4800 Update several administrative files mainly to facilitate releasing.
4801 * HACKING (Administrivia): Make the git-merge-changelog notes more
4802 helpful.
4803 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4804 (Release Procedure): Update for git and add numerous details that were
4805 previously missing.
4806 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4807 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4808 that announcements don't claim we bootstrapped with whatever bison
4809 happened to be in PATH. Add flex as a bootstrap tool.
4810 * Makefile.maint: Remove, previously replaced by maint.mk.
4811 * Makefile.cfg: Remove, and migrate settings to...
4812 * cfg.mk: ... here for the sake of `make announcement'.
4813 * bootstrap.conf (gnulib_modules): Add announce-gen.
4814 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4815 Berry.
4816
48172008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4818
4819 Small but important bugfixes for the Java skeleton.
4820 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4821 (yy_symbol_print): Call toString on yyvaluep.
4822
48232008-08-29 Akim Demaille <demaille@gostai.com>
4824
4825 Clarify UPDATED use.
4826 * doc/bison.texinfo: It refers to the last edition of this file,
4827 not to the release date of Bison.
4828 Reported by Joel E. Denny.
4829
48302008-08-29 Akim Demaille <demaille@gostai.com>
4831
4832 * README: Update FAQ pointer.
4833 Reported by Joel E. Denny.
4834
48352008-08-27 Eric Blake <ebb9@byu.net>
4836
4837 Resync m4sugar from autoconf.
4838 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4839 (m4_init): Adjust to latest m4.git changes.
4840 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4841 effects.
4842 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4843 (_m4_list_cmp): Reduce side effects.
4844
48452008-08-27 Akim Demaille <demaille@gostai.com>
4846
4847 Check yyerrok in calc.at.
4848 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4849 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4850 expected.
4851
48522008-08-27 Akim Demaille <demaille@gostai.com>
4853
4854 Support yyerrok in lalr1.cc.
4855 YYBACKUP is still to import back into lalr1.cc.
4856 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4857
48582008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4859
4860 For maintainer-check*, don't recompile for a $(VERSION) update.
4861 * cfg.mk: New file.
4862 (_is-dist-target): Override the one in GNUmakefile.
4863 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4864
48652008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4866
4867 Update for recent change to gnulib.
4868 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4869 string.h now.
4870
48712008-08-15 Eric Blake <ebb9@byu.net>
4872
4873 Remaining m4sugar merge from autoconf.
4874 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4875 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4876 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4877 * src/output.c (output_skeleton): Tell m4 how to find it.
4878
4879 Partial m4sugar merge from autoconf: m4_map.
4880 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4881 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4882 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4883 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4884 for empty list.
4885 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4886 Likewise.
4887 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4888 declares it.
4889
48902008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4891
4892 Keep .version and PACKAGE_VERSION in sync.
4893 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4894 dependency, and add comments justifying this in more detail. Discussed
4895 starting at
4896 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4897
48982008-08-06 Eric Blake <ebb9@byu.net>
4899
4900 Partial m4sugar merge from autoconf: m4_shiftn.
4901 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4902 (m4_shift2, m4_shift3): New macros.
4903 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4904 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4905 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4906 * data/java.m4 (b4_remove_comma): Likewise.
4907
4908 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4909 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4910 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4911 (m4_init): Consolidate wrapped text into single m4_wrap.
4912 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4913 in wrapped text.
4914
49152008-08-05 Eric Blake <ebb9@byu.net>
4916
4917 Partial m4sugar merge from autoconf: builtins, version.m4.
4918 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4919 (m4_prepend): Remove, as it is unused and inherently quadratic,
4920 whereas m4_append is linear in newer m4.
4921 (m4_mkstemp): New builtin.
4922 (m4_symbols): Make rename conditional.
4923 (m4_version_prereq): Ensure fatal error if used in bison, which
4924 intentionally lacks version.m4.
4925
4926 Fix comments in m4sugar.
4927 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4928
49292008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4930
4931 Update for recent .gitignore fix in Gnulib.
4932 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4933 anchored .gitignore entries.
4934
49352008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 Set gnu or gnits strictness.
4938 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4939 development and gnits strictness for releases. Based on Eric Blake's
4940 suggestion at
4941 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4942
49432008-07-31 Paolo Bonzini <bonzini@gnu.org>
4944
4945 * NEWS: Clarify documentation of %language.
4946
49472008-07-31 Paolo Bonzini <bonzini@gnu.org>
4948
4949 Support usage of git-merge-changelog.
4950 * .gitattributes: New.
4951 * HACKING: Document usage of git-merge-changelog.
4952 * bootstrap: Install git-merge-changelog entries in .git/config
4953 if appropriate.
4954
49552008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4956
4957 Remove remaining dependence on CVS Id keyword.
4958 * ChangeLog: For the sake of people still using CVS, don't use dollars
4959 when mentioning Id.
4960 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4961 unusual anyway.
4962 * data/xslt/xml2dot.xsl: Likewise.
4963 * data/xslt/xml2text.xsl: Likewise.
4964 * data/xslt/xml2xhtml.xsl: Likewise.
4965 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4966 * doc/Makefile.am (neutralize): Remove, no longer needed.
4967 (.x.1): Don't use neutralize.
4968 (edit): Don't substitute for ID.
4969 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4970
49712008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4972
4973 Fix dependence on computed configure variables.
4974 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4975 $(top_srcdir)/configure.ac so that changes to computed variables, such
4976 as PACKAGE_VERSION, are seen.
4977 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4978
49792008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4980
4981 Update copyright dates for recent changes.
4982 * Makefile.am: Here.
4983 * src/Makefile.am: Here.
4984 * src/reduce.c: Here.
4985 * tests/reduce.at: Here.
4986
49872008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4988
4989 Use git-version-gen for version names between releases.
4990 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4991 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4992 * .prev-version: New.
4993 * .version.in: Remove.
4994 * ChangeLog: Remove the Id previously used for capturing the CVS
4995 revision.
4996 * GNUmakefile: Remove, now copied from Gnulib.
4997 * Makefile.am: Add code suggested by comments in
4998 build-aux/git-version-gen.
4999 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5000 .prev-version, and .version.
5001 * NEWS (2.3b+): Rename to...
5002 (?.?): ... this because we're dropping the "+" version naming scheme,
5003 but, in general, we still can't be sure of our next release name.
5004 * bootstrap: Add a quick hack to remove from .gitignore the
5005 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5006 entry. This should really be fixed in gnulib instead.
5007 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5008 * configure.ac (AC_INIT): Set version name by invoking
5009 build-aux/git-version-gen.
5010 (AC_CONFIG_FILES): Remove .version, now generated by
5011 build-aux/git-version-gen.
5012 * maint.mk: New, copied from coreutils.
5013 * doc/.cvsignore (bison.1): Add.
5014 * doc/.gitignore (/bison.1): Add.
5015 * doc/bison.1: Remove, generated.
5016 * src/.cvsignore (revision.c): Remove.
5017 * src/.gitignore (/revision.c): Remove.
5018 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5019 (BUILT_SOURCES): Remove revision.c.
5020 (revision.c): Remove.
5021 * src/getargs.c (version): Don't print revision after the VERSION.
5022 * src/revision.h: Remove.
5023
50242008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5025
5026 Fix untranslatable composition of sentences. Reported by Goran
5027 Uddeborg at
5028 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5029 * THANKS (Goran Uddeborg): Add.
5030 * src/reduce.c (reduce_print): Report the number of nonterminals and
5031 rules useless in the grammar in separate sentences.
5032 * tests/reduce.at (Useless Rules): Update output.
5033 (Reduced Automaton): Likewise.
5034 (Underivable Rules): Likewise.
5035 (Empty Language): Likewise.
5036
50372008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5038
5039 Fix some .gitignore and .cvsignore problems.
5040 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5041 (insert_vc_ignore): ... this new function, which prepends `/' to all
5042 .gitignore entries before passing them to insert_sorted_if_absent.
5043 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5044 .cvsignore files are maintained even though Bison developers run
5045 bootstrap while using Git.
5046 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5047 unneeded by Bison.
5048 (gnulib): Add.
5049 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5050 unneeded. Reported by Eric Blake.
5051 * lib/.gitignore (/*~): Add.
5052 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5053 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5054 Blake.
5055 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5056
50572008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5058
5059 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5060 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5061 * bootstrap.conf (gnulib_modules): Add unsetenv.
5062 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5063 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5064 (/setenv.m4): Add.
5065 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5066 the first argument because it may become position-dependent, and unset
5067 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5068 Add comments explaining these issues in more detail.
5069
50702008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5071
5072 Add .gitignore everywhere based on .cvsignore.
5073 * .gitignore: New.
5074 * build-aux/.gitignore: New.
5075 * data/.gitignore: New.
5076 * doc/.gitignore: New.
5077 * etc/.gitignore: New.
5078 * examples/.gitignore: New.
5079 * examples/calc++/.gitignore: New.
5080 * lib/.gitignore: New.
5081 * m4/.gitignore: New.
5082 * po/.gitignore: New.
5083 * runtime-po/.gitignore: New.
5084 * src/.gitignore: New.
5085 * tests/.gitignore: New.
5086
50872008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5088
5089 * NEWS (2.3b+): New section, empty for now.
5090 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5091
50922008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 * NEWS (2.3b): Update release date since there has been a delay in
5095 getting the announcements and tarballs out.
5096
50972008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5098
5099 * NEWS: Version 2.3b.
5100 * configure.ac (AC_INIT): Likewise.
5101 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5102
51032008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5104
5105 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5106 been doing it for years.
5107 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5108 (Release Procedure): Add FIXME about make alpha being unmaintained.
5109
51102008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5111
5112 * data/yacc.c: Reformat m4 a little for readability.
5113 * src/lalr.c (build_relations): Correct comment.
5114
51152008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5116
5117 DJGPP specific issue.
5118 * djgpp/config.sed: Fixes required to run configure scripts generated
5119 by autoconf 2.62.
5120
51212008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5122
5123 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5124 coordinator@translationproject.org.
5125
51262008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5127
5128 * THANKS: Add Eric Blake.
5129
51302008-04-23 Eric Blake <ebb9@byu.net>
5131
5132 Revert prior patch, by working around autoconf regression.
5133 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
5134 ("Output file name: ("): Uncomment test.
5135 ("Output file name: )"): Likewise.
5136 Based on an idea from Noah Misch.
5137
51382008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5139
5140 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
5141 2.61. Reported by Juan Manuel Guerrero at
5142 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
5143 * tests/output.at ("Output file name: ("): Comment out test case for
5144 now.
5145 ("Output file name: )"): Likewise.
5146
51472008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5148
5149 * GNUmakefile: Update git-version-gen invocation so make dist
5150 succeeds.
5151
51522008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
5153
5154 Update to the current gnulib CVS repository, and fix trigraph handling
5155 in Bison.
5156 * bootstrap: Update gnulib CVS repository URL.
5157 (symlink_to_dir): Encapsulate the code that guarantees the destination
5158 directory exists into...
5159 (check_dst_dir): ... this new function, and...
5160 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
5161 fail when copying files into lib/uniwidth/.
5162 * src/output.c (prepare_symbols): When writing yytname muscles, where
5163 symbol names will be encoded in C-string literals, tell quotearg to
5164 escape trigraphs. This used to be the default in gnulib.
5165 * tests/regression.at (Token definitions): Because of the change in
5166 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
5167 escapes trigraphs in symbol names. Thus, yytname no longer has
5168 trigraphs unnecessarily doubly escaped. Update test case output.
5169 Extend test case to be sure Bison's own error messages will no longer
5170 have trigraphs in symbol names unnecessarily escaped once.
5171
51722008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
5173
5174 Fix make dist infinite loop reported by Juan Manuel Guerrero at
5175 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
5176 * .cvsignore: Add .version.
5177 * .version.in: New.
5178 * bootstrap.conf (gnulib_modules): Add git-version-gen.
5179 * configure.ac (AC_CONFIG_FILES): Add .version.
5180 * build-aux/.cvsignore: Add git-version-gen.
5181
51822008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5183
5184 * NEWS (2.3a+): Mention that -g now takes an argument.
5185 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
5186 consistency. Update the -g and -x entries now that they take
5187 arguments. Use brackets to indicate optional arguments.
5188 * src/getargs.c (usage): Explain the relationship between arguments of
5189 long and short options more completely. Document --defines and -d
5190 separately since the former takes an argument but, for POSIX Yacc, the
5191 latter does not.
5192 (short_options): Let -W take an optional argument like --warnings.
5193 (getargs): Sort cases.
5194
51952008-02-28 Akim Demaille <demaille@gostai.com>
5196
5197 * doc/bison.texinfo: Fix a few typos.
5198
51992008-02-28 Akim Demaille <akim@epita.fr>
5200
5201 * doc/bison.texinfo (Bison Options): Document -W.
5202 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
5203
52042008-02-28 Akim Demaille <akim@epita.fr>
5205
5206 * src/getargs.c (short_options): Split and sort for readability.
5207 -g and -x take optional arguments, just like their long options.
5208 * build-aux/cross-options.pl: Use /x to make the regexp easier to
5209 understand.
5210 Fix the handling of $opt which resulted in all the argument to be
5211 considered as optional.
5212
52132008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
5214
5215 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
5216 say its interface is experimental.
5217 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5218 Java.
5219 (Bison Options): In the -L and --language entry, mention Java.
5220 (Java Bison Interface): Say the interface is experimental.
5221 * src/getargs.c (usage): Mention -L and --language.
5222
5223 * NEWS (2.3a+): Say the push parsing interface is experimental.
5224 * doc/bison.texinfo (Push Decl): Likewise.
5225 (Decl Summary): Likewise in the "%define api.push_pull" entry.
5226 (Push Parser Function): Likewise.
5227 (Pull Parser Function): Likewise.
5228 (Parser Create Function): Likewise.
5229 (Parser Delete Function): Likewise.
5230 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
5231 yypull_parse, and yypush_parse entries.
5232
5233 * NEWS (2.3a+): Mention XML support, and say the schema is
5234 experimental.
5235 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
5236 * src/getargs.c (usage): Say the XML schema is experimental.
5237
5238 * NEWS (2.3a+): Say option instead of flag.
5239
52402008-02-21 Wojciech Polak <polak@gnu.org>
5241
5242 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
5243 text.
5244
52452008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
5246
5247 Fix impure push parser compile error reported by Bob Rossi at
5248 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
5249 * data/yacc.c: Clean up whitespace in the output a little.
5250 (yypstate_allocated): Define for impure push parsers regardless of
5251 whether the pull interface is also requested.
5252 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
5253 check impure push parsers without the pull interface.
5254
5255 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
5256 yyerror takes arguments specified by %parse-param while yypstate_new
5257 does not.
5258 * doc/bison.texinfo (Parser Create Function): Document that
5259 yypstate_new returns 0 for multiple impure parser instances.
5260 * tests/push.at (Push Parsing: Multiple impure instances): Update
5261 expected stderr output.
5262
52632008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5264
5265 * runtime-po/POTFILES.in (push.c): Remove.
5266
52672008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5268
5269 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
5270 * data/push.c: Rename to...
5271 * data/yacc.c: ... this, overwriting it.
5272 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
5273 `%push-pull-parser' -> `%define api.push_pull "both"'.
5274 Remove old yacc.c tests, and update push.c tests to yacc.c.
5275
52762008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
5279 `"%code top" blocks' instead of `%code "top" blocks'.
5280 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
5281 Clean up whitespace in the output a little.
5282
52832008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5284
5285 Fix documentation problems reported by Tim Josling at
5286 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
5287 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
5288 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
5289 integers. Explain the effect of literal string aliases on error
5290 messages. Copy token 0 documentation from the C++ skeleton
5291 documentation.
5292
52932008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
5294
5295 Accept a token number in a %left, %right, or %nonassoc for POSIX
5296 conformance. Reported by Tim Josling at
5297 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
5298 * NEWS (2.3a+): Mention.
5299 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
5300 and code numbers are treated by precedence declarations.
5301 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
5302 of symbols.1.
5303 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
5304 of symbol.
5305 (symbol.prec): New, just like symbol but allows INT.
5306 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
5307 longer holds.
5308 * tests/regression.at (Token number in precedence declaration): New
5309 test case.
5310
53112008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5312
5313 DJGPP specific issues.
5314 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
5315 be changed. Copyright timestamp adjusted.
5316 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
5317 be changed. Copyright timestamp adjusted.
5318 * djgpp/config.site: Copyright timestamp adjusted.
5319 * djgpp/config_h.sed: Copyright timestamp adjusted.
5320 * djgpp/djunpack.bat: Copyright timestamp adjusted.
5321 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
5322 filename translation list.
5323 * djgpp/subpipe.c (init_subpipe): Check the environment variables
5324 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
5325 files shall be created. Before trying to use the temp dir where the
5326 environment variable points to check that the dir really exists. If
5327 not default to the cwd as temp dir. Copyright timestamp adjusted.
5328 * djgpp/subpipe.h: Copyright timestamp adjusted.
5329 * djgpp/testsuite.sed: Copyright timestamp adjusted.
5330
53312008-01-30 Paul Eggert <eggert@cs.ucla.edu>
5332
5333 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
5334
53352008-01-09 Paul Eggert <eggert@cs.ucla.edu>
5336
5337 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
5338 Problem reported by Claudio Saavedra in
5339 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
5340
53412008-01-05 Wojciech Polak <polak@gnu.org>
5342
5343 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
5344 document's title with the input grammar file name.
5345
53462007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5347
5348 Automate regression testing of the XML/XSLT implementation. Discussed
5349 starting at
5350 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5351 * configure.ac (XSLTPROC): New substitution.
5352 * Makefile.am (maintainer-xml-check): New phony target invoking...
5353 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5354 invoking make maintainer-check with BISON_TEST_XML=1.
5355 * tests/atlocal.in (XSLTPROC): New.
5356 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5357 not to report reachable memory when Bison is expected to have a
5358 non-zero exit status and (2) to compare XML/XSLT output with --graph
5359 and --report=all output for every working grammar when
5360 BISON_TEST_XML=1.
5361 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5362 (AT_BISON_CHECK_XML): New.
5363 (AT_QUELL_VALGRIND): New.
5364 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5365 (AT_CHECK): ... don't redefine this since this was the old way to
5366 quell Valgrind.
5367 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5368 AT_BISON_CHECK invocations.
5369 * tests/c++.at: Likewise.
5370 * tests/calc.at: Likewise.
5371 * tests/conflicts.at: Likewise.
5372 * tests/cxx-type.at: Likewise.
5373 * tests/existing.at: Likewise.
5374 * tests/glr-regression.at: Likewise.
5375 * tests/headers.at: Likewise.
5376 * tests/input.at: Likewise.
5377 * tests/java.at: Likewise.
5378 * tests/output.at: Likewise.
5379 * tests/push.at: Likewise.
5380 * tests/reduce.at: Likewise.
5381 * tests/regression.at: Likewise.
5382 * tests/sets.at: Likewise.
5383 * tests/skeletons.at: Likewise.
5384 * tests/synclines.at: Likewise.
5385 * tests/torture.at: Likewise.
5386 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5387 tends to hang xsltproc.
5388 (Big horizontal): Likewise.
5389
53902007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5391
5392 In XML output, remove redundant class attribute on symbol element.
5393 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5394 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5395 look up a symbol to determine whether it's a nonterminal or terminal.
5396 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5397 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5398
5399 Add prec/assoc information to XML output.
5400 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5401 %prec, add a percent_prec attribute.
5402 * src/print-xml.c (print_grammar): For each terminal that has a
5403 precedence or associativity, add a prec or assoc attribute.
5404 (xml_indent): New.
5405 (xml_puts): Use xml_indent.
5406 (xml_printf): Use xml_indent.
5407 * src/print-xml.h (xml_indent): Prototype.
5408
5409 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5410 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5411
54122007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5413
5414 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5415 (bison:ruleByNumber): ... this for clarity.
5416 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5417 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5418 (xsl:template match="reduction"): Update.
5419 (xsl:template match="item"): Update.
5420 (xsl:template match="reduction"): Update.
5421
5422 In the XML output, don't print the list of rules where symbols appear.
5423 Compute it in XSLT instead. Discussed at
5424 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5425 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5426 (bison:ruleByRhs): New.
5427 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5428 bison:ruleByRhs.
5429 (xsl:template match="terminal/rule"): Remove.
5430 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5431 bison:ruleByRhs.
5432 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5433 Remove.
5434 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5435 bison:ruleByRhs and mode="number-link" for rule template.
5436 (xsl:template match="terminal/rule"): Remove.
5437 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5438 bison:ruleByRhs and mode="number-link" for rule template.
5439 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5440 Rewrite as...
5441 (xsl:template match="rule" mode="number-link"): ... this.
5442 * src/print-xml.c (print_grammar): Don't print the list of rules.
5443
54442007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5445
5446 Don't let --report affect XML output; always print all information.
5447 Discussed at
5448 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5449 * src/conflicts.c (log_resolution): Implement.
5450 * src/print-xml.c (print_core): Implement.
5451 (print_state): Implement.
5452 (print_xml): Implement.
5453
5454 * NEWS (2.3a+): Fix quotes.
5455 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5456 don't let %verbose clear the list specified by --report.
5457
54582007-11-26 Akim Demaille <akim@epita.fr>
5459
5460 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5461
54622007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5463
5464 In the XML output, list useless and unused symbols and rules with the
5465 useful ones and add a "usefulness" attribute. Discussed starting at
5466 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5467 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5468 (grammar_rules_print_xml): Print all rules instead of just those
5469 useful in the grammar, and add a "usefulness" attribute.
5470 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5471 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5472 (print_grammar): Print all nonterminals instead of just useful ones,
5473 and add a "usefulness" attribute to nonterminals and terminals.
5474 (print_xml): Don't print a separate "reductions" or
5475 "rules-useless-in-parser" element.
5476 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5477 (reduce_xml): Remove.
5478 (reduce_token_unused_in_grammar): New.
5479 (reduce_nonterminal_useless_in_grammar): New.
5480 * src/reduce.h (reduce_xml): Remove prototype.
5481 (reduce_token_unused_in_grammar): Add prototype.
5482 (reduce_nonterminal_useless_in_grammar): Add prototype.
5483 * data/xslt/xml2text.xsl: Update for XML changes.
5484 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5485 * tests/reduce.at (Useless Terminals): Update output.
5486 (Useless Rules): Update output.
5487 (Reduced Automaton): Update output.
5488
5489 Say "Terminals unused in grammar" instead of "Unused terminals".
5490 * NEWS (2.3a+): Update.
5491 * doc/bison.texinfo (Understanding): Update example output.
5492 * src/reduce.c (reduce_output): Implement.
5493 * data/xslt/xml2text.xsl: Implement.
5494 * data/xslt/xml2xhtml.xsl: Implement.
5495
54962007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5497
5498 Accept --report-file=FILE to override the default `.output' filename.
5499 * NEWS (2.3a+): Mention.
5500 * doc/bison.texinfo (Bison Options): Add an entry.
5501 * src/files.c (compute_output_file_names): Don't override
5502 spec_verbose_file if already set.
5503 * src/getargs.c (usage): Document --report-file.
5504 (REPORT_FILE_OPTION): New anonymous enum member.
5505 (long_options): Add entry for it.
5506 (getargs): Add case for it setting spec_verbose_file.
5507
5508 * build-aux/cross-options.pl: Don't record a short option just because
5509 there's an arg.
5510 * doc/.cvsignore: Add yacc.1.
5511
55122007-11-14 Akim Demaille <akim@epita.fr>
5513
5514 * doc/yacc.1.in: New.
5515 * configure.ac, doc/Makefile.am: Adjust.
5516 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5517 config.h symbol.
5518 Use AC_SUBST for assignments too.
5519 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5520
55212007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5522
5523 * src/gram.c: Remove comments that duplicate comments in gram.h.
5524
5525 When reporting useless rules and nonterminals, say "useless in grammar"
5526 instead of "useless", and say "useless in parser" instead of "never
5527 reduced". Discussed starting at
5528 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5529 * NEWS (2.3a+): Mention this change.
5530 * data/xslt/xml2text.xsl: Update output text and expected input XML
5531 element names to match changes below.
5532 * data/xslt/xml2xhtml.xsl: Likewise.
5533 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5534 Contents: "Rules useless in parser due to conflicts".
5535 * doc/bison.texinfo (Decl Summary): Reword a little.
5536 (Understanding): Update example output for changes below.
5537 * src/gram.c: (rule_useful_p): Rename to...
5538 (rule_useful_in_grammar_p): ... this.
5539 (rule_useless_p): Rename to...
5540 (rule_useless_in_grammar_p): ... this.
5541 (rule_never_reduced_p): Rename to...
5542 (rule_useless_in_parser_p): ... this.
5543 (grammar_rules_print): Update for renames.
5544 (grammar_rules_print_xml): Update for renames.
5545 (grammar_rules_never_reduced_report): Rename to...
5546 (grammar_rules_useless_report): ... this since it is used for either
5547 kind of useless rule.
5548 * src/gram.h: Reword comments and update function names in prototypes.
5549 * src/main.c (main): Say "rule useless in parser due to conflicts".
5550 * src/print-xml.c (print_rules_never_reduced): Rename to...
5551 (print_rules_useless_in_parser): ... this, and rename output XML
5552 element "rules-never-reduced" to "rules-useless-in-parser".
5553 (print_xml): Update for rename.
5554 * src/print.c (print_results): Say "Rules useless in parser due to
5555 conflicts".
5556 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5557 (nonterminals_reduce): Say "nonterminal useless in grammar".
5558 (reduce_output): Say "Nonterminals useless in grammar".
5559 Say "Rules useless in grammar".
5560 (reduce_xml): Rename output XML element "useless" to
5561 "useless-in-grammar".
5562 (reduce_print): Don't report the count of grammatically useless rules
5563 as "rules never reduced" just because %yacc is specified.
5564 In the correct report of this count, say nonterminal(s) and rule(s)
5565 "useless in grammar".
5566 * tests/conflicts.at (S/R in initial): Update expected output.
5567 (Defaulted Conflicted Reduction): Likewise.
5568 (Unreachable States After Conflict Resolution): Likewise.
5569 * tests/existing.at (GNU pic Grammar): Likewise.
5570 * tests/reduce.at (Useless Nonterminals): Likewise.
5571 (Useless Rules): Likewise.
5572 (Reduced Automaton): Likewise.
5573 (Underivable Rules): Likewise.
5574 (Empty Language): Likewise.
5575
55762007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5577
5578 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5579 here document and before the EOF so that BSD's implementation of Bourne
5580 shell doesn't parse the delimiter as part of the here document.
5581 * doc/.cvsignore: Add cross-options.texi.
5582 * src/getargs.c (usage): Add a blank line after the warning categories.
5583
55842007-11-08 Paolo Bonzini <bonzini@gnu.org>
5585
5586 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5587
55882007-11-05 Akim Demaille <akim@epita.fr>
5589
5590 Remove Id: from bison.1.
5591 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5592 (perl -0777 -pi -e 's/\.PP\nId): New.
5593 (.x.1): Use it to ignore the version control revision.
5594
55952007-11-05 Akim Demaille <demaille@gostai.com>
5596
5597 * build-aux/Makefile.am: Ship cross-options.pl.
5598 * doc/Makefile.am: Always refer to cross-options.texi with
5599 $(srcdir).
5600 (MAINTAINERCLEANFILES): Add it.
5601
56022007-11-04 Akim Demaille <demaille@gostai.com>
5603
5604 Generate the long/short option cross-table.
5605 * build-aux/cross-options.pl: New.
5606 * doc/Makefile.am (cross-options.texi): New.
5607 * doc/bison.texinfo: Use it.
5608
56092007-11-04 Akim Demaille <demaille@gostai.com>
5610
5611 Generate bison.1 using help2man.
5612 * doc/common.x, doc/bison.x: New.
5613 * doc/Makefile.am (bison.1, .x.1): New.
5614 The code is taken from autoconf-2.61/man/Makefile.am.
5615 * configure.ac: Look for help2man.
5616
56172007-11-04 Akim Demaille <demaille@gostai.com>
5618
5619 Complete --help.
5620 * src/getargs.c (usage): Document -W, make it clear that -d,
5621 -g and -x have optional arguments.
5622
56232007-11-04 Akim Demaille <demaille@gostai.com>
5624
5625 Find sha1sum when named gsha1sum.
5626 * bootstrap (find_tool): New.
5627 ($SHA1SUM): New.
5628
56292007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5630
5631 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5632 at
5633 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5634 * NEWS (2.3a+): Mention.
5635 * data/bison.m4 (b4_pure_if): Don't define it here.
5636 * data/c.m4 (b4_identification): Depend on individual skeletons to
5637 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5638 values of the %define variables api.pure or api.push_pull. Define
5639 YYPURE, YYPUSH, and YYPULL accordingly.
5640 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5641 glr.cc has already defined b4_pure_flag.
5642 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5643 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5644 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5645 * doc/bison.texinfo (Pure Decl): Update.
5646 (Push Decl): Update.
5647 (Decl Summary): Add api.pure to %define entry.
5648 In %pure-parser entry, say it's deprecated and reference %define.
5649 (Pure Calling): Update.
5650 (Error Reporting): Update.
5651 (C++ Scanner Interface): Update.
5652 (How Can I Reset the Parser): Update.
5653 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5654 reference %define.
5655 * src/getargs.c (pure_parser): Remove global variable.
5656 * src/getargs.h (pure_parser): Remove extern.
5657 * src/output.c (prepare): Don't define pure_flag muscle.
5658 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5659 wrapper around `%define api.pure'.
5660 * tests/calc.at (Simple LALR Calculator): Update.
5661 (Simple GLR Calculator): Update.
5662 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5663 Update.
5664 (GLR: Resolve ambiguity, pure, locations): Update.
5665 (GLR: Merge conflicting parses, pure, no locations): Update.
5666 (GLR: Merge conflicting parses, pure, locations): Update.
5667 * tests/glr-regression.at (Uninitialized location when reporting
5668 ambiguity): Update
5669 * tests/input.at (Unused %define api.pure): New test case.
5670 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5671 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5672 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5673
56742007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5675
5676 %define push_pull -> %define api.push_pull. Discussed starting at
5677 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5678 * data/push.c: Expect the new name.
5679 * data/yacc.c: Likewise.
5680 * doc/bison.texinfo (Push Decl): Update.
5681 (Decl Summary): Update %define entry.
5682 (Push Parser Function): Update.
5683 (Pull Parser Function): Update.
5684 (Parser Create Function): Update.
5685 (Parser Delete Function): Update.
5686 * tests/calc.at (Simple LALR Calculator): Update.
5687 * tests/input.at (%define enum variables): Update.
5688 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5689 (Push Parsing: Multiple impure instances): Update.
5690 (Push Parsing: Unsupported Skeletons): Update.
5691 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5692 (Exploding the Stack Size with Malloc): Update.
5693
5694 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5695 other entries some.
5696
56972007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5698
5699 For the XML output's terminal element, rename @number to @token-number,
5700 and add @symbol-number. In the nonterminal element, rename @number to
5701 @symbol-number. Discussed starting at
5702 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5703 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5704 renames.
5705 (xsl:template match="nonterminal"): Likewise.
5706 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5707 (xsl:template match="nonterminal"): Likewise.
5708 * src/print-xml.c (print_grammar): Implement.
5709
57102007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5711
5712 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5713 2007-10-11 change, the child elements here are items not rules.
5714 (xsl:template match="item"): New.
5715 (xsl:template match="rule"): Update for new reduced itemset.
5716 (xsl:template match="point"): Remove.
5717 (xsl:template match="empty"): For consistency with --graph, don't
5718 output "/* empty */".
5719 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5720 line-wrap, don't pass a negative value as first-line-length since this
5721 won't work with the following changes.
5722 (xsl:template name="line-wrap"): Simplify slightly.
5723 (xsl:template name="ws-search"): Eliminate recursion.
5724 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5725 set next to an item whose dot is not at the end of the RHS even if it
5726 happens to be associated with the same rule.
5727
57282007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5729
5730 Add %define lr.keep_unreachable_states.
5731 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5732 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5733 * src/main.c (main): Implement it.
5734 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5735 Extend to test it, and fix a typo.
5736
57372007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5738
5739 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5740 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5741 the example .output text.
5742 * tests/regression.at (Extra lookahead sets in report): Improve wording
5743 of comments.
5744
57452007-10-17 Wojciech Polak <polak@gnu.org>
5746
5747 * src/print-xml.c (print_grammar): Renamed
5748 <terminal> and <nonterminal> attributes:
5749 "type" to "number" and "symbol" to "name".
5750 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5751 Use new attribute names.
5752 (xsl:template match="nonterminal"): Likewise.
5753 * data/xslt/xml2xhtml.xsl: Likewise.
5754
57552007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5756
5757 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5758 (Option Cross Key): Likewise.
5759
5760 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5761 next to an item whose dot is not at the end of the RHS even if it
5762 happens to be associated with the same rule.
5763 * src/print.c (print_core): Likewise.
5764 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5765 (Resolved SR Conflicts): Update output.
5766 * tests/regression.at (Extra lookahead sets in report): New test case.
5767
57682007-10-11 Wojciech Polak <polak@gnu.org>
5769
5770 * src/print-xml.c (print_core): Remove item set
5771 redundancy.
5772 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5773 Improve processing time. Suggested by Joel E. Denny.
5774 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5775 Write xsl:param "required" attribute as comment.
5776 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5777 (xsl:template match="rule"): Support new reduced itemset.
5778 (xsl:template match="point"): Remove.
5779 * data/xslt/xml2xhtml.xsl: Likewise.
5780
57812007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5782
5783 * src/getargs.c (version): Update copyright year.
5784
57852007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5786
5787 Make xml2dot.xsl and --graph produce the same output.
5788 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5789 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5790 escaped later.
5791 (xsl:template name="output-node"): Use the new escape template instead
5792 of the string-replace template directly.
5793 (xsl:template name="output-edge"): Likewise.
5794 (xsl:template name="escape"): New, escapes backslashes and newlines in
5795 addition to quotation marks.
5796 * src/graphviz.c (start_graph, output_node, output_edge): Add
5797 whitespace to output for legibility.
5798
5799 Make xml2text.xsl and --report produce the same output, and remove the
5800 XML "conflicts" element since a conflict summary is easily extracted
5801 from the automaton.
5802 * data/xslt/bison.xsl: New.
5803 (xsl:template match="state" mode="bison:count-conflicts): New.
5804 * data/xslt/xml2text.xsl: Import bison.xsl.
5805 (xsl:template match="bison-xml-report"): Instead of styling the
5806 "conflicts" element, style the "automaton" element with mode
5807 "conflicts". Unlike the former, the latter lists S/R and R/R
5808 conflicts for a state on the same line.
5809 (xsl:template match="conflicts"): Remove.
5810 (xsl:template match="conflict"): Remove.
5811 (xsl:template match="terminal"): Line-wrap the list of rules in which
5812 the terminal is used.
5813 (xsl:template match="nonterminal"): Likewise for nonterminals.
5814 (xsl:template match="automaton" mode="conflicts"): New.
5815 (xsl:template match="state" mode="conflicts"): New.
5816 (xsl:template name="line-wrap"): New.
5817 (xsl:template name="ws-search"): New.
5818 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5819 (xsl:template match="bison-xml-report"): Instead of styling the
5820 "conflicts" element, style the "automaton" element with mode
5821 "conflicts."
5822 (xsl:template match="conflicts"): Remove.
5823 (xsl:template match="conflict"): Remove.
5824 (xsl:template match="automaton" mode="conflicts"): New.
5825 (xsl:template match="state" mode="conflicts): New.
5826 * src/conflicts.c (conflicts_output_xml): Remove.
5827 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5828 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5829 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5830 the corresponding XSLT is easier. Also, never wrap between a word and
5831 the comma that follows it.
5832
58332007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5834
5835 Improve C++ namespace support. Discussed starting at
5836 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5837 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5838 b4_namespace_close): New macros that interpret the %define variable
5839 "namespace" so its value can contain "::" to indicate nested
5840 namespaces.
5841 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5842 the above macros.
5843 * data/lalr1.cc (b4_namespace): Likewise.
5844 * data/location.cc (b4_namespace): Likewise.
5845 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5846 inside a new table in the general %define entry. Document `%define
5847 namespace' there as well. Point the %name-prefix entry to it since it
5848 explains it more completely in the case of C++.
5849 (C++ Bison Interface): Mention `%define namespace' instead of
5850 %name-prefix.
5851 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5852 entry suffices.
5853 * tests/c++.at (Relative namespace references): New test case.
5854 (Absolute namespace references): New test case.
5855 (Syntactically invalid namespace references): New test case.
5856 * tests/input.at (C++ namespace reference errors): New test case.
5857
58582007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5859
5860 Add syncline support and location accessor to internal %define
5861 interfaces.
5862 * data/bison.m4 (b4_percent_define_get_loc): New.
5863 (b4_percent_define_get_syncline): New.
5864 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5865 (b4_percent_define_default): Record defining location as line 1 rather
5866 than 0 for the sake of synchronizing #line's, and define
5867 b4_percent_define_syncline(VARIABLE).
5868 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5869 * src/muscle_tab.c (muscle_syncline_grow): New.
5870 (muscle_code_grow): Use muscle_syncline_grow.
5871 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5872 define b4_percent_define_syncline(VARIABLE).
5873 (muscle_percent_define_get_loc): New.
5874 (muscle_percent_define_get_syncline): New.
5875 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5876 remove some unused variables.
5877 (muscle_percent_define_default): Record defining location as line 1
5878 rather than 0 for the sake of synchronizing #line's, and define
5879 b4_percent_define_syncline(VARIABLE).
5880 (muscle_percent_define_check_values): Use
5881 muscle_percent_define_get_loc.
5882 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5883 (muscle_percent_define_get_syncline): Prototype.
5884 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5885 defaults): Update output for location change.
5886 (Complaining during macro argument expansion): Extend to test
5887 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5888
58892007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5890
5891 Fix some error-reporting macro bugs.
5892 * data/bison.m4 (b4_cat): New.
5893 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5894 to stdout so they don't become arguments to other macros. Update
5895 comments and add examples.
5896 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5897 add examples.
5898 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5899 after printing the error directive so that M4 doesn't report subsequent
5900 problems that are induced by this problem.
5901 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5902 instead of just in them. Recognize @\n in both places. Both expand to
5903 the empty string. Needed by b4_cat.
5904 * tests/skeletons.at (Complaining during macro argument expansion):
5905 New test case.
5906 (Fatal errors make M4 exit immediately): New test case.
5907
59082007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5909
5910 Implement --print-datadir.
5911 * src/getargs.c (usage): Mention.
5912 (PRINT_DATADIR_OPTION): New anonymous enum member.
5913 (long_options): Add entry for it.
5914 (getargs): Add case for it calling compute_pkgdatadir.
5915 * src/output.c (output_skeleton): Encapsulate data directory
5916 computation from here...
5917 (prepare): ... and from here...
5918 (compute_pkgdatadir): ... into this new function.
5919 * src/output.h (compute_pkgdatadir): Prototype.
5920
59212007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5922
5923 * src/print-xml.c (escape_bufs): New static global variable
5924 replacing...
5925 (xml_escape_n): ... the static local variable buf here.
5926 (print_xml): Free memory for escape_bufs.
5927 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5928
59292007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5930
5931 Replace `%push-parser' and `%push-pull-parser' with
5932 `%define push_pull "push"' and `%define push_pull "both"'.
5933 `%define push_pull "pull"' is the default.
5934 * doc/bison.texinfo (Push Decl, Push Parser Function,
5935 Pull Parser Function, Parser Create Function, Parser Delete Function):
5936 Update declarations.
5937 (Decl Summary, Table of Symbols): Replace %push-parser and
5938 %push-pull-parser entries with a %define push_pull entry.
5939 * data/bison.m4 (b4_percent_define_check_values): New macro.
5940 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5941 definitions...
5942 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5943 definitions...
5944 * data/push.c: ... to here and compute them from the value of the
5945 %define variable push_pull.
5946 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5947 parsing requests here...
5948 * data/yacc.c: ... hack this to switch to push.c any time
5949 b4_use_push_pull_flag or the %define variable push_pull is set. This
5950 will go away when we mv push.c yacc.c.
5951 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5952 push parsing is not supported since unused %define variables are
5953 reported anyway.
5954 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5955 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5956 comments for consistency with b4_percent_define_check_values.
5957 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5958 muscles.
5959 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5960 Remove.
5961 (prologue_declaration): Remove %push-parser and %push-pull-parser
5962 rules.
5963 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5964 * tests/calc.at: Update declarations.
5965 * tests/input.at (%define enum variables): New test case.
5966 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5967 declaration.
5968 (Push Parsing: Multiple impure instances): Update declaration.
5969 (Push Parsing: Unsupported Skeletons): New test case.
5970 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5971 declaration.
5972 (Exploding the Stack Size with Malloc): Update declaration.
5973
59742007-09-24 Wojciech Polak <polak@gnu.org>
5975
5976 Add XSLT transformations.
5977
5978 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5979 * data/xslt/xml2text.xsl: Transform XML into plain text.
5980 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5981 * data/Makefile.am (xsltdir): New variable.
5982 (dist_xslt_DATA): Add xslt/*.xsl files.
5983
59842007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5985
5986 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5987 Problem reported by Wojciech Polak.
5988 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5989 (xml_printf): Undo change I made on 21 September; that is,
5990 indent 2 spaces, not 1.
5991
59922007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5993
5994 Pacify ./configure --enable-gcc-warnings.
5995 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5996 `char const *' instead of `char *'.
5997 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5998 local variable `sep'.
5999
60002007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6001
6002 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6003 elsewhere.
6004 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6005 (xml_printf): Indent just 1 space for level.
6006 (e_char, xlate_char): Remove.
6007 (xml_escape_string): Rewrite to avoid undefined behavior (used
6008 storage that was freed from the stack).
6009 (xml_escape_n): Don't bother checking for subscript error.
6010
60112007-09-21 Wojciech Polak <polak@gnu.org>
6012
6013 Add Bison XML Automaton Report.
6014
6015 Add support for an -x option to generate an XML report.
6016 It is not documented yet.
6017 * src/print-xml.c: New file.
6018 * src/print-xml.h: Likewise.
6019 * lib/timevar.def (TV_XML): New var.
6020 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6021 * src/conflicts.c: Include print-xml.h.
6022 (solved_conflicts_xml_obstack): New var.
6023 (log_resolution, conflicts_solve, conflicts_free):
6024 Add support for XML report.
6025 (conflicts_output_val): New function.
6026 * src/conflicts.h (conflicts_output_val): New decl.
6027 * src/files.c (spec_xml_file): New var.
6028 (compute_output_file_names, output_file_names_free): Add XML support.
6029 * src/files.h (spec_xml_file): New decl.
6030 * src/getargs.c (xml_flag): New var.
6031 (usage, short_options, long_options, getargs): Add XML support.
6032 * src/getargs.h (xml_flag): New decl.
6033 * src/gram.c: Include print-xml.h.
6034 (rule_lhs_print_xml, rule_rhs_print_xml):
6035 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6036 New functions.
6037 * src/gram.h: Declare external ones.
6038 * src/main.c: Include print-xml.h.
6039 (main): Add XML support.
6040 * src/reduce.c: Include print-xml.h.
6041 (reduce_xml): New function.
6042 * src/reduce.h: Declare it.
6043 * src/state.c: Include print-xml.h.
6044 (state_new): Add XML support.
6045 (state_rule_lookahead_tokens_print_xml): New function.
6046 * src/state.h: Declare it.
6047 (struct state): New member solved_conflicts_xml.
6048 * src/symtab.c (symbol_class_get_string): New function.
6049 * src/symtab.h: Declare it.
6050
60512007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6052
6053 * GNUmakefile: Switch to coreutils's version.
6054 * bootstrap: Likewise.
6055 * Makefile.cfg: Adjust to new GNUmakefile.
6056 * README-hacking: Likewise.
6057
6058 Import from gnulib:
6059
6060 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6061 Bruno Haible <bruno@clisp.org>
6062
6063 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6064 and is a script that invokes bison. Tighten the code. Add comments.
6065
60662007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6067
6068 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6069 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6070 * doc/bison.texinfo (Decl Summary): Fix.
6071 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6072 * tests/input.at (Boolean %define variables): Update output.
6073 * tests/skeletons.at (%define boolean variables: invalid skeleton
6074 defaults): Rename to...
6075 (%define Boolean variables: invalid skeleton defaults): ... this and
6076 update output.
6077
60782007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6079
6080 In impure push mode, don't allow more than one yypstate to be allocated
6081 since multiple impure parsers would corrupt yynerrs.
6082 * data/push.c (yypstate_allocated): New static global variable
6083 initialized to 0.
6084 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6085 exhaustion if yypstate_allocated is 1, but still return 2.
6086 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6087 already 1. Otherwise, set it to 1.
6088 (yypstate_delete): Set it to 0.
6089 * tests/push.at (Push Parsing: Multiple impure instances): New test
6090 case.
6091
60922007-08-17 Bob Rossi <bob@brasko.net>
6093
6094 * doc/bison.texinfo (Push Decl): Document the push parser.
6095 (Table of Symbols): Ditto.
6096 (Pure Decl): Ditto.
6097 (Decl Summary): Ditto.
6098 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6099 Parser Create Function, Parser Delete Function):
6100 Add new push parser symbols.
6101 (Table of Symbols): Document push-parser, push-pull-parser,
6102 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6103
61042007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6105
6106 Update to GPLv3.
6107 * doc/gpl-3.0.texi: New file.
6108 * doc/gpl.texi: Remove.
6109 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6110 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6111 * README-hacking, TODO, bootstrap, bootstrap.conf:
6112 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6113 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6114 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6115 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6116 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6117 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6118 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6119 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6120 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6121 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6122 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6123 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6124 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6125 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
6126 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
6127 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
6128 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
6129 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
6130 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
6131 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
6132 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
6133 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
6134 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
6135 * src/complain.c, src/complain.h, src/conflicts.c:
6136 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
6137 * src/files.h, src/flex-scanner.h, src/getargs.c:
6138 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
6139 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
6140 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
6141 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
6142 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
6143 * src/print.c, src/print.h, src/print_graph.c:
6144 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
6145 * src/reduce.h, src/relation.c, src/relation.h:
6146 * src/revision.h, src/scan-code.h, src/scan-code.l:
6147 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
6148 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
6149 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
6150 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
6151 * tests/Makefile.am, tests/actions.at, tests/c++.at:
6152 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
6153 * tests/existing.at, tests/glr-regression.at:
6154 * tests/headers.at, tests/input.at, tests/java.at:
6155 * tests/local.at, tests/output.at, tests/push.at:
6156 * tests/reduce.at, tests/regression.at, tests/sets.at:
6157 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
6158 * tests/torture.at:
6159 Update to GPLv3.
6160
61612007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6162
6163 Get rid of broken %no-parser, -n, and --no-parser implementation and
6164 documentation.
6165 * TODO: Don't mention them.
6166 * doc/bison.1: Likewise.
6167 * doc/bison.texinfo (Decl Summary): Likewise.
6168 (Bison Options): Likewise.
6169 (Option Cross Key): Likewise.
6170 * src/getargs.c (no_parser_flag): Remove global variable.
6171 (usage): Don't print description of -n and --no-parser.
6172 (long_options): Remove --no-parser entry here.
6173 (getargs): Remove -n case in the switch here.
6174 * src/getargs.h (no_parser_flag): Remove extern.
6175 * tests/regression.at (Web2c Actions): Remove comment that mentions
6176 --no-parser.
6177
61782007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
6179
6180 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
6181 name user variables starting with `yy'. Just pass NULL instead of a
6182 dummy local &yylval to yypush_parse.
6183 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
6184 starting with `yy'.
6185
61862007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
6187
6188 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
6189 true since it's then always used regardless of whether yyoverflow is
6190 defined. Reported by Christian Burger at
6191 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
6192 * THANKS: Add Christian Burger.
6193
6194 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6195 node names: say "Decl Summary" not "Bison Declaration Summary".
6196
61972007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
6200 determine whether this function has already complained about an invalid
6201 value for a %define boolean variable, don't check whether Bison has
6202 ever examined the value. As written, the check was a tautology.
6203 Instead, record and check for this complaint using a separate muscle.
6204
62052007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6206
6207 Fix push parsing memory leak reported by Brandon Lucia at
6208 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
6209 * THANKS: Add Brandon Lucia.
6210 * data/push.c (yypstate_delete): Free the stack if it was reallocated
6211 but the parse never completed and thus freed it.
6212 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
6213 * tests/testsuite.at: Include push.at.
6214 * test/push.at: New.
6215 (Push Parsing: Memory Leak for Early Deletion): New test case.
6216
62172007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
6218
6219 Improve handling of multiple S/R conflicts in the same state and of S/R
6220 conflicts involving multiple reductions.
6221 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
6222 set for a state here or Bison will abort if it is reassigned on a
6223 later conflicted reduction in the same state.
6224 Similarly, don't finalize and assign the solved conflicts report here
6225 or it will be lost if it is reassigned on a later conflicted reduction
6226 in the same state.
6227 (set_conflicts): Instead, assign them both here after all S/R conflicts
6228 in the state have been fully examined.
6229 * src/print.c (shift_set): Rename to...
6230 (no_reduce_set): ... this.
6231 (print_reductions): Update for rename, and add %nonassoc error action
6232 tokens to no_reduce_set so that, when printing the first remaining
6233 reduction on an error action token, the reduction is enclosed in
6234 brackets.
6235 (print_results): Update for rename.
6236 * tests/conflicts.at (Solved conflicts report for multiple reductions
6237 in a state): New test case.
6238 (%nonassoc error actions for multiple reductions in a state): New test
6239 case.
6240
6241 * src/main.c (main): Don't depend on C99 features.
6242
62432007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6244
6245 * build-aux/.cvsignore: Add compile.
6246 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
6247 uniwidth.
6248
62492007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
6250
6251 * bootstrap (slurp): Create target directories that don't exist.
6252 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
6253
62542007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6255
6256 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
6257 than item number.
6258 * closure.c (closure): Likewise.
6259 * state.h (reductions): Comment sorting of rules.
6260 (state): Comment sorting of items.
6261
62622007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
6263
6264 Fix C++ test cases after recent Gnulib changes. Discussed starting at
6265 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
6266 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
6267 definition in order to avoid Gnulib headers since we don't use config.h
6268 here.
6269 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
6270 rather than AT_DATA so that config.h is included.
6271
62722007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
6273
6274 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
6275 instead of fprintf. Guard these functions with #if YYDEBUG instead of
6276 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
6277 and so that YYFPRINTF is guaranteed to be defined here.
6278
62792007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6280
6281 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
6282 with...
6283 (muscle_percent_define_check_values): ... this more helpful function.
6284 Again, it's not used yet, but it will be.
6285 * src/muscle_tab.h: Likewise.
6286
6287 Improve some comments in parser table construction.
6288 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
6289 (generate_states): Don't mention ruleset, which is internal to closure.
6290 * src/closure.c (closure): Explain sorting of core and itemset, which
6291 is required for this function to behave correctly.
6292 * src/closure.h (closure): Mention sorting.
6293
62942007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
6295
6296 * src/lalr.c (state_lookahead_tokens_count): For code readability,
6297 move the check for disabled transitions to an aver since conflict
6298 resolution hasn't happened yet.
6299
6300 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
6301 labels a state as inconsistent just because it has error transitions.
6302 The original form of this check appeared in revision 1.1 of lalr.c,
6303 which was committed on 1991-12-21. Now (at least), changing the
6304 consistency label on such a state appears to have no useful effect in
6305 any of the places it is examined, which I enumerate below. The key
6306 point to understanding each item in this enumeration is that a state
6307 with an error transition is labelled consistent in the first place only
6308 if it has no rules, so the check cannot matter for states that have
6309 rules. (1) Labelling a state as inconsistent will cause set_conflicts
6310 to try to identify its conflicts, and a state must have *rules* to have
6311 conflicts. (2) Labelling a state as inconsistent will affect how
6312 action_row sets the default *rule* for the state. (3) Labelling a
6313 state as inconsistent will cause build_relations to add lookback edges
6314 to *rules* in that state.
6315 * src/state.h (struct state): Word the comment for member consistent
6316 more carefully.
6317
63182007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6319
6320 Don't depend on C99 features.
6321 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
6322 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
6323 * src/reader.c (check_and_convert_grammar): Fix for-loop.
6324 * src/state.c (state_mark_reachable_states): Fix for-loop.
6325 (state_remove_unreachable_states): Fix for-loop.
6326
6327 Don't widen struct state with member reachable just to temporarily
6328 record reachability. Instead, use a local bitset.
6329 * src/state.h (struct state): Remove member.
6330 * src/state.c (state_new): Don't initialize it.
6331 (state_mark_reachable_states): Rename to...
6332 (state_record_reachable_states): ... this, and use bitset.
6333 (state_remove_unreachable_states): Use bitset.
6334
63352007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
6336
6337 * src/Makefile.am (yacc): Quote target action commands properly so
6338 that the yacc script isn't corrupt. Reported by Hans Aberg at
6339 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
6340
6341 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
6342 the case of pure parsers. Reported by Frans Englich at
6343 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
6344 * THANKS: Add Frans Englich.
6345
6346 * NEWS (2.3a+): In the %code entry, reference section `Bison
6347 Declaration Summary' from the manual now since the %code summary has
6348 moved there.
6349 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6350 in the rules section must be terminated by semicolons.
6351
63522007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6353
6354 Extend the front-end API for %define variables to more completely
6355 mirror the back-end. This will be useful in the future.
6356 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6357 Update comments to mention the new front-end counterparts of these
6358 macros.
6359 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6360 for muscle_string_decode and muscle_location_decode.
6361 (muscle_string_decode): New static function.
6362 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6363 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6364 functions.
6365 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6366 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6367 implementation more closely.
6368 (muscle_percent_define_invalid_value): New function.
6369 * src/muscle_tab.h (muscle_percent_define_get,
6370 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6371 Prototype.
6372
63732007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6374
6375 * NEWS (2.3a+): Mention yesterday's state-removal change.
6376 (2.3a): Remove the %language entry, which was added after 2.3a.
6377 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6378 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6379 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6380 tests/existing.at: Update copyright date.
6381
63822007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6383
6384 If conflict resolution makes states unreachable, remove those states,
6385 report rules that are then unused, and don't report conflicts in those
6386 states.
6387 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6388 New global function.
6389 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6390 function.
6391 * src/main.c (main): After conflict resolution, remove the unreachable
6392 states and update all data structures that reference states by number.
6393 * src/state.c (state_new): Initialize each state's reachable member to
6394 false.
6395 (state_mark_reachable_states): New static function.
6396 (state_remove_unreachable_states): New global function.
6397 * src/state.h (struct state): Add member bool reachable.
6398 (state_remove_unreachable_states): Prototype.
6399 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6400 New test case.
6401 * tests/existing.at (GNU pic Grammar): Update test case output now that
6402 an unused rule is discovered.
6403
64042007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6405
6406 Minor code cleanup in parser table construction.
6407 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6408 (new_itemsets, save_reductions): Update for rename to nitemset.
6409 * src/closure.c (nritemset): Rename to...
6410 (nitemset): ... this since the "r" appears to meaningless and isn't
6411 used in the comments.
6412 (closure): Update for rename.
6413 * src/closure.h (nritemset): Update extern to...
6414 (nitemset): ... this.
6415 * src/lalr.c (LA): Fix a typo in comments.
6416 * src/print.c (print_core): Update for rename to nitemset.
6417 * src/print_graph.c (print_graph): Likewise.
6418 * src/state.h: Fix some typos in header comments.
6419
64202007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6421
6422 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6423 still sticks to ASCII. Sorry!
6424
6425 * README-hacking: New file, taken mostly from coreutils, with changes
6426 for Bison. Contains much of the contents of:
6427 * README-cvs: Remove.
6428 * bootstrap: Sync from gnulib.
6429 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6430 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6431
64322007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6433
6434 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6435 Setzer.
6436 (Java Differences): Fix some typos.
6437 * THANKS: Add Sebastian Setzer.
6438
64392007-03-07 Paolo Bonzini <bonzini@gnu.org>
6440
6441 * data/java.m4 (b4_single_class_if): Remove.
6442 (b4_abstract_if): Look at "%define abstract".
6443 (b4_lexer_if): New.
6444 (b4_union_name): Rename...
6445 (b4_yystype): ... to this. Map to "%define stype".
6446 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6447 b4_maybe_throws): Fix quoting.
6448 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6449 * data/lalr1.java (Lexer interface): Always define.
6450 (Lexer interface within parser class): Remove.
6451 (YYLexer class): New, used when "%code lexer" is present.
6452 (constructor): When "%code lexer" is used, pass %lex-param
6453 to the lexer constructor.
6454 (yylex, yyparse): Remove %lex-param from method invocations
6455 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6456
6457 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6458 abstract". Rename "%define union_name" to "%define stype".
6459 Rename method names according to previous patch.
6460 (Java Scanner Interface): Describe "%code lexer" instead of
6461 "%pure-parser" and "%define single_class".
6462 (Java Differences): Mention "%code lexer".
6463
6464 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6465 Include scanner here, using macros from tests/local.at.
6466 (AT_DATA_CALC_Y): Remove final argument.
6467 (_AT_CHECK_JAVA_CALC): Likewise.
6468 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6469 of %locations and %error-verbose.
6470 (main): Test with and without %lex-param.
6471 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6472 (AT_BISON_OPTION_POPDEFS): Pop it.
6473
64742007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6475
6476 DJGPP spefic issue. Inhibit the use of disallowed characters for
6477 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6478 and concern testsuite case 46.
6479 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6480 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6481 * djgpp/config.bat: Inhibit the use of disallowed characters.
6482
64832007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6484
6485 Miscellaneous %define and %code cleanup.
6486 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6487 values are interpreted.
6488 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6489 documentation a little more.
6490 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6491 muscle_percent_define_insert, muscle_percent_code_grow): New
6492 functions/macros.
6493 * src/muscle_tab.h (muscle_percent_define_insert,
6494 muscle_percent_code_grow): Prototype.
6495 * src/parse-gram.y (prologue_declaration): Use
6496 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6497 %define and %code directives.
6498
6499 Make it easy to share %define boolean variables between the front-end
6500 and back-end. Though not used yet, this will be useful in the future.
6501 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6502 Bison uses of names rather than just skeleton uses of names.
6503 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6504 b4_percent_define_skeleton_variables(VARIABLE) to
6505 b4_percent_define_bison_variables(VARIABLE).
6506 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6507 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6508 b4_percent_code_bison_qualifiers(QUALIFIER).
6509 (b4_check_user_names_wrap): Update for renames.
6510 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6511 muscle_percent_define_default): New functions mimicking
6512 b4_percent_define_flag_if and b4_percent_define_default.
6513
6514 For %define variables, report locations for invalid values and
6515 redefinitions.
6516 * data/bison.m4 (b4_percent_define_flag_if): Read
6517 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6518 value for VARIABLE.
6519 (b4_percent_define_default): Save a special location in
6520 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6521 must later be reported as invalid.
6522 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6523 functions.
6524 (muscle_percent_define_insert): Record the location of VARIABLE in
6525 muscle percent_define_loc(VARIABLE), and use it to report the previous
6526 location for a redefinition.
6527 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6528 (muscle_percent_define_default): Update like b4_percent_define_default.
6529 (muscle_grow_user_name_list): Rename to...
6530 (muscle_user_name_list_grow): ... this for consistency and use
6531 muscle_location_grow.
6532 * src/muscle_tab.h (muscle_location_grow): Prototype.
6533 * tests/input.at (%define errors): Update expected output.
6534 * tests/skeletons.at (%define boolean variables: invalid skeleton
6535 defaults): New test case.
6536
65372007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6538
6539 * src/print.c (lookahead_set, state_default_rule): Remove.
6540 (print_reductions): Replace state_default_rule invocation with
6541 equivalent use of yydefact, which was computed in token_actions in
6542 tables.c.
6543 (print_results): Don't allocate lookahead_set.
6544
65452007-02-27 Paolo Bonzini <bonzini@gnu.org>
6546
6547 * data/lalr1.java: Prefix all private members with yy.
6548
65492007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6550
6551 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6552 Sebastien Fricker at
6553 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6554 * THANKS: Add Sebastien Fricker.
6555 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6556 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6557 accept a variable number of arguments.
6558
65592007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6560
6561 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6562
65632007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6564
6565 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6566 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6567 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6568
65692007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6570
6571 Undo my 2007-02-07 change, switching back to the c-strcase module
6572 introduced in the 2007-02-03 change. Bruno Haible reported that
6573 the 2007-02-07 change would be dangerous in Turkish if we add a
6574 language whose name contains "i", since "i" is not lowercase "I"
6575 in Turkish.
6576 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6577 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6578 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6579 * m4/.cvsignore: Remove strcase.m4.
6580 * src/getargs.c: Revert 2007-02-07 change, as follows.
6581 Include c-strcase.h.
6582 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6583
65842007-02-11 Bruno Haible <bruno@clisp.org>
6585
6586 Enable the Java related testsuite tests when the only Java compiler
6587 found is a gcj < 4.3. Discussed at
6588 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6589 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6590
65912007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 * data/Makefile.am: Update copyright date.
6594 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6595 yypstate_new returns NULL.
6596 (yypstate_new): Return NULL if malloc does.
6597 * src/reader.c (packgram): Move translation of rule actions from the
6598 beginning of packgram to...
6599 (check_and_convert_grammar): ... here right before packgram is invoked
6600 so it's easier to write more complete comments, and remove redundant
6601 code.
6602
66032007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6604
6605 As in semantic actions, make @$ in %initial-action, %destructor, and
6606 %printer imply %locations.
6607 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6608 scanning @$.
6609 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6610 (@$ in %initial-action implies %locations,
6611 @$ in %destructor implies %locations,
6612 @$ in %printer implies %locations): ... these new test cases.
6613
66142007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6615
6616 Undo most of the 2007-02-03 change, switching to the strcase module
6617 now that gnulib strcase has been fixed.
6618 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6619 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6620 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6621 * m4/.cvsignore: Add strcase.m4.
6622 * src/getargs.c: Revert 2007-02-03 change, as follows.
6623 Don't include c-strcase.h.
6624 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6625 strcasecmp has "unspecified behavior" outside the POSIX locale,
6626 but it works fine in practice if at least one argument is ASCII,
6627 as is the case in Bison.
6628
66292007-02-07 Paolo Bonzini <bonzini@gnu.org>
6630
6631 * tests/java.at: Skip tests if only one of javac/java is present.
6632 Reported by Joel E. Denny.
6633 * tests/atlocal.in: Adjust copyright years.
6634
66352007-02-05 Paolo Bonzini <bonzini@gnu.org>
6636
6637 * data/lalr1.java (Stack): Work around old verifiers that disallow
6638 access to the private fields of an inner class, from the outer class.
6639 We can make Stack's fields public because user code doesn't have access
6640 to the instance of Stack used by parse(). Reported by Paul Eggert.
6641
66422007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6643
6644 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6645 the right spot for these files?
6646 * bootstrap.conf (gnulib_modules): Add c-strcase.
6647 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6648 c-strncasecmp.c.
6649 * src/getargs.c: Include c-strcase.h.
6650 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6651 to avoid unspecified behavior.
6652
66532007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6654
6655 * doc/bison.texinfo (Decl Summary): Correct typo.
6656
66572007-01-30 Paolo Bonzini <bonzini@gnu.org>
6658
6659 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6660 Complain if the value does not match empty, "true" or "false".
6661 * data/c++.m4: Adjust default definitions of %define variables.
6662 * data/java.m4: Adjust default definitions of %define variables.
6663 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6664 to above behavior.
6665 * tests/input.at (Boolean %define variables): Test new behavior.
6666
66672007-01-29 Paolo Bonzini <bonzini@gnu.org>
6668
6669 * NEWS: Mention java.
6670 * TODO: Remove things that are done.
6671 * bootstrap.conf: Add javacomp-script and javaexec-script.
6672 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6673
6674 * data/Makefile.am: Add new files.
6675 * data/java-skel.m4: New.
6676 * data/java.m4: New.
6677 * data/lalr1.java: New.
6678
6679 * doc/bison.texinfo: Put "A Complete C++ Example" under
6680 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6681 under Other Languages.
6682
6683 * src/getargs.c (valid_languages): Add Java.
6684 * src/getargs.h (struct bison_language): Update size of string fields.
6685
6686 * tests/Makefile.am: Add java.at.
6687 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6688 * tests/java.at: New.
6689 * tests/testsuite.at: Include it.
6690
66912007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6692
6693 Clean up.
6694 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6695 at_directive_argv arguments so these no longer have to be global
6696 variables. Also, update the implementation for the following changes.
6697 (fail_for_at_directive_too_many_args,
6698 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6699 (at_directive_name): Remove as at_directive_argv[0] will be used for
6700 this now.
6701 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6702 for the directive name.
6703 (at_directive_argc, at_directive_argv): Make these local within
6704 skel_lex instead of global.
6705 (INITIAL): Update directive start action for above changes.
6706 (SC_AT_DIRECTIVE_ARG): Rename to...
6707 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6708 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6709 (scan_skel): Move yylex_destroy to...
6710 (skel_scanner_free): ... here.
6711 * tests/skeletons.at (installed skeleton file name): Rename to...
6712 (installed skeleton file names): ... this.
6713
67142007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6715
6716 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6717 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6718 Summary" not "Directives".
6719 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6720 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6721 since the former is now the more complete one.
6722 (Prologue Alternatives): Likewise and do the same for %defines.
6723 (Table of Symbols): Add summary of %code, add summary of %define, and
6724 move full %code documentation to...
6725 (Decl Summary): ... here for consistency with other entries in these
6726 sections.
6727 Move %define entry in order to keep this list alphabetized.
6728 Reword %define entry a little to put less emphasis on the skeleton
6729 concept, which most users shouldn't have to think about.
6730
67312007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6732
6733 Adjust to recent gnulib changes.
6734 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6735 Add string.h, string_.h, unistd_.h, wchar_.h.
6736 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6737 * src/system.h: Don't include <stpcpy.h>; this is now done by
6738 <string.h>.
6739
67402007-01-23 Paolo Bonzini <bonzini@gnu.org>
6741
6742 Simplify implementation of unqualified %code, implement macros for
6743 uniform treatment of boolean %define flags. Document %define.
6744 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6745 b4_percent_code_ifdef): New.
6746 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6747 * data/c++.m4: Define default value for global_tokens_and_yystype.
6748 * data/glr.cc: Likewise.
6749 * data/location.cc: Use b4_percent_define_flag_if.
6750
6751 * doc/bison.texinfo (Decl Summary): Document %define.
6752
6753 * src/parse-gram.y (Unqualified %code): Change muscle name to
6754 b4_percent_code().
6755 (content.opt): Default to empty.
6756
67572007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6758
6759 Implement support for relative and absolute skeleton file names.
6760 Discussed starting at
6761 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6762 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6763 (Bison Options): Document in --skeleton entry.
6764 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6765 full_skeleton can't necessarily hold all of pkgdatadir.
6766 If the specified skeleton file name contains a `/', don't prepend
6767 pkgdatadir.
6768 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6769 file name contains a `/', prepend the grammar file directory.
6770 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6771 * skeletons.at: New file.
6772 (relative skeleton file names): New test case.
6773 (installed skeleton file names): New test case.
6774 * tests/testsuite.at: Include skeletons.at.
6775
6776 * bootstrap: Update copyright to 2007.
6777
67782007-01-17 Paolo Bonzini <bonzini@gnu.org>
6779
6780 * bootstrap: Remove occurrences of .#bootmp from the files.
6781
67822007-01-17 Akim Demaille <akim@epita.fr>
6783
6784 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6785 nonterminals.
6786 Use per-type %printer.
6787
67882007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6789
6790 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6791 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6792 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6793 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6794 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6795 tests/glr-regression.at, tests/input.at, tests/local.at,
6796 tests/output.at, tests/torture.at: Update copyright to 2007.
6797
67982007-01-16 Akim Demaille <akim@epita.fr>
6799
6800 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6801 error code.
6802 (Calc++ Scanner): Exit with failure if we can't open the input
6803 file.
6804 Accept "-" standing for stdin.
6805 (Calc++ Top Level): Print the result only if the parsing was
6806 successful.
6807
68082007-01-16 Akim Demaille <akim@epita.fr>
6809
6810 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6811
68122007-01-15 Paolo Bonzini <bonzini@gnu.org>
6813 and Joel E. Denny <jdenny@ces.clemson.edu>
6814
6815 Clean up %define and %code implementation in M4 some. Most
6816 importantly, rename all related macros to be in the b4_percent_define
6817 and b4_percent_code namespaces. Also, complete support for `.' in
6818 %define variable names and %code qualifiers.
6819 * data/bison.m4 (b4_check_user_names): Check for special
6820 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6821 m4_foreach loops.
6822 (b4_get_percent_define, b4_get_percent_code): Rename to...
6823 (b4_percent_define_get, b4_percent_code_get): ... these.
6824 Extend documentation with examples.
6825 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6826 b4_percent_define_skeleton_variables and
6827 b4_percent_code_skeleton_qualifiers.
6828 Expect any value for the %define variable `foo' to be stored in the
6829 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6830 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6831 expect any unqualified %code blocks to be stored in a macro named
6832 `b4_percent_code_unqualified'.
6833 Use m4_indir so that %define variable names and %code qualifiers can
6834 contain `.', which is allowed by the grammar parser.
6835 (b4_percent_define_default): New macro to set a default value for a
6836 %define variable.
6837 (m4_wrap): Update wrapped code, and fix some underquoting.
6838 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6839 Expect grammar uses of %define variables and %code qualifiers to be
6840 defined in b4_percent_define_user_variables and
6841 b4_percent_code_user_qualifiers.
6842 * data/c++.m4: Use b4_percent_define_default rather than
6843 m4_define_default. Fix some underquoting. Skeleton usage of %define
6844 variable define_location_comparison now implies skeleton usage of
6845 %define variable filename_type.
6846 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6847 data/push.c, data/yacc.c: Update macro names.
6848 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6849 muscle names.
6850
68512007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6852
6853 DJGPP specific issues.
6854
6855 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6856 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6857
68582007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6859
6860 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6861 run parsers in all tests so that Valgrind is invoked during
6862 maintainer-check-valgrind.
6863 (Duplicate representation of merged trees): Free all semantic values.
6864 (Duplicated user destructor for lookahead): Likewise.
6865
68662007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6867
6868 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6869 command-line prefix.
6870 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6871 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6872 miss Valgrind messages.
6873 (Exploding the Stack Size with Malloc): Likewise.
6874
68752007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6876
6877 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6878 locals. Reported by Juan Manuel Guerrero at
6879 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6880 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6881 Fix some indentation also.
6882 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6883 explaining this issue.
6884
68852007-01-09 Paolo Bonzini <bonzini@gnu.org>
6886 and Joel E. Denny <jdenny@ces.clemson.edu>
6887
6888 Simplify union and prologue handling, and escape union and lex/parse
6889 params with digraphs.
6890 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6891 values to the empty string since these are no longer guaranteed
6892 initialized by the front-end.
6893 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6894 braces around b4_user_stype since this is no longer done by the
6895 front-end.
6896 * src/files.c, src/files.h (pre_prologue_obstack,
6897 post_prologue_obstack): Remove.
6898 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6899 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6900 with digraphs. This fixes lex params and parse params.
6901 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6902 * src/output.c (prepare): Remove muscle insertion of the prologues.
6903 (output): Remove freeing of pre_prologue_obstack and
6904 post_prologue_obstack.
6905 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6906 than prologue_augment for prologue parsing so you don't need prologue
6907 obstacks.
6908 (grammar_declaration): For %union RHS, use `braceless' instead of
6909 "{...}" so that braces are already stripped and code is escaped with
6910 digraphs.
6911 * src/reader.c (prologue_augment): Remove.
6912 (reader): Remove initialization of pre_prologue_obstack and
6913 post_prologue_obstack.
6914 * src/reader.h (prologue_augment): Remove.
6915
6916 * data/c.m4: Remove stray parenthesis.
6917
69182007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6919
6920 Remove quotes from variables names in %define directives and from
6921 qualifiers in %code directives, and restrict the characters that are
6922 allowed in them to M4-friendly ones. For %define, continue to support
6923 the quoted form as a deprecated feature. Discussed starting at
6924 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6925 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6926 %code.
6927 * doc/bison.texinfo (Prologue Alternatives): Update.
6928 (Decl Summary): In %defines entry, update mention of `%code requires'
6929 and `%code provides'.
6930 (C++ Location Values): Update %define uses.
6931 (Calc++ Parser Interface): Likewise.
6932 (Calc++ Parser): Likewise, and update `%code requires' uses.
6933 (Table of Symbols): Update %code documentation.
6934 * src/parse-gram.y (prologue_declaration): For %define variables, use
6935 `variable' instead of `STRING'.
6936 (grammar_declaration): For %code qualifiers, use `ID' instead of
6937 `STRING'.
6938 (variable): New nonterminal that takes an `ID' or a `STRING'.
6939 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6940 and %define uses.
6941 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6942 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6943 (%define errors): Update %define uses.
6944
69452007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6946
6947 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6948 instead of muscle_insert for %define values so that M4-special
6949 characters are replaced with digraphs.
6950 * tests/input.at (%define errors): Extend to check weird values.
6951
69522007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6953
6954 Instead of having skeletons declare all valid %define variables and
6955 %code qualifiers, provide macros that retrieve the associated values
6956 and build these lists automatically. Thus Bison will now warn when a
6957 variable or qualifier is not used by the skeleton in the current
6958 invocation regardless of whether it might sometimes be used by that
6959 skeleton in other invocations. Also, move all %define value macros to
6960 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6961 form, which is replaced by %code.
6962 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6963 (b4_check_user_names): ... this, and change the series of valid name
6964 arguments to a single list argument for names used in the skeleton
6965 similar to the existing list argument for names used in the grammar.
6966 Warn instead of complaining.
6967 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6968 values and %code code, to format %code code properly, and to build
6969 lists of all %define variables and %code qualifiers used in the
6970 skeleton: b4_skeleton_percent_define_variables and
6971 b4_skeleton_percent_code_qualifiers.
6972 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6973 Remove, and...
6974 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6975 the skeleton names lists can finish building first. In place of
6976 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6977 expect the lists b4_user_percent_define_variables and
6978 b4_user_percent_code_qualifiers.
6979 * data/c++.m4: Where setting default values for b4_parser_class_name,
6980 b4_location_type, b4_filename_type, b4_namespace, and
6981 b4_define_location_comparison, update their names to the
6982 b4_percent_define_ namespace.
6983 * data/glr.c: Don't use b4_check_percent_define_variables and
6984 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6985 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6986 (b4_parser_class_name, b4_namespace): Define these using
6987 b4_get_percent_define for parser_class_name and namespace.
6988 * data/location.cc: Use b4_get_percent_define.
6989 * data/push.c: Don't use b4_check_percent_define_variables and
6990 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6991 * data/yacc.c: Likewise, and don't call m4_exit in
6992 b4_use_push_for_pull_if or m4_wrap code will never execute.
6993 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6994 Rename to...
6995 (muscle_grow_user_name_list): ... this for consistency with the
6996 terminology used in bison.m4.
6997 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6998 %define variable names, and rename muscle used_percent_define_variables
6999 to user_percent_define_variables.
7000 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7001 user_percent_code_qualifiers.
7002 (content): Remove.
7003 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7004 {CODE} form is no longer accepted.
7005 * tests/input.at (Reject bad %code qualifiers): Rename to...
7006 (Reject unused %code qualifiers): ... this, and update test output.
7007 (%define error): Update test output.
7008
70092007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7010
7011 Check for unrecognized %define variables similar to checking for
7012 unrecognized %code qualifiers. Check for redefined %define variables.
7013 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7014 generalizes...
7015 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7016 (b4_check_percent_define_variables): New, also wraps it.
7017 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7018 variables using b4_check_percent_define_variables.
7019 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7020 all those exercised in the test suite and all those listed in the
7021 `Default values' section of c++.m4. Are there others?
7022 * data/push.c, data/yacc.c: Declare no valid %define variables.
7023 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7024 similar to muscle_find, but it works even when the muscle stores a
7025 const value.
7026 (muscle_grow_used_name_list): New function for constructing the used
7027 name list muscles that b4_check_for_unrecognized_names requires.
7028 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7029 %define'd more than once. Define the b4_used_percent_define_variables
7030 muscle with muscle_grow_used_name_list.
7031 (grammar_declaration): Abbreviate %code code with
7032 muscle_grow_used_name_list.
7033 * tests/input.at (%define errors): New.
7034
70352007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7036
7037 Provide warn_at, complain_at, and fatal_at function callbacks to the
7038 skeletons, and use this for %code qualifier complaints.
7039 * data/bison.m4 (b4_error_at): New, invoked by...
7040 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7041 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7042 @fatal_at(...@) directives.
7043 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7044 qualifiers in b4_used_percent_code_qualifiers and to use
7045 b4_complain_at.
7046 * src/location.c, src/location.h (boundary_set_from_string): New global
7047 function.
7048 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7049 function.
7050 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7051 to b4_used_percent_code_qualifiers.
7052 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7053 function.
7054 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7055 (lineno): Rename to...
7056 (out_lineno): ... this so I don't misunderstand it again.
7057 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7058 here; these newlines are in the input but not the output file.
7059 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7060 (at_directive_perform): ... this new static function, and add handling
7061 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7062 directives.
7063 * tests/input.at (Reject bad %code qualifiers): Update test output with
7064 locations and extend.
7065
7066 * tests/output.at (Output file name: [, Output file name: ]): Remove
7067 bogus comment about these tests failing.
7068
70692007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7070
7071 Clean up b4_check_percent_code_qualifiers a little.
7072 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7073 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7074 documentation and add examples.
7075 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7076 qualifiers here.
7077
70782007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7079
7080 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7081 unreliable -- especially when they're hidden inside another macro.
7082 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7083 data/c.m4: Remove m4_divert(-1).
7084 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7085 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7086 m4_divert_push(0) and m4_divert_pop(0).
7087 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7088 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7089 pushed and popped by m4sugar, should be first on the stack.
7090
7091 Provide warn, complain, and fatal function callbacks to the skeletons.
7092 This provides more flexibility than m4_fatal, improves the error
7093 message format, and captures messages for translation. Discussed
7094 starting at
7095 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7096 * data/bison.m4 (b4_error): New, invoked by...
7097 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7098 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7099 directives. Because these M4 macros might be called when the current
7100 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7101 the previous removal of uses of m4_divert, which caused trouble.
7102 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7103 m4_fatal to report unrecognized %code qualifiers.
7104 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7105 push parser requests.
7106 * data/glr.c: Use b4_complain instead of m4_fatal to report
7107 non-deterministic push parser requests.
7108 Update @output usage to @output(...@) form.
7109 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7110 report missing %defines. Update @output usage to @output(...@) form.
7111 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7112 @output(...@) form.
7113 * src/main.c (main): Invoke skel_scanner_free.
7114 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7115 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7116 obstack_for_string from flex-scanner.h.
7117 (YY_DECL): Use to declare skel_lex static.
7118 (decode_at_digraphs): Remove; now handled in the new
7119 SC_AT_DIRECTIVE_ARG start condition.
7120 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7121 functions.
7122 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7123 at_directive_argv): New static globals.
7124 (INITIAL): Use fail_for_invalid_at.
7125 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
7126 recognize the start of a generalized `@directive(...@)' form and
7127 start...
7128 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
7129 directive args (using the new obstack_for_string), to decode the
7130 contained @ diagraphs, and to perform the directive. It recognizes
7131 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
7132 @output(...@).
7133 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
7134 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
7135 `@,'.
7136 (scan_skel): Initialize obstack_for_string on the first call.
7137 (skel_scanner_free): New function to free obstack_for_string.
7138 * tests/input.at (Reject bad %code qualifiers): Update test output.
7139
71402007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
7141
7142 Consolidate the 4 prologue alternative directives (%code, %requires,
7143 %provides, and %code-top) into a single %code directive with an
7144 optional qualifier field. Discussed at
7145 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
7146 * NEWS (2.3a+): Rewrite the existing entry for the prologue
7147 alternatives.
7148 * doc/bison.texinfo (Prologue Alternatives): Update.
7149 (Decl Summary): Update to %code "requires" and %code "provides".
7150 (Calc++ Parser): Update to %code "requires".
7151 (Table of Symbols): Remove entries for %requires, %provides, and
7152 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
7153 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
7154 are replaced by b4_percent_code_provides and b4_percent_code_requires,
7155 which are skeleton-specific.
7156 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
7157 declare what %code qualifiers it supports and to complain if any other
7158 qualifiers were used in the grammar.
7159 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
7160 and b4_user_code([b4_percent_code_provides]) in place of
7161 b4_user_requires and b4_user_provides.
7162 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
7163 Add b4_user_code([b4_percent_code_top]) and
7164 b4_user_code([b4_percent_code]).
7165 Invoke b4_check_percent_code_qualifiers.
7166 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7167 PERCENT_REQUIRES): Remove.
7168 (grammar_declaration): Remove RHS's for %code-top, %provides, and
7169 %requires. Rewrite the %code RHS as the unqualified form defining the
7170 muscle b4_percent_code. Add another RHS for the qualified %code form,
7171 which defines muscles of the form b4_percent_code_QUALIFIER and the
7172 b4_used_percent_code_qualifiers muscle.
7173 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
7174 PERCENT_REQUIRES): Remove.
7175 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
7176 %code "requires" and %code "provides".
7177 * tests/input.at (Reject bad %code qualifiers): New.
7178
71792007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7180
7181 Use the new code_props interface for destructors and printers.
7182 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
7183 printer_location members, and change the type of the destructor and
7184 printer members to code_props.
7185 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
7186 symbol_printer_get, semantic_type_destructor_set,
7187 semantic_type_printer_set, default_tagged_destructor_set,
7188 default_tagless_destructor_set, default_tagged_printer_set,
7189 default_tagless_printer_set): Use code_props in arguments and return
7190 types in place of char const * and location.
7191 (symbol_destructor_location_get, symbol_printer_location_get): Remove
7192 since the locations are now contained in the return of
7193 symbol_destructor_get and symbol_printer_get.
7194 * src/output.c (symbol_destructors_output, symbol_printers_output):
7195 Replace with...
7196 (symbol_code_props_output): ... this to eliminate duplicate code.
7197 (output_skeleton): Update to use symbol_code_props_output.
7198 * src/reader.c (symbol_should_be_used): Update use of
7199 symbol_destructor_get.
7200 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7201 Update uses of the various _destructor_set and _printer_set functions.
7202 * src/symtab.c: (default_tagged_destructor_location,
7203 default_tagless_destructor_location, default_tagged_printer_location,
7204 default_tagless_printer_location): Remove since we...
7205 (default_tagged_destructor, default_tagless_destructor,
7206 default_tagged_printer, default_tagless_printer): ... change the type
7207 of these to code_props.
7208 (symbol_new, semantic_type_new, symbol_destructor_set,
7209 semantic_type_destructor_set, symbol_destructor_get,
7210 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
7211 symbol_check_alias_consistency, default_tagged_destructor_set,
7212 default_tagless_destructor_set, default_tagged_printer_set,
7213 default_tagless_printer_set): Update.
7214 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
7215 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
7216 code_props members.
7217 (symbol_print): Use SYMBOL_CODE_PRINT.
7218
72192007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
7220
7221 Use the new code_props interface for rule actions.
7222 * src/symlist.h (symbol_list): Replace action, action_location, and
7223 used members with a code_props action_props member.
7224 * src/reader.c (symbol_should_be_used, grammar_rule_check,
7225 grammar_midrule_action, grammar_current_rule_merge_set,
7226 grammar_current_rule_symbol_append, packgram): Update.
7227 * src/scan-code.h (translate_rule_action): Remove, no longer used.
7228 * src/scan-code.l (handle_action_dollar): Update.
7229 (translate_rule_action): Remove, no longer used.
7230 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
7231
72322007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7233
7234 Use the new code_props interface in parse-gram.y.
7235 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
7236 Update all uses of translate_* functions to use the new code_props
7237 interface and to use gram_scanner_last_string_free and
7238 code_scanner_last_string_free where possible.
7239 (grammar_declaration): symbol_list_destructor_set and
7240 symbol_list_printer_set now perform the translation, so don't do it
7241 here. Use gram_scanner_last_string_free where possible.
7242 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
7243 translate_code): Remove, no longer used.
7244 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
7245 symbol_list_printer_set): Perform code translation here rather than
7246 depending on the caller to do so.
7247
7248 * src/symlist.h (struct symbol_list): Correct some documentation typos.
7249 * src/scan-gram.h (gram_last_string): Remove declaration.
7250 * src/scan-gram.l (last_string): Declare it static.
7251
72522007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7253
7254 Encapsulate code properties and related functionality for the various
7255 destructors, printers, and actions into a code_props structure and
7256 interface. This patch merely implements code_props in scan-code.h and
7257 scan-code.l. Future patches will rewrite other modules to use it.
7258 Discussed starting at
7259 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
7260 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7261 consistently initialize const structs that have an empty location
7262 field.
7263 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
7264 to ensure consistency.
7265 * src/scan-code.h (code_props): New structure.
7266 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
7267 function, macro, and const global variable for initializing a
7268 code_props with no code.
7269 (code_props_plain_init, code_props_symbol_action_init,
7270 code_props_rule_action_init, code_props_translate_code): The rest of
7271 the new code_props functional interface. Among other things, the init
7272 functions set the code_props kind field so that
7273 code_props_translate_code will know whether to behave like
7274 translate_symbol_action, translate_rule_action, or translate_code.
7275 These old translate functions must remain until all other modules are
7276 updated to use the new code_props interface.
7277 (code_scanner_last_string_free): New function similar to
7278 gram_scanner_last_string_free.
7279 (code_scanner_free): Add documentation.
7280 * src/scan-code.l: Implement the new interface.
7281 (code_lex): Make it static, add a code_props* argument, and remove the
7282 rule argument.
7283 (last_string): New static global similar to the one in scan-gram.l.
7284 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
7285 instead of rule.
7286 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
7287 code_props since Bison may one day use this information for destructors
7288 and printers.
7289 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
7290 (handle_action_dollar): Use symbol_list_n_get and set used flag
7291 directly since symbol_list_n_used_set is removed.
7292 (translate_action): Add a code_props* argument and remove the rule,
7293 action, and location arguments. Pass the code_props* on to code_lex.
7294 (translate_rule_action, translate_symbol_action, translate_code):
7295 Rewrite as wrappers around the new code_props interface.
7296 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
7297 it would eventually need to break the encapsulation of code_props.
7298
72992007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7300
7301 * etc/.cvsignore: New.
7302
73032007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
7304
7305 Add maintainer-push-check to run maintainer-check using push parsing in
7306 place of pull parsing where available.
7307 * Makefile.am (maintainer-push-check): New.
7308 * data/bison.m4 (b4_use_push_for_pull_if): New.
7309 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
7310 appropriately based on their existing values.
7311 (yypush_parse): Don't print push-parser-specific diagnostics if push
7312 parsing is being used in place of pull parsing.
7313 * data/yacc.c: If push parsing should replace pull parsing, redirect to
7314 push.c.
7315 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
7316 variable, and insert b4_use_push_for_pull_flag into muscles.
7317 * tests/Makefile.am (maintainer-push-check): New.
7318
73192006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7320
7321 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
7322 (whether successful or failed) so that yypush_parse can be invoked
7323 again to start a new parse using the same yypstate.
7324 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
7325 check multiple yypull_parse invocations on the same yypstate. For pull
7326 mode, extend to check multiple yyparse invocations.
7327 (Exploding the Stack Size with Alloca): Extend to try with
7328 %push-pull-parser.
7329 (Exploding the Stack Size with Malloc): Likewise.
7330
7331 * tests/calc.at (Simple LALR Calculator): Don't specify
7332 %skeleton "push.c" since %push-pull-parser implies that now.
7333 * tests/headers.at (export YYLTYPE): Don't check for the push
7334 declarations. Otherwise, this test case can't be used to see if push
7335 mode can truly emulate pull mode.
7336 * tests/input.at (Torturing the Scanner): Likewise.
7337 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
7338 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
7339 AT_YACC_IF, which now includes the case of push mode since %skeleton
7340 need not be used for push mode. This will be more intuitive once
7341 push.c is renamed to yacc.c.
7342
73432006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
7344
7345 For push mode, convert yyparse from a macro to a function, invoke yylex
7346 instead of passing a yylexp argument to yypull_parse, and don't
7347 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7348 Discussed starting at
7349 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7350 * data/bison.m4 (b4_pull_if): New.
7351 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7352 * data/push.c: Improve M4 quoting a little.
7353 (b4_generate_macro_args, b4_parenthesize): Remove.
7354 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7355 any time a pull parser is requested.
7356 Don't #define this as a wrapper around yypull_parse. Instead, when
7357 both push and pull are requested, make it a function that does that
7358 same thing.
7359 (yypull_parse): If there's a b4_prefix, #define this to
7360 b4_prefix[pull_parse] when both push and pull are requested.
7361 Don't define this as a function unless both push and pull are
7362 requested.
7363 Remove the yylexp argument and hard-code yylex invocation instead.
7364 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7365 %push-parser.
7366 * src/getargs.c (pull_parser): New global initialized to true.
7367 * getargs.h (pull_parser): extern it.
7368 * src/output.c (prepare): Insert pull_flag muscle.
7369 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7370 (prologue_declaration): Set both push_parser and pull_parser = true for
7371 %push-pull-parser. Set push_parser = true and pull_parser = false for
7372 %push-parser.
7373 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7374 %push-parser since there's no backward-compatibility concern here.
7375 Scan %push-pull-parser.
7376 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7377 instead of %push-parser.
7378 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7379 prototype it in the module that calls yyparse.
7380 * tests/input.at (Torturing the Scanner): Likewise.
7381 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7382
73832006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7384
7385 Update etc/bench.pl. Optimize push mode a little (the yyn change
7386 deserves most of the credit).
7387 * Makefile.am (SUBDIRS): Add etc subdirectory.
7388 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7389 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7390 yytoken, yyval, and yyloc declarations to...
7391 (yyparse or yypush_parse): ... here to improve performance. For
7392 yypush_parse invocations after the first, be sure to assign yyn its old
7393 value again.
7394 (yypstate_new): Don't bother initializing the yyresult field since the
7395 initial value isn't used.
7396 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7397 remove the #define that, in push mode, set it to yyps->NAME.
7398 * etc/Makefile.am: New.
7399 * etc/bench.pl: Remove and build it instead from...
7400 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7401 "tests/bison" from the build directory by default rather than just
7402 invoking "bison" from $PATH.
7403 (calc_grammar): Update push parser code: don't declare yylval globally,
7404 don't define yyparse_wrapper, and don't #define yyparse.
7405 (bench_grammar): Update to check all working combinations of yacc.c,
7406 push.c, impure, pure, pull, and push.
7407
74082006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7409
7410 For push mode, add pull wrappers around yypush_parse.
7411 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7412 (yypull_parse): New function wrapping yypush_parse.
7413 (yyparse): New #define wrapping yypull_parse.
7414 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7415 is declared.
7416 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7417 prototype yylex in the module that calls yyparse, and don't prototype
7418 yyparse there. Otherwise, the yyparse expansion won't compile.
7419 * tests/input.at (Torturing the Scanner): Likewise.
7420
74212006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7422
7423 Enable push parsers to operate in impure mode. Thus, %push-parser no
7424 longer implies %pure-parser. The point of this change is to move
7425 towards being able to test the push parser code by running the entire
7426 test suite as if %push-parser had been declared.
7427 * data/push.c (yypush_parse): For impure mode, remove the
7428 yypushed_char, yypushed_val, and yypushed_loc arguments.
7429 Instead, declare these as local variables initialized to the global
7430 yychar, yylval, and yylloc.
7431 For the first yypush_parse invocation only, restore the initial values
7432 of these global variables when it's time to read a token since they
7433 have been overwritten.
7434 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7435 %push-parser.
7436 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7437 %pure-parser along with %push-parser since this test case was designed
7438 for pure push parsers.
7439 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7440 (AT_YACC_OR_PUSH_IF): New.
7441 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7442 add a note that it's still wrong for some cases (as it has been for a
7443 while).
7444 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7445 %push-parser no longer implies %pure-parser.
7446
74472006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7448
7449 Remove some unnecessary differences between the pull parser code and
7450 the push parser code. This patch enables yynerrs in push mode.
7451 * data/push.c: Reformat M4 a little.
7452 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7453 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7454 because push mode is on. Instead, if pure mode is on, move yynerrs
7455 to...
7456 (b4_declare_parser_state_variables): ... here.
7457 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7458 to yyps->NAME so it can be used in yypush_parse.
7459 (yypush_parse): Don't omit uses of yynerrs in push mode.
7460
74612006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7462
7463 Fix bug such that the first pushed token's value and location are
7464 sometimes overwritten (sometimes by %initial-action) before being used.
7465 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7466 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7467 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7468 more closely mimic the pull parser logic.
7469 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7470 time to read a token, which is after any initialization of yylval and
7471 yylloc.
7472 (gottoken): Rename label to...
7473 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7474 user namespace.
7475
74762006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7477
7478 Rearrange initialization of the parser state variables so that the
7479 skeleton doesn't have to have a copy for pull mode and another for push
7480 mode. This patch also fixes at least a bug such that yylloc was not
7481 initialized (with b4_location_initial_line and
7482 b4_location_initial_column) upon calling yypush_parse. However, that
7483 initialization now overwrites the first token's location;
7484 %initial-action assigning @$ already did the same thing, and both bugs
7485 will be fixed in a later patch.
7486 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7487 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7488 yyss, yyvs, yyls, and yystacksize.
7489 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7490 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7491 yylsp.
7492 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7493 yyps->NAME so it can be used in yypush_parse.
7494 (yyparse or yypush_parse): For yypush_parse, don't print the
7495 "Starting parse" diagnostic for invocations after the first.
7496 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7497 yypush_parse, only do it for the first invocation.
7498 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7499 initialization to occur in yypush_parse but only on the first
7500 invocation.
7501
75022006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7503
7504 * data/push.c: Add CPP guards around push parser declarations in both
7505 the header and the code file.
7506 In the code file, move the push parser declarations to the same place
7507 they appear in the header file.
7508 Clean up the M4 some, especially the inconsistent underquoting in
7509 some b4_c_function_def and b4_c_function_decl uses.
7510
75112006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7512
7513 Encapsulate the push parser state variables into an M4 macro so the
7514 push skeleton doesn't have to list them again for pull mode's yyparse.
7515 For push mode, remove yypush_parse's local equivalents of these
7516 variables to eliminate unnecessary copying between the two sets at
7517 run-time. This patch also fixes at least a bug related to multiple
7518 %initial-action invocations in push mode.
7519 * data/push.c (b4_declare_parser_variables): Rename to...
7520 (b4_declare_scanner_communication_variables): ... this for clarity and
7521 update both uses.
7522 (b4_declare_yyparse_variables): Remove and move its contents to the one
7523 spot where it was invoked.
7524 (b4_declare_parser_state_variables): New macro containing the parser
7525 state variables required by push mode.
7526 (struct yypstate): Replace all fields but yynew with
7527 b4_declare_parser_state_variables.
7528 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7529 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7530 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7531 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7532 parser state variable declarations with
7533 b4_declare_parser_state_variables.
7534 Don't initialize parser state variables when calling yypush_parse since
7535 yypstate_new already does that.
7536 Invoke the user's initial action only upon the first yypush_parse
7537 invocation.
7538 Remove all code that copies between the local parser state variables
7539 and the yypstate.
7540
75412006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7542
7543 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7544 prevent a name collision in a future patch where these names will
7545 sometimes be #define'd.
7546 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7547 since it no longer has the same name as the existing argument.
7548 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7549
75502006-12-19 Paolo Bonzini <bonzini@gnu.org>
7551 and Joel E. Denny <jdenny@ces.clemson.edu>
7552
7553 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7554 that the argument is case-insensitive, and there's no `=' here.
7555 For the %skeleton entry, mention that %language is better.
7556 (Bison Options): Likewise for --language and --skeleton. Move the
7557 --skeleton entry so that the `Tuning the parser' section is sorted
7558 alphabetically on long options.
7559 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7560 %language directive in detail here; cross-reference the %language
7561 documentation instead.
7562 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7563 `%require "2.3b"' so that the example is always up-to-date.
7564 (Table of Symbols): Add entries for %language and %skeleton.
7565 * examples/extexi (normalize): Instead of replacing every %require
7566 argument with the current Bison version, just substitute for
7567 `@value{VERSION}'. This guarantees that we're testing what actually
7568 appears in the documentation.
7569 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7570 rather than `@VERSION@'.
7571
75722006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7573
7574 * NEWS: Reword the %language news a bit, and put it earlier.
7575
7576 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7577 Rewrite to simplify the logic.
7578 (language_argmatch): Likewise.
7579 (program_name): We now own this var.
7580 * src/getargs.h (struct bison_language): Use char[] rather than
7581 const char *.
7582
7583 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7584 Java is supported.
7585 * src/complain.c (program_name): Remove decl; no longer needed.
7586 * src/main.c (program_name): Remove; now belongs to getargs.
7587
75882006-12-18 Paolo Bonzini <bonzini@gnu.org>
7589
7590 * NEWS: Document %language.
7591
7592 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7593
7594 * data/c-skel.m4, data/c++-skel.m4: New files.
7595 * data/glr.c: Complain on push parsers.
7596
7597 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7598 over %skeleton.
7599 (Decl Summary): Document %language and %skeleton.
7600 (Command line): Document -L.
7601
7602 * examples/extexi: Rewrite %require directive.
7603 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7604
7605 * src/files.c (compute_exts_from_gc): Look in language structure
7606 for .y extension.
7607 (compute_file_name_parts): Check whether .tab should be added.
7608 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7609 (language, skeleton_arg, language_argmatch): New.
7610 (long_options): Add --language.
7611 (getargs): Use skeleton_arg, add -L/--language.
7612 * src/getargs.h: Include location.h.
7613 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7614 * src/output.c (prepare): Pick default skeleton from struct language.
7615 Don't dispatch C skeletons here.
7616 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7617 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7618 * src/scan-gram.l ("%language"): New rule.
7619
7620 * tests/calc.at: Test %skeleton and %language.
7621 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7622 (AT_GLR_IF): Look for %skeleton "glr.cc".
7623 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7624 (AT_YACC_IF): Reject %language.
7625
76262006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7627
7628 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7629 since it wasn't used; only the typedef name 'semantic_type' is needed.
7630 Also, omit trailing white space.
7631
7632 * bootstrap: Sync from coreutils.
7633 (gnulib_extra_files): Add build-aux/announce.gen.
7634 (slurp): Adjust .gitignore files like .cvsignore files.
7635 * build-aux/announce-gen: Remove from CVS, since bootstrap
7636 now creates this.
7637
76382006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7639
7640 Make %push-parser imply %pure-parser. This fixes several bugs; see
7641 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7642 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7643 pure_parser = true.
7644 * data/push.c: Don't bother testing b4_push_if when deciding whether
7645 to expand b4_declare_parser_variables globally.
7646 (yypush_parse): Likewise in here.
7647
7648 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7649 (yy_reduce_print): Reformat M4 for readability.
7650
76512006-12-15 Bob Rossi <bob@brasko.net>
7652 and Joel Denny <jdenny@ces.clemson.edu>
7653
7654 * data/push.c (yypstate): Add typedef, and update all uses of
7655 struct yypstate to just yypstate.
7656 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7657
76582006-12-14 Bob Rossi <bob@brasko.net>
7659
7660 * data/push.c (yypush_parse): Declare prototype regardless of
7661 %locations option.
7662
76632006-12-14 Bob Rossi <bob@brasko.net>
7664
7665 * data/push.c (yyparse): Remove the prototype and the #define when in
7666 push-parser mode.
7667
76682006-12-13 Bob Rossi <bob@brasko.net>
7669
7670 * data/push.c (yypstate_init): Rename to...
7671 (yypstate_new): ... this and use b4_c_function_def.
7672 (yypstate_delete): New.
7673 (yypush_parse): Change parameters yynval and yynlloc to be const.
7674 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7675 yypstate_delete functions.
7676
76772006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7678
7679 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7680 strange test case titles. Reported by Bob Rossi.
7681
76822006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7683
7684 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7685 of potential ambiguities in GLR grammers.
7686
76872006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7688
7689 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7690 `bison ', use m4_index instead of m4_substr since chopping up a string
7691 containing M4-special characters causes problems here.
7692
7693 Fix a couple of bugs related to special characters in user-specified
7694 file names, and make it easier for skeletons to compute output file
7695 names with the same file name prefix as Bison-computed output file
7696 names.
7697 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7698 b4_parser_file_name and b4_spec_defines_file instead of
7699 @output_parser_name@ and @output_header_name@, which are now redundant.
7700 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7701 b4_parser_file_name, b4_spec_defines_file, and the new
7702 @basename(FILENAME@) instead of @output_parser_name@ and
7703 @output_header_name@, which inappropriately escaped the file names as
7704 C string literals.
7705 * src/files.c (all_but_ext): Remove static qualifier.
7706 (compute_output_file_names): Move `free (all_but_ext)' to...
7707 (output_file_names_free): ... here since all_but_ext is needed later.
7708 * src/files.h (all_but_ext): Extern.
7709 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7710 exactly what MUSCLE_INSERT_STRING used to do.
7711 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7712 characters are escaped properly.
7713 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7714 all_but_ext.
7715 For pkgdatadir muscle, maintain previous functionality by using
7716 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7717 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7718 digraphs would never be expanded. Hopefully no one has M4-special
7719 characters in his Bison installation path.
7720 * src/scan-skel.l: Don't parse @output_header_name@ and
7721 @output_parser_name@ anymore since they're now redundant.
7722 In @output, use decode_at_digraphs.
7723 Parse a new @basename command that invokes last_component.
7724 (decode_at_digraphs): New.
7725 (BASE_QPUTS): Remove unused.
7726 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7727 (Output file name): New tests.
7728
77292006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7730
7731 Warn about output files that are generated by the skeletons and that
7732 conflict with other output files.
7733 * data/glr.c: Don't generate the header file here when glr.cc does.
7734 * src/files.c (file_names, file_names_count): New static globals.
7735 (compute_output_file_names): Invoke output_file_name_check for files
7736 not generated by the skeletons and remove existing checks.
7737 (output_file_name_check): New function that warns about conflicting
7738 output file names.
7739 (output_file_names_free): Free file_names.
7740 * src/files.h (output_file_name_check): Declare.
7741 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7742 the skeletons.
7743 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7744 (Conflicting output files): New tests.
7745
77462006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7747
7748 * doc/bison.texinfo: Fix a couple of typos.
7749
77502006-12-08 Bob Rossi <bob@brasko.net>
7751
7752 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7753 Rename to...
7754 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7755 update all uses.
7756 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7757 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7758 local pv.
7759 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7760 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7761
77622006-12-07 Bob Rossi <bob@brasko.net>
7763 and Joel Denny <jdenny@ces.clemson.edu>
7764
7765 * data/push.c (yypvarsinit): Change return type from void* to struct
7766 yypvars*. No longer cast to void* on return.
7767 (struct yypvars): Remove yylen since it need not be remembered between
7768 yypushparse invocations.
7769 (yypushparse): Don't copy between yylen and pv->yylen.
7770
77712006-12-05 Bob Rossi <bob@brasko.net>
7772
7773 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7774 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7775 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7776 (struct yypvars): Remove b4_declare_parser_variables.
7777 (yypvarsinit): Remove init code for removed variables.
7778 (global scope): Do not declare b4_declare_parser_variables if
7779 push or pure mode.
7780 (yypushparse): Add b4_declare_parser_variables.
7781 Init new local variables, and remove init code for removed
7782 yypvars variables.
7783 (yyparse): Delete.
7784 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7785 and yyparse for other modes.
7786 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7787 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7788 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7789 (AT_PURE_LEX_IF): True if pure or push parser.
7790
77912006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7792
7793 Document Yacc prologue alternatives and default %destructor's and
7794 %printer's as experimental. Don't mention Java yet. Discussed at
7795 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7796 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7797 (2.3a): Annotate this entry to say the old forms of these features were
7798 also experimental.
7799 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7800 Table of Symbols): Say they're experimental. Comment out any mention
7801 of Java (we'll want this back eventually).
7802
78032006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 Support a file name argument to %defines. Deprecate `=' in
7806 %file-prefix, %name-prefix, and %output. Discussed at
7807 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7808 * NEWS (2.3a+): Mention.
7809 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7810 form of %defines, and remove `=' from entries for %file-prefix,
7811 %name-prefix, and %output.
7812 * src/parse-gram.y (prologue_declaration): Implement.
7813 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7814 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7815 all but one occurrence of %name-prefix.
7816 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7817 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7818 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7819 occurrence of each of %file-prefix and %output. Add check for %defines
7820 with argument.
7821 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7822 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7823 Remove the `=' from %output.
7824
78252006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 Don't escape $ in test case titles since Autoconf 2.61 now does that
7828 correctly.
7829 * tests/actions.at (Default %printer and %destructor are not for error
7830 or $undefined): Here.
7831 (Default %printer and %destructor are not for $accept): Here.
7832 * tests/input.at (Invalid $n and @n): Here.
7833
78342006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7835
7836 Rename <!> to <>. Discussed starting at
7837 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7838 * NEWS (2.3a+): Update.
7839 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7840 Update.
7841 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7842 * src/scan-gram.l (INITIAL): Implement.
7843 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7844 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7845 comment.
7846 * tests/actions.at (Default tagless %printer and %destructor,
7847 Default tagged and per-type %printer and %destructor,
7848 Default %printer and %destructor are not for error or $undefined,
7849 Default %printer and %destructor are not for $accept,
7850 Default %printer and %destructor for mid-rule values): Update.
7851 * tests/input.at (Default %printer and %destructor redeclared,
7852 Unused values with default %destructor): Update.
7853
78542006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7855
7856 Don't let %prec take a nonterminal.
7857 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7858 token.
7859 * tests/input.at (%prec takes a token): New test checking that %prec
7860 won't take a nonterminal.
7861
78622006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7863
7864 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7865 it was double-quoted.
7866 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7867 grammar is maintained with Bison's highest standards.
7868 * src/getargs.c: Fix some typos in Doxygen comments.
7869
78702006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7871
7872 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7873 later. Reported by Paul Eggert in
7874 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7875 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7876 * src/scan-code.l (translate_action): Don't bother invoking
7877 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7878 (code_scanner_free): Instead of invoking
7879 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7880 which frees more.
7881 * src/scan-gram.l (gram_scanner_free): Likewise.
7882 * src/scan-skel.l (scan_skel): Likewise.
7883
78842006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7885
7886 * src/files.c (tr): Change return type to void.
7887 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7888 has been called previously for the same key.
7889 (muscle_find): Return storage instead of value so that
7890 --enable-gcc-warnings doesn't produce warnings that the return discards
7891 const. aver that the value and storage are the same since storage
7892 could potentially be NULL when value is not.
7893 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7894 same as 0.
7895
78962006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7897
7898 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7899 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7900 us a slightly cleaner distribution, and also works.
7901 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7902 gnulib changes.
7903
79042006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7905 and Paul Eggert <eggert@cs.ucla.edu>
7906
7907 Don't let Bison leak memory except when it complains.
7908 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7909 (spec_defines_file, dir_prefix): Now char *, not const char *,
7910 since they are freed.
7911 * src/files.c: Likewise.
7912 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7913 Likewise.
7914 (tr): Now operates in-place. All uses changed.
7915 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7916 values.
7917 (compute_file_name_parts, compute_output_file_names): Don't store
7918 read-only data in variables that will be freed.
7919 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7920 src_extension, and header_extension.
7921 (output_file_names_free): New public function to free
7922 spec_verbose_file, spec_graph_file, spec_defines_file,
7923 parser_file_name, and dir_prefix.
7924 * src/getargs.c (getargs): Don't store read-only data in variables that
7925 will be freed.
7926 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7927 (which previously existed but was unused), and quotearg_free.
7928 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7929 * src/muscle_tab.c: Likewise.
7930 (muscle_entry): Make the value char const *,
7931 and add a new storage member that is char * and can be freed.
7932 (muscle_entry_free): New private function.
7933 (muscle_init): Use it instead of free.
7934 (muscle_insert, muscle_grow): Update and use new storage member.
7935 (muscle_code_grow): Free the string passed to muscle_grow
7936 since it's not needed anymore.
7937 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7938 add a new `char *code' member.
7939 ("{...}"): Declare semantic type as code.
7940 * src/scan-code.h (translate_rule_action):
7941 (translate_symbol_action, translate_code, translate_action): Return
7942 `char const *' rather than `char *' since external code should not free
7943 these strings.
7944 * src/scan-code.l: Likewise.
7945 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7946 which is "{...}" in the parser.
7947 * tests/Makefile.am (maintainer-check-valgrind): Set
7948 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7949 Valgrind.
7950 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7951 complain.
7952 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7953 expecting a non-zero exit status sets --leak-check=summary and
7954 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7955 this case, and we don't want to hear about it.
7956
79572006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7958
7959 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7960 instead of from the template, to simplify configuration a bit.
7961 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7962 and m4/wint_t.m4, as they are needed with the latest gnulib.
7963
79642006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7965
7966 Disable unset/unused mid-rule value warnings by default, and recognize
7967 --warnings=midrule-values to enable them. Discussed starting at
7968 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7969 * NEWS (2.3a+): Mention.
7970 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7971 warnings): Add entry for midrule-values subargument.
7972 * src/reader.c (symbol_should_be_used): Don't return true just because
7973 the value is a set/used mid-rule value unless
7974 --warnings=midrule-values was specified.
7975 * tests/input.at (Unused values, Unused values before symbol
7976 declarations): Run tests with and without --warnings=midrule-values.
7977
7978 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7979 than LIST_FREE directly.
7980
79812006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7982
7983 Finish implementing --warnings=error, which should not be implied by
7984 --warnings=all (or by its synonyms -W and --warnings without
7985 subarguments).
7986 * src/complain.c (set_warning_issued): New function to report that
7987 warnings are being treated as errors and to record an error if so.
7988 Invoke...
7989 (warn_at, warn): ... here.
7990 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7991 "error - warnings are errors" does not appear above "all - all of the
7992 above".
7993 (getargs): For -W and --warnings without subarguments, don't let
7994 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7995 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7996
79972006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7998
7999 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8000 empty subargument list. For example: `bison --warnings= parser.y'.
8001
80022006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8003
8004 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8005 the parser header file so that gcc doesn't warn.
8006
80072006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8008
8009 Split the default %destructor/%printer into two kinds: <*> and <!>.
8010 Discussed starting at
8011 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8012 * NEWS (2.3a+): Mention.
8013 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8014 previous change today related to mid-rules.
8015 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8016 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8017 (TYPE_TAG_ANY): Add as <*>.
8018 (TYPE_TAG_NONE): Add as <!>.
8019 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8020 for <*> and <!>.
8021 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8022 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8023 * src/symlist.c (symbol_list_default_new): Split into tagged and
8024 tagless versions.
8025 (symbol_list_destructor_set, symbol_list_printer_set): Split
8026 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8027 SYMLIST_DEFAULT_TAGLESS.
8028 * src/symlist.h: Update symbol_list_default*_new prototypes.
8029 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8030 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8031 * src/symtab.c (default_destructor, default_destructor_location,
8032 default_printer, default_printer_location): Split each into tagged and
8033 tagless versions.
8034 (symbol_destructor_get, symbol_destructor_location_get,
8035 symbol_printer_get, symbol_printer_location_get): Implement tagged
8036 default and tagless default cases.
8037 (default_destructor_set, default_printer_set): Split each into tagged
8038 and tagless versions.
8039 * src/symtab.h: Update prototypes.
8040 * tests/actions.at (Default %printer and %destructor): Rename to...
8041 (Default tagless %printer and %destructor): ... this, and extend.
8042 (Per-type %printer and %destructor): Rename to...
8043 (Default tagged and per-type %printer and %destructor): ... this, and
8044 extend.
8045 (Default %printer and %destructor for user-defined end token): Extend.
8046 (Default %printer and %destructor are not for error or $undefined):
8047 Update.
8048 (Default %printer and %destructor are not for $accept): Update.
8049 (Default %printer and %destructor for mid-rule values): Extend.
8050 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8051 (Unused values with default %destructor): Extend.
8052
80532006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8054
8055 Don't apply the default %destructor/%printer to an unreferenced midrule
8056 value. Mentioned at
8057 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8058 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8059 like $@n instead of just @n so that the default %destructor/%printer
8060 logic doesn't see them as user-defined symbols.
8061 (symbol_is_dummy): Check for both forms of the name.
8062 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8063 name for which the midrule value is referenced in any action.
8064 * tests/actions.at (Default %printer and %destructor for mid-rule
8065 values): New test.
8066 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8067 for change to dummy symbol names.
8068
80692006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8070
8071 Warn about unset midrule $$ if the corresponding $n is used.
8072 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8073 $n usage.
8074 (packgram): Before invoking grammar_rule_check on any rule, make sure
8075 all actions have already been scanned in order to set `used' flags.
8076 Otherwise, checking that a midrule's $$ is set will not always work
8077 properly because the midrule check must forward-reference the midrule's
8078 parent rule.
8079 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8080 warning.
8081
80822006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8083
8084 More improvements to the documentation of the prologue alternatives:
8085 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8086 Bison manual.
8087 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8088 some text to clarify the relative importance of the new directives and
8089 to show how these directives may be viewed as code labels.
8090
80912006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8092
8093 Similar to the recently removed %before-header, add %code-top as the
8094 alternative to the pre-prologue. Mentioned at
8095 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8096 Also, let the prologue alternatives appear in the grammar section.
8097 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8098 (prologue_declaration): Move the existing prologue alternatives to...
8099 (grammar_declaration): ... here and add %code-top.
8100 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8101
8102 Clean up and extend documentation for the prologue alternatives.
8103 * NEWS (2.3a+): Describe prologue alternatives.
8104 * doc/bison.texinfo (Prologue): Move discussion of prologue
8105 alternatives to...
8106 (Prologue Alternatives): ... this new section, and extend it to discuss
8107 all 4 directives in detail.
8108 (Table of Symbols): Clean up discussion of prologue alternatives and
8109 add %code-top.
8110
81112006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8112
8113 DJGPP specific issues.
8114
8115 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8116 config.bat accordingly.
8117 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8118 * djgpp/config.site: Likewise.
8119
81202006-10-16 Paolo Bonzini <bonzini@gnu.org>
8121
8122 Replace %*-header with %provides, %requires, %code. See discussion at
8123 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8124
8125 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
8126 (b4_user_start_header): Remove.
8127 * data/glr.c: Use new macros instead of b4_*start_header
8128 and b4_*end_header.
8129 * data/glr.cc: Likewise.
8130 * data/lalr1.cc: Likewise.
8131 * data/push.c: Likewise.
8132 * data/yacc.c: Likewise.
8133
8134 * doc/bison.texinfo: Remove %before-header, rename
8135 %{start,end,after}-header to %requires, %provides, %code.
8136
8137 * src/parse-gram.y: Likewise (also rename token names accordingly).
8138 * src/scan-gram.l: Likewise.
8139 * tests/actions.at: Likewise.
8140
81412006-10-14 Paul Eggert <eggert@cs.ucla.edu>
8142
8143 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
8144 Problem reported by Joel E. Denny.
8145
81462006-10-14 Jim Meyering <jim@meyering.net>
8147
8148 (Sync from coreutils.)
8149 Work also when the working directory (with e.g. coreutils sources)
8150 is version controlled with git, rather than CVS.
8151 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
8152 rather than CVS.
8153 In messages and comments, say e.g., "checked-out sources",
8154 rather than "CVS sources".
8155 (version_controlled_file): New function. Work for git as well as
8156 for CVS. Don't use grep's -q option.
8157 (slurp): Call it here, in place of CVS-specific code.
8158
81592006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
8160
8161 Fix testsuite for ./configure --enable-gcc-warnings:
8162 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
8163 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
8164 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
8165 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
8166 * test/regression.at (Diagnostic that expects two alternatives):
8167 Likewise.
8168
81692006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * bootstrap.conf (gnulib_modules): Add config-h.
8172 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
8173 worry about HAVE_CONFIG_H.
8174 * lib/abitset.c: Likewise.
8175 * lib/bitset.c: Likewise.
8176 * lib/bitset_stats.c: Likewise.
8177 * lib/bitsetv-print.c: Likewise.
8178 * lib/bitsetv.c: Likewise.
8179 * lib/ebitset.c: Likewise.
8180 * lib/get-errno.c: Likewise.
8181 * lib/lbitset.c: Likewise.
8182 * lib/subpipe.c: Likewise.
8183 * lib/timevar.c: Likewise.
8184 * lib/vbitset.c: Likewise.
8185 * lib/bitset.c: Include "bitset.h" first, to test interface.
8186 * lib/bitset_stats.c: Include "bitset_stats.h" first.
8187 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
8188 * lib/bitsetv.c: Include "bitsetv.h" first.
8189 * lib/get-errno.c: Include "get-errno.h" first.
8190 * m4/.cvsignore: Add config-h.m4.
8191 * tests/actions.at (Default %printer and %destructor for ...):
8192 Adjust expected line numbers in output to reflect removal of #if
8193 HAVE_CONFIG_H lines.
8194 * tests/glr-regression.at (Missed %merge type warnings when ...):
8195 Likewise.
8196 * tests/regression.at (Braced code in declaration in rules section):
8197 Likewise.
8198 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
8199 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
8200 Include <config.h> unconditionally.
8201
8202 * bootstrap: Sync from coreutils, as follows:
8203
8204 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8205
8206 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
8207 variable was sometimes used without being initialized. This
8208 messed up the installation of the INSTALL file in some cases.
8209
8210 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8211
8212 * bootstrap (usage, main program, symlink_to_gnulib): Add option
8213 --copy. Inspired by a suggestion from Bruno Haible.
8214
8215 2006-10-03 Jim Meyering <jim@meyering.net>
8216
8217 * bootstrap: Undo last change to this file, since now gnulib-tool
8218 sticks with the automake default in generating dependencies.
8219
82202006-10-12 Paul Eggert <eggert@cs.ucla.edu>
8221
8222 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
8223 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
8224
8225 * doc/bison.1: Add copyright notice.
8226
8227 * data/glr.c: Don't include <stdarg.h>; not used.
8228
8229 * NEWS: The -g and --graph options now output graphs in Graphviz
8230 DOT format, not VCG format.
8231 * doc/bison.1: Likewise.
8232 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
8233 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
8234 of this change in
8235 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
8236 * TODO: Remove Graphviz entry.
8237 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
8238 remove vcg.c, vcg.h, vcg_defaults.h.
8239 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
8240 * src/graphviz.c, src/graphviz.h: New files.
8241 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
8242 * src/files.h: Make comment more generic.
8243 * src/main.c (main): Likewise.
8244 * src/print_graph.h: Likewise.
8245 * src/getargs.c (usage): Make usage description more generic.
8246 * src/print_graph.c: Include graphviz.h rather than vcg.h.
8247 (static_graph, fgraph): Remove. All uses changed to pass
8248 arguments instead of sharing a static var.
8249 (print_core, print_actions, print_state, print_graph):
8250 Output graphviz format rather than VCG format.
8251 * tests/.cvsignore: Remove *.vcg; add *.dot.
8252 * tests/output.at: Expect *.dot files, not *.vcg files.
8253
8254 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
8255 accommodates the 2006-10-08 change.
8256
82572006-10-11 Bob Rossi <bob@brasko.net>
8258
8259 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
8260 (b4_yyssa, b4_yyerror_range): New macros.
8261 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
8262 (yypvarsinit): Remove init of removed fields.
8263 (yypushparse): Remove use of removed fields; use new macros instead.
8264
82652006-10-11 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
8268 in a push parser. Reindent slightly to match yacc.c better.
8269
82702006-10-11 Bob Rossi <bob@brasko.net>
8271
8272 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
8273 yymsg_alloc fields.
8274 (yypvarsinit, yypushparse): Remove init of removed fields.
8275 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
8276
82772006-10-09 Paul Eggert <eggert@cs.ucla.edu>
8278
8279 * THANKS: Add Paolo Bonzini and Bob Rossi.
8280
82812006-10-08 Paolo Bonzini <bonzini@gnu.org>
8282
8283 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
8284 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
8285 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
8286 b4_define_user_cde and uses): Remove.
8287 (b4_comment, b4_prefix, b4_sync_start): New.
8288 * data/bison.m4: New file, with most of the content removed from c.m4.
8289 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
8290 * src/output.c (output_skeleton): Pass bison.m4.
8291 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
8292 only if specified.
8293
82942006-10-05 Paul Eggert <eggert@cs.ucla.edu>
8295
8296 Fix test failure reported by Tom Lane in
8297 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
8298 and try to make such failures easier to catch in the future.
8299 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
8300 that's now the caller's responsibility.
8301 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
8302 Set yychar = YYEOF if it's negative.
8303 * tests/actions.at (yylex): Abort if asked to read past EOF.
8304 * tests/conflicts.at (yylex): Likewise.
8305 * tests/cxx-type.at (yylex): Likewise.
8306 * tests/glr-regression.at (yylex): Likewise.
8307 * tests/input.at (yylex): Likewise.
8308 * tests/regression.at (yylex): Likewise.
8309 * tests/torture.at (yylex): Likewise.
8310
83112006-10-01 Paul Eggert <eggert@cs.ucla.edu>
8312
8313 Fix problems with translating English-language diagnostics.
8314 * bootstrap: Fix bug introduced in recent bootstrap changes, with
8315 respect to bison-runtime pot generation. The YY_ stuff
8316 wasn't being captured.
8317 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
8318 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
8319 * runtime-po/POTFILES.in: Add data/push.c.
8320
83212006-09-29 Paul Eggert <eggert@cs.ucla.edu>
8322
8323 Merge bootstrap changes from coreutils.
8324
8325 2006-09-28 Jim Meyering <jim@meyering.net>
8326
8327 Automatically generated dependencies are important even
8328 when all of the sources in a directory come from gnulib.
8329 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
8330 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
8331
8332 2006-09-23 Jim Meyering <jim@meyering.net>
8333
8334 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
8335
8336 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8337
8338 * bootstrap: Add support for --force.
8339 (usage): New function. Describe usage less tersely.
8340 (CVS_only_file): New var.
8341
83422006-09-21 Paul Eggert <eggert@cs.ucla.edu>
8343
8344 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8345 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8346 Adjust white space and comments to match GNU style better.
8347
83482006-09-20 Bob Rossi <bob@brasko.net>
8349
8350 * data/push.c (yyresult_get): Remove function.
8351 (YYPUSH_MORE): Add #define.
8352 (yypushparse): Modify return value.
8353
83542006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 * stamp-h.in: Remove; no longer needed.
8357 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8358 Remove config.h, config.hin, intl (no longer created).
8359 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8360 stamp-h1.
8361
8362 Sync bootstrap from coreutils, as follows:
8363
8364 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8365
8366 * bootstrap (symlink_to_gnulib): New function.
8367 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8368 to copies-of-gnulib.
8369 (cp_mark_as_generated, slurp, gnulib_files):
8370 Avoid making a copy if it's the same as the old version.
8371 (gnulib_files): Add support for this variable (used by Bison).
8372
83732006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8374
8375 * src/getargs.c (usage): Rework to use conventions similar to
8376 coreutils, to make translation a bit easier and the code a bit
8377 smaller. Problem reported by Tim Van Holder.
8378
83792006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8380
8381 Use some of gnulib's new modules, taken from coreutils.
8382
8383 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8384 * bootstrap.conf: New file.
8385 (gnulib_modules): Add configmake, inttypes, unistd.
8386 (XGETTEXT_OPTIONS): Add complain, complain_at,
8387 fatal, fatal_at, warn, warn_at, unexpected_end.
8388 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8389 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8390 (gl_EARLY): Add.
8391 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8392 (gl_INIT): Add
8393 (GNULIB_AUTOCONF_SNIPPET): Remove.
8394 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8395 the pickiest.
8396 * lib/.cvsignore: Add inttypes_.h.
8397 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8398 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8399 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8400 no-longer-necessary initializations.
8401 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8402 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8403 use the unistd module.
8404 * src/system.h: Likewise.
8405 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8406 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8407 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8408 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8409 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8410 * src/system.h: Include inttypes.h unconditionally, now that we
8411 use the inttypes module. Don't bother to include stdint.h, since
8412 inttypes.h now does that for us.
8413 (LOCALEDIR): Remove, now that we use the configmake module.
8414 * src/getargs.c: Include configmake.h.
8415 * src/main.c: Likewise.
8416 * src/output.c: Likewise.
8417 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8418 not from $abs_top_builddir, since config.h moved.
8419
8420
8421 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8422 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8423
8424 * src/parse-gram.y (symbol_declaration): Don't put statements
8425 before declarations; it's not portable to C89.
8426 * src/scan-code.l (handle_action_at): Likewise.
8427
8428 * src/scan-code.l: Always initialize braces_level; the old code
8429 left it uninitialized and therefore had undefined behavior.
8430
8431 Don't attempt to redefine 'assert', since it runs afoul of
8432 systems where standard headers (mistakenly) include <assert.h>.
8433 Instead, define and use our own alternative, called 'aver'.
8434 * src/reader.c: Don't include assert.h, since we no longer
8435 use assert.
8436 * src/scan-code.l: Likewise.
8437 * src/system.h (assert): Remove, replacing with....
8438 (aver): New function, taking a bool arg. All uses changed.
8439 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8440 not merely an integer.
8441
84422006-09-15 Bob Rossi <bob@brasko.net>
8443
8444 Add support for push parsing. Based on the original work of
8445 Odd Arild Olsen <oao@fibula.no>.
8446 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8447 * data/c.m4 (YYPUSH): New.
8448 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8449 * data/push.c: New file.
8450 * src/getargs.c (push_parser): New var.
8451 * src/getargs.h (push_parser): New declaration.
8452 * src/output.c (prepare): Add macro insertion of `push_flag'.
8453 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8454 (prologue_declaration): Parse %push-parser.
8455 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8456 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8457 list of removed lines from the traces observed.
8458 (AT_CHECK_CALC_LALR): Added push parser tests.
8459
84602006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8461
8462 * NEWS: Version 2.3a.
8463 * configure.ac (AC_INIT): Likewise.
8464
8465 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8466 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8467 due to header ordering dependencies. I don't know why the #define
8468 was there.
8469
8470 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8471 runtime cost when YYDEBUG is not defined, and so that some tests
8472 that used to fail now work. Problem and initial suggestion by
8473 Paolo Bonzini.
8474 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8475 * data/glr.cc (b4_parser_class_name):
8476 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8477 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8478 (yydebug_) [YYDEBUG]: New member.
8479 (yycdebug_): Now defined only if YYDEBUG.
8480 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8481 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8482 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8483 if YYYDEBUG.
8484 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8485 Define only if YYDEBUG.
8486 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8487 set_debug_level.
8488 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8489 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8490 AT_CHECK_CALC_GLR_CC that are working now.
8491
84922006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8493
8494 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8495 We don't need them in glr.cc, and glr.c defines them.
8496 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8497 assumes that defining it to anything is the same as defining
8498 it to 1. Problem reported by Paolo Bonzini.
8499
85002006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8501
8502 * data/c.m4 (b4_null, b4_case): Define.
8503 * src/output.c (prepare_symbols): Use b4_null.
8504 (user_actions_output): Use b4_case.
8505
85062006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 * data/glr.c (b4_shared_declarations): Put start-header first,
8509 before any #includes that we generate, so that feature-test
8510 macros work. Problem reported by Michael Deutschmann in
8511 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8512 * data/lalr1.cc: Likewise.
8513 * doc/bison.texinfo (Prologue): Document that feature-test macros
8514 should be defined before any Bison declarations.
8515 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8516 that depend on location.hh after, not before, Bison decls, since
8517 we now include location.hh after the first user prologue.
8518
8519 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8520 Sander Brandenburg in
8521 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8522 Also, fix minor white space and comment issues.
8523 (Prologue): Mention that it's better to define feature-test macros
8524 before Bison declarations. Problem reported by Michael Deutschmann.
8525
8526 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8527 by Jim Meyering.
8528 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8529 This adjusts to recent gnulib changes.
8530
85312006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8532
8533 Finish implementation of per-type %destructor/%printer. Discussed
8534 starting at
8535 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8536 and
8537 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8538 * NEWS (2.3+): Add a description of this feature to the default
8539 %destructor/%printer description.
8540 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8541 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8542 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8543 list node contains a semantic type.
8544 * src/symtab.c, src/symtab.h: Extend with a table that associates
8545 semantic types with their %destructor's and %printer's.
8546 (semantic_type_from_uniqstr, semantic_type_get,
8547 semantic_type_destructor_set, semantic_type_printer_set): New functions
8548 composing the public interface of that table.
8549 (symbol_destructor_get, symbol_destructor_location_get,
8550 symbol_printer_get, symbol_printer_location_get): If there's no
8551 per-symbol %destructor/%printer, look up the per-type before trying
8552 the default.
8553 * tests/actions.at (Per-type %printer and %destructor): New test case.
8554 * tests/input.at (Default %printer and %destructor redeclared):
8555 Extend to check that multiple occurrences of %symbol-default in a
8556 single %destructor/%printer declaration is an error.
8557 (Per-type %printer and %destructor redeclared, Unused values with
8558 per-type %destructor): New test cases.
8559
85602006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8561
8562 Require default %destructor/%printer to be declared using
8563 %symbol-default instead of an empty symbol list, and start working on
8564 new per-type %destructor/%printer. Discussed at
8565 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8566 * NEWS (2.3+): Add %symbol-default to example.
8567 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8568 (Table of Symbols): Add entry for %symbol-default.
8569 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8570 (generic_symlist, generic_symlist_item): New nonterminals for creating
8571 a list in which each item is a symbol, semantic type, or
8572 %symbol-default.
8573 (grammar_declaration): Use generic_symlist in %destructor and %printer
8574 declarations instead of symbols.1 or an empty list.
8575 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8576 for changes to symbol_list.
8577 * src/reader.c: Update for changes to symbol_list.
8578 * src/scan-code.l: Likewise.
8579 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8580 * src/symlist.c, src/symlist.h: Extend such that a list node may
8581 represent a semantic type or a %symbol-default in addition to just an
8582 ordinary symbol. Add switched functions for setting %destructor's and
8583 %printer's.
8584 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8585 %destructor/%printer declarations.
8586
85872006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8588
8589 Whether the default %destructor/%printer applies to a particular symbol
8590 isn't a question of whether the user *declares* that symbol (in %token,
8591 for example). It's a question of whether the user by any means
8592 *defines* the symbol at all (by simply using a char token, for
8593 example). $end is defined by Bison whereas any other token with token
8594 number 0 is defined by the user. The error token is always defined by
8595 Bison regardless of whether the user declares it with %token, but we
8596 may one day let the user define error as a nonterminal instead.
8597 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8598 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8599 the meaning of "user-defined".
8600 * tests/actions.at (Default %printer and %destructor for user-declared
8601 end token): Rename to...
8602 (Default %printer and %destructor for user-defined end token): ...
8603 this.
8604
8605 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8606 computation of whether to apply the default, don't maintain a list of
8607 every Bison-defined symbol. Instead, just check for a first character
8608 of '$', which a user symbol cannot have, and check for the error token.
8609
86102006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8611
8612 Don't apply the default %destructor or %printer to the error token,
8613 $undefined, or $accept. This change fits the general rule that the
8614 default %destructor and %printer are only for user-declared symbols,
8615 and it solves several difficulties that are described in the new test
8616 cases listed below.
8617 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8618 * tests/actions.at (Default %printer and %destructor are not for error
8619 or $undefined, Default %printer and %destructor are not for $accept):
8620 New test cases.
8621
86222006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8623
8624 Allow %start after the first rule.
8625 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8626 when parsing the first rule.
8627 (check_and_convert_grammar): Search for it here after all grammar
8628 declarations have been parsed. Skip midrules, which have dummy LHS
8629 nonterminals.
8630 * src/symtab.c (symbol_is_dummy): New function.
8631 * src/symtab.h (symbol_is_dummy): Declare it.
8632 * tests/input.at (%start after first rule): New test.
8633
86342006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8635
8636 Redo some of the previous commit: add back the ability to use
8637 non-aliased/undeclared string literals since it might be useful to
8638 those declaring %token-table.
8639 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8640 commit: don't worry about complaints from symbols_pack.
8641 * src/symtab.c (symbol_new, symbol_class_set,
8642 symbol_check_alias_consistency): Undo changes in previous commit: count
8643 each string literal as a new symbol and token, assign it a symbol
8644 number, and don't complain about non-aliased string literals.
8645 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8646 and token counts but does still set aliased tokens to the same number,
8647 symbol_pack_processor now leaves empty slots in the symbols array.
8648 Remove those slots.
8649 * tests/regression.at (Undeclared string literal): Remove test case
8650 added in previous commit since non-aliased string literals are allowed
8651 again.
8652 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8653 remove unnecessary string literal declarations.
8654 * tests/sets.at (Firsts): Likewise.
8655
86562006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8657
8658 Don't allow an undeclared string literal, but allow a string literal to
8659 be used before its declaration.
8660 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8661 symbols_pack complained.
8662 * src/symtab.c (symbol_new): Don't count a string literal as a new
8663 symbol.
8664 (symbol_class_set): Don't count a string literal as a new token, and
8665 don't assign it a symbol number since symbol_make_alias does that.
8666 (symbol_make_alias): It's not necessary to decrement the symbol and
8667 token counts anymore. Don't assume that an alias declaration occurs
8668 before any uses of the identifier or string, and thus don't assert that
8669 one of them has the highest symbol number so far.
8670 (symbol_check_alias_consistency): Complain if there's a string literal
8671 that wasn't declared as an alias.
8672 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8673 symbol_pack asserts that every token has been assigned a symbol number
8674 although undeclared string literals have not.
8675 * tests/regression.at (String alias declared after use, Undeclared
8676 string literal): New test cases.
8677 (Characters Escapes, Web2c Actions): Declare string literals as
8678 aliases.
8679 * tests/sets.at (Firsts): Likewise.
8680
86812006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8682
8683 In the grammar scanner, STRING_FINISH unclosed constructs and return
8684 them to the parser in order to improve error messages.
8685 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8686 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8687 * tests/input.at (Unclosed constructs): New test case.
8688 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8689 seen.
8690
8691 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8692 unused global.
8693
86942006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8695
8696 Handle string aliases for character tokens correctly.
8697 * src/symtab.c (symbol_user_token_number_set): If the token has an
8698 alias, check and set its alias's user token number instead of its own,
8699 which is set to indicate the alias. Previously, every occurrence of
8700 the character token in the grammar overwrote that alias indicator with
8701 the character code.
8702 * tests/input.at (String aliases for character tokens): New test.
8703
87042006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8705
8706 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8707
87082006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8709
8710 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8711 to prevent failures when building on older platforms.
8712 Check for autopoint failure.
8713 Set XGETTEXT_OPTIONS to values that check for C format strings,
8714 so that translators are warned about them (this also helps
8715 prevent core dumps).
8716
8717 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8718 function, since it simplifies our code a bit.
8719
8720 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8721 rather than -W, so we don't get bogus warnings about sign comparisons.
8722 Add -Wpointer-arith, since that warning is useful (it reports code
8723 that does not conform to C89 and that some compilers reject).
8724 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8725 since it's no longer needed.
8726
87272006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8728
8729 Clean up scanners a bit.
8730 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8731 definitions so gcc won't warn when obstack_for_string is unused.
8732 * src/scan-code.l: config.h and system.h are already #include'd by
8733 scan-code-c.c, so get rid of them here.
8734 * src/scan-gram.l: Likewise.
8735 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8736 definitions rather than duplicating the rest of it.
8737 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8738
87392006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8740
8741 Suppress signed/unsigned comparison warnings for yycheck.
8742 * data/c.m4 (b4_safest_int_type): New macro.
8743 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8744 a signed int type, cast it to b4_safest_int_type first.
8745 * data/yacc.c: Likewise.
8746 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8747 also overwritten.
8748
87492006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8750
8751 * doc/bison.texinfo: Fix some typos.
8752
87532006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8754
8755 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8756 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8757
8758 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8759 the latest gnulib does this a different way.
8760 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8761 translation was patched, so stop omitting it.
8762
87632006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8764
8765 Enable declaration of default %printer/%destructor. Make the parser
8766 use these for all user-declared grammar symbols for which the user does
8767 not declare a specific %printer/%destructor. Thus, the parser uses it
8768 for token 0 if the user declares it but not if Bison generates it as
8769 $end. Discussed starting at
8770 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8771 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8772 and
8773 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8774 * NEWS (2.3+): Mention.
8775 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8776 declare a %destructor for a mid-rule's semantic value. It's just
8777 impossible to declare one specific to it.
8778 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8779 code. Describe default %destructor form.
8780 * src/parse-gram.y (grammar_declaration): Parse default
8781 %printer/%destructor declarations.
8782 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8783 and symbol_destructor_location_get rather than accessing the destructor
8784 and destructor_location members of struct symbol.
8785 (symbol_printers_output): Likewise but for %printer's.
8786 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8787 again.
8788 * src/symtab.c (default_destructor, default_destructor_location,
8789 default_printer, default_printer_location): New static global
8790 variables to record the default %destructor and %printer.
8791 (symbol_destructor_get, symbol_destructor_location_get,
8792 symbol_printer_get, symbol_printer_location_get): New functions to
8793 compute the appropriate %destructor and %printer for a symbol.
8794 (default_destructor_set, default_printer_set): New functions to set the
8795 default %destructor and %printer.
8796 * src/symtab.h: Prototype all those new functions.
8797 * tests/actions.at (Default %printer and %destructor): New test to
8798 check that the right %printer and %destructor are called, that they're
8799 not called for $end, and that $$ and @$ work correctly.
8800 (Default %printer and %destructor for user-declared end token): New
8801 test to check that the default %printer and %destructor are called for
8802 a user-declared end token.
8803 * tests/input.at (Default %printer and %destructor redeclared, Unused
8804 values with default %destructor): New tests to check related grammar
8805 warnings and errors.
8806
88072006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8808
8809 Clean up handling of %destructor for the end token (token 0).
8810 Discussed starting at
8811 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8812 and
8813 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8814
8815 Make the skeletons consistent in how they pop the end token and invoke
8816 its %destructor.
8817 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8818 state, which has token number 0, since this would invoke the
8819 %destructor for the end token.
8820 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8821 until after shifting the end token, or else it won't be popped.
8822 * data/yacc.c (yyparse): Likewise.
8823
8824 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8825 it's the end token. Upon termination, destroy an unshifted lookahead
8826 even when it's the end token.
8827 * data/lalr1.cc (yy::parser::parse): Likewise.
8828 * data/yacc.c (yyparse): Likewise.
8829
8830 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8831 value warnings for the end token when the user gives the end token a
8832 %destructor.
8833
8834 * tests/actions.at (Printers and Destructors): Test all the above.
8835
88362006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8837
8838 Update to latest gnulib and gettext versions.
8839 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8840 Add fopen-safer.
8841 (gnulib_files): Add m4/warning.m4. Don't worry about files
8842 overwritten by autopoint.
8843 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8844 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8845 rejects them.
8846 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8847 so that we can remove the intl files at a better time.
8848 (intl_files_to_remove): Remove aclocal.m4, since it gets
8849 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8850 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8851 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8852 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8853 Remove datarootdir hack; no longer needed.
8854 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8855 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8856 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8857 strdup.h.
8858 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8859 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8860
88612006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8862
8863 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8864 it with --assume-autoconf='latest-stable'.
8865
88662006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8867
8868 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8869 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8870 YYSTYPE' and `{'.
8871 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8872 those from muscle_tab.c since the old ones are misleading.
8873
88742006-07-13 Akim Demaille <akim@epita.fr>
8875
8876 Support %define "KEY" {VALUE}.
8877 * src/scan-code.h, src/scan-code.l (translate_action)
8878 (translate_rule_action, translate_symbol_action, translate_code):
8879 Return char *, not const char *.
8880 * src/parse-gram.y (declaration): Rename as...
8881 (prologue_declaration): this.
8882 (string_content): Remove this nonterminal, use STRING.
8883 (braceless, content, content.opt): New nonterminal.
8884 Use them.
8885 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8886 as value.
8887 * src/scan-gram.l (getargs.h): Don't include it.
8888
88892006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8890
8891 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8892 rather than a for-loop that declares a local bool variable. This
8893 should work around a compatibility problem with a Cray x1e C++
8894 compiler reported by Hung Nguyen in
8895 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8896 The for-loop was introduced in the 2004-11-17 change but I don't
8897 know why it was needed.
8898
88992006-07-12 Akim Demaille <akim@epita.fr>
8900
8901 * data/c.m4: Comment changes.
8902
89032006-07-10 Akim Demaille <akim@lrde.epita.fr>
8904
8905 * src/complain.c (error_message, ERROR_MESSAGE): New.
8906 To factor...
8907 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8908 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8909
89102006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8911
8912 * NEWS: Instead of %union, you can define and use your own union type
8913 YYSTYPE if your grammar contains at least one <type> tag.
8914 Your YYSTYPE need not be a macro; it can be a typedef.
8915 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8916 (Union Decl, Decl Summary): Document this.
8917 * data/glr.c (YYSTYPE): Implement this.
8918 * data/glr.cc (YYSTYPE): Likewise.
8919 * data/lalr1.cc (YYSTYPE): Likewise.
8920 * data/yacc.c (YYSTYPE): Likewise.
8921 * src/output.c (prepare): Output tag_seen_flag.
8922 * src/parse-gram.y (declaration, grammar_declaration):
8923 Use 'union_seen' rather than 'typed' to determine whether
8924 %union has been seen, since grammars can now be typed without
8925 %union.
8926 (symbol_declaration, type.opt, symbol_def):
8927 Keep track of whether a tag has been seen.
8928 * src/reader.c (union_seen, tag_seen): New vars.
8929 (typed): remove.
8930 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8931 * src/scan-code.l (untyped_var_seen): New variable.
8932 (handle_action_dollar): Adjust to above changes.
8933 (handle_action_dollar, handle_action_at):
8934 Improve overflow checking for outlandish numbers.
8935 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8936 avoid new diagnostics generated by above changes.
8937 * tests/regression.at (YYSTYPE typedef): Add test to check
8938 for type tags without %union.
8939
8940 * src/symlist.c (symbol_list_length): Return int, not unsigned
8941 int, since callers expect int. This may need to get revisited
8942 once we have proper integer overflow checking.
8943
8944 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8945 object is now static.
8946
8947 * src/getargs.c (flags_argmatch): Return void, not int,
8948 to pacify ./configure --enable-gcc-warnings.
8949
8950 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8951 since last_string is already defined to FLEX_PREFIX (last_string).
8952
89532006-07-09 Akim Demaille <akim@lrde.epita.fr>
8954
8955 Implement --warnings/-W.
8956 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8957 replaced by...
8958 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8959 Adjust callers.
8960 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8961 (warnings_args, warnings_types): New.
8962 (getargs, short_options, long_options): Accept -W/--warnings.
8963 Sort the options by alphabetical order, upper case letter right
8964 before its lower case.
8965
89662006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8967
8968 Change %merge result type clash warnings to errors. Discussed at
8969 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8970 * src/reader.c (record_merge_function_type): Use complain_at.
8971 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8972 declared later): Update test case results.
8973
89742006-07-09 Akim Demaille <akim@lrde.epita.fr>
8975
8976 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8977 to be in alphabetical order.
8978 (trace_args): Spelling fixes.
8979
89802006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8981
8982 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8983 so they don't collide with user-defined macros.
8984 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8985 this was never guaranteed, and now that we're using gnulib stdint,
8986 which defines int_fast16_t to long int, the problem is exposed.
8987
89882006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8989
8990 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8991 need the full POSIX semantics (and weren't implementing them
8992 anyway).
8993
8994 Adjust to Autoconf 2.60 and today's gnulib.
8995 * bootstrap (gnulib_modules): Add stdint.
8996 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8997 no longer copies it.
8998 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8999 since stdint needs the former and wcwidth (which is now required
9000 by mbswidth) needs the latter.
9001 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9002 work around a compatibility glitch between gettext 0.14.6 and
9003 Autoconf 2.60.
9004 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9005 Do not check for uintptr_t, since new stdint module does the right
9006 thing.
9007 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9008 Add stdint.h, stdint_.h, wcwidth.h.
9009 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9010 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9011 stdint.m4, wchar_t.m4, wcwidth.m4.
9012 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9013 usual order for ../lib/*.h files.
9014 (file_name_split): Use last_component, not base_name, to adjust
9015 to gnulib changes.
9016 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9017 for ../lib/*.h files.
9018 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9019 Define unconditionally, since we now assume the stdint module.
9020 * src/scan-skel.l: Include <dirname.h>.
9021 (BASE_QPUTS): Use last_component, not base_name.
9022 * src/system.h: Include <unlocked-io.h> in the usual order
9023 for ../lib/*.h files. Include <stdint.h> unconditionally,
9024 since we now use the stdint module.
9025 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9026 HAVE_UINTPTR_T, since we now use the stdint module.
9027 (base_name): Remove decl, since files now include <dirname.h>
9028 to get the decl.
9029
90302006-07-08 Akim Demaille <akim@lrde.epita.fr>
9031
9032 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9033 New, default to 1.
9034 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9035 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9036 default.
9037 * tests/calc.at: Adjust.
9038
90392006-07-08 Akim Demaille <akim@lrde.epita.fr>
9040
9041 * data/c.m4 (b4_basename): New.
9042 (b4_syncline): Also output the location of its invocation (from
9043 the skeleton).
9044 (b4_user_action, b4_define_user_action, b4_user_actions)
9045 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9046 (b4_user_stype): New.
9047 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9048
90492006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9050
9051 In the grammar file, the first column is 1 not 0 on the first line as
9052 on every other line.
9053 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9054 * tests/input.at (Torturing the Scanner): Update output.
9055
9056 * src/scan-gram.l (scanner_cursor): Declare it static.
9057
90582006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9059
9060 In warnings, say "previous declaration" rather than "first
9061 declaration".
9062 * src/symtab.c (redeclaration): Do that here.
9063 * src/reader.c (record_merge_function_type): In the case of a result
9064 type clash, report the previous declaration rather than the very first
9065 one in the grammar file.
9066 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9067 declared later): Add a third declaration to check this behavior.
9068 * tests/input.at (Incompatible Aliases): Update output.
9069
90702006-06-27 Akim Demaille <akim@epita.fr>
9071
9072 * doc/Doxyfile.in: New.
9073 * doc/Makefile.am: Use it.
9074 * src/lalr.h, src/symtab.h: Initial doxygenation.
9075
90762006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9077
9078 Don't miss %merge result type warnings just because the LHS types are
9079 declared after the %merge. This continues the effort of the previous
9080 patch.
9081 * src/reader.c (get_merge_function): Don't set the merger type yet.
9082 (record_merge_function_type): New function for setting the merger type
9083 and checking for clashes.
9084 (grammar_current_rule_merge_set): Set the location of the %merge for
9085 the current rule.
9086 (packgram): Invoke record_merge_function_type for each rule now that
9087 all symbol type declarations have been parsed.
9088 * src/reader.h (merger_list.type_declaration_location): New member
9089 storing the location of the first %merge from which the type for this
9090 merging function was derived.
9091 * src/symlist.h (symbol_list.merger_declaration_location): New member
9092 storing the location of a rule's %merge, if any.
9093 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9094 declared later): New test to catch the error fixed by the above patch.
9095
90962006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9097
9098 Get action warnings (grammar_rule_check) right even when symbol
9099 declarations appear after the rules. Discussed at
9100 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9101 and
9102 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9103 Don't mistake the type of $$ in a midrule to be that of its parent
9104 rule's $$.
9105 * src/reader.c (grammar_current_rule_end): Don't invoke
9106 grammar_rule_check yet since not all symbol declarations may have been
9107 parsed yet.
9108 (grammar_midrule_action): Likewise.
9109 Don't record whether the midrule's $$ has been used yet since actions
9110 haven't been translated yet.
9111 Record the midrule's parent rule and its RHS index within the parent
9112 rule.
9113 (grammar_current_rule_action_append): Don't translate the action yet
9114 since not all symbol declarations may have been parsed yet and, thus,
9115 warnings about types for $$, $n, @$, and @n can't be reported yet.
9116 (packgram): Translate the action and invoke grammar_rule_check now that
9117 all symbol declarations have been parsed.
9118 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9119 after parsing the entire grammar file, the symbol list here in the case
9120 of a midrule is actually the midrule's empty RHS, so reference its
9121 parent rule's RHS where necessary.
9122 On the other hand, now that you can already know it's a midrule, you
9123 aren't forced to think $$ has the same type as its parent rule's $$.
9124 (handle_action_at): In the case of a midrule, reference the parent rule
9125 where necessary.
9126 * src/symlist.c (symbol_list_new): Initialize new midrule-related
9127 members.
9128 (symbol_list_length): Now that this is invoked after all rules have
9129 been parsed, a NULL symbol (rather than a NULL symbol list node)
9130 terminates a rule. symbol_list_print already does this correctly.
9131 * src/symlist.h (symbol_list.midrule_parent_rule,
9132 symbol_list.midrule_parent_rhs_index): New members so that midrules can
9133 remember their relationships with their parents.
9134 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
9135 fixed by the above patch.
9136 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
9137 implementing...
9138 (Unused values): ... this old test case and...
9139 (Unused values before symbol declarations): ... this new test case.
9140 This one is the same as `Unused values' except that all symbol
9141 declarations appear after the rules in order to catch the rest of the
9142 errors fixed by the above patch.
9143
91442006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9145
9146 More cleanup.
9147 * src/reader.c (current_rule): Declare it static since it's no longer
9148 used outside this file.
9149 (grammar_current_rule_action_append): Remove redundant arguments from
9150 translate_rule_action invocation.
9151 * src/reader.h (current_rule): Remove this unused extern.
9152 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
9153 * src/scan-code.l (translate_rule_action): Likewise.
9154
91552006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
9156
9157 Clean up yesterday's patch.
9158 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
9159 to...
9160 * src/reader.c (grammar_current_rule_action_append): ... here for
9161 consistency with grammar_current_rule_symbol_append.
9162 * tests/regression.at (Braced code in declaration in rules section):
9163 Make yyerror and yylex static as usual.
9164
91652006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
9166
9167 Fix bug that mistakes braced code in a declaration in the rules section
9168 to be a rule action. Mentioned at
9169 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
9170 * src/scan-gram.l: Move midrule action detection from the start of the
9171 scanning of any braced code to...
9172 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
9173 action. For readability, use $2 and @2 rather than the equivalent
9174 global variables.
9175 * tests/regression.at (Braced code in declaration in rules section):
9176 New test to catch the error fixed by the above patch.
9177
9178 Work on code readability some.
9179 * src/scan-code.l (current_rule): Get rid of this misleading and
9180 redundant declaration: it's actually extern'ed in reader.h.
9181 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
9182 translate_action): Add a rule argument and use it instead of the global
9183 current_rule.
9184 (translate_rule_action): This already receives current_rule through an
9185 argument, so pass it on to translate_action instead of assigning
9186 current_rule to current_rule.
9187 (translate_symbol_action, translate_code): Pass rule = NULL to
9188 translate_action.
9189
91902006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
9191
9192 Rename %before-definitions to %start-header and %after-definitions to
9193 %end-header. Don't use these declarations to separate pre-prologue
9194 blocks from post-prologue blocks. Add new order-independent
9195 declarations %before-header and %after-header as alternatives to the
9196 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
9197 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
9198 * NEWS (2.3+): Update for these changes.
9199 * data/glr.c (b4_before_definitions): Update to...
9200 (b4_start_header): ... this.
9201 (b4_after_definitions): Update to...
9202 (b4_end_header): ... this.
9203 * data/glr.cc: Likewise.
9204 * data/lalr1.cc: Likewise.
9205 * data/yacc.c: Likewise.
9206 * doc/bison.texinfo (The prologue): Update names, and replace remaining
9207 prologue blocks with %*-header declarations.
9208 (Calc++ Parser): Likewise.
9209 (Decl Summary): Update names.
9210 (Table of Symbols): Update description.
9211 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
9212 (PERCENT_END_HEADER): ... this.
9213 (PERCENT_BEFORE_DEFINITIONS): Update to...
9214 (PERCENT_START_HEADER): ... this.
9215 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9216 (declaration): Update token names and m4 macro names.
9217 When parsing %end-header and %start-header, invoke translate_code
9218 before muscle_code_grow, and no longer set global booleans to remember
9219 whether these declarations have been seen.
9220 Parse new %after-header and %before-header.
9221 * src/reader.c (before_definitions, after_definitions): Remove.
9222 (prologue_augment): Accept a new bool argument to specify whether to
9223 augment the pre-prologue or post-prologue.
9224 * src/reader.h (before_definitions, after_definitions): Remove these
9225 extern's.
9226 (prologue_augment): Add new bool argument.
9227 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
9228 (PERCENT_END_HEADER): ... this.
9229 (PERCENT_BEFORE_DEFINITIONS): Update to...
9230 (PERCENT_START_HEADER): ... this.
9231 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
9232 * tests/actions.at (Printers and Destructors): Update names.
9233
92342006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
9235
9236 Add comparison operators for C++ location classes. Discussed at
9237 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
9238 * data/c++.m4 (b4_define_location_comparison): New boolean %define
9239 declaration indicating whether filename_type has an operator==. If
9240 filename_type is `std::string', it defaults to `1', `0' otherwise.
9241 * data/location.cc: Iff b4_define_location_comparison is `1', add
9242 operator== and operator!= for class position and for class location.
9243
9244 Some minor fixes.
9245 * src/scan-action.l: Remove unused file.
9246 * src/symtab.c (symbol_printer_set): Use printer_location not
9247 destructor_location.
9248 * src/symtab.h (struct symbol): Replace incorrect source comment for
9249 printer members.
9250 * tests/input.at (Incompatible Aliases): Update output with correct
9251 printer location.
9252
92532006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
9254
9255 Don't put the pre-prologue in the header file. For the yacc.c code
9256 file and the glr.c header and code files, move the pre-prologue before
9257 the token definitions. Add new %before-definitions and
9258 %after-definitions to declare code that will go in both the header file
9259 and code file. Discussed at
9260 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
9261 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
9262 and
9263 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
9264 * NEWS (2.3+): Describe these changes.
9265 * data/glr.c (b4_pre_prologue): Move from within to before...
9266 (b4_shared_declarations): ... this.
9267 Add new b4_before_definitions before b4_token_enums.
9268 Add new b4_after_definitions at the end.
9269 * data/glr.cc (b4_pre_prologue): Replace with...
9270 (b4_before_definitions): ... this in the header file.
9271 (b4_after_definitions): New near the end of the header file.
9272 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
9273 code file right before including the header file.
9274 (b4_before_definitions): New in the previous position of
9275 b4_pre_prologue in the header file.
9276 (b4_after_definitions): New near the end of the header file.
9277 * data/yacc.c: Clean up some m4 quoting especially in the header file.
9278 (b4_token_enums_defines): In the code file, move to right before
9279 YYSTYPE for consistency with the header file.
9280 (b4_before_definitions): New right before b4_token_enums_defines in
9281 both the header and code file.
9282 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
9283 header and code file.
9284 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
9285 of prologues for %union dependencies.
9286 (Decl Summary): In %defines description, mention the effect of
9287 %before-definitions and %after-definitions on the header file.
9288 (Calc++ Parser): Forward declare driver in a %before-definitions rather
9289 than in the pre-prologue so that make check succeeds.
9290 (Table of Symbols): Add entries for %before-definitions and
9291 %after-definitions.
9292 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
9293 %before-definitions.
9294 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
9295 (declaration): Parse those declarations and append to
9296 b4_before_definitions and b4_after_definitions, respectively.
9297 * src/reader.c (before_definitions, after_definitions): New bools to
9298 track whether those declarations have been seen.
9299 (prologue_augment): Add to the post-prologue if %union,
9300 %before-definitions, or %after-definitions has been seen.
9301 * src/reader.h (before_definitions, after_definitions): New extern's.
9302 * src/scan-gram.l: Scan the new declarations.
9303 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
9304 prologue block in a %before-definitions or a %after-definitions based
9305 on whether the %union is declared.
9306 * tests/regression.at (Early token definitions with --yacc, Early token
9307 definitions without --yacc): Move tests for token definitions into the
9308 post-prologue since token names are no longer defined in the
9309 pre-prologue.
9310
93112006-06-20 Akim Demaille <akim@epita.fr>
9312
9313 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
9314 (symbol_get): Use it.
9315 * src/parse-gram.y: Use it.
9316
93172006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
9318
9319 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
9320 build succeeds when configured with --enable-gcc-warnings.
9321
93222006-06-19 Paul Eggert <eggert@cs.ucla.edu>
9323
9324 * src/parse-gram.y (char_name): New function.
9325 (CHAR, STRING, string_content): For %printer, properly escape.
9326 (ID): Prefer fputs to fprintf.
9327 (id): Reindent to be consistent with other rules.
9328 Properly quote char.
9329
9330 The Translation Project changed its way of publishing translations
9331 to maintainers. I haven't received any responses to my request
9332 for supporting the old way, or for documenting the new way. I
9333 have modified 'bootstrap' to use screen scraping
9334 (in this case, HTML scraping). This is unreliable and inelegant,
9335 but I don't see any better way. Yuck.
9336 * bootstrap (TP_URL, WGET_COMMAND): New vars.
9337 (get_translations): New function, which uses HTML scraping to
9338 deduce locations of latest translations.
9339 Use this function to grab both bison and bison-runtime .po files.
9340 Don't bother priming the pump for the runtime-po domain any more,
9341 as it's now translated better than bison is.
9342
93432006-06-19 Akim Demaille <akim@epita.fr>
9344
9345 * src/scan-gram.l: No longer "parse" things after `%union' until
9346 `{'. Rather, return a single "%union" token.
9347 No longer make symbols: return strings, and leave the conversion
9348 to symbols to the parser.
9349 (SC_PRE_CODE, token_type): Remove.
9350 * src/parse-gram.y (%union): New field `character'.
9351 Sort tokens.
9352 (CHAR): New token.
9353 (ID, ID_COLON): Now that the scanner no longer makes them
9354 identifiers, adjust all uses to invoke symbol_get.
9355 (id_colon): New, wraps the conversion from string to symbol.
9356 (%union): Accept a possible union_name.
9357 (symbol): Now can be a char.
9358 * data/c.m4 (b4_union_name): Leave a default value.
9359 * data/glr.c, data/yacc.c: Use it.
9360
93612006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9362
9363 For associating token numbers with token names for "yacc.c", don't use
9364 #define statements unless `--yacc' is specified; always use enum
9365 yytokentype. Most important discussions start at:
9366 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9367 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9368 and
9369 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9370 * NEWS (2.3+): Mention.
9371 * data/c.m4 (b4_yacc_if): New.
9372 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9373 token #define's.
9374 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9375 on token name definitions.
9376 * src/getargs.c (usage): Capitalize `Yacc' in English.
9377 * src/output.c (prepare): Define b4_yacc_flag.
9378 * tests/regression.at (Early token definitions): Test that tokens names
9379 are defined before the pre-prologue not just before the post-prologue.
9380 Remove this test case and copy to...
9381 (Early token definitions with --yacc): ... this to test #define's.
9382 (Early token definitions without --yacc): ... and this to test enums.
9383
93842006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * NEWS: Reword the post-2.3 change to not be so optimistic about
9387 removing the old "look-ahead" spelling.
9388 Update previous look-ahead/lookahead change reports.
9389 * REFERENCES: look-ahead -> lookahead (since that's
9390 what he actually wrote).
9391 * doc/refcard.tex: look ahead -> lookahead,
9392 look-ahead -> lookahead
9393
93942006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9395
9396 For consistency, use `lookahead' instead of `look-ahead' or
9397 `look_ahead'. Discussed starting at
9398 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9399 and then at
9400 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9401 * NEWS: For the next release, note the change to `--report'.
9402 * TODO, doc/bison.1: Update English.
9403 * doc/bison.texinfo: Update English.
9404 (Understanding Your Parser, Bison Options): Document as
9405 `--report=lookahead' rather than `--report=look-ahead'.
9406 * src/conflicts.c: Update English in comments.
9407 (lookahead_set): Rename from look_ahead_set.
9408 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9409 (resolve_sr_conflict): Rename local look_ahead_tokens to
9410 lookahead_tokens, and update other uses.
9411 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9412 count_rr_conflicts, conflicts_free): Update uses.
9413 * src/getargs.c (report_args): Move "lookahead" before alternate
9414 spellings.
9415 (report_types): Update uses.
9416 (usage): For `--report' usage description, state `lookahead' spelling
9417 rather than `look-ahead'.
9418 * src/getargs.h (report.report_lookahead_tokens): Rename from
9419 report_look_ahead_tokens.
9420 * src/lalr.c: Update English in comments.
9421 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9422 (state_lookahead_tokens_count): Rename from
9423 state_look_ahead_tokens_count.
9424 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9425 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9426 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9427 Update other uses.
9428 Update English in output.
9429 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9430 * src/print.c: Update English in comments.
9431 (lookahead_set): Rename from look_ahead_set.
9432 (print_reduction): Rename argument lookahead_token from
9433 look_ahead_token.
9434 (print_core, state_default_rule, print_reductions, print_results):
9435 Update uses.
9436 * src/print_graph.c: Update English in comments.
9437 (print_core): Update uses.
9438 * src/state.c: Update English in comments.
9439 (reductions_new): Update uses.
9440 (state_rule_lookahead_tokens_print): Rename from
9441 state_rule_look_ahead_tokens_print, and update other uses.
9442 * src/state.h: Update English in comments.
9443 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9444 (state_rule_lookahead_tokens_print): Rename from
9445 state_rule_look_ahead_tokens_print.
9446 * src/tables.c: Update English in comments.
9447 (conflict_row, action_row): Update uses.
9448 * tests/glr-regression.at
9449 (Incorrect lookahead during deterministic GLR,
9450 Incorrect lookahead during nondeterministic GLR): Rename
9451 print_look_ahead to print_lookahead.
9452 * tests/torture.at: Update English in comments.
9453 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9454 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9455 (Many lookahead tokens): Update uses.
9456 * data/glr.c: Update English in comments.
9457 * lalr1.cc: Likewise.
9458 * yacc.c: Likewise.
9459 * src/conflicts.h: Likewise.
9460 * src/lalr.h: Likewise.
9461 * src/main.c: Likewise.
9462 * src/output.c: Likewise.
9463 * src/parse-gram.c: Likewise.
9464 * src/tables.h: Likewise.
9465 * tests/calc.at: Likewise.
9466
94672006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9468
9469 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9470
94712006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9472
9473 * TODO: Add request from Nelson H. F. Beebe to be able to install
9474 Bison without installing the yacc script.
9475
94762006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9477
9478 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9479 and yytext if they're already #define'd.
9480 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9481 * src/scan-code-c.c: ... here.
9482 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9483 <config.h>.
9484
94852006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9486
9487 Get Bison to build again when configured with --enable-gcc-warnings.
9488 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9489 missing #include's.
9490 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9491 loc argument as it shadows a global.
9492 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9493 invocation.
9494
9495 * src/.cvsignore: Add scan-code.c.
9496
94972006-06-07 Akim Demaille <akim@epita.fr>
9498
9499 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9500 to...
9501 * src/scan-code.l: here.
9502 * tests/input.at (Torturing the Scanner): Fix another location
9503 error.
9504
95052006-06-07 Akim Demaille <akim@epita.fr>
9506
9507 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9508
95092006-06-06 Akim Demaille <akim@epita.fr>
9510
9511 Extract the parsing of user actions from the grammar scanner.
9512 As a consequence, the relation between the grammar scanner and
9513 parser is much simpler. We can also split "composite tokens" back
9514 into simple tokens.
9515 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9516 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9517 rename as...
9518 * src/location.h, src/location.c (add_column_width)
9519 (location_compute): these.
9520 Fix the column count: the initial column is 0.
9521 (location_print): Be robust to ending column being 0.
9522 * src/location.h (boundary_set): New.
9523 * src/main.c: Adjust to scanner_free being renamed as
9524 gram_scanner_free.
9525 * src/output.c: Include scan-code.h.
9526 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9527 Use boundary_set.
9528 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9529 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9530 which is now, again, a separate token.
9531 Adjust all dependencies.
9532 Whereever actions with $ and @ are used, use translate_code.
9533 (action): Remove this nonterminal which is now useless.
9534 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9535 (grammar_current_rule_action_append): Use translate_code.
9536 (packgram): Bound check ruleno, itemno, and rule_length.
9537 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9538 (last_string, last_braced_code_loc, max_left_semantic_context)
9539 (scanner_initialize, scanner_free, scanner_last_string_free)
9540 (gram_out, gram_lineno, YY_DECL_): Move to...
9541 * src/scan-gram.h: this new file.
9542 (YY_DECL): Rename as...
9543 (GRAM_DECL): this.
9544 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9545 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9546 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9547 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9548 Move these declarations, and...
9549 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9550 these to...
9551 * src/flex-scanner.h: this new file.
9552 * src/scan-gram.l (rule_length, rule_length_overflow)
9553 (increment_rule_length): Remove.
9554 (last_braced_code_loc): Rename as...
9555 (gram_last_braced_code_loc): this.
9556 Adjust to the changes of the parser.
9557 Move all the handling of $ and @ into...
9558 * src/scan-code.l: here.
9559 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9560 (handle_action_dollar, handle_action_at): Move to...
9561 * src/scan-code.l: here.
9562 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9563 scan-code.h, scan-code-c.c, scan-gram.h.
9564 (EXTRA_bison_SOURCES): Add scan-code.l.
9565 (BUILT_SOURCES): Add scan-code.c.
9566 (yacc): Be robust to white spaces.
9567
9568 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9569 * tests/regression.at: Adjust the column numbers.
9570 * tests/regression.at: Adjust the error message.
9571
95722006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9573
9574 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9575 Use Akim's wording from
9576 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9577
95782006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9579
9580 Between Bison releases, manually append `+' to the previous Bison
9581 release number, and use that as a signal to automatically print the
9582 ChangeLog's CVS Id keyword from --version. Discussed starting at
9583 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9584 * ChangeLog: Add Id header.
9585 * configure.ac (AC_INIT): Append `+' to `2.3'.
9586 * src/.cvsignore: Add revision.c.
9587 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9588 (BUILT_SOURCES): Add revision.c.
9589 (revision.c): New target rule. This file defines a new global variable
9590 named revision. It initializes it with either the Id from ChangeLog
9591 or, if VERSION doesn't contain `+', with the empty string.
9592 * src/getargs.c (version): Print the value of revision.
9593 * src/revision.h: Extern revision.
9594
95952006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9596
9597 * NEWS: Version 2.3.
9598 * configure.ac (AC_INIT): Likewise.
9599
96002006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9601
9602 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9603 with no arguments, not as an object-like macro. This is for
9604 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9605 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9606 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9607 Document this.
9608
96092006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9610
9611 * src/getargs.c (usage): Back out yesterday's modification of the
9612 --help output so that we don't have to wait for translation before
9613 releasing 2.3.
9614
96152006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9616
9617 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9618 Problem reported by Akim Demaille.
9619
96202006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9621
9622 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9623
96242006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9625
9626 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9627 generated source code. Problem reported by Frans Englich in
9628 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9629
96302006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9631
9632 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9633 shell, not within 'make', so that 'make' by an ordinary builder
9634 (using GNU make) does not worry about configuring gzip. This also
9635 works around a bug reported independently by Keith Thompson and by
9636 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9637 stderr rather than stdout, messing up the build logs.
9638
96392006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9640
9641 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9642 to make sure that YYID will never be unused. This fixes a 'make
9643 maintainer-check' failure caused by the recent changes to the 'Trivial
9644 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9645 not used.
9646 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9647
96482006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9649
9650 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9651 state before an empty RHS is always resolved here. Only the location
9652 of that state is guaranteed to be resolved, and that's enough. This
9653 fixes the remaining bug reported by Derek M. Jones in
9654 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9655 * tests/glr-regression.at (Uninitialized location when reporting
9656 ambiguity): Test the above case.
9657 Also, the embedded comments in this test case claim it checks the case
9658 of an empty RHS that has inherited the initial location. However, the
9659 corresponding LHS was already resolved, so yyresolveLocations didn't
9660 actually have reason to modify it. Fix this by forcing
9661 nondeterministic operation at the beginning of the parse.
9662
96632006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9664
9665 * data/c.m4 (b4_yy_symbol_print_generate):
9666 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9667 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9668 of the bugs reported today by Derek M Jones in
9669 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9670 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9671 defined to be a type name without parens or brackets.
9672 (Location Type): Similarly for YYLTYPE.
9673 * tests/regression.at (Trivial grammars): Put in a test for this
9674 bug that will be caught by 'make maintainer-check' (though not,
9675 alas, by 'make check' unless your compiler is picky).
9676
96772006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 * NEWS: Version 2.2.
9680 * configure.ac (AC_INIT): Likewise.
9681
96822006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9683
9684 * data/glr.c (yyreportTree): Make room in yystates for the state
9685 preceding the RHS. This fixes the segmentation fault reported by Derek
9686 M. Jones in
9687 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9688 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9689 to the user. Reported for yyreportTree by Derek M. Jones later in the
9690 same thread.
9691 * THANKS: Add Derek M. Jones.
9692 Update my email address.
9693 Fix typo in Steve Murphy's name.
9694
96952006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9696
9697 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9698 checking against YYLAST that caused the parser to miss a potential
9699 alternative in its diagnostic.
9700 Problem reported by Maria Jose Moron Fernandez in
9701 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9702 * data/lalr1.cc (yysyntax_error_): Likewise.
9703 * data/yacc.c (yysyntax_error): Likewise.
9704 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9705 tokens, in case we run into an older C compiler.
9706 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9707 Use them to check for the off-by-one error fixed above.
9708
9709 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9710 YYSIZE_T, not size_t.
9711 * tests/regression.at (Trivial grammars): New test, to catch
9712 the error fixed by the above patch.
9713
97142006-05-14 Akim Demaille <akim@lrde.epita.fr>
9715
9716 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9717 scheme.
9718 Reported by Steve Murphy.
9719
97202006-05-14 Akim Demaille <akim@lrde.epita.fr>
9721
9722 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9723 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9724
97252006-05-14 Akim Demaille <akim@lrde.epita.fr>
9726
9727 Implement --trace=m4.
9728 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9729 * src/output.c (output_skeleton): When set, pass -dV to m4.
9730
9731 Factor the handling of flags in m4.
9732 * src/output.c (prepare): Rename the muscle names debug, defines,
9733 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9734 * data/c.m4: Adjust.
9735 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9736 Use b4_define_flag_if to define other b4_FLAG_if macros.
9737 (b4_location_if): As a consequence, rename as...
9738 (b4_locations_if): this, for consistency.
9739 Adjust all the skeletons.
9740
97412006-05-14 Akim Demaille <akim@lrde.epita.fr>
9742
9743 * etc/bench.pm: Shorten bench names.
9744
97452006-05-14 Akim Demaille <akim@lrde.epita.fr>
9746
9747 * src/output.h, src/output.c (error_verbose): Move to...
9748 * src/getargs.h, src/getargs.c: here.
9749 Sort the flags.
9750 Adjust dependencies.
9751
97522006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9753
9754 * data/c.m4 (b4_copyright): Put the special exception for Bison
9755 skeletons here, so we don't have to put it in each skeleton. All
9756 uses changed. Suggested by Akim Demaille. Also, wrap the
9757 copyright notice, in case it is longer than 80 columns. Replace
9758 comma by newline after title.
9759
97602006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9761
9762 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9763 incompatibility, not a bug. Mention that it wasn't fixed as of
9764 flex 2.5.33.
9765
97662006-05-11 Akim Demaille <akim@lrde.epita.fr>
9767
9768 * examples/extexi: Enforce the precedence of concatenation over
9769 >>.
9770 Reported by Tommy Nordgren.
9771
97722006-05-11 Akim Demaille <akim@lrde.epita.fr>
9773
9774 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9775 with the member "token".
9776 Reported by Martin Nylin.
9777
97782006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9779
9780 * data/glr.c: Switch to Bison 2.2 special-exception language in
9781 the copyright notice. Use more-regular format for titles and
9782 copyright notices.
9783 * data/glr.cc: Likewise.
9784 * data/location.cc: Likewise.
9785 * data/yacc.cc: Likewise.
9786 * doc/bison.texinfo (Conditions): Document this.
9787 * NEWS: likewise. Upgrade version to 2.2.
9788
97892006-04-27 Akim Demaille <akim@lrde.epita.fr>
9790
9791 * data/glr.cc: Remove dead code.
9792
97932006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9794
9795 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9796 that variable and the line breaks the bootstrap. Problem reported
9797 by Juan M. Guerrero.
9798
97992006-04-24 Akim Demaille <akim@lrde.epita.fr>
9800
9801 * doc/bison.texinfo (Multiple start-symbols): New.
9802
98032006-04-24 Akim Demaille <akim@lrde.epita.fr>
9804
9805 * etc/README, etc/bench.pl: New.
9806
98072006-04-03 Akim Demaille <akim@lrde.epita.fr>
9808
9809 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9810 rule.
9811 Reported by Mickael Labau.
9812 * tests/input.at (Torturing the Scanner): Test it.
9813
98142006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9815
9816 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9817 Problem reported by Bob Rossi.
9818
98192006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9820
9821 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9822 and didn't really work.
9823 For the index, use @ifnotinfo, not @iftex.
9824 Minor cleanups of spacing and terminology.
9825
98262006-03-12 Akim Demaille <akim@lrde.epita.fr>
9827
9828 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9829 of AT_NAME_PREFIX when %name-prefix is not used.
9830
98312006-03-12 Akim Demaille <akim@lrde.epita.fr>
9832
9833 Apply --prefix to C++ skeletons too: they change the namespace.
9834 The test suite already exercize these cases.
9835 * data/c++.m4 (b4_namespace): New.
9836 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9837 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9838 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9839 * doc/bison.texinfo: Document it.
9840 (Option Cross Key): Use @multitable in all formats. It looks
9841 nicer, even in TeX outputs.
9842 (Rules): Use the same code whatever the output type is.
9843 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9844 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9845 * tests/calc.at: Use it, instead of hard coding `yy'.
9846
98472006-03-10 Akim Demaille <akim@lrde.epita.fr>
9848
9849 * TODO: Remove dead items.
9850
98512006-03-10 Akim Demaille <akim@lrde.epita.fr>
9852
9853 * doc/FAQ: Remove, merged into...
9854 * doc/bison.texinfo (FAQ): this.
9855 * doc/Makefile.am (EXTRA_DIST): Adjust.
9856
98572006-03-10 Akim Demaille <akim@lrde.epita.fr>
9858
9859 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9860 even if empty.
9861 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9862 * doc/bison.texinfo (Calc++ Scanner): Use it.
9863
98642006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9865
9866 Fix two nits reported by twlevo, plus one more that I discovered.
9867
9868 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9869 this is the usual Bison style.
9870 * src/location.h (location_print): Likewise.
9871
9872 * src/reader.h (token_name): Likewise.
9873
98742006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9875
9876 Fix some nits reported by twlevo.
9877 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9878 and "POSIX". Use more-modern syntax for URLs. Mention C++
9879 and ask for Java. Don't hardwire OS version numbers. Add
9880 copyright notice.
9881 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9882 * src/conflicts.c (solved_conflicts_obstack): Now static.
9883
98842006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9885
9886 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9887 page. Say "you can use it" not "you may use it" as on the web page;
9888 we're describing capabilities not granting permission.
9889
98902006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9891
9892 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9893 shadowing warnings. Use usual patter for iterating through RHS.
9894 * tests/glr-regression.at
9895 (Uninitialized location when reporting ambiguity):
9896 Modify yylex so that it uses its argument, rather than trying
9897 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9898 const char -> char const.
9899
9900 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9901 Don't use tabs inside commands; it messes up 'ps'.
9902 Problem reported by twlevo.
9903
99042006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9905
9906 * tests/glr-regression.at (Uninitialized location when reporting
9907 ambiguity): New test case.
9908 * data/glr.c (yyresolveLocations): New function, which uses
9909 YYLLOC_DEFAULT.
9910 (yyresolveValue): Invoke yyresolveLocations before reporting an
9911 ambiguity.
9912 * doc/bison.texinfo (Default Action for Locations): Note
9913 YYLLOC_DEFAULT's usage for ambiguity locations.
9914 (GLR Semantic Actions): Cross-reference those notes.
9915
99162006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9917
9918 * tests/glr-regression.at (Leaked semantic values when reporting
9919 ambiguity): Remove unnecessary union and type declarations.
9920 (Leaked lookahead after nondeterministic parse syntax error): New test
9921 case.
9922 * data/glr.c (yyparse): Check for zero stacks remaining before
9923 attempting to shift the lookahead so that you don't lose it.
9924
99252006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9926
9927 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9928 * tests/glr-regression.at (Leaked semantic values when reporting
9929 ambiguity): New test case.
9930 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9931 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9932 now unnecessary yystackp parameter.
9933 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9934 destructors can be called.
9935
9936 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9937 in existing testcases.
9938
99392006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9940
9941 Don't leak semantic values for parent RHS when a user action cuts the
9942 parser, and clean up related code a bit.
9943 * tests/glr-regression.at (Leaked merged semantic value if user action
9944 cuts parse): Rename to...
9945 (Leaked semantic values if user action cuts parse): ... this. Add check
9946 for leaked parent RHS values.
9947 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9948 between an unresolved state (non-empty chain of semantic options) and
9949 an incomplete one (signaled by an empty chain).
9950 (yyresolveStates): Document the interface. Move all manipulation of a
9951 successfully or unsuccessfully resolved yyGLRState to...
9952 (yyresolveValue): ... here so that yyresolveValue always leaves a
9953 yyGLRState with consistent data and thus is easier to understand.
9954 Remove the yyvalp and yylocp parameters since they are always just
9955 taken from the yys parameter. When reporting a discarded merged value
9956 in debugging output, note that it is incompletely merged. Document the
9957 interface.
9958 (yyresolveAction): If resolving any of the RHS states fails, destroy
9959 them all rather than leaking them. Thus, as long as user actions are
9960 written to clean up the RHS correctly, yyresolveAction always cleans up
9961 the RHS of a semantic option. Document the interface.
9962
99632006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9964
9965 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9966 led to a segmentation fault in GNU Pascal. Problem reported
9967 by Waldek Hebisch.
9968
99692006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9970
9971 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9972 mid-rule action inside a nonterminal symbol in order to declare a
9973 destructor for its semantic value.
9974
99752006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9978 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9979 __cplusplus && ! defined _STDLIB_H && !
9980 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9981 defined free))]: Include <stdlib.h> rather than rolling our own
9982 declarations of malloc and free, to avoid problems with
9983 incompatible declarations (using 'throw') C++'s stdlib.h. This
9984 should fix Debian bug 340012
9985 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9986 reported by Guillaume Melquiond.
9987
99882006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9989
9990 * NEWS: Clarify symbols versus types in unused-value warnings.
9991
9992 * configure.ac (AC_INIT): Bump version number.
9993
99942006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9995
9996 * NEWS: Version 2.1a.
9997 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9998 since C99 requires this.
9999
100002006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10001
10002 * m4/c-working.m4: New file.
10003 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10004
100052006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10006
10007 * Makefile.maint: Merge from coreutils.
10008
100092006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10010
10011 More portability fixes for problems summarized by Nelson H. F. Beebe.
10012
10013 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10014 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10015 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10016 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10017 messes up because C++ code is compiled in 32-bit mode but linked
10018 in 64-bit mode.
10019
100202006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10021
10022 More portability fixes for problems summarized by Nelson H. F. Beebe.
10023
10024 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10025 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10026
10027 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10028 nodist_PROGRAMS, since we don't need to actually compile the
10029 example if we're just doing a plain 'make'. This avoids bothering
10030 the installer unnecessarily about problems due to weird C++
10031 compilers.
10032
100332006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10034
10035 More portability fixes for problems summarized by Nelson H. F. Beebe.
10036
10037 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10038 than #include "...", and compile with -I'.'. The old method was
10039 not portable, according to Posix and the C standard, and it does
10040 not work with Sun C 5.7, where previous #line directives affect
10041 the working directory used in later #include "..." directives.
10042
100432006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10044
10045 Various DJGGP specific issues in /djgpp
10046
100472006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10048
10049 More portability fixes for problems summarized by Nelson H. F. Beebe.
10050
10051 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10052 '#include <map>' works and that you can apply ++ to iterators.
10053
100542006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10055
10056 Work around portability problems summarized by Nelson H. F. Beebe in
10057 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10058
10059 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10060 that '#include <string>' works.
10061
10062 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10063 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10064 "warning: sorry: semantics of inline function static data `const
10065 unsigned char translate_table[262]' are wrong (you'll wind up with
10066 multiple copies)".
10067
10068 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10069 or, xor to not_, and_, or_, and xor_, respectively. This works
10070 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10071 random system header somewhere that includes the equivalent of
10072 <iso646.h>.
10073
10074 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10075 -E" works; it apparently doesn't work with PathScale EKO Compiler
10076 Suite Version 2.0.
10077
100782006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10079
10080 During deterministic GLR operation, user actions should be able to
10081 influence the parse by changing yychar. To make this easier to fix and
10082 to make glr.c easier to evolve in general, don't maintain yytoken in
10083 parallel with yychar; just compute yytoken when needed.
10084 * tests/glr-regression.at (Incorrect lookahead during deterministic
10085 GLR): Check that setting yychar in a user action has the intended
10086 effect.
10087 * data/glr.c (yyGLRStack): Remove yytokenp member.
10088 (yyclearin): Don't set *yytokenp.
10089 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10090 yychar rather than *yytokenp to determine the current lookahead.
10091 Compute yytoken locally when needed.
10092 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10093 point to.
10094
10095 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10096 after `--report' documentation.
10097
100982006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10099
10100 * src/parse-gram.y (grammar_declaration): Location of printer
10101 symbol is @1, not list->location. Bug reported by twlevo.
10102 * tests/input.at (Incompatible Aliases): Adjust to above change.
10103
101042006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10105
10106 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10107 all the test at once. This makes the output easier to read in the
10108 normal case.
10109
10110 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10111 got from <http://bro-ids.org/download.html>. The bug is that
10112 when two actions appeared in succession, the second one was
10113 scanned before the first one was added to the grammar rule
10114 as a midrule action. Bison then output the incorrect warning
10115 "parse.y:905.17-906.36: warning: unused value: $3".
10116 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10117 associated with a value.
10118 (rhs): Don't invoke grammar_current_rule_action_append.
10119 (action): Invoke it here instead.
10120 * src/reader.c (grammar_midrule_action): Now extern.
10121 (grammar_current_rule_action_append): Don't invoke
10122 grammar_midrule_action; that is now the scanner's job.
10123 * src/reader.h (last_string, last_braced_code_loc):
10124 (grammar_midrule_action): New decls.
10125 * src/scan-gram.l (last_string): Now extern, sigh.
10126 (last_braced_code_loc): New extern variable.
10127 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
10128 rule already has an action.
10129 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
10130 * tests/input.at (AT_CHECK_UNUSED_VALUES):
10131 Add some tests to check that the above changes fixed the bug.
10132
101332006-01-27 Paul Eggert <eggert@cs.ucla.edu>
10134
10135 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
10136 All used changed. Check whether the symbol has a destructor,
10137 not whether it is typed.
10138 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
10139 that the values are still reported as unused. All line numbers
10140 adjusted.
10141
101422006-01-23 Paul Eggert <eggert@cs.ucla.edu>
10143
10144 Work around a bug in bro 0.8, which underparenthesizes its
10145 definition of YYLLOC_DEFAULT.
10146 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
10147 their arguments.
10148 * data/lalr1.cc: Likewise.
10149 * data/yacc.cc: Likewise.
10150
101512006-01-22 Paul Eggert <eggert@cs.ucla.edu>
10152
10153 Work around a bug in Pike 7.0, and give the Pike folks a
10154 better way to override the usual int widths.
10155 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
10156 user can override the types.
10157 (short): #undef, to work around a bug in Pike 7.0.
10158 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
10159 (union yyalloc.yyss): Use yytype_int16 rather than short.
10160 All uses changed.
10161 (yysigned_char): Remove.
10162 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
10163 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
10164 * tests/regression.at (Web2c Actions): Adjust to above changes.
10165
10166 * src/reader.c (check_and_convert_grammar): New function.
10167 (reader): Close the input file even if something went wrong during
10168 parsing. Minor file descriptor leak reported by twlevo.
10169
10170 * src/assoc.c (assoc_to_string): Use a default: abort (); case
10171 to pacify gcc -Wswitch-default.
10172 * src/scan-gram.l (adjust_location): Use a default: break; case
10173 to pacify gcc -Wswitch-default.
10174 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
10175 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10176 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10177 Move these decls to scan-skel.l, since they don't need to be
10178 visible elsewhere.
10179 * src/scan-skel.l: Accept the above decls.
10180 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
10181 is used.
10182
101832006-01-21 Paul Eggert <eggert@cs.ucla.edu>
10184
10185 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
10186 since we don't want to insist on a version number at the start
10187 of the changelog every time.
10188 * Makefile.maint: Sync from coreutils a bit better.
10189 (sc_trailing_blank): Renamed from sc_trailing_space.
10190 All uses changed.
10191 (sc_no_if_have_config_h, sc_require_config_h):
10192 (sc_prohibit_assert_without_use): New rules.
10193 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
10194 (sc_dd_max_sym_length): Fix leading spaces in rule.
10195 (sc_system_h_headers): Prefix with @.
10196 (sc_useless_cpp_parens, m4-check): Output line numbers.
10197 (changelog-check): Allow version only in head.
10198 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
10199 satisfy new Makefile.maint rule.
10200 * data/glr.c: Likewise.
10201 * data/glr.cc: Likewise.
10202 * data/lalr1.cc: Likewise.
10203 * data/yacc.c: Likewise.
10204 * lib/ebitsetv.c: Likewise.
10205 * lib/lbitset.c: Likewise.
10206 * lib/subpipe.c: Likewise.
10207 * lib/timevar.c: Likewise.
10208 * src/system.h: Likewise.
10209 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
10210 * djgpp/Makefile.maint: Add copyright notice.
10211 * djgpp/README.in: Likewise.
10212 * djgpp/config.bat: Likewise.
10213 * djgpp/config.site: Likewise.
10214 * djgpp/config_h.sed: Likewise.
10215 * djgpp/djunpack.bat: Likewise.
10216 * djgpp/config.sed: Fix copyright notice to match standard format.
10217 * djgpp/subpipe.h: Likewise.
10218 * lib/bitsetv-print.c: Likewise.
10219 * lib/bitsetv.c: Likewise.
10220 * lib/subpipe.h: Likewise.
10221 * lib/timevar.c: Likewise.
10222 * lib/timevar.h: Likewise.
10223 * djgpp/subpipe.c: Use standard recipe for config.h.
10224 * lib/abitset.c: Likewise.
10225 * lib/bitset.c: Likewise.
10226 * lib/bitset_stats.c: Likewise.
10227 * lib/bitsetv-print.c: Likewise.
10228 * lib/bitsetv.c: Likewise.
10229 * lib/ebitsetv.c: Likewise.
10230 * lib/get-errno.c: Likewise.
10231 * lib/lbitset.c: Likewise.
10232 * lib/subpipe.c: Likewise.
10233 * lib/timevar.c: Likewise.
10234 * lib/vbitset.c: Likewise.
10235 * tests/local.at: Likewise.
10236 * src/scan-gram.l: Don't include verify.h, since system.h does
10237 that for us.
10238 * .x-sc_require_config_h: New file.
10239 * .x-sc_unmarked_diagnostics: New file.
10240
102412006-01-20 Paul Eggert <eggert@cs.ucla.edu>
10242
10243 Be a bit more systematic about using 'abort'.
10244 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
10245 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
10246 Put 'default: abort ();' before some other case, to satisfy older
10247 pedantic compilers.
10248 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10249 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10250 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
10251 * src/conflicts.c (resolve_sr_conflict): Likewise.
10252 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
10253 (get_decision_str, get_orientation_str, get_node_alignment_str):
10254 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
10255 (get_linestyle_str, get_arrowstyle_str): Likewise.
10256 * src/conflicts.c (resolve_sr_conflict):
10257 Use a default case rather than one for the one remaining enum
10258 value, to catch invalid enum values as well.
10259 * src/lalr.c (set_goto_map, map_goto):
10260 Prefer "assert (FOO);" to "if (!FOO) abort ();".
10261 * src/nullable.c (nullable_compute, token_definitions_output):
10262 Likewise.
10263 * src/reader.c (packgram, reader): Likewise.
10264 * src/state.c (transitions_to, state_new, state_reduction_find):
10265 Likewise.
10266 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
10267 (symbol_pack): Likewise.
10268 * src/tables.c (conflict_row, pack_vector): Likewise.
10269 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
10270 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
10271 * src/system.h: Don't include <assert.h>.
10272 (assert): New macro.
10273
10274 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
10275 (Destructor Decl, Parser Function, Pure Calling):
10276 Describe rules for braces inside C code more carefully.
10277
102782006-01-19 Paul Eggert <eggert@cs.ucla.edu>
10279
10280 Fix some porting glitches found by Nelson H. F. Beebe.
10281 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
10282 compilers that don't understand that abort () does not return.
10283 * src/state.c (transitions_to): Likewise.
10284 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10285 that '#include <cstdlib>' works.
10286 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
10287 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
10288 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
10289 for the benefit of some pre-C99 compilers.
10290
10291 * bootstrap: Undo changes to gnulib files that autoreconf made.
10292
10293 Minor fixups to get 'make maintainer-check' to work.
10294 * configure.ac: Don't use -Wnested-externs, as it's incompatible
10295 with the new verify.h implementation.
10296 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
10297 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
10298 * data/yacc.c (YYUSE): Likewise.
10299 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
10300 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
10301 * src/parse-gram.y (declaration): Don't pass a string constant
10302 to a function that expects char *, since GCC might complain
10303 about the constant value.
10304 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
10305 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
10306 before #defining them.
10307 * tests/glr-regression.at
10308 (Incorrectly initialized location for empty right-hand side in GLR):
10309 In yyerror, use the msg arg.
10310 (Corrupted semantic options if user action cuts parse):
10311 (Incorrect lookahead during deterministic GLR):
10312 (Incorrect lookahead during nondeterministic GLR):
10313 Don't name a local var 'index'; it shadows string.h's 'index'.
10314
103152006-01-19 Akim Demaille <akim@epita.fr>
10316
10317 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
10318 location, not just parts of it.
10319
103202006-01-18 Paul Eggert <eggert@cs.ucla.edu>
10321
10322 * NEWS: Document the fact that multiple %unions are now allowed.
10323 * doc/bison.texinfo (Union Decl): Likewise.
10324 * TODO: This feature is now implemented, so remove it from
10325 the wishlist.
10326
10327 * Makefile.maint: Merge with coreutils Makefile.maint.
10328 (CVS_LIST): Use build-aux version if available.
10329 (VERSION_REGEXP): New macro.
10330 (syntax-check-rules): Add sc_no_if_have_config_h,
10331 sc_prohibit_assert_without_use, sc_require_config_h,
10332 sc_useless_cpp_parens.
10333 (sc_obsolete_symbols): Check for O_NDELAY.
10334 (sc_dd_max_sym_length): Track coreutils.
10335 (sc_unmarked_diagnostics): Look in all files, not just *.c.
10336 (sc_useless_cpp_parens): New rule.
10337 (news-date-check): Look for version or today's date.
10338 (changelog-check): Don't require version number near head.
10339 (copyright-check): Use current year instead of hardwiring 2005.
10340 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
10341 (announcement): Add --gpg-key-ID.
10342
10343 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
10344 with "file system".
10345
10346 Avoid undefined behavior that addressed just before the start of an
10347 array. Problem reported by twlevo.
10348 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10349 * src/lalr.c (build_relations): Rely on new sentinel.
10350 * src/gram.c (gram_free): Adjust to new sentinel.
10351
103522006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10353
10354 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10355 yylookaheadNeeds. All uses updated.
10356 (yysplitStack): Rename local yynewLookaheadStatuses to
10357 yynewLookaheadNeeds.
10358 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10359 GLR): In comments, change `lookahead status' to `lookahead need'.
10360
103612006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10362
10363 * data/glr.c (yysplitStack): A little stylistic rewrite.
10364
103652006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10366
10367 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10368
103692006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10370
10371 * doc/bison.texinfo: Fix some typos.
10372 (GLR Semantic Actions): New subsection discussing special
10373 considerations because GLR semantic actions might be deferred.
10374 (Actions): Mention look-ahead usage of yylval.
10375 (Actions and Locations): Mention look-ahead usage of yylloc.
10376 (Special Features for Use in Actions): Add YYEOF entry and mention it
10377 in the yychar entry.
10378 In the yychar entry, remove mention of the local yychar case (pure
10379 parser) since this is irrelevant information when writing semantic
10380 actions and since it's already discussed in `Table of Symbols' where
10381 yychar is otherwise described as an external variable.
10382 In the yychar entry, don't call it the `current' look-ahead since it
10383 isn't when semantic actions are deferred.
10384 In the yychar and yyclearin entries, add note about deferred semantic
10385 actions.
10386 Add yylloc and yylval entries discussing look-ahead usage.
10387 (Look-Ahead Tokens): When discussing yychar, don't call it the
10388 `current' look-ahead, and do mention yylval and yylloc.
10389 (Error Recovery): Cross-reference `Action Features' when mentioning
10390 yyclearin.
10391 (Table of Symbols): In the yychar entry, don't call it the `current'
10392 look-ahead.
10393 In the yylloc and yylval entries, mention look-ahead usage.
10394
103952006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10396
10397 * tests/glr-regression.at: Update copyright year to 2006.
10398
103992006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10400
10401 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10402 use during nondeterministic operation to track which stacks have
10403 actually needed the current lookahead.
10404 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10405 Allocate, deallocate, resize, and otherwise shuffle space for
10406 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10407 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10408 appropriately during nondeterministic operation.
10409 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10410 members to store the current lookahead to be used by the deferred
10411 user action.
10412 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10413 from which the RHS is taken. Set the lookahead members of the new
10414 yySemanticOption according to the lookahead status for stack yyk.
10415 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10416 yyaddDeferredAction.
10417 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10418 members of yySemanticOption before invoking yyuserAction, and then set
10419 them back to their current values afterward.
10420 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10421 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10422 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10423 titles for consistency.
10424 (Leaked merged semantic value if user action cuts parse): In order to
10425 suppress lint warnings, use arguments in merge function, and assign
10426 char value < 128 in main.
10427 (Incorrect lookahead during deterministic GLR): New test case.
10428 (Incorrect lookahead during nondeterministic GLR): New test case.
10429
104302006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10431
10432 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10433 !yyvaluep as signal that no semantic value is available to print.
10434 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10435 to print a semantic value.
10436
104372006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10438
10439 * tests/glr-regression.at: For consistency with my newer test cases,
10440 don't thank myself.
10441
104422006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10443
10444 * data/glr.c (yyresolveValue): When merging semantic options, if at
10445 least one user action succeeds but a later one cuts the parse, then
10446 destroy the semantic value before returning rather than leaking it.
10447 (yyresolveStates): If a user action cuts the parse and thus
10448 yyresolveValue fails, ignore the (unset) semantic value rather than
10449 corrupting the yyGLRState, and empty the semantic options list since
10450 the user actions should have called all necessary destructors.
10451 Simplify code with YYCHK.
10452 * tests/glr-regression.at (Corrupted semantic options if user action
10453 cuts parse): New test case.
10454 (Undesirable destructors if user action cuts parse): New test case.
10455 Before applying any of this patch, this test case never actually failed
10456 for me... but only because the corrupted semantic options usually
10457 masked this bug.
10458 (Leaked merged semantic value if user action cuts parse): New test
10459 case.
10460
104612006-01-05 Akim Demaille <akim@epita.fr>
10462
10463 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10464
104652006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10466
10467 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10468 _MSC_VER. Problem reported by Cenzato Marco.
10469 (b4_c_function_def): Use it.
10470 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10471 b4_c_modern.
10472 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10473 than rolling our own.
10474
104752006-01-04 Akim Demaille <akim@epita.fr>
10476
10477 Also warn about non-used mid-rule values.
10478 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10479 member.
10480 (symbol_list_new): Adjust.
10481 * src/reader.c (symbol_typed_p): New.
10482 (grammar_rule_check): Use it.
10483 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10484 Check its rule.
10485 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10486 Use it.
10487 * tests/actions.at (Exotic Dollars): Adjust.
10488
104892006-01-04 Akim Demaille <akim@epita.fr>
10490
10491 * src/reader.c (grammar_midrule_action): If $$ is set in a
10492 mid-rule, move the `used' bit to its lhs.
10493 * tests/input.at (Unused values): New.
10494 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10495
104962006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10497
10498 * doc/bison.texinfo (Bison Options): Say more accurately what
10499 --yacc does.
10500 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10501 about declarations in the grammar when in Yacc mode, as POSIX does
10502 not require a diagnostic when the grammar uses extensions.
10503
10504 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10505
10506 Warn about dubious constructions like "%token T T".
10507 Reported by twlevo.
10508 * src/symtab.h (struct symbol.declared): New member.
10509 * src/symtab.c (symbol_new): Initialize it to false.
10510 (symbol_class_set): New arg DECLARING, specifying whether
10511 this is a declaration that we want to warn about, if there
10512 is more than one of them. All uses changed.
10513
10514 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10515 Allow multiple %union directives, whose contents concatenate.
10516 * src/parse-gram.y (grammar_declaration): Likewise.
10517 Use muscle_code_grow, so that we don't need stype_line any more.
10518 All uses changed.
10519
10520 * src/muscle_tab.c (muscle_grow): Fix comment.
10521
10522 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10523 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10524 Update copyright year to 2006.
10525
105262006-01-03 Akim Demaille <akim@epita.fr>
10527
10528 Have glr.cc pass (some of) the calc.at tests.
10529 * data/glr.cc (b4_parse_param_orig): New.
10530 (b4_parse_param): Improve its definition, and bound it more
10531 clearly in the skeleton.
10532 (b4_epilogue): Append, instead of prepending, in order to keep
10533 #line consistency.
10534 Simplify the generation of auxiliary functions: locations and
10535 purity are mandated.
10536 (b4_global_tokens_and_yystype): Honor it.
10537 * data/location.cc (c++.m4): Don't include it.
10538 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10539 and AT_SKEL_CC_IF.
10540 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10541 AT_LALR1_CC_IF.
10542 Be sure to initialize the first position's filename.
10543 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10544 mandated anyway.
10545 (AT_CHECK_CALC_GLR_CC): New.
10546 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10547
105482006-01-02 Akim Demaille <akim@epita.fr>
10549
10550 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10551 c.m4.
10552 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10553 * data/glr.cc: Do not include stack.hh.
10554
105552006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10556
10557 * data/glr.c: Reformat whitespace with tabs.
10558 (b4_lpure_formals): Remove this unused m4 macro.
10559 * tests/cxx-type.at: Reformat whitespace with tabs.
10560 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10561 since it's a member. Rename type to isNterm for clarity.
10562
105632005-12-29 Akim <akim@sulaco.local>
10564
10565 Let glr.cc catch up with symbol_value_print.
10566 * data/glr.cc (b4_yysymprint_generate): Replace by...
10567 (b4_yy_symbol_print_generate): this.
10568 (yy_symbol_print, yy_symbol_value_print): Declare them.
10569
105702005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10571
10572 * src/location.h (boundary): Note that a line or column equal
10573 to INT_MAX indicates an overflow.
10574 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10575 (rule_length_overflow, increment_rule_length, add_column_width):
10576 New functions.
10577 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10578 (<SC_BRACED_CODE>"}"):
10579 Use increment_rule_length rather than incrementing it by hand.
10580 (adjust_location, handle_syncline): Diagnose overflow.
10581 (handle_action_dollar, handle_action_at):
10582 Fix bug with monstrosities like $-2147483648.
10583 Remove now-unnecessary checks.
10584 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10585 (convert_ucn_to_byte): Verify assumptions.
10586 (handle_syncline): New arg LOC. All callers changed.
10587 Don't store through a value derived from char const * pointer.
10588
10589 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10590 GCC warnings.
10591
105922005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10593
10594 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10595 Remove unnecessary forward static decls.
10596
105972005-12-27 Akim Demaille <akim@epita.fr>
10598
10599 * src/reader.c (grammar_current_rule_check): Also check that $$
10600 is used.
10601 Take the rule to check as argument, hence rename as...
10602 (grammar_rule_check): this.
10603 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10604 Rename as...
10605 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10606 (grammar_midrule_action, grammar_symbol_append): Now static.
10607 * tests/torture.at (input): Don't rely on the default action
10608 being always performed.
10609 * tests/calc.at: "Set" $$ even when the action is "cut" with
10610 YYERROR or other.
10611 * tests/actions.at (Exotic Dollars): Instead of using unused
10612 values, check that the warning is issued.
10613
106142005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10615
10616 * NEWS: Improve wording for unused-value warnings.
10617
106182005-12-22 Akim Demaille <akim@epita.fr>
10619
10620 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10621 (b4_yysymprint_generate): Rename as...
10622 (b4_yy_symbol_print_generate): this.
10623 Generate yy_symbol_print instead of yysymprint.
10624 Generate also yy_symbol_value_print, and use it.
10625
106262005-12-22 Akim Demaille <akim@epita.fr>
10627
10628 * NEWS: Warn about unused values.
10629 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10630 a `used' member.
10631 (symbol_list_n_get, symbol_list_n_used_set): New.
10632 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10633 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10634 * src/reader.c (grammar_current_rule_check): Check that values are
10635 used.
10636 * src/symtab.c (symbol_print): Accept 0.
10637 * tests/existing.at: Remove the type information.
10638 Empty the actions.
10639 Remove useless actions (beware of mid-rule actions: perl -000
10640 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10641 * tests/actions.at (Exotic Dollars): Use unused values.
10642 * tests/calc.at: Likewise.
10643 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10644 Likewise.
10645
10646 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10647 rule_useful_p.
10648
106492005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10650
10651 Undo 2005-12-01 tentative license wording change. The wording is
10652 still being reviewed by the lawyers, and we don't want to wait for
10653 them before publishing a test release. For now, revert to the
10654 previous wording.
10655 * NEWS: Undo 2005-12-01 change.
10656 * data/glr.c: Revert to previous license wording.
10657 * data/glr.cc: Likewise.
10658 * data/lalr1.cc: Likewise.
10659 * data/location.cc: Likewise.
10660 * data/yacc.c: Likewise.
10661
10662 * NEWS: Reword %destructor vs YYABORT etc.
10663 * data/glr.c: Use American spacing, for consistency.
10664 * data/glr.cc: Likewise.
10665 * data/lalr1.cc: Likewise.
10666 * data/yacc.c: Likewise.
10667 * data/yacc.c: Reformat comments slightly.
10668 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10669 for consistency. Fix some spelling errors and reword recently-included
10670 text slightly.
10671 * tests/cxx-type.at: Cast results of malloc, for C++.
10672
106732005-12-21 Joel E. Denny <address@hidden>
10674
10675 * tests/cxx-type.at: Construct a tree, count the parents of shared
10676 nodes, and free each node once and only once. Previously, the memory
10677 for semantic values was leaked instead.
10678
106792005-12-21 Joel E. Denny <address@hidden>
10680
10681 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10682 (yylval, yylloc): If pure, #define to yystackp->yyval and
10683 yystackp->yyloc similar to yychar and yynerrs.
10684 (yyparse): If pure, remove local yylval and yylloc. Add local
10685 yystackp to accommodate pure definitions of yylval and yylloc.
10686 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10687 yylvalp and yyllocp to &yylval and &yylloc.
10688 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10689 namespace. Previously, nerrs and char were missing, but lval and lloc
10690 weren't necessary.
10691 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10692 yylvalp and yyllocp parameters since, if pure, these are now always
10693 accessible through yystackp. If not pure, they are still accessible
10694 globally.
10695 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10696 `if (YYID (N))' to pacify lint.
10697
106982005-12-21 Akim Demaille <akim@epita.fr>
10699
10700 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10701 destroy the RHS symbols of a rule.
10702 * data/yacc.c (yylen): Initialize to 0.
10703 Keep its value to the number of items to possibly shift.
10704 In particular, a regular successful parse that ends on YYFINAL by
10705 a (internal) YYACCEPT must not have yylen != 0.
10706 (yyerrorlab, yyreturn): Pop the RHS.
10707 Reorder a bit to emphasize the `shifting' bits of code.
10708 (YYPOPSTACK): Now accept a number of items to pop.
10709 * data/lalr1.cc: Likewise.
10710 * data/glr.c: Formatting changes.
10711 Use goto instead of fall through.
10712 * doc/bison.texinfo (Destructor Decl): Complete.
10713
107142005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10715
10716 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10717 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10718 * djgpp/config.bat: Replace every occurence of the file name
10719 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10720 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10721 * djgpp/config.sed: Replace every occurence of the file name
10722 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10723 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10724 * djgpp/djunpack.bat: DJGPP specific file.
10725 * djgpp/fnchange.lst: DJGPP specific file.
10726 * djgpp/README.in: Add new information about how to unpack the bison
10727 source on MSDOS and other systems which have 8.3 file name restrictions
10728 using djunpack.bat and fnchange.lst.
10729
107302005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10731
10732 * bootstrap (build_cvs_prefix): Remove; unused.
10733 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10734 when getting gnulib.
10735
107362005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10737
10738 * data/glr.c: Reorder typedef declarations for structs to match order
10739 of struct declarations.
10740 Rename yystack everywhere to yystackp except in yyparse where it's not
10741 a pointer.
10742 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10743 consistency.
10744 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10745 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10746 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10747 lint.
10748
107492005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10750
10751 * tests/sets.at (Accept): Fix typos in regular expression used to
10752 sed out the final state number.
10753
10754 Work around portability problem on Solaris 10: flex-generated
10755 files include <stdio.h> before <config.h>, which messes up
10756 because the latter defines __EXTENSIONS__. Address the problem
10757 by creating two new little files that include <config.h> first,
10758 then include the flex-generated files. Rewrite everyone else
10759 to include <config.h> first, as well.
10760 * lib/timevar.c: Always include "config.h".
10761 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10762 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10763 (EXTRA_bison_SOURCES): New macro.
10764 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10765 * src/system.h: Don't include config.h.
10766 * src/LR0.c: Include <config.h> first.
10767 * src/assoc.c: Likewise.
10768 * src/closure.c: Likewise.
10769 * src/complain.c: Likewise.
10770 * src/conflicts.c: Likewise.
10771 * src/derives.c: Likewise.
10772 * src/files.c: Likewise.
10773 * src/getargs.c: Likewise.
10774 * src/gram.c: Likewise.
10775 * src/lalr.c: Likewise.
10776 * src/location.c: Likewise.
10777 * src/main.c: Likewise.
10778 * src/muscle_tab.c: Likewise.
10779 * src/nullable.c: Likewise.
10780 * src/output.c: Likewise.
10781 * src/parse-gram.y: Likewise.
10782 * src/print.c: Likewise.
10783 * src/print_graph.c: Likewise.
10784 * src/reader.c: Likewise.
10785 * src/reduce.c: Likewise.
10786 * src/relation.c: Likewise.
10787 * src/state.c: Likewise.
10788 * src/symlist.c: Likewise.
10789 * src/symtab.c: Likewise.
10790 * src/tables.c: Likewise.
10791 * src/uniqstr.c: Likewise.
10792 * src/vcg.c: Likewise.
10793
10794 * src/parse-gram.y: Fix minor problems uncovered by lint.
10795 (current_lhs, current_lhs_location): Now static.
10796 (current_assoc): Remove unused variable.
10797
10798 Cleanups so that Bison-generated parsers have less lint.
10799 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10800 Prepend /*ARGSUSED*/, for lint's sake.
10801 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10802 definition if 'lint' is defined.
10803 (YYID): New macro (or function, if lint).
10804 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10805 * data/yacc.c: Likewise.
10806 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10807 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10808 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10809 is C++ only.
10810 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10811 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10812 Use YYID(0) rather than 0, for lint.
10813 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10814 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10815
108162005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10817
10818 * tests/glr-regression.at
10819 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10820 Close memory leak reported by twlevo.
10821
108222005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10823
10824 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10825 all stacks.
10826 (yyparse): Iterate another stack in order to call user destructors.
10827 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10828 New test case.
10829 (Duplicated user destructor for lookahead): This test now is expected
10830 to succeed.
10831
108322005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10833
10834 * NEWS: Document the following change.
10835 * data/yacc.c: Say "parser skeleton" rather than "file", since
10836 it's no longer just a file.
10837 * data/glr.c: Grant a special exception for C GLR parsers, that
10838 reads like the already-existing exception for C LALR(1) parsers.
10839 * data/glr.cc: Likewise.
10840 * data/lalr1.cc: Likewise.
10841 * data/location.cc: Likewise.
10842 * data/yacc.c: Reword the "written by" statement to clarify that
10843 it was the parser skeleton, not the entire output file.
10844 * data/glr.c: Written by Paul Hilfinger.
10845 * data/glr.cc: Written by Akim Demaille.
10846 * data/lalr1.cc: Likewise.
10847
108482005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10849
10850 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10851 Fix typos in previous change that broke 'make check'.
10852 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10853 supported in C.
10854 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10855 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10856 We can revert this once things settle down.
10857
10858 * src/conflicts.c (conflicts_print): Don't print file name twice
10859 when %expect fails because there were no conflicts.
10860 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10861 change.
10862 * tests/conflicts.at (%expect not enough, %expect too much):
10863 (%expect with reduce conflicts): Adjust to new behavior.
10864
108652005-11-18 Akim Demaille <akim@epita.fr>
10866
10867 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10868 errors.
10869 * NEWS: Document this.
10870 * doc/bison.texinfo (Expect Decl): Likewise.
10871
108722005-11-16 Akim Demaille <akim@epita.fr>
10873
10874 Generalize the display of semantic values and locations in traces.
10875 * data/glr.c (yy_reduce_print): Fix indices (again).
10876 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10877 literal integers.
10878 * data/lalr1.cc (yyreduce_print): Rename as...
10879 (yy_reduce_print): this.
10880 Display values and locations.
10881 * data/yacc.c (yy_reduce_print): Likewise.
10882 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10883 (yysymprint): Move higher to be visible from yy_reduce_print).
10884 (yyparse): Adjust.
10885 * tests/calc.at: Adjust the expected length of the traces.
10886
108872005-11-14 Akim Demaille <akim@epita.fr>
10888
10889 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10890 from 1 to N, while values and location start at 0.
10891 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10892
108932005-11-14 Akim Demaille <akim@epita.fr>
10894
10895 * data/glr.c (yy_reduce_print): Fix the $ number.
10896
108972005-11-14 Akim Demaille <akim@epita.fr>
10898
10899 "Use" parse parameters.
10900 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10901 * data/glr.c, data/glr.cc: Use them.
10902 * data/glr.c (YYUSE): Have a C++ definition that supports
10903 non-pointer types.
10904
109052005-11-14 Akim Demaille <akim@epita.fr>
10906
10907 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10908
109092005-11-14 Akim Demaille <akim@epita.fr>
10910
10911 * data/glr.cc: New.
10912 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10913
109142005-11-12 Akim Demaille <akim@epita.fr>
10915
10916 Let position and location be PODs.
10917 * data/location.cc (position::initialize, location::initialize): New.
10918 (position::position, location::location): Define only if
10919 b4_location_constructors is defined.
10920 * data/lalr1.cc (b4_location_constructors): Define it for backward
10921 compatibility.
10922 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10923
109242005-11-12 Akim Demaille <akim@epita.fr>
10925
10926 * data/lalr1.cc: Move the body of the ctor and dtor into the
10927 parser file (instead of the header).
10928 Wrap the implementations in a "namespace yy".
10929
109302005-11-12 Akim Demaille <akim@epita.fr>
10931
10932 Have glr.c include its header file when created.
10933 * data/glr.c (b4_shared_declarations): New.
10934 Output them verbatim in the parser if !%defines, otherwise
10935 output then in the header file, and include it instead.
10936
109372005-11-11 Akim Demaille <akim@epita.fr>
10938
10939 * data/glr.c: Comment changes.
10940
109412005-11-11 Akim Demaille <akim@epita.fr>
10942
10943 When yydebug, report semantic and location values for reductions.
10944 * data/glr.c (yy_reduce_print): Report the semantic values and the
10945 locations.
10946 (YY_REDUCE_PRINT): Adjust.
10947 (yyglrReduce): Use them.
10948 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10949 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10950 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10951 traces.
10952
109532005-11-10 Akim Demaille <akim@epita.fr>
10954
10955 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10956 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10957 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10958
109592005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10960
10961 * m4/cxx.m4, examples/Makefile.am: Don't build
10962 examples/calc++ if no C++ compiler is available. (trivial change)
10963
109642005-11-09 Akim Demaille <akim@epita.fr>
10965
10966 * src/scan-skel.l: Use a couple of asserts.
10967
109682005-11-03 Akim Demaille <akim@epita.fr>
10969
10970 In some (weird) cases, the final state number is incorrect.
10971 Reported by Alexandre Duret-Lutz.
10972 * src/LR0.c (state_list_append): Remove the computation of
10973 final_state.
10974 (save_reductions): Do it here.
10975 (get_state): Alpha conversion.
10976 (generate_states): Use a for loop.
10977 * src/gram.h (item_number_is_rule_number)
10978 (item_number_is_symbol_number): New.
10979 * src/state.c: Use assert.
10980 * src/system.h: Include assert.h.
10981 * tests/sets.at (Accept): New.
10982
109832005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10984
10985 * data/glr.c (yyfill): Adjust comment.
10986 (yyresolveAction): Initialize default location properly
10987 for empty right-hand sides.
10988 (yydoAction): Ditto.
10989 Add comment explaining apparently dead code.
10990 * tests/glr-regression.at
10991 (Incorrectly initialized location for empty right-hand side in GLR):
10992 New test.
10993
109942005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10997 gnulib when interrupted. This fixes some race conditions and
10998 works around some portability problems (one noted by Paul
10999 Hilfinger).
11000
110012005-10-22 Akim <akim@epita.fr>
11002
11003 * Makefile.cfg: Adjust to config -> build-aux.
11004 Reported by twledo.
11005
110062005-10-21 Akim Demaille <akim@epita.fr>
11007
11008 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11009 the %parse-params.
11010 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11011 * data/yacc.c (b4_Pure_if): Rename as...
11012 (b4_yacc_pure_if): this.
11013 (YY_SYMBOL_PRINT, yyparse): Adjust.
11014 * doc/bison.texinfo: Formatting changes.
11015
110162005-10-21 Akim Demaille <akim@epita.fr>
11017
11018 Finish the transition config -> build-aux.
11019 * configure.ac, Makefile.am: Use build-aux.
11020 * config/prev-version, config/announce-gen, config/Makefile.am:
11021 Move to...
11022 * build-aux/prev-version, build-aux/announce-gen,
11023 * build-aux/Makefile.am: here.
11024
110252005-10-14 Akim Demaille <akim@epita.fr>
11026
11027 * examples/calc++/test: Use set -x only when VERBOSE.
11028
110292005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11030
11031 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11032 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11033
110342005-10-13 Akim Demaille <akim@epita.fr>
11035
11036 * src/scan-skel.l: Output the base name parts of the parser and
11037 header file names.
11038 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11039 additional checks.
11040 Use this to exercise C++ outputs in subdirs.
11041 Reported by Oleg Smolsky.
11042
110432005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11044
11045 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11046 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11047 Problem reported by John P. Hartmann.
11048 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11049 already defined it.
11050
110512005-10-12 Akim Demaille <akim@epita.fr>
11052
11053 * src/parse-gram.y (version_check): Exit 63 to please missing
11054 (stands for "version mismatch).
11055 * tests/input.at, doc/bison.texinfo: Adjust.
11056
110572005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11058
11059 Work around portability problems with Visual Age C compiler
11060 (xlc and xlC_r) reported by John P. Hartmann.
11061 * data/location.cc (initial_column, initial_line): Remove.
11062 All uses replaced by 0 and 1.
11063 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11064 that xlc complains about.
11065 * src/scan-skel.l (skel_wrap): Likewise.
11066 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11067 as __STDC__.
11068 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11069 __STDC_VERSION__. Use it everywhere instead of looking at
11070 __STDC__ and __cplusplus.
11071
110722005-10-10 Akim Demaille <akim@epita.fr>
11073
11074 * examples/calc++/test: Be quiet unless VERBOSE.
11075
110762005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11077
11078 * data/c.m4 (yydestruct, yysymprint):
11079 Use YYUSE instead of casting to void.
11080 * data/glr.c (YYUSE): New macro.
11081 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11082 Use it instead of rolling our own.
11083 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11084 (YYCHK1):
11085 Use /*CONSTCOND*/ to suppress lint warnings.
11086 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11087 (YY_STACK_PRINT): Use 'false' not '0'.
11088 (YYUSE): New macro.
11089 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11090 * data/yacc.c (YYUSE): New macro.
11091 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11092 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11093 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11094
11095
11096 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11097 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11098
110992005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11100
11101 Undo the parts of the unlocked-I/O change that substituted
11102 putc or puts for printf. This might hurt performance a bit,
11103 but some people prefer the printf style.
11104 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11105 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11106 All uses replaced by YYFPRINTF and YYDPRINTF.
11107 * data/yacc.c: Likewise.
11108 * lib/bitset.c (bitset_print): Likewise.
11109 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11110 putc and puts.
11111 * lib/lbitset.c (debug_lbitset): Likewise.
11112 * src/closure.c (print_firsts, print_fderives): Likewise.
11113 * src/gram.c (grammar_dump): Likewise.
11114 * src/lalr.c (look_ahead_tokens_print): Likewise.
11115 * src/output.c (escaped_output): Likewise.
11116 (user_actions_output): Break apart two printfs.
11117 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11118 * src/reduce.c (reduce_print): Likewise.
11119 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11120 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11121
11122 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11123 Use assignments rather than casts-to-void to suppress
11124 unused-variable warnings. This pacifies 'lint'.
11125 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
11126 unused-variable warnings.
11127
111282005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11129
11130 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11131
111322005-10-02 Paul Eggert <eggert@cs.ucla.edu>
11133
11134 Use unlocked I/O for a minor performance improvement on hosts like
11135 GNU/Linux and Solaris that support unlocked I/O. The basic idea
11136 is to use the gnlib unlocked-io module, and to prefer putc and
11137 puts to printf when either will work (since the latter doesn't
11138 come in an unlocked flavor).
11139 * bootstrap (gnulib_modules): Add unlocked-io.
11140 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
11141 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
11142 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
11143 and similarly for puts and putc and printf.
11144 * data/yacc.c: Likewise.
11145 * lib/bitset.c (bitset_print): Likewise.
11146 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
11147 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
11148 to printf.
11149 * lib/lbitset.c (debug_lbitset): Likewise.
11150 * src/closure.c (print_firsts, print_fderives): Likewise.
11151 * src/gram.c (grammar_dump): Likewise.
11152 * src/lalr.c (look_ahead_tokens_print): Likewise.
11153 * src/output.c (escaped_output): Likewise.
11154 (user_actions_output): Coalesce two printfs.
11155 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
11156 * src/reduce.c (reduce_print): Likewise.
11157 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11158 * src/system.h: Include unlocked-io.h rather than stdio.h.
11159
11160 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
11161 this confuses xgettext.
11162
111632005-10-02 Akim Demaille <akim@epita.fr>
11164
11165 * bootstrap (gnulib_modules): Add strverscmp.
11166 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
11167 * m4/.cvsignore: Add strverscmp.m4.
11168 * src/parse-gram.y (%require): New token, new rule.
11169 (version_check): New.
11170 * src/scan-gram.l (%require): Adjust.
11171 * tests/input.at (AT_REQUIRE): New.
11172 Use it.
11173 * doc/bison.texinfo (Require Decl): New.
11174 (Calc++ Parser): Use %require.
11175
111762005-10-02 Akim Demaille <akim@epita.fr>
11177
11178 * data/location.cc: New.
11179
111802005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
11181 Akim Demaille <akim@epita.fr>
11182
11183 Make sure -odir/foo.cc creates dir/location.hh etc.
11184 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
11185 (spec_file_prefix, spec_verbose_file, spec_graph_file)
11186 (spec_defines_file): Now const.
11187 (dir_prefix): New.
11188 (short_base_name): Remove.
11189 * src/files.c: Adjust.
11190 (dirname.h): Include.
11191 (base_name): Don't prototype it.
11192 (finput): Remove, duplicates gram_in.
11193 (full_base_name, short_base_name): Replace by...
11194 (all_but_ext, all_but_tab_ext): these.
11195 (compute_base_names): Rename as...
11196 (compute_file_name_parts): this.
11197 Update to compute the new variables, including dir_prefix.
11198 Adjust dependencies.
11199 * src/output.c (prepare): Output them.
11200 * src/reader.c: Adjust to use gram_in, not finput.
11201 * src/scan-skel.l (@dir_prefix@): New.
11202
112032005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11204
11205 * lib/subpipe.c: New function end_of_output_subpipe() added
11206 to allow support for non-posix systems. This is a no-op function
11207 for posix systems.
11208
11209 * lib/subpipe.h: New function end_of_output_subpipe() added
11210 to allow support for non-posix systems. This is a no-op function
11211 for posix systems.
11212
11213 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
11214 handle the lack of pipe/fork functionality on non-posix systems.
11215
11216 * djgpp/Makefile.maint: DJGPP specific file.
11217
11218 * djgpp/README.in: DJGPP specific file.
11219
11220 * djgpp/config.bat: DJGPP specific configuration file.
11221
11222 * djgpp/config.sed: DJGPP specific configuration file.
11223
11224 * djgpp/config.site: DJGPP specific configuration file.
11225
11226 * djgpp/config_h.sed: DJGPP specific configuration file.
11227
11228 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
11229
11230 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
11231
112322005-10-02 Akim Demaille <akim@epita.fr>
11233
11234 * data/location.cc: New, extract from...
11235 * data/lalr1.cc: here.
11236 (location.hh): Include it after the user prologue, in case the
11237 filename type is defined by the user.
11238 Forward declation location and position before the pre-prologue.
11239 (yyresult_): Rename as...
11240 (yyresult): this, it's a local variable, not an attribute.
11241 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
11242
112432005-10-01 Akim Demaille <akim@epita.fr>
11244
11245 * examples/extexi: Restore the #line generation.
11246
112472005-09-30 Akim Demaille <akim@epita.fr>,
11248 Alexandre Duret-Lutz <adl@gnu.org>
11249
11250 Move the token type and YYSTYPE in the parser class.
11251 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
11252 (parser::token): New, from the moved free definition of tokens.
11253 (parser::semantic_value): Now a full definition instead of an
11254 indirection to YYSTYPE.
11255 (b4_post_prologue): No longer included in the header file, but
11256 in the implementation file.
11257 * doc/bison.texi (C+ Language Interface): Update.
11258 * src/parse-gram.y: Support unary %define.
11259 * tests/actions.at: Define global_tokens_and_yystype for backward
11260 compatibility until we update the tests.
11261 * tests/calc.at: Idem.
11262 (first_line, first_column, last_line, last_column): Define for lalr1.cc
11263 to simplify the code.
11264
112652005-09-29 Paul Eggert <eggert@cs.ucla.edu>
11266
11267 Port to SunOS 4.1.4, which lacks strtoul and strerror.
11268 Ah, the good old days! Problem reported by Peter Klein.
11269 * bootstrap (gnulib_modules): Add strerror, strtoul.
11270 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
11271 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
11272
112732005-09-29 Akim Demaille <akim@epita.fr>
11274
11275 * data/c.m4 (b4_error_verbose_if): New.
11276 * data/lalr1.cc: Use it.
11277 (YYERROR_VERBOSE_IF): Remove.
11278 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
11279 parser members, replaced by...
11280 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
11281 local variables.
11282 (yysyntax_error_): Takes the state number as argument.
11283 (yyreduce_print_): Use the argument yyrule, not the former
11284 attribute yyn_.
11285
112862005-09-26 Paul Eggert <eggert@cs.ucla.edu>
11287
11288 * bootstrap (gnulib_modules): Add verify.
11289 * lib/.cvsignore: Add verify.h.
11290 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
11291 * src/system.h (verify): Remove.
11292 Include verify.h instead.
11293 * src/tables.c (tables_generate): Use new API for 'verify'.
11294
112952005-09-21 Paul Eggert <eggert@cs.ucla.edu>
11296
11297 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
11298 local variables whose names begin with 'yy'.
11299 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11300 Trivial changes from Joel E. Denny.
11301
11302 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
11303 it itself.
11304 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
11305 don't use alloca any more.
11306
11307 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
11308 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
11309 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
11310 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
11311 to match yacc.c, to test more hosts.
11312
113132005-09-20 Paul Eggert <eggert@cs.ucla.edu>
11314
11315 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
11316 doesn't affect behavior.
11317 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
11318 Solaris, AIX, MSC.
11319 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
11320 This works a bit better with glibc, if user code has already included
11321 stdlib.h.
11322 * doc/bison.texinfo (Bison Parser): Document that users can't
11323 arbitrarily use malloc and free for other purposes. Document
11324 that <alloca.h> and <malloc.h> might be included.
11325 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
11326 user must declare alloca.
11327
11328 * HACKING (release): Forwarn the Translation Project about
11329 stable releses.
11330
113312005-09-20 Akim Demaille <akim@epita.fr>
11332
11333 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
11334
113352005-09-19 Paul Eggert <eggert@cs.ucla.edu>
11336
11337 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
11338 (YYSTACK_ALLOC_MAXIMUM): Use it.
11339 (yysyntax_error): New function.
11340 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
11341 multiple syntax errors are reported, and alloca is being used.
11342 Instead, reallocate buffers twice as big each time, so that
11343 we waste at most half the allocated memory. Start with a small
11344 (128-byte) buffer that will suffice in most cases anyway.
11345 Use yysyntax_error to do most of the work.
11346
11347 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11348 yynerrs is the number of errors reported, not the number of
11349 errors encountered.
11350
11351 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11352 Mark it as expected to fail.
11353 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11354 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11355 Don't start user-code symbols with "yy", to avoid name space problems.
11356
113572005-09-19 Akim Demaille <akim@epita.fr>
11358
11359 Remove the traits, failed experiment.
11360 It never proved useful, and anyway because of the current
11361 definition, it was not possible to have several specialization of
11362 this traits, making it useless.
11363 * data/lalr1.cc (yy:traits): Remove.
11364 Inline its definitions in the parser class.
11365
113662005-09-19 Akim Demaille <akim@epita.fr>
11367
11368 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11369 least Mac OSX with a /usr/local install of gettext.
11370
113712005-09-19 Akim Demaille <akim@epita.fr>
11372
11373 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11374 and yytoken for similarity with the other skeletons.
11375
113762005-09-19 Akim Demaille <akim@epita.fr>
11377
11378 * NEWS, configure.ac: update version number to 2.1a.
11379
113802005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11381
11382 * NEWS: Version 2.1.
11383
11384 * NEWS: Remove notice of yytname change, since it was never in an
11385 official release.
11386 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11387 diagnostic.
11388 * src/output.c (prepare): Likewise.
11389 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11390 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11391 is not defined. This is an awful hack, but it's enough for now.
11392 All callers changed.
11393 * tests/glr-regression-at (make_value): Args are const pointers now,
11394 to avoid GCC warning.
11395 (Duplicated user destructor for lookahead): New test. Currently
11396 skipped. It fails on my host but I'm not sure it'll always fail.
11397
113982005-09-16 Akim Demaille <akim@epita.fr>
11399
11400 * src/symtab.h (struct symbol): Declare the printer and destructor
11401 as const, to avoid accidental calls to free.
11402 (symbol_destructor_set, symbol_printer_set): Adjust.
11403 * src/symtab.c: Adjust.
11404
114052005-09-16 Akim Demaille <akim@epita.fr>
11406
11407 * data/c.m4 (b4_token_enums): New.
11408 (b4_token_defines): Rename as...
11409 (b4_token_enums_defines): this.
11410 (b4_token_defines): New, output only the #defines.
11411 * data/yacc.c, data/glr.c: Adjust.
11412 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11413 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11414 as default values.
11415
114162005-09-16 Akim Demaille <akim@epita.fr>
11417
11418 * data/lalr1.cc (yylex_): Remove, inline its code.
11419 (yyreport_syntax_error_): Remove, replaced by...
11420 (yysyntax_error_): this which returns a string and leaves to the
11421 caller the call to the users' error function.
11422 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11423 Move from members of the parser object...
11424 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11425 to local variables of the parse function.
11426
114272005-09-16 Akim Demaille <akim@epita.fr>
11428
11429 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11430 since it's in Bison's name space.
11431
114322005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11433
11434 * data/glr.c (yyresolveValue): Add default case to pacify
11435 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11436
11437 * NEWS: Document when yyparse started to return 2.
11438 * doc/bison.texinfo (Parser Function): Document when yyparse
11439 returns 2.
11440
11441 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11442 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11443 changed.
11444 (class position): file_name -> filename (reverting). All uses changed.
11445
114462005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11447
11448 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11449 do anything if $@ exists. This reverts part of the 2005-07-07
11450 patch.
11451
114522005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11453
11454 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11455 contains obsolete information and isn't worth distributing as a
11456 separate file anyway.
11457 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11458 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11459 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11460 (yyparse): Abort if user code uses longjmp to throw an unexpected
11461 value.
11462
114632005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11464
11465 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11466 Suggested by twlevo@xs4all.nl.
11467
11468 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11469 This avoids a diagnostic from gcc -Wswitch-enum.
11470 Problem reported by twlevo@xs4all.nl.
11471
11472 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11473 standards. Use "file name" or "file" or "name", depending on
11474 the context.
11475 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11476 not to hack/foo.tab.c.
11477 (Calc++ Top Level): 2nd arg of main is not const.
11478 * data/glr.c: b4_filename -> b4_file_name.
11479 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11480 All uses changed.
11481 (class position): filename -> file_name. All uses changed.
11482 * data/yacc.c: b4_filename -> b4_file_name.
11483 * lib/bitset.h: filename -> file_name in local vars.
11484 * lib/bitset_stats.c: Likewise.
11485 * src/files.c: Likewise.
11486 * src/scan-skel.l ("@output ".*\n): Likewise.
11487 * src/files.c (file_name_split): Renamed from filename_split.
11488 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11489
114902005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11491
11492 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11493 to accommodate latest gnulib.
11494
11495 * tests/glr-regression.at (Duplicate representation of merged trees):
11496 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11497
11498 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11499 needed.
11500
115012005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11502
11503 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11504 All uses changed. Invoke user destructor after an error during a
11505 split parse (trivial change from Joel E. Denny).
11506
11507 * tests/glr-regression.at
11508 (User destructor after an error during a split parse): New test case.
11509 Problem reported by Joel E. Denny in:
11510 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11511
115122005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11513
11514 * README-cvs: Give URLs for recommended tools.
11515 Mention Gzip version problem, and bootstrapping issues.
11516 Remove troubleshooting section, as it's somewhat obsolete.
11517
11518 * bootstrap (no_cache): New var, to accommodate different wget
11519 variants. Use it instead of '-C off'. Problem reported by
11520 twlevo@xs4all.nl.
11521
11522 * data/glr.c (yydestroyStackItem): New function.
11523 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11524 debugging information. Problem reported by Joel E. Denny.
11525
115262005-08-25 Akim Demaille <akim@epita.fr>
11527
11528 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11529
115302005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11531
11532 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11533 Don't invoke destructor on unresolved entries.
11534 * tests/glr-regression.at
11535 (User destructor for unresolved GLR semantic value): New test case.
11536 Problem reported by Joel E. Denny in:
11537 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11538
115392005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11540
11541 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11542 Add strnlen.c.
11543 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11544 lib-prefix.m4, po.m4.
11545
11546 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11547 in yydestruct diagnostic, since it might not be an error.
11548 Problem reported by Joel Denny near end of
11549 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11550 * data/lalr1.cc (yyerturn): Likewise.
11551 * data/yacc.c (yyreturn): Likewise.
11552 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11553
11554 * src/files.c: Remove obsolete FIXME comment.
11555
11556 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11557 with the other templates, and to fix bogus run-on messages such
11558 as the one reported at the end of
11559 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11560 All callers changed to avoid the newline.
11561 (yyprocessOneStack): Output two lines rather than one, to accommodate
11562 the above change. This changes the debug output format slightly.
11563
11564 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11565 reported by Joel E. Denny in
11566 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11567 (trivial change).
11568 * tests/glr-regression.at (Duplicate representation of merged trees):
11569 New test, from Joel E. Denny in:
11570 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11571 * THANKS: Add Joel E. Denny.
11572
11573 * configure.ac (AC_INIT): Bump to 2.0c.
11574
115752005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11576
11577 * NEWS: Version 2.0b.
11578
11579 * Makefile.am (SUBDIRS): Put examples before tests, so that
11580 "make check" doesn't finish with "All 1 tests passed".
11581
11582 * tests/regression.at (Token definitions): Don't rely on
11583 AT_PARSER_CHECK for data that contains backslashes. It currently
11584 uses 'echo', and 'echo' isn't portable if its argument contains
11585 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11586 that the byte '\0xff' is not printable in the C locale; it is,
11587 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11588 not printable, so use '\0x81' to test.
11589
11590 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11591 version of GCC, since the macro is used with non-GCC compilers.
11592
11593 Fix core dump reported by Pablo De Napoli in
11594 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11595 * tests/regression.at (Invalid inputs with {}): New test.
11596 * src/parse-gram.y (token_name): Translate type before using
11597 it as an index.
11598
11599 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11600 the user's name space. All uses changed to __attribute__
11601 ((__unused__)).
11602 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11603 Add __attribute__ ((__noreturn__)).
11604
11605 * etc/clcommit: Remove. We weren't using it, and it failed
11606 "make maintainer-distcheck".
11607 * Makefile.maint: Merge from coreutils.
11608 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11609 (syntax-check-rules): Change list of rules as described below.
11610 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11611 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11612 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11613 (sc_trailing_space): New rules.
11614 (sc_xalloc_h_in_src): Remove.
11615 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11616 (sc_space_tab, sc_error_exit_success, sc_changelog):
11617 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11618 (makefile-check, po-check, author_mark_check):
11619 (makefile_path_separator_check, copyright-check):
11620 Use grep -n, to make it easier to find violations.
11621 Use CVS_LIST and CVS_LIST_EXCEPT.
11622 (header_regexp, h_re): Remove.
11623 (dd_c): New macro.
11624 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11625 (my-distcheck): Use more-modern GCC flags.
11626 (signatures, %.asc): Remove.
11627 (rel-files, announcement): Remove signatures.
11628 Restore old updating code, even though we don't use it, so
11629 that we're the same as coreutils.
11630 (alpha, beta, major): Depend on news-date-check.
11631 Make the upload commands.
11632
11633 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11634 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11635 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11636 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11637 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11638 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11639 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11640 * tests/sets.at: Likewise.
11641
11642 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11643 we comment out the Autoconf version number.
11644 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11645 it's error-prone and "make maintainer-distcheck" rejects it.
11646
11647 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11648 Indent calls to "error" to pacify "make maintainer-distcheck",
11649 when the calls are not intended to be translated.
11650 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11651
11652 * src/Makefile.am (DEFS): Use +=, to pacify
11653 "make maintainer-distcheck".
11654 (bison_SOURCES): Add scan-skel.h.
11655 (sc_tight_scope): New rule, from coreutils.
11656
11657 * src/files.c (src_extension, header_extension):
11658 Now static, not extern.
11659 * src/getargs.c (short_options): Likewise.
11660 * src/muscle_tab.c (muscle_table): Likewise.
11661 * src/parse-gram.y (current_class, current_type, current_prec):
11662 Likewise.
11663 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11664 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11665 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11666 void, to avoid warning when NLS is disabled.
11667 * src/output.c: Include scan-skel.h.
11668 (scan_skel): Remove decl, since scan-skel.h does this.
11669 (output_skeleton):
11670 Indent calls to "error" to pacify "make maintainer-distcheck".
11671 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11672 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11673 "make maintainer-distcheck".
11674 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11675 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11676 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11677 (skel_lex_destroy, scan_skel): Move these decls to...
11678 * src/scan-skel.h: New file.
11679 * src/uniqstr.c (uniqstr_assert):
11680 Indent calls to "error" to pacify "make maintainer-distcheck".
11681
11682 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11683 not @VAR@.
11684
11685 * tests/torture.at: Revamp to avoid misuse of atoi that
11686 "make maintainer-distcheck" complained about.
11687
11688 * examples/extexi (message): Don't print a message more than once,
11689 and omit line-number decoration that makes Emacs compile think
11690 that informative messages are worth worrying about.
11691
116922005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11693
11694 * configure.ac: Update version number.
11695
11696 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11697 accidentally.
11698 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11699 autogenerated by the maintainer.
11700 * examples/calc++/.cvsignore: Add *.yy.
11701
11702 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11703 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11704 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11705
11706 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11707
11708 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11709 from maintainer-distcheck about casting the argument of 'free'.
11710
11711 * NEWS: Mention recent yytname changes.
11712 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11713
11714 * bootstrap: For translations that have not yet been upgraded to
11715 the new runtime-po domain, prime the pump by extracting the
11716 relevant strings from the obsolete translations. This code can be
11717 removed once the bison-runtime domain has been translated by each
11718 team.
11719
11720 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11721 now that token names are already quoted.
11722
11723 Fix problem reported by Anthony Heading.
11724 * data/glr.c (YYTOKEN_TABLE): New macro.
11725 (yytname): Define if YYTOKEN_TABLE.
11726 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11727 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11728 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11729 * src/output.c (prepare_symbols): Output token_table_flag.
11730
117312005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11732
11733 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11734 again if the first call fails.
11735
11736 * data/glr.c (yytnamerr): New function.
11737 (yyreportSyntaxError): Use it to dequote most string literals.
11738 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11739 with other skeletons. All uses changed.
11740 (yytnameerr_): New function.
11741 (yyreport_syntax_error): Use it to dequote most string literals.
11742 * data/yacc.c (yytnamerr): New function.
11743 (yyerrlab): Use it to decode most string literals.
11744 * doc/bison.texinfo (Decl Summary, Calling Convention):
11745 Clarify quoting convention of yytname.
11746 * src/output.c (prepare_symbols): Quote all names. This undoes
11747 the 2005-04-17 change, which is now accomplished (mostly) via
11748 changes in the parsers as described above.
11749 * tests/regression.at (Token definitions, Web2c Actions):
11750 Undo most 2005-04-17 change here, too.
11751
117522005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11753
11754 Fix more problems reported by twlevo@xs4all.nl.
11755 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11756 remove trailing spaces. This loses the exit status of ./types,
11757 and isn't needed since ./types shouldn't be emitting trailing
11758 spaces.
11759 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11760 as the stack isn't valid in that case.
11761
11762 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11763 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11764 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11765 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11766 is used.
11767 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11768 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11769 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11770 Likewise.
11771
11772 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11773 overly-picky compilers that reject 'char *foo = "bar";'.
11774
11775 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11776 to FILE * parameter, not to stderr. This fixes a typo introduced
11777 in the 2005-07-12 change.
11778
11779 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11780 warnings from GCC 4.
11781
11782 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11783 (yyglrShiftDefer, yysplitStack):
11784 Remove unused parameters b4_pure_formals. All uses changed.
11785 (yyglrShift): Remove unused parameters b4_user_formals.
11786 All uses changed.
11787 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11788
117892005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11790
11791 Destructor cleanups and regularization among the three skeletons.
11792 * NEWS: Document the behavior changes.
11793 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11794 stack before failing, as the cleanup code will do it for us now.
11795 * data/lalr1.cc (yyerrlab): Likewise.
11796 * data/glr.c (yyparse): Pop everything off the stack before
11797 freeing it, so that destructors get called properly.
11798 * data/lalr1.cc (yyreturn): Likewise.
11799 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11800 This is more consistent.
11801 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11802 why destructors might be called. 1.875 -> 2.1.
11803 (Destructor Decl, Decl Summary, Table of Symbols):
11804 Some English-language cleanups for %destructor.
11805 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11806 Add output line for destructor of start symbol.
11807 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11808 because of that same extra output line.
11809
11810 * NEWS: Document minor wording changes in diagnostics of
11811 Bison-generated parsers.
11812 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11813 Remove unused formals. All uses changed.
11814 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11815 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11816 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11817 Rename yyoverflowab to yyexhaustedlab.
11818 When memory exhaustion occurs during syntax-error reporting,
11819 report it separately rather than in a single diagnostic; this
11820 eases translation.
11821 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11822 (Memory Exhausted): Renamed from Parser Stack Overflow.
11823 Revamp wording slightly to prefer "memory exhaustion".
11824 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11825
11826 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11827
11828 Add i18n support to the GLR skeleton. Partially fix the C++
11829 skeleton; a C++ expert needs to finish this. Remove debugging
11830 msgids; there's little point to having them translated, since they
11831 can be understood only by someone who can read the
11832 (English-language) source code.
11833
11834 Generate runtime-po/bison-runtime.pot automatically, so that we
11835 don't have to worry about garbage getting in that file. We'll
11836 make sure after the next official release that old msgids don't
11837 get lost. See
11838 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11839
11840 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11841 Now auto-generated.
11842 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11843 Fix typos in explanations of the runtime file.
11844 * bootstrap: Change gettext keyword from YYI18N to YY_.
11845 Use standard Makefile.in.in in runtime-po, since we'll arrange
11846 for backward-compatible bison-runtime.po files in a different way.
11847 * data/glr.c (YY_): New macro, from yacc.c.
11848 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11849 Translate messages intended for users.
11850 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11851 the wording in the other skeletons. We don't know that the memory
11852 is virtual.
11853 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11854 Use same method that yacc.c uses.
11855 Don't translate debugging messages.
11856 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11857 it doesn't work (yet), and requires C++ expertise to fix.
11858 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11859 Move defn to a more logical place, to be consistent with other
11860 skeletons.
11861 Don't translate debugging messages.
11862 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11863 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11864 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11865 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11866
11867 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11868 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11869 void, not int.
11870 * tests/glr-regression.at (Badly Collapsed GLR States):
11871 Likewise.
11872 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11873 yylex should return 0 at EOF rather than aborting.
11874
11875 Improve tests for stack overflow in GLR parser.
11876 Problem reported by twlevo@xs4all.nl.
11877 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11878 All uses removed.
11879 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11880 can handle the problem.
11881 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11882 (yyparse): New local variable yyresult to record the result.
11883 Use result of setjmp to set it, rather than storing itinto
11884 struct.
11885 (yyDone): Remove label.
11886 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11887 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11888 if YYABORT is used).
11889 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11890 yyparse status; put status > 1 into diagnostic.
11891 Check that status==2 works.
11892 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11893 Use exit status 3 for failure to open (which shouldn't happen).
11894
118952005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11896
11897 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11898 1 on syntax error; just let yyparse do its thing.
11899 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11900 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11901 (Exploding the Stack Size with Alloca):
11902 (Exploding the Stack Size with Malloc):
11903 Expect exit status 2, not 1, since the parser is supposed to blow
11904 its stack. Problem reported by twlevo@xs4all.nl.
11905
11906 * data/glr.c (yyparse): Don't assume that the initial calls
11907 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11908 Print a stack-overflow message and fail instead.
11909 Initialize the line-number information before creating the stack,
11910 so that the stack-overflow message can report line zero safely.
11911
119122005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11913
11914 Fix problems reported by twlevo@xs4all.nl.
11915 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11916 (yyuserMerge): Provide a default case if b4_mergers is empty.
11917 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11918 * tests/glr-regression.at
11919 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11920 Add casts to pacify C++ compilers.
11921 * tests/glr-regression.at (Improper merging of GLR delayed action
11922 sets): Declare yylex before using it.
11923 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11924 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11925 test for valgrind; valgrind is independent of g++.
11926 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11927 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11928 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11929 Use a destructor, so that we can expand the stack. Change
11930 YYSTYPE to char * so that we can free it. Cast result of malloc.
11931
119322005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11933
11934 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11935 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11936
119372005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11938
11939 * PACKAGING: New file, suggested by Bruno Haible and taken from
11940 similar wording in gettext's PACKAGING file.
11941 * NEWS: Mention PACKAGING.
11942 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11943
119442005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11945
11946 * NEWS: Document recent i18n improvements.
11947 * bootstrap: Get runtime translations into runtime-po.
11948 Create runtime-po files automatically, if possible.
11949 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11950 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11951 does not infringe on the user's name space.
11952 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11953 * doc/bison.texinfo (Internationalization): Revamp the English
11954 and Texinfo syntax a bit, to try to make it clearer.
11955 (Bison Options, Option Cross Key): Mention --print-localedir.
11956 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11957 YYENABLE_NLS. Quote a bit more.
11958 * runtime-po/.cvsignore: New file.
11959 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11960 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11961 * runtime-po/quot.sed: Likewise.
11962 * runtime-po/boldquot.sed: Likewise.
11963 * runtime-po/en@quot.header: Likewise.
11964 * runtime-po/en@boldquot.header: Likewise.
11965 * runtime-po/insert-header.sin: Likewise.
11966 * runtime-po/remove-potcdate.sin: Likewise.
11967 * runtime-po/Makevars: Likewise.
11968 * runtime-po/LINGUAS: Likewise.
11969 * runtime-po/de.po: Likewise; we will rely on the translation project
11970 to maintain this, so "bootstrap" should get it.
11971 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11972 its value.
11973 * src/main.c (main): Bind the bison-runtime domain, too.
11974
119752005-07-12 Bruno Haible <bruno@clisp.org>
11976
11977 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11978 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11979 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11980 * runtime-po: New directory.
11981 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11982 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11983 * runtime-po/Rules-quot: New file, copied from po/.
11984 * runtime-po/quot.sed: Likewise.
11985 * runtime-po/boldquot.sed: Likewise.
11986 * runtime-po/en@quot.header: Likewise.
11987 * runtime-po/en@boldquot.header: Likewise.
11988 * runtime-po/insert-header.sin: Likewise.
11989 * runtime-po/remove-potcdate.sin: Likewise.
11990 * runtime-po/Makevars: New file.
11991 * runtime-po/POTFILES.in: New file.
11992 * runtime-po/LINGUAS: New file.
11993 * runtime-po/bison-runtime.pot: New file.
11994 * runtime-po/de.po: New file.
11995 * m4/bison.m4: New file.
11996 * Makefile.am (SUBDIRS): Add runtime-po.
11997 (aclocaldir, aclocal_DATA): New variables.
11998 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11999 Define aclocaldir.
12000 * src/getargs.c (usage): Document --print-localedir option.
12001 (PRINT_LOCALEDIR_OPTION): New enum item.
12002 (long_options): Add --print-localedir option.
12003 (getargs): Handle --print-localedir option.
12004 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12005 (Internationalization): New section.
12006
120072005-07-12 Akim Demaille <akim@epita.fr>
12008
12009 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12010 for consistency with the rest of the code.
12011 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12012 Add separators.
12013
120142005-07-12 Akim Demaille <akim@epita.fr>
12015
12016 * src/parse-gram.y: Use %printer instead of YYPRINT.
12017
120182005-07-12 Akim Demaille <akim@epita.fr>
12019
12020 * src/symtab.h, src/symtab.c (symbol_print): New.
12021 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12022 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12023
120242005-07-12 Akim Demaille <akim@epita.fr>
12025
12026 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12027 b4_at_dollar and b4_dollar_dollar.
12028
120292005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12030
12031 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12032 and Pennello's paper.
12033
120342005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12035
12036 * data/yacc.c (yyparse): Undo previous patch. Instead,
12037 set yylsp[0] and yyvsp[0] only if the initial action
12038 sets yylloc and yylval, respectively.
12039
12040 * data/yacc.c (yyparse): In the initial action, set
12041 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12042 This avoids the use of undefined variables if the initial
12043 action does not set yylloc and/or yylval.
12044
120452005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12046
12047 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12048 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12049 Remove from CVS. These files are automatically generated.
12050 * examples/extexi: Clarify that this file is now part of Bison,
12051 not GNU M4, and that it works with any POSIX-compatible Awk.
12052 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12053 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12054 so that we also get calc++-parser.yy. Geneate it.
12055 Use $(AWK), not gawk, since any conforming Awk will do.
12056 Put comment before action, since older 'make' can't handle comment
12057 in action.
12058 $(BUILT_SOURCES): List all built sources, not just some of them.
12059 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12060 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12061 $($(calc_sources_generated)): Remove unnecessary test for existence
12062 of target. (This had a shell syntax error anyway; a stray "x".)
12063 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12064 calc++-parser.yy.
12065 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12066
12067 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12068 implied by the other modules.
12069
120702005-07-06 Akim Demaille <akim@epita.fr>
12071
12072 Bind examples/calc++ to the package.
12073 * examples/calc++/Makefile: Remove, replaced by...
12074 * examples/calc++/Makefile.am: ... this new file.
12075 * examples/calc++/test: Remove input.
12076 * examples/calc++/compile: Remove.
12077 * examples/Makefile.am: New.
12078 * configure.ac, Makefile.am: Adjust.
12079 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12080
120812005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12082
12083 * data/glr.c (yyFail): Drastically simplify; since the format argument
12084 never had any % directives, we can simply pass it to yyerror.
12085 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12086 be modified later, as that is the usual style in glr.c.
12087 Problems reported by Paul Hilfinger.
12088
12089 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12090 and size overflow errors.
12091 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12092 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12093 (YYSIZEMAX): New macro.
12094 (yystpcpy): New function, taken from yacc.c.
12095 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12096 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12097 so that we don't have to maintain their signatures.
12098 (yyFail): Check for buffer overflow, by using vsnprintf rather
12099 than vsprintf. Allocate a bigger buffer if possible.
12100 Report an error if buffer allocation fails.
12101 (yyStackOverflow): New function.
12102 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12103 the initialization was successful. It might fail if storage was
12104 exhausted.
12105 (yyexpandGLRStack): Add more checks for storage allocation failure.
12106 Use yyStackOverflow to report failures.
12107 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12108 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12109 Don't assume stack number fits in int.
12110 (yysplitStack): Check for storage allocation failure.
12111 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12112 can print diagnostics on storage allocation failure. All callers
12113 changed.
12114 (yyresolveValue): Use yybool for boolean.
12115 (yyreportSyntaxError): Check for size-calculation overflow.
12116 This code is taken from yacc.c.
12117 (yyparse): Check for storage allocation errors when allocating
12118 the initial stack.
12119
121202005-07-05 Akim Demaille <akim@epita.fr>
12121
12122 Extract calc++ from the documentation.
12123 * doc/bison.texinfo (Calc++): Add the extraction marks.
12124 * examples/extexi: New, from the aborted GNU Programming 2E.
12125 Separate the different paragraph of a file with empty lines.
12126 * examples/Makefile: Use it to extract the whole calc++ example.
12127
121282005-06-24 Akim Demaille <akim@epita.fr>
12129
12130 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
12131 class typedefs.
12132
121332005-06-22 Akim Demaille <akim@epita.fr>
12134
12135 * doc/bison.texinfo (C++ Language Interface): First stab.
12136 (C++ Parsers): Remove.
12137
121382005-06-22 Akim Demaille <akim@epita.fr>
12139
12140 * data/lalr1.cc (yylex_): Honor %lex-param.
12141
121422005-06-22 Akim Demaille <akim@epita.fr>
12143
12144 Start a set of simple examples.
12145 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
12146 * examples/calc++/calc++-driver.hh,
12147 * examples/calc++/calc++-parser.yy,
12148 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
12149 * examples/calc++/compile, examples/calc++/test: New.
12150
121512005-06-09 Paul Eggert <eggert@cs.ucla.edu>
12152
12153 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
12154 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
12155 which stems from the 2005-05-27 patch.
12156
121572005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12158
12159 * data/glr.c: Modify treatment of unused parameters to permit use
12160 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
12161
121622005-05-30 Paul Eggert <eggert@cs.ucla.edu>
12163
12164 Fix infringement on user name space reported by Janos Zoltan Szabo.
12165 * data/yacc.c (yyparse): strlen -> yystrlen.
12166
121672005-05-30 Akim Demaille <akim@epita.fr>
12168
12169 * data/lalr1.cc (_): New.
12170 Translate the various messages.
12171
121722005-05-27 Paul Eggert <eggert@cs.ucla.edu>
12173
12174 Fix infringement on user name space reported by Bruno Haible.
12175 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
12176 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
12177 the user's name space.
12178 (alloca): Include <stdlib.h> to get it, if it's not built in.
12179 (YYMALLOC, YYFREE): Define only if needed.
12180 (malloc, free): Declare, but only if needed, as this infringes on
12181 the user name space.
12182
121832005-05-25 Paul Eggert <eggert@cs.ucla.edu>
12184
12185 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
12186 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
12187 with %d format.
12188 * lib/ebitset.c (min, max): Undef before defining.
12189 * lib/vbitset.c (min, max): Likewise.
12190 * lib/subpipe.c (create_subpipe): Save local variables in case
12191 vfork clobbers them.
12192
121932005-05-24 Bruno Haible <bruno@clisp.org>
12194
12195 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
12196 error message syntax used by gcc-4.0.
12197
121982005-05-23 Paul Eggert <eggert@cs.ucla.edu>
12199
12200 * README: Mention m4 1.4.3. Remove obsolete advice about
12201 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
12202
12203 * bootstrap: Remove workaround for problem I encountered with
12204 gettext 0.14.1; it seems to be fixed now.
12205
122062005-05-22 Paul Eggert <eggert@cs.ucla.edu>
12207
12208 * NEWS: Version 2.0a.
12209
12210 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
12211 the previous change.
12212
12213 Various maintainer cleanups.
12214 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
12215 conftest*, for benefit of CVS commands run at the same time as
12216 "configure". Add build-aux, since "bootstrap" now creates it and
12217 its subfiles.
12218 * Makefile.cfg (move_if_change): Remove.
12219 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
12220 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
12221 (po_repo, do-po-update, po-update, wget_files, get-targets):
12222 (config.guess-url_prefix, config.sub-url_prefix):
12223 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
12224 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
12225 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
12226 Remove.
12227 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
12228 this is now the recommended name.
12229 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
12230 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
12231 ylwrap. These files now go into build-aux.
12232 * config/move-if-change: Remove.
12233 * config/prev-version.txt: Bump from 1.75 to 2.0.
12234
12235 * bootstrap: Add stdio-safer, unistd-safer modules.
12236 Remove m4/glibc2.m4 (introduced by latest gnulib, but
12237 we don't need it).
12238 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
12239 fopen-safer.c, stdio-safer.h, unistd-safer.h.
12240 * lib/subpipe.c: Include "unistd-safer.h".
12241 (create_subpipe): Make sure all the newly-created
12242 file descriptors are > 2, so that diagnostics don't
12243 get sent down them (which might cause Bison to hang, in theory).
12244 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
12245 * src/files.c (xfopen): Use fopen_safer, not fopen.
12246
12247 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
12248 yesterday's yacc.c fix.
12249
122502005-05-21 Paul Eggert <eggert@cs.ucla.edu>
12251
12252 * data/glr.c, data/lalr1.cc: Update copyright date.
12253
12254 Fix a destructor bug reported by Wolfgang Spraul in
12255 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
12256 * data/yacc.c (yyabortlab): Don't call destructor, and
12257 don't set yychar to EMPTY.
12258 (yyoverflowlab): Don't call destructor.
12259 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
12260 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
12261 since we no longer output the message "discarding lookahead token
12262 end of input ()".
12263
122642005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12265
12266 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
12267 fix a small glitch in debugging output.
12268 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
12269 after YY_SYMBOL_PRINT where needed.
12270
12271 (struct yyGLRState): Add some comments.
12272 (struct yySemanticOption): Add some comments.
12273 (union yyGLRStackItem): Add comment.
12274
12275 (yymergeOptionSets): Correct this to properly perform the union,
12276 avoiding infinite reported by Michael Rosien.
12277 Update comment.
12278
12279 * tests/glr-regression.at: Add test for GLR merging error reported
12280 by M. Rosien.
12281
122822005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12283
12284 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
12285 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
12286 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
12287 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
12288 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
12289 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
12290 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
12291 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
12292 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
12293 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
12294 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
12295 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
12296 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
12297 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
12298 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
12299 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
12300 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
12301 src/derives.h, src/files.c, src/files.h, src/getargs.c,
12302 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
12303 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
12304 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
12305 src/output.h, src/parse-gram.c, src/parse-gram.h,
12306 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
12307 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
12308 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
12309 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
12310 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
12311 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
12312 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
12313 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
12314 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
12315 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
12316 tests/reduce.at, tests/regression.at, tests/sets.at,
12317 tests/synclines.at, tests/testsuite.at, tests/torture.at:
12318 Update FSF postal mail address.
12319
123202005-05-11 Paul Eggert <eggert@cs.ucla.edu>
12321
12322 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
12323 Problem reported by Ralf Menzel.
12324
123252005-05-01 Paul Eggert <eggert@cs.ucla.edu>
12326
12327 * tests/actions.at: Test that stack overflow invokes destructors.
12328 From Marcus Holland-Moritz.
12329 * data/yacc.c (yyerrlab): Move the code that destroys the stack
12330 from here....
12331 (yyreturn): to here. That way, destructors are called properly
12332 even if the stack overflows, or the user calls YYACCEPT or
12333 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
12334 (yyoverflowlab): Destroy the lookahead.
12335
123362005-04-24 Paul Eggert <eggert@cs.ucla.edu>
12337
12338 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
12339
123402005-04-17 Paul Eggert <eggert@cs.ucla.edu>
12341
12342 * NEWS: Bison-generated C parsers no longer quote literal strings
12343 associated with tokens.
12344 * src/output.c (prepare_symbols): Don't escape strings,
12345 since users don't want to see C escapes.
12346 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12347 in diagnostics.
12348 * tests/input.at (Torturing the Scanner): Likewise.
12349 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12350
123512005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12352
12353 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12354 the data size is known to be too small and we can't increase it.
12355 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12356
123572005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12358
12359 * src/parse-gram.y: Include quotearg.h.
12360 (string_as_id): Quote $1 before using it as a key, since the
12361 lexer no longer quotes it for us.
12362 (string_content): Don't strip quotes, since lexer no longer
12363 quotes it for us.
12364 * src/scan-gram.l: Include quotearg.h.
12365 ("\""): Omit quote.
12366 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12367 a key, since the rest of the lexer doesn't quote it.
12368 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12369 * tests/regression.at (Token definitions): Check for backslashes
12370 in token strings.
12371
12372 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12373 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12374 (yyparse): Revamp code to generate long syntax error message, to
12375 make it easier to translate, and to avoid problems with arithmetic
12376 overflow. Change "virtual memory" to "memory" in diagnostic, since
12377 we don't know whether the memory is virtual.
12378
123792005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12380
12381 * NEWS: Bison-generated C parsers now use the _ macro to
12382 translate strings.
12383 * data/yacc.c (_) [!defined _]: New macro.
12384 All English strings wrapped inside this macro.
12385 * doc/bison.texinfo (Bison Parser): Document _.
12386 * po/POTFILES.in: Include src/parse-gram.c, since it now
12387 includes translateable strings that parse-gram.y doesn't.
12388
123892005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12390
12391 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12392 reverting the 2004-10-11 change to this function.
12393 (symbol_check_alias_consistency): Don't call symbol_type_set
12394 if the type name is already correct.
12395 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12396
123972005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12398
12399 * tests/regression.at (Token definitions): Don't use a token named
12400 c, as that generates a "#define c ..." that runs afoul of buggy
12401 stdlib.h that uses the identifier c as a member of struct
12402 drand48_data. Problem reported by Horst Wente.
12403
124042005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12405
12406 * bootstrap: Change translation URL from
12407 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12408 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12409 redirection glitches. Problem reported by twlevo@xs4all.nl.
12410
124112005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12412
12413 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12414 after operands; POSIX says this isn't portable for the c99 command.
12415
124162005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12417
12418 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12419 immediately if a data overrun has occurred; this may help us track
12420 down what may be a spurious failure on MacOS.
12421
124222005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12423
12424 Respond to problems reported by twlevo@xs4all.nl.
12425
12426 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12427
12428 * src/vcg.h: Comment fix.
12429 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12430 (G_CMAX): Change to -1 instead of INT_MAX.
12431
12432 * data/yacc.c (yyparse): Omit spaces before #line.
12433
124342005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12435
12436 * src/tables.c (state_number_to_vector_number): Put it inside an
12437 "#if 0", since it's not currently used. Problem reported by
12438 Roland McGrath.
12439
124402005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12441
12442 * src/output.c (escaped_output): Renamed from
12443 escaped_file_name_output, since we now use it for symbol tags as
12444 well. All uses changed.
12445 (symbol_destructors_output, symbol_printers_output):
12446 Escape symbol tags too.
12447 Problem reported by Matyas Forstner in
12448 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12449
12450 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12451 not needed.
12452 * src/output.c (user_actions_output, token_definitions_output,
12453 symbol_destructors_output, symbol_printers_output): Likewise.
12454 * src/reader.c (prologue_augment): Likewise.
12455 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12456
12457 * src/vcg.c (output_edge): Don't quote linestyle arg.
12458 Problem reported by twlevo@xs4all.nl.
12459
124602005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12461
12462 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12463 example, reported by Derek M Jones. Also, make the example even
12464 more outrageous, to better illustrate how bad the problem is.
12465
124662005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12467
12468 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12469 putsym. Typo reported by Sebastian Piping.
12470
124712005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12472
12473 * doc/bison.texinfo (Language and Grammar): some -> same
12474 (Epilogue): int he -> in the
12475 Typos reported by Sebastian Piping via Justin Pence.
12476
124772005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12478
12479 * tests/glr-regression.at (Improper handling of embedded actions
12480 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12481 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12482 with dollar signs in test names.
12483 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12484 for a similar reason.
12485
124862005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12487
12488 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12489 wants to redefine G_VIEW.
12490
124912005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12492
12493 * src/vcg.c (get_view_str): Remove case for normal_view.
12494 Problem reported by twlevo@xs4all.nl.
12495
124962005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12497
12498 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12499 Problem reported by twlevo@xs4all.nl.
12500
12501 * doc/bison.texinfo: Change @dircategory from "GNU programming
12502 tools" to "Software development". Requested by Richard Stallman
12503 via Karl Berry.
12504
125052005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12506
12507 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12508 Problem reported by twlevo@xs4all.nl.
12509
125102005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12511
12512 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12513 keyword; it's not needed with modern compilers, and it doesn't
12514 affect correctness with older compilers. Suggested by
12515 twlevo@xs4all.nl.
12516
125172005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12518
12519 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12520 gcc -Wswitch-default.
12521 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12522 * data/yacc.c (yyparse): Likewise.
12523
125242005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12525
12526 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12527 already. Let config.h define any nonstandard values.
12528
125292005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12530
12531 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12532 for the benefit of slower hosts. Problem reported by
12533 Nelson H. F. Beebe.
12534
125352005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12536
12537 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12538 being defined and not used.
12539 * data/lalr1.cc (yyparse): Likewise.
12540 Use "if (false)" rather than "if (0)".
12541
125422005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12543
12544 * TODO: Mention that we should allow NUL bytes in tokens.
12545
125462005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12547
12548 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12549 Problem reported by Hans Aberg.
12550
125512005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12552
12553 * src/getargs.c (version): Happy new year; update overall
12554 program copyright date from 2004 to 2005.
12555
12556 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12557 Problem reported by Hans Aberg.
12558 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12559 (Output file names.): Add a test for the case when standard output
12560 is closed.
12561
125622004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12563
12564 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12565 to fix an oversight in the Bison 2.0 manual.
12566
125672004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12568
12569 * NEWS: Version 2.0. Reformat the existing news items since
12570 1.875, so that related items are grouped together.
12571 * configure.ac (AC_INIT): Bump version to 2.0.
12572 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12573
12574 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12575 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12576 otherwise, we're not testing alloca. Unfortunately there's no
12577 simple way to consult HAVE_ALLOCA here.
12578
12579 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12580 for yymsg, too.
12581
12582 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12583 hand. This avoids a warning about comparing int to size_t when
12584 GCC warnings are enabled.
12585
125862004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12587
12588 * NEWS: Bison-generated parsers no longer default to using the
12589 alloca function (when available) to extend the parser stack, due
12590 to widespread problems in unchecked stack-overflow detection.
12591 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12592 responsibility to set it to a positive value. This lets the user
12593 specify a value that is not a preprocessor constant.
12594 * data/yacc.c (YYMAXDEPTH): Likewise.
12595 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12596 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12597 to be a compile-time constant. However, explain the constraints on it.
12598 Also, explain the constraints on YYINITDEPTH.
12599 (Table of Symbols): Explain that alloca is no longer the default.
12600 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12601 to 1.
12602
12603 * doc/bison.texinfo (Location Default Action): Mention that n must
12604 be zero when k is zero. Suggested by Frank Heckenbach.
12605
126062004-12-22 Akim Demaille <akim@epita.fr>
12607
12608 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12609 (parser::state_type, parser::semantic_type, parser::location_type):
12610 Private, not public.
12611 (parser::parse): Return ints, not bool.
12612 Returning a bool introduces a problem: 0 corresponds to false, and
12613 it seems weird to return false on success. Returning true changes
12614 the conventions for yyparse.
12615 Alternatively we could return void and send an exception.
12616 There is no clear consensus (yet?).
12617 (state_stack, semantic_stack, location_stack): Rename as...
12618 (state_stack_type, semantic_stack_type, location_stack_type): these.
12619 Private, not public.
12620 * tests/c++.at: New.
12621 * tests/testsuite.at, tests/Makefile.am: Adjust.
12622
126232004-12-21 Akim Demaille <akim@epita.fr>
12624
12625 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12626
126272004-12-21 Akim Demaille <akim@epita.fr>
12628
12629 Don't impose std::string for filenames.
12630
12631 * data/lalr1.cc (b4_filename_type): New.
12632 (position::filename): Use it.
12633 (parser.hh): Move the inclusion of stack.hh and location.hh below
12634 the user code, so that needed headers for the filename type can be
12635 included first.
12636 Forward declare them before the user code.
12637 * tests/Makefile.am (check-local, installcheck-local): Pass
12638 TESTSUITEFLAGS to the TESTSUITE.
12639
126402004-12-20 Akim Demaille <akim@epita.fr>
12641
12642 Use more STL like names: my_class instead of MyClass.
12643
12644 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12645 (SemanticStack, SemanticType, StateStack, StateType)
12646 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12647 (Parser::value): Rename as...
12648 (location_stack, location_type, rhs_number_type, semantic_stack)
12649 (semantic_type, state_stack, state_type, token_number_type, stack)
12650 (slice, traits, parser::yylloc, parser::yylval): these.
12651
12652 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12653
126542004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12655
12656 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12657 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12658
126592004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12660
12661 Remove uses of 'short int' and 'unsigned short int'. This raises
12662 some arbitrary limits. It uses more memory but nowadays that's
12663 not much of an issue.
12664
12665 This change does not affect the generated parsers; that's a different
12666 task, as some users will want to conserve memory there.
12667
12668 Ideally we should use size_t to represent all object counts, and
12669 something like ptrdiff_t to represent signed differences of object
12670 counts; but that will require more code-cleanup than I have the
12671 time to do right now.
12672
12673 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12674 Use size_t, not int or short int, to count objects.
12675 * src/closure.c (nritemset, closure): Likewise.
12676 * src/closure.h (nritemset, closure): Likewise.
12677 * src/nullable.c (nullable_compute): Likewise.
12678 * src/print.c (print_core): Likewise.
12679 * src/print_graph.c (print_core): Likewise.
12680 * src/state.c (state_compare, state_hash): Likewise.
12681 * src/state.h (struct state): Likewise.
12682 * src/tables.c (default_goto, goto_actions): Likewise.
12683
12684 * src/gram.h (rule_number, rule): Use int, not short int.
12685 * src/output.c (prepare_rules): Likewise.
12686 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12687 errs, reductions): Likewise.
12688 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12689 Likewise.
12690 * src/tables.c (vector_number, tally, action_number,
12691 ACTION_NUMBER_MINIMUM): Likewise.
12692 * src/output.c (muscle_insert_short_int_table): Remove.
12693
126942004-12-17 Akim Demaille <akim@epita.fr>
12695
12696 * data/lalr1.cc: Extensive Doxygenation.
12697 (error_): Rename as...
12698 (error): this, since it is visible to the user.
12699 Adjust callers.
12700 (Parser::message): Now an automatic variable from...
12701 (Parser::yyreport_syntax_error_): here.
12702 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12703 Parser::error.
12704 * tests/input.at: Escape $.
12705
127062004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12707
12708 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12709 Parenthesize rhs to avoid obscure problems with mistakes like
12710 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12711 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12712 b4_rhs_location): Likewise.
12713 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12714 b4_rhs_location): Likewise.
12715
127162004-12-16 Akim Demaille <akim@epita.fr>
12717
12718 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12719 yacc.c: be sure to stay within yycheck_.
12720 * tests/actions.at: Re-enable C++ tests.
12721
127222004-12-16 Akim Demaille <akim@epita.fr>
12723
12724 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12725 real.
12726
127272004-12-16 Akim Demaille <akim@epita.fr>
12728
12729 Use #define to handle the %name-prefix.
12730
12731 * data/glr.c, data/yacc.c: Comment changes.
12732 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12733 so that one can refer to yylex in the parser file, and have it
12734 renamed, as is the case with other skeletons.
12735
127362004-12-16 Akim Demaille <akim@epita.fr>
12737
12738 Move lalr1.cc internals into yy*.
12739
12740 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12741 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12742 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12743 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12744 (empty_, final_, terror_, errcode_, ntokens_)
12745 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12746 (looka_, ilooka_, error_range_, nerrs_):
12747 Rename as...
12748 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12749 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12750 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12751 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12752 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12753 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12754 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12755 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12756 these.
12757
127582004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12759
12760 Fix some problems reported by twlevo at xs4all.
12761 * src/symtab.c (symbol_new): Report an error if the input grammar
12762 contains too many symbols. This is better than calling abort() later.
12763 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12764 (struct node, struct graph):
12765 Rename member expand to stretch. All uses changed.
12766 (struct graph): Remove member layoutalgorithm. All uses removed.
12767 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12768 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12769 All uses changed.
12770 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12771
127722004-12-15 Akim Demaille <akim@epita.fr>
12773
12774 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12775 Add more Doxygen comments.
12776 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12777 (report_syntax_error_, translate_): Rename as...
12778 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12779 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12780
127812004-12-15 Akim Demaille <akim@epita.fr>
12782
12783 * data/lalr1.cc (lex_): Rename as...
12784 (yylex_): this.
12785 Move the trace here.
12786 Take the %name-prefix into account.
12787 Reported by Alexandre Duret-Lutz.
12788
127892004-12-15 Akim Demaille <akim@epita.fr>
12790
12791 Simplify the C++ parser constructor.
12792
12793 * data/lalr1.cc (debug_): Rename as...
12794 (yydebug_): so that the parser's internals are always in the yy*
12795 pseudo namespace.
12796 Adjust uses.
12797 (b4_parse_param_decl): Remove the leading comma as it is now only
12798 called as unique argument list.
12799 (Parser::Parser): Remove the constructor accepting a location and
12800 an initial debugging level.
12801 Remove from the other ctor the argument for the debugging level.
12802 (debug_level_type, debug_level, set_debug_level): New.
12803
12804 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12805 constructor calls.
12806
128072004-12-15 Akim Demaille <akim@epita.fr>
12808
12809 Remove b4_root related material: failure experiment
12810 (which goal was to allow to derive from a class).
12811
12812 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12813 definitions and uses.
12814
128152004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12816
12817 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12818 not 2, since it's not portable to subtract 1 from the start of an
12819 array. The new item 0 is never set or used. All uses changed.
12820
12821 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12822 the default definition of YYLLOC_DEFAULT. Problem reported
12823 by Frank Heckenbach.
12824
128252004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12826
12827 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12828 the normal case and one for the error case. Just use the
12829 first one uniformly. Problem reported by Frank Heckenbach.
12830 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12831 use exactly the same macro in both places.
12832 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12833 so that the normal-case YYRHSLOC works for the error case too.
12834 All uses changed.
12835 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12836 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12837 * doc/bison.texinfo (Location Default Action): Don't claim that
12838 we have an array of locations. Use the same macro for both glr
12839 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12840 the index is 0.
12841
128422004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12843
12844 * HACKING: Update email addresses to send announcements to.
12845
12846 * configure.ac (AC_INIT): Bump version to 1.875f.
12847
128482004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12849
12850 * NEWS: Version 1.875e.
12851 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12852
12853 * src/scan-skel.l: Include "complain.h", for "fatal".
12854
12855 * src/relation.h (relation_print, relation_digraph):
12856 Relation sizes are of type relation_node, not size_t (this is
12857 merely a doc fix, since the two types are equivalent).
12858 (relation_transpose): Relation sizes are of type relation_node,
12859 not int.
12860 * src/relation.c: Likewise.
12861 (top, infinity): Now of type relation_node, not int.
12862 (traverse, relation_transpose): Use relation_node, not int.
12863
12864 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12865 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12866 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12867
12868 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12869 specifying whether the test should be skipped. Use it tp
12870 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12871 fail on some hosts, and should be skipped.
12872
128732004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12874
12875 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12876 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12877 unless otherwise specified below.
12878
12879 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12880 to allocate kernel_base, kernel_items, kernel_size, since
12881 they needn't be initialized to 0.
12882 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12883 * src/closure.c (new_closure): Likewise, for itemset.
12884 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12885 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12886 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12887 (build_relations): Likewise for edge, states1, includes.
12888 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12889 * src/reader.c (packgram): Likewise, for ritem, rules.
12890 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12891 * src/relation.c (relation_digraph): Likewise for VERTICES.
12892 (relation_transpose): Likewise for new_R, end_R.
12893 * src/symtab.c (symbols_token_translations_init): Likewise for
12894 token_translations.
12895 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12896 (token_actions): Likewise for yydefact, actrow, conflrow,
12897 conflict_list.
12898 (save_column): Likewise for froms[symno], tos[symno].
12899 (goto_actions): Likewise for state_count.
12900 (pack_table): Likewise for base, pos, check.
12901 (tables_generate): Likewise for width.
12902
12903 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12904 for initial core. Just have a separate core, so we needn't worry
12905 about whether kernel_size and kernel_base are initialized.
12906
12907 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12908 kernel_size, kernel_items): Remove unnecessary initialization.
12909 * src/conflicts.c (conflicts): Likewise.
12910 * src/derives.c (derives): Likewise.
12911 * src/muscle_tablc (muscle_insert): Likewise.
12912 * src/relation.c (relation_digraph): Likewise.
12913 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12914 conflrow, conflict_table, conflict_list, table, check):
12915 Likewise.
12916
12917 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12918 This is because all callers pass unsigned int.
12919 * src/closure.h (new_closure): Likewise.
12920
12921 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12922 (build_relations): Initialize includes[i] in all cases.
12923 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12924 and rules[ruleno].precsym. Initialize members in order.
12925 * src/relation.c (relation_transpose): Always initialize new_R[i]
12926 and end_R[i].
12927 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12928
12929 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12930 conflict_list[0] was always 0, but now it isn't initialized.
12931
12932 * src/table.c (table_grow): When conflict_table grew, the grown
12933 area wasn't cleared. Fix this.
12934
12935 * lib/.cvsignore: Add strdup.c, strdup.h.
12936 * m4/.cvsignore: Add strdup.m4.
12937
129382004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12939
12940 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12941 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12942 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12943 ngotos + 1 without checking for overflow.
12944 (build_relations): Use END_NODE, not -1, to denote end of edges.
12945 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12946 build_relations): Use goto_number, not int, for goto numbers.
12947 * src/tables.c (save_column, default_goto): Likewise.
12948
129492004-11-23 Akim Demaille <akim@epita.fr>
12950
12951 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12952 of #defining from yystype.
12953 Don't typedef yystype, C++ does not need it.
12954 This lets it possible to forward declare it as union.
12955
129562004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12957
12958 * bootstrap (gnulib_modules): Add extensions.
12959 Problem reported by Jim Meyering.
12960
129612004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12962
12963 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12964 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12965 src/system.h, src/tables.c: XFREE -> free, to accommodate
12966 recent change to gnulib xalloc.h.
12967 Problem reported by Jim Meyering.
12968
129692004-11-17 Akim Demaille <akim@epita.fr>
12970
12971 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12972
129732004-11-17 Akim Demaille <akim@epita.fr>,
12974 Alexandre Duret-Lutz <adl@gnu.org>
12975
12976 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12977 changes.
12978 (YYCDEBUG): Adjust.
12979 Use it instead of cdebug_.
12980 (Parser::debug_stream, Parser::set_debug_stream): New.
12981 (Parser::symprint_): Define cdebug_ for temporary backward
12982 compatibility.
12983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12984 debug_stream ().
12985
129862004-11-17 Akim Demaille <akim@epita.fr>
12987
12988 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12989 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12990 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12991 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12992
129932004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12994
12995 * data/glr.c (yyloc_default): Remove; not used.
12996 Problem reported by Frank Heckenbach.
12997
129982004-10-25 Akim Demaille <akim@epita.fr>
12999
13000 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13001 Introduce another definition to address simple location arrays.
13002 (yyGLRStack): New member: yyerror_range.
13003 (yyrecoverSyntaxError, yyparse): Update it.
13004 (yyrecoverSyntaxError): Use it when shifting the error token to
13005 have an accurate range, equivalent to the one computed by both
13006 yacc.c and lalr1.cc.
13007 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13008 that column numbers start at column 0, as per GNU Coding
13009 Standards, the others tests, and the doc.
13010 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13011 Adjust to the above change (first column is 0).
13012 And adjust the location of the "<error>", now covering the whole
13013 line.
13014
130152004-10-22 Akim Demaille <akim@epita.fr>
13016 and Paul Eggert <eggert@cs.ucla.edu>
13017
13018 Remove some arbitrary limits on goto numbers and relations.
13019 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13020 initial values, since they're never used.
13021 (set_goto_map): ngotos is now unsigned, so test for overflow
13022 by seeing whether it wraps around to zero.
13023 * src/lalr.h (goto_number): Now size_t, not short int.
13024 (GOTO_NUMBER_MAXIMUM): Remove.
13025 * src/relation.c (relation_print, traverse, relation_transpose):
13026 Check for END_NODE rather than looking at sign.
13027 * src/relation.h (END_NODE): New macro.
13028 (relation_node): Now size_t, not short int.
13029
130302004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13031
13032 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13033 keyword, not an identifier. Problem reported by Baron Schwartz in
13034 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13035
130362004-10-11 Akim Demaille <akim@epita.fr>
13037
13038 * src/symtab.c (symbol_check_alias_consistency): Also check
13039 type names, destructors, and printers.
13040 Reported by Alexandre Duret-Lutz.
13041 Recode the handling of associativity and precedence in terms
13042 of symbol_precedence_set.
13043 Accept no redeclaration at all, not even equal to the previous
13044 value.
13045 (redeclaration): New.
13046 Use it to factor redeclaration complaints.
13047 (symbol_make_alias): Don't set the type of the alias, let
13048 symbol_check_alias_consistency do it as for other features.
13049 * src/symtab.h (symbol): Add new member prec_location, and
13050 type_location.
13051 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13052 * tests/input.at (Incompatible Aliases): New.
13053
130542004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 .cvsignore fixes to accommodate gnulib changes,
13057 and the practice of naming build directories "_build".
13058 * .cvsignore: Add "_*". Sort.
13059 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13060 * m4/.cvsignore: Add "*_gl.m4".
13061
130622004-10-06 Akim Demaille <akim@epita.fr>
13063
13064 * src/parse-gram.y (add_param): Fix the truncation of trailing
13065 spaces.
13066
130672004-10-05 Akim Demaille <akim@epita.fr>
13068
13069 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13070 whether the reducion was empty or not. This leaves room to
13071 improve the use of YYLLOC_DEFAULT in such a case.
13072 lalr1.cc is still experimental, so changing this is acceptable.
13073 And finally, there are probably not many users who changed the
13074 handling of locations in GLR, so changing is admissible too.
13075
13076 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13077 empty reduction, set @$ to an empty location ending the previously
13078 stacked symbol.
13079 Adjust uses to make sure the code is triggered on empty
13080 reductions.
13081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13082 expected output: empty reductions have empty locations.
13083
130842004-09-29 Akim Demaille <akim@epita.fr>
13085
13086 * data/lalr1.cc: Move towards a more standard C++ coding style
13087 for templates: Class < T > -> Class<T>.
13088
130892004-09-29 Akim Demaille <akim@epita.fr>
13090
13091 * data/lalr1.cc: Reinstall the former ctor, for sake of
13092 compatibility, but warn it will be removed.
13093 Move towards a more standard C++ coding style (i.e., type *var ->
13094 type* var).
13095
130962004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13097
13098 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13099 since it's less likely to work if NULs are involved in the future.
13100
131012004-09-27 Akim Demaille <akim@epita.fr>
13102
13103 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13104
131052004-09-27 Akim Demaille <akim@epita.fr>
13106
13107 * data/lalr1.cc (b4_parse_param_decl_1): New.
13108 (b4_parse_param_decl): Use it to have different names between attribute
13109 and argument names.
13110 (b4_cc_constructor_call): Likewise.
13111
131122004-09-24 Akim Demaille <akim@epita.fr>
13113
13114 * src/parse-gram.y (add_param): Strip the leading and trailing
13115 blanks from a formal argument declaration.
13116 (YY_LOCATION_PRINT): New.
13117
131182004-09-24 Akim Demaille <akim@epita.fr>
13119
13120 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13121 after the location.
13122
131232004-09-24 Akim Demaille <akim@epita.fr>
13124
13125 * doc/bison.texinfo (Table of Symbols): Sort.
13126
131272004-09-21 Akim Demaille <akim@epita.fr>
13128
13129 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
13130 the useless parentheses.
13131 Suggested by Paul Eggert.
13132
131332004-09-20 Akim Demaille <akim@epita.fr>
13134
13135 Let the initial-action act on the look-ahead, and use it for the
13136 "initial push" (corresponding to an hypothetical beginning-of-file).
13137 And let lalr1.cc honor %initial-action.
13138
13139 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
13140 example.
13141 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
13142 (Parser::Parser): Remove the ctor that used to initialize it.
13143 (Parser::parse): Like in the other skeletons, issue the "starting
13144 parse" message before any action.
13145 Honor %initial-action.
13146 Initialize the stacks with the lookahead.
13147 * data/yacc.c: Let $$ and @$ in %initial-action designate the
13148 look-ahead.
13149 Push them in the stacks.
13150 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
13151
131522004-09-20 Akim Demaille <akim@epita.fr>
13153
13154 * doc/bison.texinfo (Initial Action Decl): New.
13155
131562004-09-20 Akim Demaille <akim@epita.fr>
13157
13158 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
13159 clearer criterion to define it.
13160 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
13161 When reducing on an empty RHS, use the latest stacked location as
13162 location.
13163 yylloc is not always available.
13164 * data/glr.c: Likewise.
13165 Also, honor initial-actions.
13166
131672004-09-20 Akim Demaille <akim@epita.fr>
13168
13169 * data/yacc.c (YY_LOCATION_PRINT): New.
13170 Define when we know YYLTYPE's structure, i.e., when the default
13171 YYLLOC_DEFAULT is used.
13172 * data/c.m4 (b4_yysymprint_generate): Use it.
13173 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
13174 value of the result.
13175 (error_start_): Replace with...
13176 (error_range_): this location array.
13177 This allows to replace code relying on the implementation of
13178 locations by portable code.
13179 * data/yacc.c (yylerrsp): Replace with...
13180 (yyerror_range): this.
13181 Every time a token is popped, update yyerror_range[0], to have an
13182 accurate location for the error token.
13183 * data/glr.c (YY_LOCATION_PRINT): New.
13184 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
13185 deference a pointer.
13186 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
13187 report the location in %printers.
13188
13189 * src/scan-skel.l: Instead of abort, report error messages to ease
13190 understanding skeleton scanning failures.
13191
131922004-09-16 Akim Demaille <akim@epita.fr>
13193
13194 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
13195 (iterator, const_iterator): these, to be more in the C++ spirit.
13196 Also, return reverse iterators so that when displaying the stack
13197 we display its bottom first.
13198 (Parser::stack_print_, Parser::reduce_print_): Match the messages
13199 from yacc.c.
13200 We should probably use vector here though.
13201
132022004-09-16 Akim Demaille <akim@epita.fr>
13203
13204 Have more complete shift traces.
13205
13206 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
13207 to report Shifts instead of ad hoc YYDPRINTF invocations,
13208 including for the error token.
13209 * data/lalr1.cc (symprint_): Output the location.
13210 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
13211 output the location within the %printer.
13212 Activate GLR tests, at least to make sure they compile properly.
13213 They still don't pass though.
13214 * tests/calc.at: Adjust expect verbose output, since now "Entering
13215 state..." is on a different line than the "Shifting" message.
13216
132172004-09-08 Akim Demaille <akim@epita.fr>
13218
13219 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
13220 Bison directive from the Bison file to the invocation of this
13221 macro, so that these directives are passed to
13222 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
13223 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
13224 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
13225 the extra Bison directives instead of the whole series.
13226 Change the grammar so that there are recoverable errors, and
13227 unrecoverable errors. Now we can have the parser give up before
13228 consuming the whole input. As a result we now can observe that
13229 the lookahead is freed when needed.
13230 Change the parser source to parse argv[1] instead of a hard coded
13231 string.
13232 Simplify yylex, and give a value and location to EOF.
13233 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
13234 passed directives already coded in the file.
13235 Add some tests to check the location of "error".
13236 For some tests, the C++ parser is correct, and not yacc.c.
13237 For other tests, they provide different, but unsatisfying, values,
13238 so keep the C++ value so that at least one parser is "correct"
13239 according to the test suite.
13240 (Actions after errors): Remove, this is subsumed by the
13241 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
13242
132432004-09-06 Akim Demaille <akim@epita.fr>
13244
13245 * data/lalr1.cc: Adjust the indentation of the labels.
13246 (Parser::pop): New.
13247 Use it.
13248
132492004-09-06 Akim Demaille <akim@epita.fr>
13250
13251 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
13252 argument, an informative message.
13253 Call YY_SYMBOL_PRINT.
13254 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
13255 * data/lalr1.cc (destruct_): Likewise.
13256 In addition, no longer depend on b4_yysymprint_generate and
13257 b4_yydestruct_generate to generate these functions, do it "by
13258 hand".
13259
132602004-09-03 Akim Demaille <akim@epita.fr>
13261
13262 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
13263 invoked, yydestruct the lookahead.
13264 * tests/calc.at (Calculator $1): Update the expected lengths of
13265 traces: there is an added line for the discarded lookahead.
13266 * doc/bison.texinfo (Destructor Decl): Some rewording.
13267 Define "discarded" symbols.
13268
132692004-09-02 Akim Demaille <akim@epita.fr>
13270
13271 * data/lalr1.cc (translate_, destruct_): No reason to be static.
13272
132732004-09-02 Akim Demaille <akim@epita.fr>
13274
13275 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
13276 (YYDSYMPRINTF): Rename as...
13277 (YY_SYMBOL_PRINT): this.
13278 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
13279 two.
13280 Use it instead of direct symprint_ calls.
13281 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
13282 one.
13283
132842004-09-02 Akim Demaille <akim@epita.fr>
13285
13286 * data/lalr1.cc (b4_yysymprint_generate): New.
13287 (symprint_): New member function, defined when YYDEBUG.
13288 Use it consistently instead of token/nterm debugging output by
13289 hand.
13290 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
13291 %printer calls to use cdebug_ when using lalr1.cc.
13292
132932004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
13294
13295 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
13296 with #ifdef YYDEBUG.
13297
132982004-08-26 Akim Demaille <akim@epita.fr>
13299
13300 * doc/bison.texinfo (Implementing Loops): Rename as...
13301 (Implementing Gotos/Loops): this.
13302
133032004-08-13 Paul Eggert <eggert@cs.ucla.edu>
13304
13305 Adjust to latest gnulib.
13306 * bootstrap (gnulib_modules): Add xalloc-die.
13307 Set LC_ALL=C so that file names sort consistently.
13308 Prefer the gnulib copies of gettext.m4, glibc21.m4,
13309 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
13310 uintmax_t.m4, ulonglong.m4.
13311 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
13312 po.m4 since we are now using _gl.m4 instead.
13313
133142004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
13315
13316 * src/scan-action.l: Remove. Scanning of semantic actions is
13317 handled in scan-gram.l.
13318
133192004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
13320
13321 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
13322
13323 * src/location.h (struct): The file member is a uniqstr.
13324 (equal_boundaries): Use UNIQSTR_EQ for comparison.
13325
133262004-07-22 Paul Eggert <eggert@cs.ucla.edu>
13327
13328 Fix bug with non-%union parsers that have printers or destructors,
13329 which led to a Bison core dump. Reported by Peter Fales in
13330 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
13331
13332 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
13333 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
13334 not to our own type.
13335 * src/output.c (symbol_destructors_output, symbol_printers_output):
13336 Don't assume %union.
13337 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
13338 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
13339 UNION-FLAG. All callers changed.
13340 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
13341 Use type char, not unsigned int, when declaring an array of char;
13342 this lets us remove a cast.
13343 (Printers and Destructors): Add non-%union test cases.
13344
133452004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13346
13347 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13348 GLR writeups. E.g., avoid frenchspacing and the future tense,
13349 change "lookahead" to "look-ahead", and change "wrt" to "with
13350 respect to".
13351
133522004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13353
13354 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13355 New sections, split off from the GLR Parsers section. Put the new
13356 Simple GLR Parser near the start of the GLR section, for clarity.
13357 Rewrite connective text.
13358
133592004-06-21 Frank Heckenbach <frank@g-n-u.de>
13360
13361 * doc/bison.texinfo (Simple GLR Parsers): New section.
13362
133632004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13364
13365 * NEWS, TODO, doc/bison.texinfo:
13366 Use "look-ahead" instead of "lookahead", to be consistent.
13367 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13368 while we're fixing "look-ahead".
13369 * src/conflicts.c (shift_set): Renamed from shiftset.
13370 (look_ahead_set): Renamed from lookaheadset.
13371 * src/print.c: Likewise.
13372 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13373 name for "lookahead".
13374 (report_types, usage): Likewise.
13375 * src/getargs.h (report_look_ahead_tokens): Renamed from
13376 report_lookaheads.
13377 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13378 compute_lookaheads.
13379 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13380 (look_ahead_tokens_print): Renamed from lookaheads_print.
13381 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13382 state_rule_lookaheads_print.
13383 * src/state.h: Likewise.
13384 (reductions.look_ahead_tokens): Renamed from lookaheads.
13385 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13386 AT_DATA_LOOKAHEADS_GRAMMAR.
13387
133882004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13389
13390 * README: Update location of patched M4 distribution.
13391
133922004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13393
13394 Don't assume the C++ compiler takes the same arguments as the C compiler
13395 (trivial change).
13396 * configure.ac (O0CXXFLAGS): New var.
13397 * tests/atlocal.in (CXXFLAGS): Use it.
13398
133992004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13400
13401 Fix some "make check" problems with C++ reported by
13402 Albert Chin-A-Young for Tru64 C++ in this thread:
13403 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13404
13405 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13407 Output to a .cc file for C++, not to a .c file.
13408 * tests/calc.at (AT_CHECK_CALC): Likewise.
13409 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13410 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13411
134122004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13413
13414 * tests/calc.at, tests/actions.at: Workaround for SGI
13415 C++ compiler. (trivial change)
13416
134172004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13418
13419 Spent a few hours checking out which prerequisite versions the
13420 current sources actually require. I went all the way back to
13421 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13422 a seemingly endless set of combinations of versions more recent
13423 than that. The bottom line is that the current sources require
13424 fairly recent versions of the build tools, and it'll be some work
13425 to change this.
13426 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13427 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13428 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13429 Add comments explaining why those particular versions are
13430 currently needed.
13431
13432 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13433 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13434 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13435
13436 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13437 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13438
134392004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13440
13441 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13442 0.11.5. Suggested by Bruno Haible.
13443 * bootstrap: Remove gettext version checking.
13444
13445 * doc/bison.texinfo (Decl Summary): Also mention that %union
13446 can depend on prerequisite types. Problem reported by Tim
13447 Van Holder.
13448
134492004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13450
13451 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13452 * README-alpha: Don't tell people not to package this.
13453
13454 * bootstrap: Don't assume $(...) works; use `...` instead.
13455 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13456 gettext better.
13457
13458 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13459 put into the -d output file, and mention what to do if YYSTYPE is
13460 defined as a macro.
13461
134622004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13463
13464 Undo change made earlier today: it caused autopoint to not bring
13465 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13466 autopoint's.
13467
13468 * bootstrap: Check that gettext version matches what's in
13469 configure.ac. Warn users to ignore robots.txt ERROR 404.
13470 * bootstrap: Undo today's earlier change (logged below).
13471 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13472
13473 The gettext version checking is causing more trouble than it's
13474 curing; remove it. Problem reported by Paul Hilfinger.
13475
13476 * bootstrap: Issue a warning that one can expect a message
13477 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13478 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13479
134802004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13481
13482 Ensure that the C++ compiler used for testing actually works on a
13483 simple test program; if not, skip the C++-related tests. Problem
13484 reported by Vin Shelton in:
13485 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13486
13487 * m4/cxx.m4: New file.
13488 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13489 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13490 * tests/local.at (AT_COMPILE_CXX): Use it.
13491
134922004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13493
13494 * data/glr.c (yylloc): Output this macro even if locations are not
13495 being generated, as the GLR parser needs it even in that case.
13496 Problem reported by Troy A. Johnson
13497 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13498
13499 * configure.ac (AC_INIT): Update to 1.875e.
13500
135012004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13502
13503 * NEWS: Version 1.875d.
13504 * configure.ac (AC_INIT): Likewise.
13505 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13506
13507 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13508 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13509 lalr1.cc runs afoul of the first, and the last two are no longer
13510 supported by GCC 3.4.0.
13511 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13512 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13513
135142004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13515
13516 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13517 unsigned int, for compatibility with latest gnulib hash module.
13518 * src/state.c (state_hash, state_hasher): Likewise.
13519 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13520 * src/uniqstr.c (hash_uniqstr): Likewise.
13521
135222004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13523
13524 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13525
13526 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13527 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13528 character and string literals.
13529 (unexpected_end): New function.
13530 (unexpected_eof): Use it.
13531 (unexpected_newline): New function.
13532 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13533 actions.
13534
13535 * NEWS: Document %expect-rr.
13536
13537 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13538 Fix typo by replacing $1 with $option.
13539 Remove more 'intl'-related files.
13540 Don't DEFUN AM_INTL_SUBDIR twice.
13541
13542 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13543 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13544 strtoul.c.
13545 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13546 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13547 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13548 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13549 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13550 * src/.cvsignore: Add *.output.
13551
13552 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13553 gets copied to the output file.
13554
135552004-04-28 Paul Eggert <eggert@twinsun.com>
13556
13557 Get files from the gnulib and po repositories, instead of relying
13558 on them being in our CVS. Upgrade to latest versions of gnulib
13559 and Automake.
13560
13561 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13562 * bootstrap: Bootstrap from gnulib and po repositories.
13563 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13564 * README-cvs: Document these changes. Remove version numbers from
13565 mentions of build tools, since they change so often. Mention Flex.
13566
13567 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13568 (gl_USE_SYSTEM_EXTENSIONS): Add.
13569 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13570 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13571 does this for us.
13572 (AC_ISC_POSIX): Remove; we no longer support this
13573 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13574 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13575 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13576 Do not check for C89 headers, except for locale.h which is used
13577 by the Yacc library and must port to K&R hosts.
13578 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13579 Do not check for C89 functions, except for setlocale which is
13580 used by the Yacc library.
13581 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13582 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13583 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13584 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13585 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13586 AM_GNU_GETTEXT): Remove; now done by:
13587 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13588 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13589 for us.
13590
13591 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13592 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13593 Define to empty, as gnulib.mk will do the rest for us.
13594 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13595 for us.
13596 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13597 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13598
13599 * src/files.c: Include gnulib's xstrndup.h.
13600
13601 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13602 (REALLOC): Use xnrealloc, for likewise.
13603 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13604 (strnlen, memrchr): Remove decls; functions no longer used.
13605 Include <stpcpy.h>.
13606
13607 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13608 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13609 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13610 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13611 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13612 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13613 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13614 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13615 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13616 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13617 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13618 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13619 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13620 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13621 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13622 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13623 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13624 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13625 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13626 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13627 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13628 Remove, as these files are now generated automatically
13629 by bootstrap or automake.
13630
13631 * po/ChangeLog: Remove: all but one entry was a duplicate
13632 of this file, and I moved that 2000-11-02 entry here.
13633
13634 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13635 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13636 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13637 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13638 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13639 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13640 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13641 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13642 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13643 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13644 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13645 xstrndup.h.
13646 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13647 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13648 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13649 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13650 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13651 * src/.cvsignore: Remove *_.c.
13652
13653
13654 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13655 support it. (The latest stable gzip doesn't.)
13656
136572004-04-27 Paul Eggert <eggert@twinsun.com>
13658
13659 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13660 case, as stos_ is now used by destructors due to the 2004-02-09
13661 change.
13662
13663 Remove more K&R C support.
13664 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13665 * lib/subpipe.c (errno): Remove decl.
13666 Include <stdlib.h> unconditionally.
13667 (EXIT_FAILURE): Remove macro.
13668 * src/complain.c (vfprintf, strerror): Remove.
13669 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13670 unconditionally.
13671 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13672 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13673 (strchr, strspn, memchr): Remove decls.
13674 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13675 unconditionally. Do not declare perror.
13676 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13677 unconditionally.
13678
13679 * src/complain.c (_): Remove useless defn, as system.h defines this.
13680
13681 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13682 with latest obstack.h.
13683 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13684 to procedure types, as obstack.h now does that for us.
13685 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13686
13687 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13688 so that this include file can stand alone.
13689 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13690 does this now. Include subpipe.h first after config.h, to
13691 test whether it can stand alone.
13692
13693 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13694 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13695 unused declaration.
13696
13697 * tests/synclines.at (%union synch line): Put a dummy member in
13698 the union, because empty unions aren't allowed in C. Caught
13699 by GCC 3.4.0.
13700
137012004-04-13 Jim Meyering <jim@meyering.net>
13702
13703 * src/conflicts.c (conflicts_print): Correct format string typo:
13704 use `%%' to produce literal `%'. (trivial change)
13705
137062004-03-30 Paul Eggert <eggert@twinsun.com>
13707
13708 * src/getargs.c (version): Update copyright year to 2004.
13709
13710 * data/c.m4 (b4_int_type): Use 'short int' rather than
13711 'short', and similarly for 'long', 'unsigned', etc.
13712 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13713 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13714 yy_yypstack, yydumpstack): Likewise.
13715 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13716 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13717 Likewise.
13718 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13719 yy_stack_print, yyparse): Likewise.
13720 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13721 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13722 * lib/bitset.c (bitset_print): Likewise.
13723 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13724 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13725 * lib/bitsetv.c (bitsetv_dump): Likewise.
13726 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13727 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13728 Likewise.
13729 * src/LR0.c (allocate_itemsets): Likewise.
13730 * src/gram.h (rule_number, rule): Likewise.
13731 * src/lalr.h (goto_number): Likewise.
13732 * src/nullable.c (nullable_compute): Likewise.
13733 * src/output.c (prepare_rules): Likewise.
13734 * src/relation.c (relation_print, relation_digraph): Likewise.
13735 * src/relation.h (relation_node): Likewise.
13736 * src/state.h (state_number, transitions, errs, reductions,
13737 struct state): Likewise.
13738 * src/symtab.h (symbol_number, struct symbol): Likewise.
13739 * src/tables.c (vector_number, tally, action_number,
13740 default_goto, goto_actions): Likewise.
13741 * tests/existing.at (GNU Cim Grammar): Likewise.
13742 * tests/regression.at (Web2c Actions): Likewise.
13743
13744 * src/output.c (muscle_insert_short_int_table): Renamed from
13745 muscle_insert_short_table. All uses changed.
13746
137472004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13748
13749 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13750 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13751 Add %expect-rr rule.
13752
13753 * src/scan-gram.l: Recognize %expect-rr.
13754
13755 * src/conflicts.h (expected_sr_conflicts): Rename from
13756 expected_conflicts.
13757 (expected_rr_conflicts): Declare.
13758
13759 * src/conflicts.c (expected_sr_conflicts): Rename from
13760 expected_conflicts.
13761 (expected_rr_conflicts): Define.
13762 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13763 for GLR parsers.
13764 Use expected_sr_conflicts in place of expected_conflicts.
13765 Warn if expected_rr_conflicts used in non-GLR parser.
13766
13767 * doc/bison.texinfo: Add documentation for %expect-rr.
13768
137692004-03-08 Paul Eggert <eggert@gnu.org>
13770
13771 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13772 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13773
13774 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13775 in lalr1.cc.
13776 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13777 * src/scan-gram.l (scan_integer): New function.
13778 ({int}): Use it.
13779 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13780 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13781 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13782 Say "long int", not "long", for uniformity with GNU style.
13783
137842004-02-25 Paul Eggert <eggert@twinsun.com>
13785
13786 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13787 compilers. This fixes a problem with Intel's C++ compiler being
13788 chatty, reported by Guido Trentalancia in
13789 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13790
137912004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13792
13793 Support %destructor and merge error locations in lalr1.cc.
13794
13795 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13796 (Parser::stos_): Define unconditionally.
13797 (Parser::destruct_): New method. Generate its body with
13798 b4_yydestruct_generate.
13799 (Parser::error_start_): New attribute.
13800 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13801 token which are discarded.
13802 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13803 error_start_ when erroneous token are discarded.
13804 (Parser::parse) <yyerrlab1>: Compute the location of the error
13805 token so that it covers all the discarded tokens.
13806 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13807 it can be called with `%skeleton "lalr1.cc"', and do that.
13808
138092004-02-02 Paul Eggert <eggert@twinsun.com>
13810
13811 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13812 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13813 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13814 There's no need to mention top_builddir since Automake does that
13815 for us.
13816 (INCLUDES): Remove, as Automake says it's obsolescent.
13817 Contents migrated into AM_CPPFLAGS as described above.
13818 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13819
138202004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13821
13822 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13823 (yyreportSyntaxError): Handle case where lookahead token is
13824 YYEMPTY.
13825
138262004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13827
13828 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13829 resulting parsers are compilable with C++.
13830
138312003-12-23 Paul Eggert <eggert@twinsun.com>
13832
13833 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13834 * src/output.c (output_skeleton): Rename local var.
13835 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13836 Bison tokens, as this runs afoul of the 2003-10-07 change that
13837 disallowed NUL bytes in character constants or string literals.
13838
13839 * tests/local.at: Require Autoconf 2.59's Autotest.
13840 * tests/testsuite.at: Don't include local.at, since we now assume
13841 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13842 including it.
13843 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13844 multiple inclusion warnings.
13845
138462003-12-02 Akim Demaille <akim@epita.fr>
13847
13848 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13849 conditions.
13850 From Bruno Haible.
13851
138522003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13853
13854 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13855
138562003-10-07 Paul Eggert <eggert@twinsun.com>
13857
13858 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13859 if testsuite doesn't exist.
13860
13861 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13862 literals, unfortunately.
13863 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13864 Complain about NUL bytes in character constants or string literals.
13865
138662003-10-05 Paul Eggert <eggert@twinsun.com>
13867
13868 * NEWS: Don't document %no-default-prec, as it's still
13869 too experimental.
13870 * doc/bison.texinfo: Document %no-default-prec only if
13871 the defaultprec flag is set. Normally it's not.
13872
138732003-10-04 Paul Eggert <eggert@twinsun.com>
13874
13875 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13876 non-modifiable lvalue, instead of a modifiable one.
13877 * doc/bison.texinfo (Actions): Document that $$ can
13878 be assigned to. Do not claim that $$ and $N are
13879 array element references: user code should not rely on this.
13880
138812003-10-01 Paul Eggert <eggert@twinsun.com>
13882
13883 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13884 (grammar_declaration): Use it.
13885 * src/scan-gram.l: New token %no-default-prec.
13886 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13887 * NEWS, doc/bison.texinfo: Document the above.
13888
138892003-10-01 Akim Demaille <akim@epita.fr>
13890
13891 VCG no longer supports long_straight_phase.
13892
13893 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13894 * src/print_graph.c (print_graph): Adjust.
13895
138962003-09-30 Frank Heckenbach <frank@g-n-u.de>
13897 and Paul Eggert <eggert@twinsun.com>
13898
13899 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13900 Table of Symbols): Document %default-prec.
13901 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13902 (grammar_declaration): Set default_prec on %default-prec.
13903 * src/scan-gram.l (%default-prec): New token.
13904 * src/reader.h (default_prec): New flag.
13905 * src/reader.c: Likewise.
13906 (packgram): Handle it.
13907 * tests/conflicts.at (%default-prec without %prec,
13908 %default-prec with %prec, %default-prec 1): New tests.
13909
139102003-09-30 Paul Eggert <eggert@twinsun.com>
13911
13912 * tests/testsuite.at: Include local.at, not input.at, fixing
13913 a typo in the 2003-08-25 patch.
13914
139152003-08-27 Akim Demaille <akim@epita.fr>
13916
13917 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13918 GCC warnings.
13919
139202003-08-26 Akim Demaille <akim@epita.fr>
13921
13922 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13923 "<\#" to avoid magic from Gnus when posting parts of this script.
13924
139252003-08-26 Akim Demaille <akim@epita.fr>
13926
13927 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13928 (Parser::parse): here.
13929 Adjust: nerrs and errstatus is now replaced by...
13930 (Parser::nerrs_, Parser::errstatus_): New.
13931
139322003-08-25 Akim Demaille <akim@epita.fr>
13933
13934 * config/announce-gen, Makefile.cfg: New.
13935 * Makefile.am: Adjust.
13936 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13937 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13938
139392003-08-25 Akim Demaille <akim@epita.fr>
13940
13941 When reducing initial empty rules, Bison parser read an initial
13942 location that is not defined. This results in garbage, and that
13943 affects Bison's own parser. Therefore we need (i) to extend Bison
13944 to support a means to initialize this location, and (ii) to use
13945 this CVS Bison to fix CVS Bison's parser.
13946
13947 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13948 with...
13949 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13950 * src/parse-gram.y: Adjust.
13951 (%initial-action): New.
13952 (%error-verbose): Since we require CVS Bison, there is no reason
13953 not to use it.
13954 * src/scan-gram.l: Adjust.
13955 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13956 * data/yacc.c (yyparse): Use b4_initial_action.
13957
139582003-08-25 Akim Demaille <akim@epita.fr>
13959
13960 * doc/bison.texinfo: Don't promote stdout for error messages.
13961
139622003-08-25 Akim Demaille <akim@epita.fr>
13963
13964 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13965 From Alexandre Duret-Lutz.
13966
139672003-08-25 Akim Demaille <akim@epita.fr>
13968
13969 Version 1.875c.
13970
139712003-08-25 Akim Demaille <akim@epita.fr>
13972
13973 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13974 Use them.
13975
139762003-08-25 Akim Demaille <akim@epita.fr>
13977
13978 * data/lalr1.cc (Parser::reduce_print_): New.
13979 Use it.
13980
139812003-08-25 Akim Demaille <akim@epita.fr>
13982
13983 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13984 error recovery loops. This patch is based on
13985 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13986 Also, augment the similarity between lalr1.cc and yacc.c.
13987 Note: the locations of error recovery rules are not correct yet.
13988
13989 * data/lalr1.cc: Comment changes to augment the similarity between
13990 lalr1.cc and yacc.c.
13991 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13992 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13993 yyerrlab), when hitting EOF, pop the whole stack here instead of
13994 merely falling thru the default error handling mechanism.
13995 (yyerrorlab): New label, with the old contents of YYERROR,
13996 plus the following change: pop the stack of rhs corresponding
13997 to the production that invoked YYERROR. That is how Yacc
13998 behaves (required by POSIX).
13999 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14000 fail.
14001
140022003-08-25 Akim Demaille <akim@epita.fr>
14003
14004 Tune local.at so that people can "autom4te -l autotest calc.at -o
14005 calc" for instance, to extract a sub test suite.
14006
14007 * tests/testsuite.at: Move the initialization, Autotest version
14008 requirement, and AT_TESTED invocation into...
14009 * tests/local.at: here.
14010 * tests/testsuite.at: Include it for compatibility with Autoconf
14011 2.57.
14012 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14013 be ignore.
14014
140152003-08-04 Paul Eggert <eggert@twinsun.com>
14016
14017 Rework code slightly to avoid gcc -Wtraditional warnings.
14018 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14019 The returned value is now stored in *YY0. All callers changed.
14020 * src/output.c (merge_output): Adjust to the above change.
14021
140222003-07-26 Paul Eggert <eggert@twinsun.com>
14023
14024 * data/glr.c (YYASSERT): New macro.
14025 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14026 yyresolveStates, yyprocessOneStack):
14027 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14028 Derived from a suggestion by Frank Heckenbach.
14029
140302003-07-25 Paul Eggert <eggert@twinsun.com>
14031
14032 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14033 for portability to K&R C (after ansi2knr, presumably). See
14034 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14035 by Frank Heckenbach, though I have omitted the structure-initialization
14036 part of his glr-knr.diff patch since I recall that the Portable
14037 C Compiler didn't require that change.
14038
14039 Let the user specify how to allocate and free memory.
14040 Derived from a suggestion by Frank Heckenbach in
14041 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14042 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14043 All uses of free, malloc, realloc changed to use these macros,
14044 and unnecessary casts removed.
14045 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14046
140472003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14048
14049 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14050 use s.empty() rather than s == "" to test for empty string; see
14051 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14052 (trivial change)
14053
140542003-06-25 Akim Demaille <akim@epita.fr>
14055
14056 * config/depcomp, config/install-sh: Update from masters.
14057
140582003-06-20 Paul Eggert <eggert@twinsun.com>
14059
14060 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14061 and return properly parenthesized result.
14062 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14063 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14064 Remove unnecessary parentheses from uses.
14065 * doc/bison.texinfo (Location Default Action): Describe the
14066 conventions for parentheses.
14067
140682003-06-19 Paul Eggert <eggert@twinsun.com>
14069
14070 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14071 yyreportTree): Do not assume that size_t is the same width as int,
14072 when printing sizes. Print sizes using an unsigned format.
14073 Problem reported by Frank Heckenbach in
14074 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14075
14076 Port to Forte Developer 7 C compiler.
14077 * data/glr.c (struct YYLTYPE): If locations are not being used,
14078 declare a single dummy member, as empty structs do not conform
14079 to the C standard.
14080 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14081 the Forte Developer 7 C compiler complains that end-of-loop
14082 code is not reached.
14083
140842003-06-17 Paul Eggert <eggert@twinsun.com>
14085
14086 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14087 avoid warnings from picky compilers about redefinition of PARAMS.
14088
140892003-06-17 Paul Eggert <eggert@twinsun.com>
14090
14091 Version 1.875b.
14092
14093 * NEWS: Document 1.875b.
14094
14095 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14096 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14097 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14098 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14099 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14100 per recent gettext manual's suggestion.
14101 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14102 Use prototypes, not old-style definitions.
14103 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14104 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14105 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14106 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14107 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14108 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14109 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14110 vbitset_or_and_cmp, vbitset_copy): Likewise.
14111
14112 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14113 Do not include <stdlib.h>.
14114 (PARAMS): Define unconditionally for C89.
14115 (ATTRIBUTE_NORETURN): Remove.
14116 (ATTRIBUTE_UNUSED): Define unconditionally.
14117
14118 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
14119 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
14120 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14121 * lib/vbitset.c, lib/vbitset.h: New files.
14122 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14123 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14124 from libbitset.
14125
14126 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
14127 `How Can I Reset @code{yyparse}', since texinfo does not allow
14128 arbitrary @ in node names.
14129
14130 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
14131 shouldn't be needed according to the gettext 0.12.1 documentation
14132 but which seem to be needed anyway: codeset.m4 glibc21.m4
14133 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
14134 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
14135 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
14136
14137 * lib/.cvsignore: Add stdbool.h.
14138 * m4/.cvsignore: Add nls.m4, po.m4.
14139
14140 Upgrade to CVS gnulib.
14141 * stdbool_.h: File renamed from stdbool.h.in.
14142 * configure.ac (AM_STDBOOL_H): Invoke this instead of
14143 AC_HEADER_STDBOOL.
14144 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
14145 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
14146 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
14147 (MOSTLYCLEANFILES): New var.
14148 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
14149 (stdbool.h): New rule.
14150 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
14151 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
14152 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
14153 m4/quote.m4: Upgrade to today's gnulib.
14154
14155 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
14156 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
14157 the tests right now.
14158 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
14159 yyerror are declared before use; C99 requires this.
14160
141612003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14162
14163 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
14164 first.
14165 (yyrecoverSyntaxError): Correct the logic for setting and testing
14166 yyerrState.
14167 Correct comment on handling EOF.
14168 Allow states with only a default reduction, rather than failing
14169 (I can't quite reconstruct why these were not allowed before).
14170
14171 Fixes to avoid problem that $-N rules in GLR parsers can cause
14172 buffer overruns, corrupting state.
14173
14174 * src/output.c (prepare_rules): Output max_left_semantic_context
14175 definition.
14176 * src/reader.h (max_left_semantic_context): New variable declaration.
14177 * src/scan-gram.l (max_left_semantic_context): Define.
14178 (handle_action_dollar): Update max_left_semantic_context.
14179 * data/glr.c (YYMAXLEFT): New definition.
14180 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
14181 (yyresolveAction): Ditto.
14182
14183 Fixes to problems with location handling in GLR parsers reported by
14184 Frank Heckenbach (2003/06/05).
14185
14186 * data/glr.c (YYLTYPE): Make trivial if locations not used.
14187 (YYRHSLOC): Add parentheses, and define only if locations used.
14188 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
14189 locations not used.
14190 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
14191 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
14192
14193 * tests/cxx-type.at: Exercise location information; update tests
14194 to differentiate output with and without locations.
14195 Remove forward declarations of yylex and yyerror---caused errors
14196 because default YYLTYPE not yet defined.
14197 Change semantic actions to compute strings, rather than printing
14198 them directly (to test proper passing of semantics values). Change
14199 output to prefix notation and update test data and expected results.
14200 (yylex): Track locations.
14201 (stmtMerge): Return value rather than printing, and include arguments
14202 in value.
14203
142042003-06-03 Paul Eggert <eggert@twinsun.com>
14205
14206 Avoid warnings generated by GCC 2.95.4 when Bison is
14207 configured with --enable-gcc-warnings.
14208 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
14209 yy::]b4_parser_class_name[::translate_,
14210 yy::Stack::operator[] (unsigned),
14211 yy::Stack::operator[] (unsigned) const,
14212 yy::Slice::operator[] (unsigned),
14213 yy::Slice::operator[] (unsigned) const):
14214 Rename local vars to avoid warnings.
14215 * tests/glr-regression.at (Improper handling of embedded actions
14216 and $-N in GLR parsers): Remove unused local variable from yylex.
14217 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
14218 (void) as arg when not pure, since we now assume C89 when building
14219 Bison. Pacify GCC by using parameter.
14220
142212003-06-02 Paul Eggert <eggert@twinsun.com>
14222
14223 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
14224 yy::Location::lines, yy::Location::columns): Rename arguments
14225 to avoid shadowing; this removes a warning generated by GCC 3.3.
14226
142272003-06-01 Paul Eggert <eggert@twinsun.com>
14228
14229 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
14230 to g++, as GCC 3.3 complains if you do it.
14231 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
14232 everything that WARNING_CFLAGS has, except omit warnings
14233 not suitable for C++.
14234 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
14235 * tests/atlocal.in (CXXFLAGS): New var.
14236 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
14237
14238 Fix a GLR parser bug I reported in February; see
14239 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
14240 The problem was that GLR parsers did not conform to the C standard,
14241 because actions like { $1 = $2 + $3; } expanded to expressions
14242 that invoked YYFILL in separate subexpressions, and YYFILL assigned
14243 to a local variable. The C standard says that expressions
14244 like (var = f ()) + (var = f ()) have undefined behavior.
14245 Another problem was that GCC sometimes issues warnings that
14246 yyfill and its parameters are unused.
14247
14248 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
14249 as possibly unused.
14250 (yyfill): New function.
14251 (YYFILL): Use it.
14252 (yyuserAction): Change type of yynormal to bool, so that it matches
14253 the new yyfill signature. Mark it as possibly unused.
14254
14255
14256 Follow up on a bug I reported in February, where a Bison-generated
14257 parser can loop. Provide a test case and a fix for yacc.c. I
14258 don't have a fix for lalr1.cc or for glr.c, unfortunately.
14259 The original bug report is in:
14260 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
14261
14262 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
14263 macro's size was becoming unwieldy.
14264 (yyerrlab): Do not discard an empty lookahead symbol, as this
14265 might destroy garbage.
14266 (yyerrorlab): New label, with the old contents of YYERROR,
14267 plus the following change: pop the stack of rhs corresponding
14268 to the production that invoked YYERROR. That is how Yacc
14269 behaves, and POSIX requires this behavior.
14270 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
14271 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
14272 Define 'alarm' to do nothing if unistd.h is not available.
14273 Add a new rule "exp: '-' error;" to test the above change to
14274 data/yacc.c. Use 'alarm' to abort any test taking longer than
14275 10 seconds, as it's probably looping.
14276 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
14277 Also, the new yacc.c generates two fewer diagnostics for an
14278 existing test.
14279
142802003-05-24 Paul Eggert <eggert@twinsun.com>
14281
14282 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
14283 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
14284 This fixes a problem reported by John Bowman when the Compaq/HP
14285 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
14286 -ansi -Wall -gall).
14287 * data/yacc.c (union yyalloc): Likewise.
14288 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
14289
14290 Switch from 'int' to 'bool' where that makes sense.
14291
14292 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
14293 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
14294 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
14295 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
14296 Return or accept bool, not int. All callers changed.
14297 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
14298 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
14299 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
14300 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
14301 bitset_or_and_cmp_): Likewise.
14302 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
14303 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
14304 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
14305 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
14306 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
14307 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
14308 bitset_stats_or_and_cmp): Likewise.
14309 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
14310 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
14311 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
14312 ebitset_xor_cmp): Likewise.
14313 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
14314 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
14315 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
14316 lbitset_xor_cmp): Likewise.
14317 * lib/bbitset.h: Include <stdbool.h>.
14318 (struct bitset_vtable): The following members now return bool, not
14319 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
14320 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
14321 or_and_cmp).
14322 * src/conflicts.c (count_rr_conflicts): Likewise.
14323 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
14324 All uses changed.
14325 * lib/ebitset.c (ebitset_obstack_init): Likewise.
14326 * lib/lbitset.c (lbitset_obstack_init): Likewise.
14327 * src/getargs.c (debug_flag, defines_flag, locations_flag,
14328 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14329 graph_flag): Likewise.
14330 * src/getargs.h (debug_flag, defines_flag, locations_flag,
14331 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
14332 graph_flag): Likewise.
14333 * src/output.c (error_verbose): Likewise.
14334 * src/output.h (error_verbose): Likewise.
14335 * src/reader.c (start_flag, typed): Likewise.
14336 * src/reader.h (typed): Likewise.
14337 * src/getargs.c (LOCATIONS_OPTION): New constant.
14338 (long_options, getargs): Use it.
14339 * src/lalr.c (build_relations): Use bool, not int.
14340 * src/nullable.c (nullable_compute): Likewise.
14341 * src/print.c (print_reductions): Likewise.
14342 * src/tables.c (action_row, pack_vector): Likewise.
14343 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
14344 * src/output.c (prepare): Use it.
14345 * src/output.c (token_definitions_output,
14346 symbol_destructors_output, symbol_destructors_output): Use string,
14347 not boolean integer, to keep track of whether to output separator.
14348 * src/print_graph.c (print_core): Likewise.
14349 * src/state.c (state_rule_lookaheads_print): Likewise.
14350
14351 * config/install-sh: Sync from automake 1.7.5.
14352
143532003-05-14 Paul Eggert <eggert@twinsun.com>
14354
14355 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14356 semicolon after a grammar declaration, in the interest of possible
14357 future changes to the Bison input language.
14358 Do not allow a stray semicolon at the start of the grammar.
14359 (rhses.1): Allow one or more semicolons after any rule, including
14360 just before "|" as required by POSIX.
14361 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14362 grammar.
14363
143642003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14365
14366 %parse-param support for lalr1.cc.
14367
14368 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14369 b4_cc_constructor_calls, b4_cc_constructor_call,
14370 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14371 definitions.
14372 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14373 parse-param arguments.
14374 (yy::b4_parser_class_name): Declare instance variables to
14375 hold parse-param arguments.
14376 * tests/calc.at: s/value/semantic_value/ because value clashes
14377 with a member of yy::b4_parser_class_name. Adjust C++ code
14378 to handle %parse-param. Enable %parse-param test in C++.
14379
143802003-05-12 Paul Eggert <eggert@twinsun.com>
14381
14382 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14383 English a bit. Fix fclose typo. Change "const char" to "char
14384 const", and use ANSI C rather than K&R for "main". Suggest
14385 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14386 and suggest yy_switch_to_buffer.
14387
143882003-05-05 Paul Eggert <eggert@twinsun.com>
14389
14390 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14391 C89. This avoids a diagnostic on compilers that define __STDC__
14392 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14393 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14394
143952003-05-03 Paul Eggert <eggert@twinsun.com>
14396
14397 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14398 Do not overrun array bounds.
14399 This should fix a bug reported today by Olatunji Oluwabukunmi in
14400 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14401
144022003-04-29 Akim Demaille <akim@epita.fr>
14403
14404 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14405 * src/getargs.c, src/getargs.h: here, as bool, not int.
14406 (nondeterministic_parser): New.
14407 * src/parse-gram.y, src/scan-gram.l: Support
14408 %nondeterministic-parser.
14409 * src/output.c (prepare): Use nondeterministic_parser instead
14410 of glr_parser where appropriate.
14411 * src/tables.c (conflict_row, action_row, save_row)
14412 (token_actions, token_actions, pack_vector): Ditto.
14413
144142003-04-29 Akim Demaille <akim@epita.fr>
14415
14416 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14417
144182003-04-29 Akim Demaille <akim@epita.fr>
14419
14420 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14421 with %pure-parser and %locations to exercise the patch from Yakov
14422 Markovitch below.
14423
144242003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14425
14426 * data/yacc.c: (b4_lex_param): Corrected for the case where
14427 %lex-param is provided and %pure-parser isn't.
14428
144292003-04-27 Paul Eggert <eggert@twinsun.com>
14430
14431 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14432 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14433 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14434 if it is not defined.
14435 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14436
144372003-04-26 Paul Eggert <eggert@twinsun.com>
14438
14439 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14440 Declare to be of type suitable for the ninf value itself, not of
14441 type suitable for the corresponding table, since the latter might
14442 be unsigned but the ninf value might be negative. This fixes a
14443 bug reported by Alexandre Duret-Lutz in
14444 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14445
14446 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14447 invokes it. We shouldn't invoke it twice because it will attempt
14448 to put error.o in the archive twice. This fixes a glitch reported
14449 by Martin Mokrejs in
14450 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14451
144522003-04-21 Paul Eggert <eggert@twinsun.com>
14453
14454 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14455 to gnulib.
14456
144572003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14458
14459 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14460 Fix obvious typo that results in uncompilable GLR parsers
14461 when both %pure-parser and %locations are used. (trivial change)
14462
144632003-04-17 Paul Eggert <eggert@twinsun.com>
14464
14465 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14466 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14467 Do not insert the expected token via unput, as this runs afoul
14468 of a POSIX-compatibility bug in flex 2.5.31.
14469 All uses changed to BEGIN the parent state,
14470 since we no longer insert the expected token via unput.
14471 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14472 that is no longer emitted after the above change.
14473
14474 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14475 the first one. This change is from Paul Hilfinger, and it fixes
14476 regression reported by Werner Lemberg in
14477 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14478
14479 (resolve_sr_conflict): Don't invoke state_errs_set
14480 unless one or more tokens have been explicitly made errors.
14481 Otherwise, the above change causes Bison to abort.
14482
14483 * tests/existing.at (GNU pic Grammar): New test case, taken from
14484 Lemberg's email.
14485
144862003-03-31 Akim Demaille <akim@epita.fr>
14487
14488 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14489
144902003-03-31 Akim Demaille <akim@epita.fr>
14491
14492 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14493 output.
14494
144952003-03-31 Akim Demaille <akim@epita.fr>
14496
14497 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14498 From Paul Hilfinger.
14499
145002003-03-29 Akim Demaille <akim@epita.fr>
14501
14502 * m4/error.m4: Do not put under dynamic conditions some code which
14503 expansion is under static control.
14504
145052003-03-29 Akim Demaille <akim@epita.fr>
14506
14507 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14508
145092003-03-29 Akim Demaille <akim@epita.fr>
14510
14511 * doc/bison.texinfo (Strings are Destroyed): New.
14512
145132003-03-13 Paul Eggert <eggert@twinsun.com>
14514
14515 * .cvsignore: Add configure.lineno.
14516 * src/.cvsignore: Add yacc.
14517 * tests/.cvsignore: Add testsuite.log.
14518 * doc/fdl.texi: Sync with latest FSF version.
14519
145202003-03-12 Paul Eggert <eggert@twinsun.com>
14521
14522 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14523 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14524 cursor, instead of leaving it undefined. This fixes a bug
14525 reported by Tim Van Holder in
14526 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14527 * tests/input.at (Torturing the Scanner): Test the scanner on
14528 an empty input file, which was Tim Van Holder's test case.
14529
14530 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14531 <sys/resource.h> can be included, include sys/time.h and
14532 sys/times.h first, if available. This works around the SunOS
14533 4.1.4 porting bug reported by Bruce Becker in
14534 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14535
14536 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14537 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14538 AC_HEADER_SYS_WAIT.
14539
14540 Merge changes from gnulib. This was prompted because the CVS
14541 snapshot didn't build on Solaris 7 due to strnlen problems.
14542
14543 These changes need to be merged back into gnulib:
14544 * lib/hash.c: Include <stdbool.h> unconditionally.
14545 * m4/onceonly.m4 (m4_quote): New macro.
14546 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14547 Quote AC_FOREACH variable-expansions properly.
14548 The 2003-01-03 obstack.h change also needs merging.
14549 {end of changes requiring merging}
14550
14551 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14552 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14553 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14554 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14555 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14556 New files, imported from gnulib.
14557 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14558 above.
14559
14560 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14561 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14562 gnulib sources.
14563
14564 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14565 Add.
14566 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14567 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14568 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14569 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14570 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14571 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14572 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14573 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14574 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14575 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14576 (jm_PREREQ_ARGMATCH): Remove.
14577 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14578 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14579
14580 * src/system.h: Include <stdbool.h> unconditionally.
14581
14582 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14583 assuming at least C89 in the bitset code for some time now.
14584
145852003-03-03 Akim Demaille <akim@epita.fr>
14586
14587 * ro.po: New.
14588
145892003-03-02 Akim Demaille <akim@epita.fr>
14590
14591 * doc/bison.texinfo (Table of Symbols): Reactivate the
14592 documentation for %lex-param, and %parse-param.
14593
145942003-03-02 Akim Demaille <akim@epita.fr>
14595
14596 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14597 generate verbose error messages.
14598 Use the number of tokens as an upper bound in yytname, as it
14599 cannot be a non terminal.
14600
146012003-03-02 Akim Demaille <akim@epita.fr>
14602
14603 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14604 message.
14605
146062003-03-02 Akim Demaille <akim@epita.fr>
14607
14608 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14609 Use them to exercise yycheck overrun.
14610 Based on Andrew Suffield's grammar.
14611
146122003-03-02 Akim Demaille <akim@epita.fr>
14613
14614 Create tests/local.at for Bison generic testing macros.
14615
14616 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14617 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14618 This new file.
14619 * tests/calc.at (AT_CHECK_CALC): Adjust.
14620 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14621 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14622 * tests/local.at: here.
14623 (AT_COMPILE_CXX): Tags the tests using it as c++.
14624 Ignore the test if CXX is not functional.
14625
146262003-03-01 Paul Eggert <eggert@twinsun.com>
14627
14628 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14629 not loc->end, since loc->end might contain garbage and this leads
14630 to undefined behavior on some platforms.
14631 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14632 depend on *loc, so that the reader doesn't give the the false
14633 impression that *loc is initialized.
14634 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14635 does not survive the return.
14636
146372003-03-01 Akim Demaille <akim@epita.fr>
14638
14639 * src/scan-gram.l (code_start): Always initialize it when entering
14640 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14641 yylex invocation. An alternative would be making it static, but
14642 then it starts with the second %%'s beginning, instead of its end.
14643
146442003-02-28 Paul Eggert <eggert@twinsun.com>
14645
14646 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14647 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14648 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14649
146502003-02-26 Paul Eggert <eggert@twinsun.com>
14651
14652 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14653 Remove Sequent/Pyramid discussion (nobody uses them any more).
14654 Merge VMS and MS-DOS discussion; these ports may well be dead
14655 but let's keep mentioning them for now. Put <> around email
14656 addresses. Add copyright notice.
14657
146582003-02-24 Paul Eggert <eggert@twinsun.com>
14659
14660 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14661 to avoid collision with flex use of yylineno.
14662 Problem reported by Bruce Lilly in
14663 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14664 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14665 * data/yacc.c (yy_reduce_print): Likewise.
14666
14667 * config/depcomp: Sync with Automake 1.7.3.
14668
146692003-02-21 Akim Demaille <akim@epita.fr>
14670
14671 * data/lalr1.cc: Use temporary variables instead of casts to
14672 change integer types.
14673 Suggested by Paul Eggert.
14674
146752003-02-21 Akim Demaille <akim@epita.fr>
14676
14677 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14678 to avoid confusions with lalr1.cc's notion of Position.
14679 Suggested by Paul Eggert.
14680
146812003-02-20 Akim Demaille <akim@epita.fr>
14682
14683 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14684 before initial_columns.
14685 (location.hh): Use consistent variable names when defining the
14686 operator<<.
14687 Use "last" so that we subtract from Positions, not from unsigned.
14688
146892003-02-20 Akim Demaille <akim@epita.fr>
14690
14691 * data/lalr1.cc (position.hh): New subfile, including the extended
14692 and Doxygen'ed documentation of class Position.
14693 (location.hh): Use it.
14694 Document a` la Doxygen.
14695 With the help of Benoit Perrot.
14696
146972003-02-20 Akim Demaille <akim@epita.fr>
14698
14699 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14700 AT_YACC_IF.
14701 Redefine AT_YYERROR_SEES_LOC_IF using it.
14702 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14703 not defined.
14704 Don't use the location in yy::Parser::error_ and
14705 yy::Parser::print_ when not %locations.
14706 Activate more lalr1.cc tests.
14707
147082003-02-19 Akim Demaille <akim@epita.fr>
14709
14710 * data/lalr1.cc: When displaying a line number, be sure to make it
14711 an int.
14712
147132003-02-19 Akim Demaille <akim@epita.fr>
14714
14715 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14716 Remove, useless.
14717 (YYABORT, YYACCEPT, YYERROR): New.
14718 * tests/calc.at: Renable the lalr1.cc test.
14719
147202003-02-19 Akim Demaille <akim@epita.fr>
14721
14722 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14723 error recovery, mixing with/without pops and discarding of the
14724 lookahead.
14725 Exercise YYERROR.
14726 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14727
147282003-02-17 Paul Eggert <eggert@twinsun.com>
14729
14730 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14731 * tests/testsuite.at (AT_COMPILE): Use them.
14732 This fixes the testsuite problem reported by Robert Lentz in
14733 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14734
147352003-02-12 Paul Eggert <eggert@twinsun.com>
14736
14737 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14738 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14739 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14740 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14741 Check for malloc failure, for consistency with yacc.c.
14742 (yytname_size): Remove, for consistency with yacc.c.
14743
14744 The bug still remains in data/lalr1.cc, as I didn't have time
14745 to fix it there.
14746
147472003-02-06 Akim Demaille <akim@epita.fr>
14748
14749 * configure.ac (GXX): Rename as...
14750 (CXX): this, to keep the original Autoconf semantics.
14751 Require 2.57.
14752 * data/lalr1.cc: Fix b4_copyright invocations.
14753 If YYDEBUG is not defined, don't depend upon name_ being defined.
14754 (location.hh): Include string and iostream.
14755 (Position::filename): New member.
14756 (Position::Position ()): New.
14757 (operator<< (Position)): New.
14758 (operator- (Position, int)): New.
14759 (Location::first, Location::last): Rename as...
14760 (Location::begin, Location::end): these, to mock the conventional
14761 iterator names.
14762 (operator<< (Location)): New.
14763 * tests/atlocal.in (CXX): New.
14764 * tests/testsuite.at (AT_COMPILE_CXX): New.
14765 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14766 locations in a more synthetic way.
14767 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14768 lalr1.cc is used.
14769 Adjust the C locations to match those from Emacs: first column is
14770 column 0.
14771 Change all the expected results.
14772 Conform to the GCS: simplify the locations when applicable.
14773 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14774 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14775 these CPP macros with the m4 macros new defined by...
14776 (AT_CHECK_PUSHDEFS): this, i.e.:
14777 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14778 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14779 New macros.
14780 (AT_CHECK_POPDEFS): Undefine them.
14781 (AT_CHECK_CALC_LALR1_CC): New.
14782 Use it for the first lalr1.cc test.
14783
147842003-02-04 Akim Demaille <akim@epita.fr>
14785
14786 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14787 Location as is defined.
14788
147892003-02-04 Akim Demaille <akim@epita.fr>
14790
14791 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14792 name_ being defined.
14793
147942003-02-03 Paul Eggert <eggert@twinsun.com>
14795
14796 * src/gram.h (start_symbol): Remove unused decl.
14797
14798 Use more-consistent naming conventions for local vars.
14799
14800 * src/derives.c (derives_compute): Change type of local var from
14801 int to rule_number.
14802 * src/gram.c (grammar_rules_partial_print): Likewise.
14803 * src/print.c (print_core): Likewise.
14804 * src/reduce.c (reduce_grammar_tables): Likewise.
14805
14806 * src/gram.c (grammar_dump): Change name of item_number *
14807 local var from r to rp.
14808 * src/nullable.c (nullable_compute): Likewise.
14809
14810 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14811
14812 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14813 for symbol or symbol_number var.
14814 * src/reader.c (grammar_start_symbol_set): Likewise.
14815 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14816 Likewise.
14817 * src/state.c (transitions_to): Likewise.
14818 * src/state.h: Likewise.
14819 * src/tables.c (symbol_number_to_vector_number): Likewise.
14820
14821 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14822 char * var.
14823
14824 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14825 var.
14826
14827 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14828 var.
14829
14830 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14831 Use str, not s, for char * var. Use ch, not c, for character var.
14832 Use size for size var.
14833
14834 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14835 char * var.
14836 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14837 uniqstr var.
14838 * src/uniqstr.h: Likewise.
14839
14840 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14841 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14842 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14843 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14844 param to have same name as that of enum, so that we don't use
14845 "s" to stand for a non-state.
14846
148472003-02-02 Akim Demaille <akim@epita.fr>
14848
14849 * src/scan-skel.l: Scan more than one inert character per yylex
14850 invocation.
14851
148522003-02-01 Paul Eggert <eggert@twinsun.com>
14853
14854 Version 1.875a.
14855
14856 * po/LINGUAS: Add ms.
14857
148582003-01-30 Akim Demaille <akim@epita.fr>
14859
14860 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14861
148622003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14863
14864 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14865 of $1.
14866
14867 Changes in response to error report by S. Eken: GLR mode does not
14868 handle negative $ indices or $ indices in embedded rules correctly.
14869 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14870
14871 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14872 (b4_rhs_location): Ditto.
14873 (yyfill): New function to copy from stack tree into array
14874 incrementally.
14875 (yyuserAction): Modify to allow incremental move of semantic values
14876 to rhs array when in GLR mode.
14877 Define YYFILL to use in user-defined actions to fill semantic array
14878 as needed.
14879 Remove dummy use of yystack, as there is now a guaranteed use.
14880 (yydoAction): Modify to allow incremental move of semantic values
14881 to rhs array when in GLR mode.
14882 (yyresolveAction): Ditto.
14883 (yyglrShiftDefer): Update comment.
14884 (yyresolveStates): Use X == NULL for pointers, not !X.
14885 (yyglrReduce): Ditto.
14886 (yydoAction): Ditto
14887
14888 * tests/glr-regr1.at: Rename to ...
14889 * tests/glr-regression.at: Add new regression test for the problems
14890 described above (adapted from S. Eken).
14891 Update copyright notice.
14892 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14893 * tests/Makefile.am: Ditto.
14894
148952003-01-28 Paul Eggert <eggert@twinsun.com>
14896
14897 * data/lalr1.cc: Do not use @output_header_name@ unless
14898 b4_defines_flag is set. This fixes two bugs reported by
14899 Tim Van Holder in
14900 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14901 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14902
149032003-01-21 Paul Eggert <eggert@twinsun.com>
14904
14905 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14906 we don't need to worry about yyerrlab1 being reported as an
14907 "unused label" by non-GCC C compilers. The downside is that if
14908 locations are used then a couple of statements are duplicated each
14909 time YYERROR is invoked, but the upside is that the warnings
14910 should vanish.
14911 (yyerrlab1): Move code to YERROR.
14912 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14913 This reverts some of the 2002-12-27 change.
14914
149152003-01-17 Paul Eggert <eggert@twinsun.com>
14916
14917 * src/output.c (symbol_printers_output): Fix typo that led
14918 to core dump. Problem reported by Antonio Rus in
14919 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14920
149212003-01-13 Akim Demaille <akim@epita.fr>,
14922 Quoc Peyrot <chojin@lrde.epita.fr>,
14923 Robert Anisko <anisko_r@lrde.epita.fr>
14924
14925 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14926 when the stacks contain one element, as the loop would otherwise
14927 free the last state, and then use the top state (the one we just
14928 popped). This means that the initial elements will not be freed
14929 explicitly, as is the case in yacc.c; it is not a problem, as
14930 these elements have fake values.
14931
149322003-01-11 Paul Eggert <eggert@twinsun.com>
14933
14934 * NEWS: %expect-violations are now just warnings, reverting
14935 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14936 bootstrapping problem reported by Matthias Klose; see
14937 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14938 * src/conflicts.c (conflicts_print): Likewise.
14939 * tests/conflicts.at (%expect not enough, %expect too much,
14940 %expect with reduce conflicts): Likewise.
14941 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14942 that the warning is enabled if the number of conflicts changes
14943 (not necessarily increases).
14944
14945 * src/getargs.c (version): Update copyright year.
14946
149472003-01-09 Akim Demaille <akim@epita.fr>
14948
14949 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14950
149512003-01-08 Paul Eggert <eggert@twinsun.com>
14952
14953 * Makefile.maint (WGETFLAGS):
14954 New macro, containing "-C off" to disable proxy caches.
14955 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14956 (rel-check): Use $(WGET) instead of wget.
14957
149582003-01-06 Paul Eggert <eggert@twinsun.com>
14959
14960 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14961 the GLR paper of Scott, Johnstone and Hussain.
14962
149632003-01-04 Paul Eggert <eggert@twinsun.com>
14964
14965 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14966 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14967 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14968 (EXTRA_LIBRARIES): New var, for liby.a.
14969 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14970 (EXTRA_SCRIPTS): New var, for yacc.
14971
14972 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14973 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14974 Problem reported by Nelson H. F. Beebe.
14975
149762003-01-03 Paul Eggert <eggert@twinsun.com>
14977
14978 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14979 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14980 when compiling Bison 1.875's `bitset bset = obstack_alloc
14981 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14982
14983 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14984 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14985 grow to a huge size with typical invocation.
14986
14987 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14988 Use the pattern recommended by Autoconf 2.57, except also protect
14989 against double-definition.
14990 * src/system.h: Likewise.
14991 Portability issues reported by Nelson H. F. Beebe.
14992
14993 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14994 All uses changed. Provide a definition in both C and C++.
14995 (yytrue, yyfalse): Define even if defined (__cplusplus).
14996
14997 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14998 Reported by Nelson H. F. Beebe.
14999
15000 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15001
150022003-01-02 Paul Eggert <eggert@twinsun.com>
15003
15004 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15005 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15006 Bug reported by Nelson H. F. Beebe.
15007
150082003-01-01 Paul Eggert <eggert@twinsun.com>
15009
15010 * Version 1.875.
15011
150122002-12-30 Paul Eggert <eggert@twinsun.com>
15013
15014 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15015 Moved here from...
15016 (<INITIAL>","): Here. This causes stray "," to be treated
15017 more uniformly.
15018
15019 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15020 last brace in braced code when not in Yacc mode, for compatibility
15021 with Bison 1.35. This resurrects the 2001-12-15 patch to
15022 src/reader.c.
15023
15024 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15025 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15026
150272002-12-28 Paul Eggert <eggert@twinsun.com>
15028
15029 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15030 that of SYM's type. This fixes Debian bug 168069, reported by
15031 Thomas Olsson.
15032
150332002-12-28 Paul Eggert <eggert@twinsun.com>
15034
15035 Version 1.75f.
15036
15037 Switch back to the Yacc style of conflict reports, undoing some
15038 of the 2002-07-30 change.
15039 * doc/bison.texinfo (Understanding): Use Yacc style for
15040 conflict reports. Also, use new way of locating rules.
15041 * src/conflicts.c (conflict_report):
15042 Renamed from conflict_report_yacc, removing the old
15043 'conflict_report'. Translate the entire conflict report at once,
15044 so that we don't assume that "," has the same interpretation in
15045 all languages.
15046 (conflicts_output): Use Yacc-style conflict report for each state,
15047 instead of our more-complicated style.
15048 (conflicts_print): Use Yacc-style conflict report, except print
15049 the input file name when not emulating Yacc.
15050 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15051 Conflicted Reduction, %expect not enough, %expect too much,
15052 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15053 * tests/existing.at (GNU Cim Grammar): Likewise.
15054 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15055
15056 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15057 fatal): Don't invoke fflush; it's not needed and it might even be
15058 harmful for stdout, as stdout might not be open.
15059 * src/reduce.c (reduce_print): Likewise.
15060
150612002-12-27 Paul Eggert <eggert@twinsun.com>
15062
15063 Fix a bug where error locations were not being recorded correctly.
15064 This problem was originally reported by Paul Hilfinger in
15065 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15066
15067 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15068 top of the location stack's error locations.
15069 (yyerrlab): Set it. When discarding a token, push its location
15070 onto yylerrsp so that we don't lose track of the error's end.
15071 (yyerrlab1): Now is only the target of YYERROR, so that we can
15072 properly record the location of the action that failed. For GCC
15073 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15074 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15075 (yyerrlab2): New label, which yyerrlab now falls through to.
15076 Compute the error's location by applying YYLLOC_DEFAULT to
15077 the locations of all the symbols that went into the error.
15078 * doc/bison.texinfo (Location Default Action): Mention that
15079 YYLLOC_DEFAULT is also invoked for syntax errors.
15080 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15081 Error locations include the locations of all the tokens that were
15082 discarded, not just the last token.
15083
150842002-12-26 Paul Eggert <eggert@twinsun.com>
15085
15086 * src/files.c: Include quote.h.
15087 (compute_output_file_names): Warn if we detect conflicting
15088 outputs to the same file. This should catch the misunderstanding
15089 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15090
15091 * src/conflicts.c (conflicts_print): If the user specifies
15092 "%expect N", report an error if there are any reduce/reduce
15093 conflicts. This is what the manual says should happen.
15094 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15095 * tests/conflicts.at (%expect with reduce conflicts): New test.
15096
15097 Don't use m4_include on relative file names, as it doesn't work as
15098 desired if there happens to be a file with that name under ".".
15099
15100 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15101 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15102 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15103 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15104 * src/output.c (output_skeleton): Use full path names when
15105 specifying a file to include; don't rely on include path, as
15106 it's unreliable when the working file contains a file with
15107 that name.
15108
151092002-12-25 Paul Eggert <eggert@twinsun.com>
15110
15111 Remove obsolete references to bison.simple and bison.hairy.
15112 Problem mentioned by Aubin Mahe in
15113 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
15114 * data/glr.c: Comment fix.
15115 * doc/bison.1: Remove references. Also, mention "yacc".
15116
15117 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15118 with -g option.
15119
15120 * src/parse-gram.y (declaration): Use enum "report_states" rather
15121 than its numeric value 1.
15122
15123 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15124 opening a new one. This fixes Debian bug 165349, reported by
15125 Bruce Stephens.
15126
151272002-12-24 Paul Eggert <eggert@twinsun.com>
15128
15129 Version 1.75e.
15130
15131 * Makefile.maint (cvs-update): Don't assume that the shell
15132 supports $(...), as Solaris sh doesn't.
15133
15134 * src/parse-gram.y (lloc_default): Remove test for empty
15135 nonterminals at the end, since it didn't change the result.
15136
151372002-12-24 Paul Eggert <eggert@twinsun.com>
15138
15139 If the user does not define YYSTYPE as a macro, Bison now declares it
15140 using typedef instead of defining it as a macro. POSIX requires this.
15141 For consistency, YYLTYPE is also declared instead of defined.
15142
15143 %union directives can now have a tag before the `{', e.g., the
15144 directive `%union foo {...}' now generates the C code
15145 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
15146 The default union tag is `YYSTYPE', for compatibility with Solaris 9
15147 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
15148 instead of `yyltype'.
15149
15150 `yystype' and `yyltype' are now obsolescent macros instead of being
15151 typedefs or tags; they are no longer documented and will be
15152 withdrawn in a future release.
15153
15154 * data/glr.c (b4_location_type): Remove.
15155 (YYSTYPE): Renamed from yystype.
15156 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
15157 (struct YYLTYPE): Renamed from struct yyltype.
15158 (YYLTYPE): Renamed from yyltype.
15159 (yyltype, yystype): New (and obsolescent) macros,
15160 for backward compatibility.
15161 * data/yacc.c: Likewise.
15162
15163 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
15164 does not specify a union tag. This is for compatibility with
15165 Solaris 9 yacc.
15166
15167 * src/parse-gram.y (add_param): 2nd arg is now char * not char
15168 const *, since it is now modified by stripping surrounding { }.
15169 (current_braced_code): Remove.
15170 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
15171 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
15172 trailing " {...}". Now of type <chars>.
15173 (grammar_declaration): Adjust to bundled tokens.
15174 (code_content): Remove; stripping is now done by add_param.
15175 (print_token_value): Print contents of bundled tokens.
15176 (token_name): New function.
15177
15178 * src/reader.h (braced_code, current_braced_code): Remove.
15179 (token_name): New decl.
15180
15181 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
15182 token_type, not braced_code code_kind. All uses changed.
15183 (SC_PRE_CODE): New state, for scanning after a keyword that
15184 has (or usually has) an immediately-following braced code.
15185 (token_type): New local var, to keep track of which token type
15186 to return when scanning braced code.
15187 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
15188 <INITIAL>"%parse-param", <INITIAL>"%printer",
15189 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
15190 instead of returning a token type immediately.
15191 (<INITIAL>"{"): Set token type.
15192 (<SC_BRACED_CODE>"}"): Use it.
15193 (handle_action_dollar, handle_action_at): Now returns bool
15194 indicating success. Fail if ! current_rule; this prevents a core dump.
15195 (handle_symbol_code_dollar, handle_symbol_code_at):
15196 Remove; merge body into caller.
15197 (handle_dollar, handle_at): Complain in invalid contexts.
15198
15199 * NEWS, doc/bison.texinfo: Document the above.
15200 * NEWS: Fix years and program names in copyright notice.
15201
152022002-12-17 Paul Eggert <eggert@twinsun.com>
15203
15204 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
15205 Reporting, Table of Symbols): Omit mentions of %lex-param and
15206 %parse-param from the documentation for now.
15207
152082002-12-15 Paul Eggert <eggert@twinsun.com>
15209
15210 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
15211 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
15212 lookahead symbol, and which sets yychar in parser actions) and it
15213 disagreed with the Bison documentation. Bug
15214 reported by Andrew Walrond.
15215
15216 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
15217 as the caller now does that.
15218 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
15219 (YYEMPTY): Parenthesize right hand side, since others use it.
15220 (yyparse): Don't assume that our generated code is the only code
15221 that sets yychar.
15222
152232002-12-13 Paul Eggert <eggert@twinsun.com>
15224
15225 Version 1.75d.
15226
15227 POSIX requires a "yacc" command.
15228 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
15229 (MOSTLYCLEANFILES): Add yacc.
15230 (yacc): New rule.
15231 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
15232 as an alias for bison y.
15233
15234 * po/LINGUAS: Add da.
15235
15236 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
15237 problem with latest <getopt.h>.
15238 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
15239
15240 * doc/fdl.texi: Upgrade to 1.2.
15241 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
15242 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
15243 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
15244 gnulib.
15245 * config/install-sh: Sync with autotools.
15246
15247 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
15248 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15249 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
15250 locations are requested.
15251 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
15252 locations are requested.
15253
152542002-12-12 Paul Eggert <eggert@twinsun.com>
15255
15256 Remove unportable casts and storage allocation tricks.
15257 While we're at it, remove almost all casts, since they
15258 usually aren't needed and are a sign of trouble.
15259
15260 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
15261
15262 * src/derives.c (derives_compute): Do not subtract NTOKENS from
15263 the pointer DSET returned by malloc; this isn't portable.
15264 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
15265 Similarly for DERIVES.
15266 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
15267 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
15268 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
15269
15270 * src/derives.c (derives_compute): Do not bother invoking
15271 int_of_rule_number, since rule numbers are integers.
15272
15273 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
15274 rather than XMALLOC (char, N).
15275
15276 * src/files.c (filename_split): Rewrite to avoid cast.
15277
15278 * src/gram.h (symbol_number_as_item_number,
15279 item_number_as_symbol_number, rule_number_as_item_number,
15280 item_number_as_rule_number):
15281 Now inline functions rather than macros, to avoid casts.
15282 * src/state.h (state_number_as_int): Likewise.
15283 * src/tables.c (state_number_to_vector_number,
15284 symbol_number_to_vector_number): Likewise.
15285
15286 * src/gram.h (int_of_rule_number): Remove; no longer used.
15287
15288 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
15289 since the resulting storage is always stored into.
15290
15291 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
15292 where it's needed.
15293
15294 * src/muscle_tab.c (muscle_m4_output):
15295 Now inline. Return bool, not int.
15296 * src/state.c (state_compare): Likewise.
15297 * src/symtab.c (symbol_check_defined,
15298 symbol_check_alias_consistency, symbol_pack, symbol_translation,
15299 hash_compare_symbol, hash_symbol):
15300 Likewise.
15301 * src/uniqstr.c (uniqstr_print): Likewise.
15302 * src/muscle_tab.c (muscle_m4_output_processor):
15303 New function, to avoid casts.
15304 * src/state.c (state_comparator, stage_hasher): Likewise.
15305 * src/symtab.c (symbol_check_defined_processor,
15306 symbol_check_alias_consistency_processor, symbol_pack_processor,
15307 symbol_translation_processor, hash_symbol_comparator,
15308 hash_symbol_hasher): Likewise.
15309 * src/uniqstr.c (uniqstr_print_processor): Likewise.
15310 * src/muscle_tab.c (muscles_m4_output):
15311 Use new functions instead of casting old functions unportably.
15312 * src/state.c (state_hash_new): Likewise.
15313 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
15314 symbols_token_translations_init):
15315 Likewise.
15316 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
15317
15318 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
15319 var instead of casting to long, to avoid casts.
15320 (prepare_states): Use MALLOC rather than alloca, so that we don't
15321 have to worry about alloca.
15322 * src/state.c (state_hash_lookup): Likewise.
15323
15324 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
15325 local var instead of casting to unsigned char, to avoid casts.
15326
15327 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
15328 STATE_ALLOC): Remove.
15329 (transitions_new, errs_new, reductions_new, state_new): Use malloc
15330 rather than calloc, and use offsetof to avoid allocating slightly
15331 too much storage.
15332 (state_new): Initialize all members.
15333
15334 * src/state.c (state_hash): Use unsigned accumulator, not signed.
15335
15336 * src/symtab.c (symbol_free): Remove; unused.
15337 (symbol_get): Remove cast in lhs of assignment.
15338 (symbols_do): Now static. Accept generic arguments, not
15339 hashing-related ones.
15340
15341 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
15342 (symbol_processor): Remove.
15343 (symbols_do): Remove decl; now static.
15344
15345 * src/system.h (alloca): Remove; decl no longer needed.
15346 (<stddef.h>): Include, for offsetof.
15347 (<inttypes.>, <stdint.h>): Include if available.
15348 (uintptr_t): New type, if system lacks it.
15349 (CALLOC, MALLOC, REALLOC): New macros.
15350 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15351 new macros.
15352
15353 * src/tables.c (table_size): Now int, to pacify GCC.
15354 (table_grow, table_ninf_remap): Use signed table size.
15355 (save_row): Don't bother initializing locals when not needed.
15356 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15357 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15358
15359 * src/vcg.h: Correct misspellings.
15360
15361 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15362
15363
15364 * src/getargs.c (getargs): Don't assume EOF == -1.
15365
153662002-12-09 Paul Eggert <eggert@twinsun.com>
15367
15368 Change identifier spellings to avoid collisions with names
15369 that are reserved by POSIX.
15370
15371 Don't use names ending in _t, since POSIX reserves them.
15372 For consistency, remove _e and _s endings -- they're weren't
15373 needed to remove ambiguity. All uses changed.
15374 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15375 turn was just renamed from struniq_t.
15376 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15377 which in turn was just renamed from struniq_processor_t.
15378 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15379 in turn was renamed from hash_compare_struniq_t.
15380 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15381 (state_list): Renamed from state_list_t.
15382 * src/assoc.h (assoc): Renamed from assoc_t.
15383 * src/conflicts.c (enum conflict_resolution): Renamed from
15384 enum conflict_resolution_e.
15385 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15386 (rule_list): Renamed from rule_list_t.
15387 * src/getargs.h (enum trace): Renamed from enum trace_e.
15388 (enum report): Renamed from enum report_e.
15389 * src/gram.h (item_number): Renamed from item_number_t.
15390 (rule_number): Renamed from rule_number_t.
15391 (struct rule_s): Remove the "rule_s" part; not used.
15392 (rule): Renamed from rule_t.
15393 (rule_filter): Renamed from rule_filter_t.
15394 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15395 (goto_list): Renamed from goto_list_t.
15396 * src/lalr.h (goto_number): Renamed from goto_number_t.
15397 * src/location.h (location): Renamed from location_t.
15398 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15399 and moved here from:
15400 * src/muscle_tab.h (muscle_entry_t): here.
15401 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15402 (rule_list): Renamed from rule_list_t.
15403 * src/print_graph.c (static_graph): Renamed from graph.
15404 * src/reader.h (braced_code): Renamed from braced_code_t.
15405 Remove brace_code_e tag.
15406 * src/relation.h (relation_node): Renamed from relation_node_t.
15407 (relation_nodes): Renamed from relation_nodes_t.
15408 (relation): Renamed from relation_t.
15409 * src/state.h (state_number): Renamed from state_number_t.
15410 (struct state): Renamed from struct state_s.
15411 (state): Renamed from state_t.
15412 (transitions): Renamed from transitions_t. Unused (and
15413 misspelled) transtion_s tag removed.
15414 (errs): Renamed from errs_t. Unused errs_s tag removed.
15415 (reductions): Renamed from reductions_t. Unused tag
15416 reductions_s removed.
15417 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15418 (struct symbol_list): Renamed from struct symbol_list_s.
15419 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15420 (struct symbol): Renamed from struct symbol_s.
15421 (symbol): Renamed from symbol_t.
15422 * src/tables.c (vector_number): Renamed from vector_number_t.
15423 (action_number): Renamed from action_t.
15424 * src/tables.h (base_number): Renamed from base_t.
15425 * src/vcg.h (enum color): Renamed from enum color_e.
15426 (enum textmode): Renamed from enum textmode_e.
15427 (enum shape): Renamed from enum shape_e.
15428 (struct colorentry): Renamed from struct colorentry_s.
15429 (struct classname): Renamed from struct classname_s.
15430 (struct infoname): Renamed from struct infoname_s.
15431 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15432 (enum decision): Renamed from enum decision_e.
15433 (enum orientation): Renamed from enum orientation_e.
15434 (enum alignment): Renamed from enum alignment_e.
15435 (enum arrow_mode): Renamed from enum arrow_mode_e.
15436 (enum crossing_type): Renamed from enum crossing_type_e.
15437 (enum view): Renamed from enum view_e.
15438 (struct node): Renamed from struct node_s.
15439 (node): Renamed from node_t.
15440 (enum linestyle): Renamed from enum linestyle_e.
15441 (enum arrowstyle): Renamed from enum arrowstyle_e.
15442 (struct edge): Renamed from struct edge.
15443 (edge): Renamed from edge_t.
15444 (struct graph): Renamed from struct graph_s.
15445 (graph): Renamed from graph_t.
15446 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15447 Rename value_t -> value.
15448 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15449 value_t_as_yystype -> value_as_yystype.
15450
15451 Don't include <errno.h> in the mainstream code, since it
15452 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15453 * lib/get-errno.c, lib/get-errno.h: New files.
15454 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15455 get-errno.c.
15456 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15457 * src/output.c (output_skeleton): Likewise.
15458 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15459 instead of errno.
15460 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15461 Likewise.
15462 (handle_action_dollar, handle_action_at): Likewise.
15463 * src/system.h: Do not include <errno.h>.
15464 (TAB_EXT): Renamed from EXT_TAB.
15465 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15466
15467 Avoid str[a-z]*, since <string.h> reserves that name space.
15468 Change all instances of "struniq" in names to "uniqstr", and
15469 likewise for "STRUNIQ" and "UNIQSTR".
15470 * src/uniqstr.c: Renamed from src/struniq.c.
15471 * src/uniqstr.h: Renamed from src/struniq.h.
15472 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15473 * src/files.c (strsuffix): Remove; unused.
15474 (concat2): Renamed from stringappend. Now static.
15475 * src/files.h (strsuffix, stringappend): Remove; unused.
15476 * src/parse-gram.y (<chars>): Renamed from <string>.
15477 (<uniqstr>): Renamed from <struniq>.
15478 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15479 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15480 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15481 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15482 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15483 (N_EXPAND): Renamed from N_STRETCH.
15484
15485 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15486 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15487 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15488 Remove; unused.
15489 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15490 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15491 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15492 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15493 (BASE_MAXIMUM): Renamed from BASE_MAX.
15494 (BASE_MINIMUM): Renamed from BASE_MIN.
15495 (ACTION_MAX): Remove; unused.
15496 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15497 Unnecessary casts removed from above defines.
15498
15499
15500 Fix misspelling in names.
15501 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15502 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15503 G_NODE_ALIGNEMENT.
15504
15505
15506 * lib/timevar.c (timevar_report): Renamed from time_report,
15507 for consistency with other names.
15508 * lib/timevar.h (timevar_report): New decl.
15509 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15510
15511
15512 Sort include-file uses.
15513
15514 Reorder all include files under src to be in the order "system.h".
15515 then the ../lib include files in angle brackets (alphabetized),
15516 then the . include files in double-quotes (alphabetized). Fix
15517 dependency breakages encountered in this process, as follows:
15518 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15519 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15520 * src/state.h: Include "symtab.h".
15521
155222002-12-08 Paul Eggert <eggert@twinsun.com>
15523
15524 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15525 since this causes problems when __file__ contains character
15526 sequences like "@" that are treated specially by src/scan-skel.l.
15527 Instead, just use the file's basename. This fixes the bug
15528 reported by Martin Mokrejs in
15529 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15530
155312002-12-06 Paul Eggert <eggert@twinsun.com>
15532
15533 Add support for rules that do not have trailing semicolons, as
15534 POSIX requires. Improve the quality of locations in Bison
15535 diagnostics.
15536
15537 * src/location.c: Include <quotearg.h>.
15538 (empty_location): Now const.
15539 (location_print): New function. Follow the recommendation of the
15540 GNU Coding Standards for locations that span file boundaries.
15541 * src/location.h: Do not include <quotearg.h>; no longer needed.
15542 (boundary): New type.
15543 (location_t): Use it. This allows locations to span file boundaries.
15544 All member uses changed: file -> start.file or end.file (as needed),
15545 first_line -> start.line, first_column -> start.column,
15546 last_line -> end.line, last_column -> end.column.
15547 (equal_boundaries): New function.
15548 (LOCATION_RESET, LOCATION_STEP): Remove.
15549 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15550 (empty_location): Now const.
15551 (location_print): New decl.
15552 * src/parse-gram.y (lloc_default): New function, which handles
15553 empty locations more accurately.
15554 (YYLLOC_DEFAULT): Use it.
15555 (%token COLON): Remove.
15556 (%token ID_COLON): New token.
15557 (rules): Use it.
15558 (declarations, rules): Remove trailing semicolon.
15559 (declaration, rules_or_grammar_declaration):
15560 Allow empty (";") declaration.
15561 (symbol_def): Remove empty actions; no longer needed.
15562 (rules_or_grammar_declaration): Remove trailing semicolon.
15563 (semi_colon.opt): Remove.
15564 * src/reader.h: Include location.h.
15565 (scanner_cursor): New decl.
15566 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15567 rolling our own.
15568 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15569 of *loc.
15570 (STEP): Remove. No longer needed, now that adjust_location does
15571 the work. All uses removed.
15572 (scanner_cursor): New var.
15573 (adjust_location): Renamed from extend_location. It now sets
15574 *loc and adjusts the scanner cursor. All uses changed.
15575 Don't bother testing for CR.
15576 (handle_syncline): Remove location arg; now updates scanner cursor.
15577 All callers changed.
15578 (unexpected_end_of_file): Now accepts start boundary of token or
15579 comment, not location. All callers changed. Update scanner cursor,
15580 not the location.
15581 (SC_AFTER_IDENTIFIER): New state.
15582 (context_state): Renamed from c_context. All uses changed.
15583 (id_loc, code_start, token_start): New local vars.
15584 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15585 processing of Yacc white space and equivalents here.
15586 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15587 instead of returning ID immediately, since we need to search for
15588 a subsequent colon.
15589 (<INITIAL>"'", "\""): Save token_start.
15590 (<INITIAL>"%{", "{", "%%"): Save code_start.
15591 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15592 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15593 BEGIN context_state at end, not INITIAL.
15594 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15595 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15596 Return correct token start.
15597 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15598 the start of a character, string or multiline comment is found.
15599 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15600 Reduction): Adjust reported locations to match the more-precise
15601 results now expected.
15602 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15603 * tests/reduce.at (Useless Rules, Reduced Automaton,
15604 Underivable Rules): Likewise.
15605 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15606 or "|"' now that so many other tokens are allowed by the new grammar.
15607
15608 * src/complain.h (current_file): Remove duplicate decl;
15609 current_file is now owned by files.h.
15610 * src/complain.c, src/scan-gram.l: Include files.h.
15611
156122002-12-06 Paul Eggert <eggert@twinsun.com>
15613
15614 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15615 promotes to int; it might be unsigned int.
15616 * data/yacc.c (yy_reduce_print): Likewise.
15617
15618 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15619 be #defined in the prologue, not in the Bison declarations.
15620 This fixes Debian Bug 102878, reported by Shaul Karl.
15621
156222002-12-02 Paul Eggert <eggert@twinsun.com>
15623
15624 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15625 * lib/strtoul.c: New file, from gnulib.
15626 This fixes a porting bug reported by Peter Klein in
15627 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15628
156292002-11-30 Paul Eggert <eggert@twinsun.com>
15630
15631 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15632 and put only a forward declaration in the prologue. This is for
15633 consistency with the other scanner helper functions.
15634
15635 Type clashes now generate warnings, not errors, since it
15636 appears that POSIX may allow some grammars with type clashes.
15637 * src/reader.c (grammar_current_rule_check): Warn about
15638 type clashes instead of complaining.
15639 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15640
15641 Add Yacc library, since POSIX requires it.
15642 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15643 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15644 * lib/main.c, lib/yyerror.c: New files.
15645
15646 gram_error can be static; it need not be extern.
15647 * src/reader.h (gram_error): Remove decl.
15648 * src/parse-gram.y (gram_error): Now static. Add static decl.
15649 (print_token_value): Omit parameter names from forward decl,
15650 for consistency.
15651
156522002-11-29 Paul Eggert <eggert@twinsun.com>
15653
15654 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15655 be declared before being used. E.g., one should typically
15656 declare them in the prologue. Use GNU coding style in examples.
15657 Put "const" consistently after the type it modifies. Mention
15658 that C99 supports "inline". Mention that yyerror traditionally
15659 returns "int".
15660
15661 %parse-param and %lex-param now take just one argument, the
15662 declaration; the argument name is deduced from the declaration.
15663
15664 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15665 Reporting, Table of Symbols): Document this.
15666 * src/parse-gram.y (add_param): New function.
15667 (COMMA): Remove.
15668 (declaration): Implement new rule for %parse-param and %lex-param.
15669 * src/scan-gram.l: "," now elicits a warning, rather than being
15670 a token; this is more compatible with byacc.
15671 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15672
156732002-11-27 Paul Eggert <eggert@twinsun.com>
15674
15675 Rename identifiers to avoid real and potential collisions.
15676
15677 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15678 to avoid collision with lex macro described by Bruce Lilly in
15679 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15680 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15681 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15682 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15683 All uses changed.
15684 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15685 The name "yycontrol" violates the name space rules, and this stuff
15686 wasn't being used anyway.
15687 (input): Remove action; this stuff wasn't being used.
15688 (gram_error): Rename local variable yylloc -> loc.
15689 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15690 (YY_DECL): Don't use "yy" at start of local variables.
15691 All uses changed, e.g., yylloc -> loc.
15692 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15693 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15694 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15695 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15696
15697 * src/parse-gram.y (gram_error): loc is now const *.
15698 * src/reader.h (gram_error): Likewise.
15699
157002002-11-24 Paul Eggert <eggert@twinsun.com>
15701
15702 Version 1.75c.
15703
15704 * tests/actions.at (Actions after errors): Use an output format
15705 more similar to that of the Printers and Destructors test.
15706 Test the position of the ';' token too.
15707 (Printers and Destructors): Likewise.
15708 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15709 unnecessarily alarming people when the test fails.
15710
15711 * data/yacc.c (yyerrlab1): Move this label down, so that the
15712 parser does not discard the lookahead token if the user code
15713 invokes YYERROR. This change is required for POSIX conformance.
15714
15715 * lib/error.c: Sync with gnulib.
15716
157172002-11-22 Paul Eggert <eggert@twinsun.com>
15718
15719 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15720 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15721 * lib/xmalloc.c: Likewise.
15722
157232002-11-20 Paul Eggert <eggert@twinsun.com>
15724
15725 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15726
157272002-11-20 Paul Eggert <eggert@twinsun.com>
15728
15729 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15730 should use `if (! x) abort ();' rather than `assert (x);', and
15731 anyway it's one less thing to worry about configuring.
15732
15733 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15734 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15735 and replace all instances of assert with abort.
15736 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15737 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15738
15739 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15740 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15741 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15742 hash_find_entry, hash_rehash, hash_insert): Likewise.
15743 * src/conflicts.c (resolve_sr_conflict): Likewise.
15744 * src/lalr.c (set_goto_map, map_goto): Likewise.
15745 * src/nullable.c (nullable_compute): Likewise.
15746 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15747 * src/reader.c (packgram, reader): Likewise.
15748 * src/state.c (state_new, state_free, state_transitions_set,
15749 state_reduction_find): Likewise.
15750 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15751 symbol_pack): Likewise.
15752 * src/tables.c (conflict_row, pack_vector): Likewise.
15753 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15754 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15755 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15756 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15757
15758 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15759 (ARGMATCH_CONSTRAINT): New macro.
15760 (ARGMATCH_ASSERT): Use it.
15761
15762 * src/system.h (verify): New macro.
15763 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15764 rather than assert.
15765 * src/tables.c (tables_generate): Likewise.
15766
15767 * src/struniq.c (struniq_assert): Now returns void, and aborts
15768 if the assertion is false.
15769 (struniq_assert_p): Remove.
15770 * src/struniq.h: Likewise.
15771
157722002-11-18 Paul Eggert <eggert@twinsun.com>
15773
15774 * data/glr.c (yygetLRActions): Replace `yyindex' with
15775 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15776 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15777 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15778
157792002-11-18 Akim Demaille <akim@epita.fr>
15780
15781 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15782 space.
15783 From Tim Van Holder.
15784
157852002-11-17 Paul Eggert <eggert@twinsun.com>
15786
15787 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15788 to "SyntaxError" for consistency with my 2002-11-15 change.
15789
15790 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15791 not define to {}, since this breaks the common use of `YYDPRINTF
15792 ((...));' if a single statement is desired (e.g. before `else').
15793 Work around GCC warnings by surrounding corresponding calls with
15794 {} if needed.
15795 (yyhasResolvedValue): Remove unused function.
15796 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15797 loop body.
15798 (yyreportSyntaxError): Renamed from yyreportParseError.
15799 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15800 All uses changed.
15801 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15802 extern when possible. Remove unused initializations.
15803
158042002-11-16 Akim Demaille <akim@epita.fr>
15805
15806 Augment the similarity between GLR and LALR traces.
15807
15808 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15809 (YY_REDUCE_PRINT): New.
15810 (yyparse): Use them.
15811 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15812 YYDPRINT here.
15813 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15814 state reached after the reduction/recovery, since...
15815 (yyparse, yyprocessOneStack): Report the state we are entering in.
15816
158172002-11-16 Akim Demaille <akim@epita.fr>
15818
15819 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15820 Add support for --trace=skeleton.
15821 * src/scan-skel.l: %option debug.
15822 Scan strings of non-@ or \n instead of character by character.
15823 (scan_skel): Handle trace_skeleton.
15824 (QPUTS): New.
15825 (@output_parser_name@, @output_header_name@): ``Restore'' their
15826 support (used to be M4 macros).
15827 * data/yacc.c: Quote larger chunks, a la glr.c.
15828 * data/lalr1.cc: Likewise.
15829 The header guards are no longer available, so use some other
15830 string than `YYLSP_NEEDED'.
15831
158322002-11-16 Akim Demaille <akim@epita.fr>
15833
15834 Make the ``Printers and Destructors'' test more verbose, taking
15835 `yacc.c''s behavior as (possibly wrong) reference.
15836
15837 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15838 instead of fprint on stdout.
15839 Set and report the last_line of the symbols.
15840 Consistently display values and locations.
15841
158422002-11-16 Paul Eggert <eggert@twinsun.com>
15843
15844 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15845
158462002-11-15 Paul Eggert <eggert@twinsun.com>
15847
15848 * tests/actions.at (Actions after errors): New test case.
15849
15850 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15851 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15852 tests/action.at, tests/calc.at, tests/conflicts.at,
15853 tests/cxx-type.at, tests/regression.at:
15854 "parse error" -> "syntax error" for POSIX compatibility.
15855 "parsing stack overflow..." -> "parser stack overflow" so
15856 that code matches Bison documentation.
15857
158582002-11-15 Akim Demaille <akim@epita.fr>
15859
15860 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15861 take two BRACED_CODE, not two string_content.
15862 Free the scanner's obstack when we are done.
15863 (code_content): New.
15864 * tests/calc.at: Adjust.
15865 * doc/bison.texinfo: Adjust.
15866 Also, make sure to include the `,' for these declarations.
15867
158682002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15869
15870 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15871 definition; avoids potential autoreconf problems.
15872
158732002-11-15 Akim Demaille <akim@epita.fr>
15874
15875 Always check the value returned by yyparse.
15876
15877 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15878 returned by yyparse.
15879 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15880 Adjust calls.
15881 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15882 returned by yyparse.
15883
158842002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15885
15886 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15887 on input.at test.
15888
158892002-11-14 Paul Eggert <eggert@twinsun.com>
15890
15891 * src/output.c (output_skeleton): Call xfopen instead of
15892 duplicating xfopen's body.
15893
15894 Fix bugs reported by Nelson H. F. Beebe in
15895 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15896
15897 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15898 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15899 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15900 file twice in the grammar, as an extra check.
15901
15902 * tests/input.at (Torturing the Scanner): Surround the
15903 backslash-newline tests with "#if 0", to make it less likely that
15904 we'll run into compiler bugs. Bring back solitary \ inside
15905 comment, but add a closing comment to work around HP C bug. Don't
15906 test backslash-newline in C character constant.
15907
159082002-11-14 Akim Demaille <akim@epita.fr>
15909
15910 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15911 status of the compiler.
15912 Calling `exit 1' is no longer needed.
15913 Reported by Nelson H. F. Beebe.
15914
159152002-11-14 Akim Demaille <akim@epita.fr>
15916
15917 * tests/atlocal.in (CPPFLAGS): We have config.h.
15918 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15919 New.
15920 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15921 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15922 * tests/regression.at, tests/torture.at: Use them for all the
15923 grammars that are to be compiled.
15924 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15925 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15926 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15927
159282002-11-14 Akim Demaille <akim@epita.fr>
15929
15930 * doc/bison.texinfo: Various formatting changes (alignments in
15931 samples, additional @group/@end group, GCS in samples.
15932 Use @deffn instead of simple @table to define the directives,
15933 macros, variables etc.
15934
159352002-11-13 Paul Eggert <eggert@twinsun.com>
15936
15937 Fix some bugs reported by Albert Chin-A-Young in
15938 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15939
15940 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15941 -o c"; the HP C compiler chatters during compilation.
15942 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15943 * tests/headers.at (export YYLTYPE): Likewise.
15944
15945 * tests/input.at (Torturing the Scanner): Remove lines containing
15946 solitary backslashes, as they tickle a bug in the HP C compiler.
15947
15948 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15949 comments, since they're not portable. Use GNU coding style.
15950
159512002-11-13 Akim Demaille <akim@epita.fr>
15952
15953 * data/yacc.c: Leave bigger chunks of quoted text.
15954 (YYDSYMPRINTF): New.
15955 Use it to report symbol activities.
15956 * data/glr.c (YYDSYMPRINTF): New.
15957 Use it.
15958
159592002-11-12 Paul Eggert <eggert@twinsun.com>
15960
15961 Version 1.75b.
15962
15963 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15964 (yyglrReduce): Return yyok, not 0.
15965 This should avoid the enumerated-type warnings reported
15966 by Nelson H. F. Beebe in
15967 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15968
15969 * lib/bbitset.h (BITSET_INLINE): Remove.
15970 * lib/bitset.h [! BITSET_INLINE]: Remove.
15971 (bitset_set, bitset_reset, bitset_test): Rename local vars
15972 to avoid shadowing warnings by GCC.
15973
15974 * data/glr.c (inline): Remove #define. It's the user's
15975 responsibility to #define it away, just like 'const'.
15976 This fixes one of the bugs reported by Nelson H. F. Beebe in
15977 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15978
15979 * Makefile.maint (po-check): Scan .l and .y files instead of the
15980 .c and the .h files that they generate. This fixes the bug
15981 reported by Tim Van Holder in:
15982 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15983 Look for N_ as well as for _. Try to avoid matching #define for
15984 N_ and _.
15985 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15986 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15987 * src/scan-gram.l: Revamp regular expressions so that " and '
15988 do not confuse xgettext.
15989
15990 * src/struniq.h (struniq_new): Do not declare the return type
15991 to be 'const'; this violates the C standard.
15992 * src/struniq.c (struniq_new): Likewise.
15993
159942002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15995
15996 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15997 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15998 linker.
15999
160002002-11-12 Akim Demaille <akim@epita.fr>
16001
16002 * Makefile.maint: Sync with Autoconf:
16003 (local_updates): New.
16004
160052002-11-12 Akim Demaille <akim@epita.fr>
16006
16007 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16008
160092002-11-12 Akim Demaille <akim@epita.fr>
16010
16011 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16012 locations.
16013
160142002-11-12 Akim Demaille <akim@epita.fr>
16015
16016 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16017 not yyvalue.
16018
160192002-11-12 Akim Demaille <akim@epita.fr>
16020
16021 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16022 Use it to test the GLR parser.
16023
160242002-11-12 Akim Demaille <akim@epita.fr>
16025
16026 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16027 defines it.
16028 * data/glr.c (yystos): New.
16029 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16030 (YYDSYMPRINT): New.
16031 (yyval): Don't define it, it is handled via M4.
16032 (yyrecoverParseError): Free verbosely the discarded symbols.
16033 * data/yacc.c (yysymprint): Remove, rather...
16034 (b4_yysymprint_generate): invoke.
16035 * data/c.m4 (b4_yysymprint_generate): New.
16036 Accept pointers as arguments, as opposed to the version from
16037 yacc.c.
16038 (b4_yydestruct_generate): Likewise.
16039 * tests/cations.at (Printers and Destructors): Use Bison directives
16040 instead of CPP macros.
16041 Don't rely on internal details.
16042
160432002-11-12 Akim Demaille <akim@epita.fr>
16044
16045 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16046 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16047 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16048 it against YYEMPTY and so forth), work on yytoken (i.e., set
16049 it to YYEMPTY etc.).
16050 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16051 (b4_symbol_actions): Remove.
16052 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16053 for 0, end-of-input.
16054
160552002-11-12 Akim Demaille <akim@epita.fr>
16056
16057 * doc/bison.texinfo (Destructor Decl): New.
16058
160592002-11-12 Akim Demaille <akim@epita.fr>
16060
16061 * src/tables.c (tables_generate): Use free for pointers that
16062 cannot be NULL, not XFREE.
16063 (pack_vector): Use assert, not fatal, for bound violations.
16064 * src/state.c (state_new): Likewise.
16065 * src/reader.c (reader): Likewise.
16066 * src/lalr.c (set_goto_map): Likewise.
16067 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16068 the file name.
16069
160702002-11-12 Akim Demaille <akim@epita.fr>
16071
16072 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16073 Restore.
16074 * src/scan-gram.l (last_string): Is global to the file, not to
16075 yylex.
16076 * src/parse-gram.y (input): Don't append the epilogue here,
16077 (epilogue.opt): do it here, and free the scanner's obstack.
16078 * src/reader.c (epilogue_set): Rename as...
16079 (epilogue_augment): this.
16080 * data/c.m4 (b4_epilogue): Defaults to empty.
16081
160822002-11-12 Akim Demaille <akim@epita.fr>
16083
16084 * src/getargs.c (long_options): Remove duplicates.
16085 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16086 Remove.
16087 * doc/bison.rnh: Remove.
16088 * doc/bison.texinfo (VMS Invocation): Remove.
16089
160902002-11-12 Akim Demaille <akim@epita.fr>
16091
16092 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16093 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16094
16095 Use struniq for symbols.
16096
16097 * src/symtab.h (symbol_t): The tag member is a struniq.
16098 (symbol_type_set): Adjust.
16099 * src/symtab.c (symbol_new): Takes a struniq.
16100 (symbol_free): Don't free the tag member.
16101 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16102 (hash_compare_symbol, hash_symbol): these.
16103 Use the fact that tags as struniqs.
16104 (symbol_get): Use struniq_new.
16105 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16106 Returns a strniq.
16107 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16108 and type members are struniqs.
16109 * src/reader.c (get_merge_function)
16110 (grammar_current_rule_merge_set): Adjust.
16111 (TYPE, current_type): Are struniq.
16112
16113 Use struniq for file names.
16114
16115 * src/files.h, src/files.c (infile): Split into...
16116 (grammar_file, current_file): these.
16117 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16118 * src/reduce.c (reduce_print): Likewise.
16119 * src/getargs.c (getargs): Likewise.
16120 * src/complain.h, src/complain.c: Likewise.
16121 * src/main.c (main): Call struniqs_new early enough to use it for
16122 file names.
16123 Don't free the input file name.
16124
161252002-11-12 Akim Demaille <akim@epita.fr>
16126
16127 * src/symtab.c (symbol_free): Remove dead deactivated code:
16128 type_name are properly removed.
16129 Don't use XFREE to free items that cannot be NULL.
16130 * src/struniq.h, src/struniq.c: New.
16131 * src/main.c (main): Initialize/free struniqs.
16132 * src/parse-gram.y (%union): Add astruniq member.
16133 (yyprint): Adjust.
16134 * src/scan-gram.l (<{tag}>): Return a struniq.
16135 Free the obstack bit that used to store it.
16136 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
16137
161382002-11-11 Paul Eggert <eggert@twinsun.com>
16139
16140 Revamp to fix many (but not all) of the C- and M4-related quoting
16141 problems. Among other things, this fixes the Bison bug reported
16142 by Jan Hubicka when processing the Bash grammar; see:
16143 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
16144
16145 Use new @ escapes consistently. Represent brackets with @{ and @}
16146 rather than @<:@ and @:>@, since this works a bit better with dumb
16147 editors like vi. Represent @ with @@, since @ is now consistently
16148 an escape. Use @oline@ and @ofile@ rather than __oline__ and
16149 __ofile__, to avoid unexpected expansions. Similarly, use @output
16150 rather than #output.
16151
16152 * data/c.m4 (b4_copyright): Omit file name from comment, since
16153 the file name could contain "*/".
16154 (b4_synclines_flag): Don't quote the 2nd argument; it should already
16155 be quoted. All uses changed.
16156
16157 * data/glr.c: Use new @ escapes consistently.
16158 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
16159 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
16160 Remove, since they couldn't handle arbitrary characters in file
16161 names.
16162 * data/lalr1.cc: Likewise.
16163 * data/yacc.c: Likewise.
16164
16165 * src/files.c (output_infix): Remove; all uses removed.
16166 * src/files.h: Likewise.
16167
16168 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
16169 mishandled funny characters in file names, and anyway it isn't
16170 needed any more.
16171 * data/yacc.c: Likewise.
16172 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
16173
16174 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
16175 * data/yacc.c: Likewise.
16176
16177 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
16178 strings now.
16179 (muscle_init): Quote filename as a C string.
16180 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
16181 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
16182 * src/output.c (escaped_file_name_output): New function.
16183 (prepare_symbols): Quote tokens for M4.
16184 (prepare): Don't insert output_infix, output_prefix,
16185 output_parser_name, output_header_name; this is now down by scan-skel.
16186 Insert skeleton as a C string.
16187
16188 * src/output.c (user_actions_output, symbol_destructors_output,
16189 symbol_printers_output): Quote filenames for C and M4.
16190 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16191
16192 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
16193 escapes other than \\ and \'; this simplifies the code.
16194 (<SC_STRING>): Likewise, for \\ and \".
16195 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
16196 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
16197 Use new escapes @{ and @} for [ and ].
16198
16199 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
16200 them with auto vars.
16201 Switch to new escape scheme, where @ is the escape character uniformly.
16202 Abort if a stray escape character is found. Avoid unbounded input
16203 buffer when parsing non-escaped text.
16204
16205 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
16206 __oline__, #output, $@, and @{ do not have unintended meanings.
16207
162082002-11-09 Paul Eggert <eggert@twinsun.com>
16209
16210 Fix the test failure due to GCC warnings described in
16211 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
16212 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
16213 evaluate to 0 if it's impossible for NINF to be in the respective
16214 table.
16215 (yygetLRActions, yyrecoverParseError): Use them.
16216
16217 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
16218 counted in the token inserted at end of file. Now takes
16219 location_t *, not location_t, so that the location can be
16220 adjusted. All uses changed.
16221
16222 * tests/regression.at (Invalid inputs): Adjust wording in
16223 diagnostic to match the new behavior.
16224
16225 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
16226 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
16227 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
16228 abort ();'. This reduces the runtime of the "Many lookaheads"
16229 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
16230 GCC 3.2.
16231
162322002-11-07 Paul Eggert <eggert@twinsun.com>
16233
16234 * src/parse-gram.y (CHARACTER): Remove unused token.
16235 All uses removed.
16236
16237 * src/scan-gram.l: Remove stack option. We no longer use the
16238 stack, since the stack was never deeper than 1; instead, use the
16239 new auto var c_context to record the stacked value.
16240
16241 Remove nounput option. At an unexpected end of file, we now unput
16242 the minimal input necessary to end cleanly; this simplifies the
16243 code.
16244
16245 Avoid unbounded token sizes where this is easy.
16246
16247 (unexpected_end_of_file): New function.
16248 Use it to systematize the error message on unexpected EOF.
16249 (last-string): Now auto, not static.
16250 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
16251 (scanner_last_string_free): Remove; not used.
16252 (percent_percent_count): Move decl to just before use.
16253 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
16254 not the (never otherwised-used) CHARACTER.
16255
162562002-11-07 Akim Demaille <akim@epita.fr>
16257
16258 Let yyerror always receive the msg as last argument, so that
16259 yyerror can be variadic.
16260
16261 * data/yacc.c (b4_yyerror_args): New.
16262 Use it when calling yyerror.
16263 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
16264 Use it when calling yyerror.
16265 * doc/bison.texinfo (Error Reporting): Adjust.
16266 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
16267 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
16268
162692002-11-06 Akim Demaille <akim@epita.fr>
16270
16271 #line should have quoted strings.
16272 Ideally, this should be done by m4_quotearg.
16273
16274 * src/scan-skel.l: Include quotearg.h.
16275 Quote __ofile__.
16276 * src/output.c (symbol_printers_output)
16277 (symbol_destructors_output): Quote the file name.
16278
162792002-11-06 Akim Demaille <akim@epita.fr>
16280
16281 * tests/regression.at (Invalid inputs): Adjust to the recent
16282 messages.
16283
162842002-11-06 Akim Demaille <akim@epita.fr>
16285
16286 Restore --no-lines.
16287 Reported by Jim Kent.
16288
16289 * data/c.m4 (b4_syncline): New.
16290 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
16291 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
16292 * src/output.c (user_actions_output): Likewise.
16293 (prepare): Define 'b4_synclines_flag'.
16294 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
16295
162962002-11-06 Akim Demaille <akim@epita.fr>
16297
16298 * src/main.c (main): Free `infile'.
16299 * src/scan-gram.l (handle_syncline): New.
16300 Recognize `#line'.
16301 * src/output.c (user_actions_output, symbol_destructors_output)
16302 (symbol_printers_output): Use the location's file name, not
16303 infile.
16304 * src/reader.c (prologue_augment, epilogue_set): Likewise.
16305
163062002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16307
16308 * src/tables.c (matching_state): Don't allow states to match if
16309 either has GLR conflict entries.
16310
163112002-11-05 Paul Eggert <eggert@twinsun.com>
16312
16313 * src/scan-gram.l: Use more accurate diagnostics, e.g.
16314 "integer out of range" rather than "invalid value".
16315 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
16316 accordingly.
16317
16318 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
16319 Also, remove one static variable in the scanner.
16320
16321 * src/scan-gram.l (braces_level): Now auto, not static.
16322 Initialize to zero if the compiler is being picky.
16323 (INITIAL): Clear braces_level instead of incrementing it.
16324 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
16325 as POSIX 1003.1-2001 requires.
16326 * src/system.h (IF_LINT): New macro, taken from coreutils.
16327 * configure.ac: Define "lint" if --enable-gcc-warnings.
16328
163292002-11-05 Akim Demaille <akim@epita.fr>
16330
16331 * src/scan-gram.l: When it starts with `%', complain about the
16332 whole directive, not just that `invalid character: %'.
16333
163342002-11-04 Akim Demaille <akim@epita.fr>
16335
16336 * Makefile.maint: Update from Autoconf.
16337 (update, cvs-update, po-update, do-po-update): New.
16338
163392002-11-04 Akim Demaille <akim@epita.fr>
16340
16341 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
16342 and yyerror.
16343 Have yyerror `use' its arguments.
16344 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16345 returns true when location & yacc & pure & parse-param.
16346 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16347
163482002-11-04 Akim Demaille <akim@epita.fr>
16349
16350 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16351 clashes.
16352 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16353 font-lock-mode.
16354 Use complain_at.
16355 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16356 slot 0.
16357
163582002-11-03 Paul Eggert <eggert@twinsun.com>
16359
16360 * src/reader.c (get_merge_function, grammar_current_rule_check):
16361 Use consistent diagnostics for reporting type name clashes.
16362 Quote the types with <>, for consistency with Yacc.
16363 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16364
163652002-11-03 Akim Demaille <akim@epita.fr>
16366
16367 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16368 New.
16369 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16370 (b4_parse_param): Remove.
16371 Use b4_identification.
16372 Propagate b4_pure_args where needed to pass them to yyerror.
16373 * data/glr.m4 (b4_parse_param): Remove.
16374 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16375 (b4_lpure_formals): New.
16376 Use b4_identification.
16377 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16378 b4_user_formals and b4_user_args.
16379 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16380 (yyreportAmbiguity): When using a pure parser, also need
16381 the location, and the parse-params.
16382 Adjust callers.
16383 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16384 When using a pure parser, also need the parse-params.
16385 Adjust callers.
16386 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16387 (%pure-parser + %parse-param) LALR and GLR parsers.
16388 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16389 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16390 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16391 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16392 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16393 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16394 * doc/bison.texinfo: Untabify the whole file.
16395 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16396 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16397 (Error Reporting): Adjust to these new directives.
16398 Document %error-verbose, deprecate YYERROR_VERBOSE.
16399
164002002-11-03 Akim Demaille <akim@epita.fr>
16401
16402 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16403 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16404 command line options.
16405 * tests/cxx-type.at: Formatting changes.
16406
164072002-11-03 Paul Eggert <eggert@twinsun.com>
16408
16409 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16410 to count columns correctly, and to check for invalid inputs.
16411
16412 Use mbsnwidth to count columns correctly. Account for tabs, too.
16413 Include mbswidth.h.
16414 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16415 (extend_location): New function.
16416 (YY_LINES): Remove.
16417
16418 Handle CRLF in C code rather than in Lex code.
16419 (YY_INPUT): New macro.
16420 (no_cr_read): New function.
16421
16422 Scan UCNs, even though we don't fully handle them yet.
16423 (convert_ucn_to_byte): New function.
16424
16425 Handle backslash-newline correctly in C code.
16426 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16427 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16428 all uses changed.
16429 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16430 Use {splice} wherever C allows backslash-newline.
16431 YY_STEP after space, newline, vertical-tab.
16432 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16433
16434 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16435
16436 ({int}, handle_action_dollar, handle_action_at): Check for integer
16437 overflow.
16438
16439 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16440
16441 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16442 as well as \000. Check for UCHAR_MAX, not 255.
16443 Allow \x with an arbitrary positive number of digits, as in C.
16444 Check for overflow here.
16445 Allow \? and UCNs, for compatibility with C.
16446
16447 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16448 with quote slot used by complain_at.
16449
16450 * tests/input.at: Add tests for backslash-newline, m4 quotes
16451 in symbols, long literals, and funny escapes in strings.
16452
16453 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16454 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16455 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16456 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16457 * m4/mbswidth.m4: New file, from GNU coreutils.
16458
16459 * doc/bison.texinfo (Grammar Outline): Document // comments.
16460 (Symbols): Document that trigraphs have no special meaning in Bison,
16461 nor is backslash-newline allowed.
16462 (Actions): Document that trigraphs have no special meaning.
16463
16464 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16465 no longer used.
16466
164672002-11-02 Paul Eggert <eggert@twinsun.com>
16468
16469 * src/reader.c: Don't include quote.h; not needed.
16470 (get_merge_function): Reword warning to be consistent with
16471 type clash diagnostic in grammar_current_rule_check.
16472
16473 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16474 bug in trigraph handling.
16475
16476 * src/output.c (prepare_symbols): When printing token names,
16477 escape "[" as "@<:@" and likewise for "]".
16478
16479 * src/system.h (errno): Remove declaration, as we are now
16480 assuming C89 or better, and C89 guarantees errno.
16481
164822002-10-30 Paul Eggert <eggert@twinsun.com>
16483
16484 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16485 Check for close failures.
16486 * src/files.h (xfclose): Return void, not int, since it always
16487 returned zero.
16488 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16489 indicates one.
16490 * src/output.c (output_skeleton): Use xfclose rather than fclose
16491 and ferror. xfclose now checks ferror.
16492
16493 * data/glr.c (YYLEFTMOST_STATE): Remove.
16494 (yyreportTree): Use a stack-based leftmost state. This avoids
16495 our continuing battles with bogus warnings about initializers.
16496
164972002-10-30 Akim Demaille <akim@epita.fr>
16498
16499 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16500 #if.
16501
165022002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16503
16504 * tests/glr-regr1.at: New test for reported regressions.
16505 * tests/testsuite.at: Add glr-regr1.at test.
16506 * tests/Makefile.am: Add glr-regr1.at test.
16507
165082002-10-24 Paul Eggert <eggert@twinsun.com>
16509
16510 Version 1.75a.
16511
16512 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16513 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16514 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16515 Don't assume strdup exists; POSIX says its an XSI extension.
16516 Check for buffer overflow on input.
16517
165182002-10-24 Akim Demaille <akim@epita.fr>
16519
16520 * src/output.c (output_skeleton): Don't disable M4sugar comments
16521 too soon: it results in comments being expanded.
16522 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16523 first output.
16524
165252002-10-24 Akim Demaille <akim@epita.fr>
16526
16527 * data/yacc.c (m4_int_type): New.
16528 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16529 char' as only yacc.c wants K&R portability.
16530 * data/glr.c (yysigned_char): Remove.
16531 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16532 Reported by Quoc Peyrot.
16533
165342002-10-23 Paul Eggert <eggert@twinsun.com>
16535
16536 * src/main.c (main): With --trace=time, report times even if a
16537 non-fatal error occurs. Formerly, the times were reported in some
16538 such cases but not in others.
16539 * src/reader.c (reader): Just return if a complaint has been issued,
16540 instead of exiting, so that 'main' can report times.
16541
165422002-10-22 Akim Demaille <akim@epita.fr>
16543
16544 * src/system.h: Include sys/types.
16545 Reported by Bert Deknuydt.
16546
165472002-10-23 Paul Eggert <eggert@twinsun.com>
16548
16549 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16550 Suggested by Art Haas.
16551
165522002-10-22 Paul Eggert <eggert@twinsun.com>
16553
16554 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16555 decl; not needed any more.
16556 * src/main.c (main): Use return to exit, undoing yesterday's change.
16557 The last OS that we could find where this wouldn't work is
16558 SunOS 3.5, and that's too old to worry about now.
16559
16560 * data/glr.c (struct yyltype): Define members even when not
16561 doing locations. This is more consistent with yacc.c, and it
16562 works around the following bug reports:
16563 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16564 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16565
16566 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16567 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16568 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16569
165702002-10-22 Akim Demaille <akim@epita.fr>
16571
16572 * data/README: New.
16573
165742002-10-21 Paul Eggert <eggert@twinsun.com>
16575
16576 Be consistent about 'bool'; the old code used an enum in one
16577 module and an int in another, and this violates the C standard.
16578 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16579 * configure.ac (AC_HEADER_STDBOOL): Add.
16580 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16581 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16582 * src/symtab.c (hash_compare_symbol_t): Likewise.
16583 * src/system.h (bool, false, true): Use a definition consistent
16584 with ../lib/hash.c. All uses changed.
16585
16586 * src/complain.c (warning_issued): Renamed from warn_message_count,
16587 so that we needn't worry about integer overflow (!).
16588 Now of type bool. All uses changed.
16589 (complaint_issued): Renamed from complain_message_count; likewise.
16590
16591 * src/main.c (main): Use exit to exit with failure.
16592
16593 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16594 rather than 1 and 0.
16595 * src/main.c (main): Likewise.
16596 * src/getargs.c (getargs): Likewise.
16597 * src/reader.c (reader): Likewise.
16598
16599 * src/getarg.c (getargs): Remove duplicate code for
16600 "Try `bison --help'".
16601
16602 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16603 What was that "2" for?
16604
16605 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16606 * src/getargs.c (usage): Likewise.
16607
16608 * src/getargs.c (getargs): When there are too few operands, report
16609 the last one. When there are too many, report the first extra
16610 one. This is how diffutils does it.
16611
166122002-10-20 Paul Eggert <eggert@twinsun.com>
16613
16614 Remove K&R vestiges.
16615 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16616 * src/complain.c (VA_START): Remove. Assume prototypes.
16617 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16618 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16619 fatal): Assume prototypes.
16620 * src/complain.h: Assume prototypes.
16621 * src/system.h (PARAMS): Remove.
16622 Include <limits.h> unconditionally, since it's guaranteeed even
16623 for a freestanding C89 compiler.
16624 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16625 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16626
166272002-10-20 Akim Demaille <akim@epita.fr>
16628
16629 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16630 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16631 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16632 (yyresolveStates, yyresolveAction, yyresolveStack)
16633 (yyprocessOneStack): Use them.
16634 (yy_reduce_print): New.
16635 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16636
166372002-10-20 Akim Demaille <akim@epita.fr>
16638
16639 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16640 arguments and output `void'.
16641 (b4_c_function): Rename as...
16642 (b4_c_function_def): this.
16643 (b4_c_function_decl, b4_c_ansi_function_def)
16644 (b4_c_ansi_function_decl): New.
16645 Change the interpretation of the arguments: before `int, foo', now
16646 `int foo, foo'.
16647 * data/yacc.c (yyparse): Prototype and define thanks to these.
16648 Adjust b4_c_function_def uses.
16649 * data/glr.c (yyparse): Likewise, but ANSI only.
16650
166512002-10-20 Akim Demaille <akim@epita.fr>
16652
16653 * src/output.c (prepare): Move the definition of `tokens_number',
16654 `nterms_number', `undef_token_number', `user_token_number_max'
16655 to...
16656 (prepare_tokens): Here.
16657 (prepare_tokens): Rename as...
16658 (prepare_symbols): this.
16659 (prepare): Move the definition of `rules_number' to...
16660 (prepare_rules): here.
16661 (prepare): Move the definition of `last', `final_state_number',
16662 `states_number' to...
16663 (prepare_states): here.
16664 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16665
166662002-10-20 Akim Demaille <akim@epita.fr>
16667
16668 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16669
166702002-10-20 Akim Demaille <akim@epita.fr>
16671
16672 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16673 * data/c.m4: here.
16674
166752002-10-20 Akim Demaille <akim@epita.fr>
16676
16677 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16678 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16679 `pair'.
16680 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16681 `name' to...
16682 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16683 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16684 These.
16685
166862002-10-19 Paul Eggert <eggert@twinsun.com>
16687
16688 Do not create a temporary file, as that involves security and
16689 cleanup headaches. Instead, use a pair of pipes.
16690 Derived from a suggestion by Florian Krohm.
16691 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16692 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16693 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16694 (BISON_PREREQ_SUBPIPE): Add.
16695 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16696 Add subpipe.h, subpipe.c.
16697 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16698 * po/POTFILES.in: Add lib/subpipe.c.
16699 * src/output.c: Include "subpipe.h".
16700 (m4_invoke): Remove decl.
16701 (scan_skel): New decl.
16702 (output_skeleton): Use pipe rather than temporary file for m4 input.
16703 Check that m4sugar.m4 is readable, to avoid deadlock.
16704 Check for pipe I/O error.
16705 * src/scan-skel.l (readpipe): Remove decl.
16706 (scan_skel): New function, to be used in place of m4_invoke.
16707 Read from stream rather than file.
16708
16709 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16710 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16711 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16712 this generates a more-accurate value anyway.
16713
16714 * lib/timevar.c (timervar_accumulate): Rename locals to
16715 avoid confusion with similarly-named more-global.
16716 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16717
16718 * src/output.c (prepare): Use xstrdup to convert char const *
16719 to char *, to avoid GCC warning.
16720
167212002-10-19 Akim Demaille <akim@epita.fr>
16722
16723 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16724 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16725 Use them to have `calc.y' ready for %pure-parser.
16726 * data/yacc.c (YYLEX): Pass a yylex return type to
16727 b4_c_function_call.
16728
167292002-10-19 Akim Demaille <akim@epita.fr>
16730
16731 Prototype support of %lex-param and %parse-param.
16732
16733 * src/parse-gram.y: Add the definition of the %lex-param and
16734 %parse-param tokens, plus their rules.
16735 Drop the `_' version of %glr-parser.
16736 Add the "," token.
16737 * src/scan-gram.l (INITIAL): Scan them.
16738 * src/muscle_tab.c: Comment changes.
16739 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16740 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16741 (muscle_entry_s): The `value' member is no longer const.
16742 Adjust all dependencies.
16743 * src/muscle_tab.c (muscle_init): Adjust: use
16744 MUSCLE_INSERT_STRING.
16745 Initialize the obstack earlier.
16746 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16747 (muscle_pair_list_grow): New.
16748 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16749 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16750 * tests/calc.at: Use %locations, not --locations.
16751 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16752
167532002-10-19 Akim Demaille <akim@epita.fr>
16754
16755 * src/getargs.c (usage): Take status as argument and exit
16756 accordingly.
16757 Report the traditional `Try ... --help' message when status != 0.
16758 (usage, version): Don't take a FILE * as arg, it is pointless.
16759 (getargs): When there is an incorrect number of arguments, make it
16760 an error, and report it GNUlically thanks to `usage ()'.
16761
167622002-10-18 Paul Eggert <eggert@twinsun.com>
16763
16764 * data/glr.c (yyreportParseError): Don't assume that sprintf
16765 yields the length of the printed string, as this is not true
16766 on SunOS 4.1.4. Reported by Peter Klein.
16767
16768 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16769 * tests/conflicts.at (%nonassoc and eof): Likewise.
16770 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16771
167722002-10-17 Akim Demaille <akim@epita.fr>
16773
16774 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16775 * src/getargs.c (trace_types, trace_args): Adjust.
16776 * src/reader.c (grammar_current_rule_prec_set)
16777 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16778 Standardize error messages.
16779 And s/@prec/%prec/!
16780 (reader): Use trace_flag to enable scanner/parser debugging,
16781 instead of an adhoc scheme.
16782 * src/scan-gram.l: Remove trailing debugging code.
16783
167842002-10-16 Paul Eggert <eggert@twinsun.com>
16785
16786 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16787 MUSCLE_TAB_H.
16788
16789 * NEWS: Officially drop support for building Bison with K&R C,
16790 since it didn't work anyway and it's not worth worrying about.
16791 * Makefile.maint (wget_files): Remove ansi2knr.c.
16792 (ansi2knr.c-url_prefix): Remove.
16793 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16794 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16795 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16796
167972002-10-15 Paul Eggert <eggert@twinsun.com>
16798
16799 Stop using the "enum_" trick for K&R-style function definitions;
16800 it confused me, and I was the author! Instead, assume that people
16801 who want to use K&R C compilers (when using these modules in GCC,
16802 perhaps?) will run ansi2knr.
16803
16804 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16805 All uses of "enum_" changed to "enum ".
16806 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16807 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16808
16809 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16810 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16811 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16812 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16813 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16814 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16815 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16816 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16817 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16818 Use function prototypes; this removes the need for declaring
16819 static functions simply to provide their prototypes.
16820 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16821 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16822 bitset_count_, bitset_create, bitset_dump, bitset_first,
16823 bitset_free, bitset_init, bitset_last, bitset_next,
16824 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16825 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16826 bitset_print, bitset_release_memory, bitset_toggle_,
16827 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16828 debug_bitset): Likewise.
16829 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16830 * lib/bitset_stats.c (bitset_log_histogram_print,
16831 bitset_percent_histogram_print, bitset_stats_and,
16832 bitset_stats_and_cmp, bitset_stats_and_or,
16833 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16834 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16835 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16836 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16837 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16838 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16839 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16840 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16841 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16842 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16843 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16844 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16845 bitset_stats_zero): Likewise.
16846 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16847 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16848 bitsetv_dump, debug_bitsetv): Likewise.
16849 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16850 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16851 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16852 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16853 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16854 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16855 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16856 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16857 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16858 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16859 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16860 Likewise.
16861 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16862 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16863 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16864 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16865 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16866 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16867 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16868 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16869 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16870 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16871 lbitset_xor_cmp, lbitset_zero): Likewise.
16872
168732002-10-14 Akim Demaille <akim@epita.fr>
16874
16875 Version 1.75.
16876
168772002-10-14 Akim Demaille <akim@epita.fr>
16878
16879 * tests/Makefile.am (maintainer-check-posix): New.
16880
168812002-10-14 Akim Demaille <akim@epita.fr>
16882
16883 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16884 member.
16885
168862002-10-14 Akim Demaille <akim@epita.fr>
16887
16888 * src/tables.c (table_ninf_remap): base -> tab.
16889 Reported by Matt Rosing.
16890
168912002-10-14 Paul Eggert <eggert@twinsun.com>
16892
16893 * tests/action.at, tests/calc.at, tests/conflicts.at,
16894 tests/cxx-type.at, tests/headers.at, tests/input.at,
16895 tests/regression.at, tests/synclines.at, tests/torture.at:
16896 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16897 so that the tests still work even if POSIXLY_CORRECT is set.
16898 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16899
16900 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16901 for portability to K&R hosts. Fix typo: signed char is guaranteed
16902 only to 127, not to 128.
16903 * data/glr.c (yysigned_char): New type.
16904 * data/yacc.c (yysigned_char): Likewise.
16905 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16906
169072002-10-13 Paul Eggert <eggert@twinsun.com>
16908
16909 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16910 true due to limited range of data type" warning from GCC.
16911
16912 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16913 by wrapping enum yytokentype's definition inside #ifndef
16914 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16915
169162002-10-13 Akim Demaille <akim@epita.fr>
16917
16918 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16919 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16920
169212002-10-13 Akim Demaille <akim@epita.fr>
16922
16923 * Makefile.maint: Update from Autoconf 2.54.
16924 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16925
169262002-10-13 Akim Demaille <akim@epita.fr>
16927
16928 * src/print.c (print_state): Separate the list of solved conflicts
16929 from the other items.
16930 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16931
169322002-10-13 Akim Demaille <akim@epita.fr>
16933
16934 Let nondeterministic skeletons be usable with deterministic
16935 tables.
16936
16937 With the patch, GAWK compiled by GCC without -O2 passes its test
16938 suite using a GLR parser driven by LALR tables. It fails with -O2
16939 because `struct stat' gives two different answers on my machine:
16940 88 (definition of an auto var) and later 96 (memset on this var).
16941 Hence the stack is badly corrumpted. The headers inclusion is to
16942 blame: if I move the awk.h inclusion before GLR's system header
16943 inclusion, the two struct stat have the same size.
16944
16945 * src/tables.c (pack_table): Always create conflict_table.
16946 (token_actions): Always create conflict_list.
16947 * data/glr.c (YYFLAG): Remove, unused.
16948
169492002-10-13 Akim Demaille <akim@epita.fr>
16950
16951 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16952 (O0FLAGS): New.
16953 (VALGRIND, GXX): New.
16954 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16955 * tests/bison.in: Run $PREBISON a pre-command.
16956 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16957 (maintainer-check-g++): New.
16958 * Makefile.am (maintainer-check): New.
16959
169602002-10-13 Akim Demaille <akim@epita.fr>
16961
16962 * data/glr.c: Formatting changes.
16963 Tweak some trace messages to match yacc.c's.
16964
169652002-10-13 Akim Demaille <akim@epita.fr>
16966
16967 GLR parsers sometimes raise parse errors instead of performing the
16968 default reduction.
16969 Reported by Charles-Henry de Boysson.
16970
16971 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16972 check the length of the traces when %glr.
16973 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16974 GLR's traces.
16975 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16976 Test GLR parsers.
16977 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16978 (yyltype): Remove the yy prefix from the member names.
16979 (yytable): Complete its comment.
16980 (yygetLRActions): Map error action number from YYTABLE from
16981 YYTABLE_NINF to 0.
16982 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16983 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16984 not satisfying as we could compare an YYACTION computed from
16985 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16986 only value for error actions.
16987 (yyreportParseError): In verbose parse error messages, don't issue
16988 `error' in the list of expected tokens.
16989 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16990 next action to perform to match glr.c's decoding.
16991 (yytable): Complete its comment.
16992
169932002-10-13 Paul Eggert <eggert@twinsun.com>
16994
16995 Fix problem reported by Henrik Grubbstroem in
16996 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16997 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16998 because the Bison parser reads the second action before reducing
16999 the first one.
17000 * src/scan-gram.l (rule_length): New static var.
17001 Use it to keep track of the rule length in the scanner, since
17002 we can't expect the parser to be in lock-step sync with the scanner.
17003 (handle_action_dollar, handle_action_at): Use this var.
17004 * tests/actions.at (Exotic Dollars): Test for the problem.
17005
170062002-10-12 Paul Eggert <eggert@twinsun.com>
17007
17008 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17009 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17010 Include <sys/time.h> when checking for clock_t and struct tms.
17011 Use same include order as source.
17012 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17013 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17014
17015 * lib/timevar.c: Update copyright date and clarify comments.
17016 (get_time) [IN_GCC]: Keep the GCC version for reference.
17017
17018 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17019 GCC version as of today, then merge Bison's changes.
17020 Change "GCC" to "Bison" in copyright notice. timevar.def's
17021 author is Akim, so change that too.
17022
17023 * src/reader.c (grammar_current_rule_check):
17024 Don't worry about the default action if $$ is untyped.
17025 Prevents bogus warnings reported by Jim Gifford in
17026 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17027
17028 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17029 * data/glr.c, data/lalr1.cc, data/yacc.c:
17030 Output token definitions before the first part of user declarations.
17031 Fixes compatibility problem reported by Jim Gifford for kbd in
17032 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17033
170342002-10-11 Paul Eggert <eggert@twinsun.com>
17035
17036 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17037 (yyparse): here. This undoes some of the 2002-07-25 change.
17038 Compatibility problem reported by Ralf S. Engelschall with
17039 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17040
170412002-10-11 Akim Demaille <akim@epita.fr>
17042
17043 * tests/regression.at Characters Escapes): New.
17044 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17045 characters.
17046 Reported by Jan Nieuwenhuizen.
17047
170482002-10-11 Akim Demaille <akim@epita.fr>
17049
17050 * po/id.po: New.
17051
170522002-10-10 Paul Eggert <eggert@twinsun.com>
17053
17054 Portability fixes for bitsets; this also avoids several GCC
17055 warnings.
17056
17057 * lib/abitset.c: Include <stddef.h>, for offsetof.
17058 * lib/lbitset.c: Likewise.
17059
17060 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17061 properly for vectors of objects. Do not assume that adding a
17062 header size to a multiple of a word size yields a value that is
17063 properly aligned for the whole union.
17064 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17065
17066 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17067 unique names for structures.
17068 * lib/ebitset.c (ebitset_bytes): Likewise.
17069 * lib/lbitset.c (lbitset_bytes): Likewise.
17070
17071 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17072 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17073 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17074 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17075 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17076 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17077 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17078 to improve the type-checking that GCC can do.
17079 * lib/bitset.c (bitset_op4_cmp): Likewise.
17080 * lib/bitset_stats.c (bitset_stats_count,
17081 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17082 bitset_stats_copy, bitset_stats_disjoint_p,
17083 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17084 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17085 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17086 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17087 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17088 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17089 bitset_stats_or_and_cmp): Likewise.
17090 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17091 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17092 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17093 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17094
17095 * lib/abitset.h: Include bitset.h, not bbitset.h.
17096 * lib/ebitset.h: Likewise.
17097 * lib/lbitset.h: Likewise.
17098
17099 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17100 All instances of parameters of type enum bitset_opts are now of
17101 type enum_bitset_opts, to conform to the C Standard, and similarly
17102 for enum_bitset_type.
17103 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17104 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17105
17106 Do not use "struct bitset_struct" to mean different things in
17107 different modules. Not only is this confusing, it violates
17108 the C Standard, which requires that structure types in different
17109 modules must be compatible if one is to be passed to the other.
17110 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17111 All instances of "struct bitset_struct *" replaced with "bitset".
17112 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17113 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17114 struct lbitset_struct, struct bitset_stats_struct): New types.
17115 All uses of struct bitset_struct changed to union bitset_union,
17116 etc.
17117 * lib/abitset.c (struct abitset_struct, abitset,
17118 struct bitset_struct): Remove.
17119 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17120 struct bitset_struct): Remove.
17121 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17122 bitset_struct): Remove.
17123 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17124 Likewise.
17125
17126 Do not call a function of type T using a call that assumes the
17127 function is of a different type U. Standard C requires that a
17128 function must be called with a type that is compatible with its
17129 definition.
17130 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17131 New decls.
17132 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
17133 New functions.
17134 * lib/ebitset.c (PFV): Remove.
17135 * lib/lbitset.c (PFV): Likewise.
17136 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
17137 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
17138 decls.
17139 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
17140 (ebitset_vtable): Use them.
17141 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
17142 lbitset_xor): New functions.
17143 (lbitset_vtable): Use them.
17144
17145 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
17146 Declare.
17147
17148 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
17149 GCC warning.
17150 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
17151 Use offsetof, for simplicity.
17152
171532002-10-06 Paul Eggert <eggert@twinsun.com>
17154
17155 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
17156 the same width as int. This reapplies a hunk of the 2002-08-12 patch
17157 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
17158 which was inadvertently undone by the 2002-09-30 patch.
17159 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
17160 the same width as int.
17161
171622002-10-04 Paul Eggert <eggert@twinsun.com>
17163
17164 Version 1.50.
17165
17166 * configure.ac (AC_INIT), NEWS: Increment version number.
17167
17168 * doc/bison.texinfo: Minor spelling, grammar, and white space
17169 fixes.
17170 (Symbols): Mention that any negative value returned from yylex
17171 signifies end-of-input. Warn about negative chars. Mention
17172 the portable Standard C character set.
17173
17174 The GNU coding standard says CFLAGS and YFLAGS are reserved
17175 for the installer to set.
17176 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
17177 * src/Makefile.am (AM_CFLAGS): Likewise.
17178 (AM_YFLAGS): Renamed from YFLAGS.
17179
17180 Fix some MAX and MIN problems.
17181 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
17182 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
17183 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
17184 * src/reader.c (reader): Use it.
17185
17186 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
17187 POSIX 1003.1-2001 has removed fgrep.
17188
171892002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
17190
17191 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
17192 interpreted as signed.
17193 * lib/ebitset.c (ebitset_list): Fix bug.
17194
171952002-10-01 Paul Eggert <eggert@twinsun.com>
17196
17197 More fixes for 64-bit hosts and large bitsets.
17198
17199 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
17200 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
17201 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
17202 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
17203 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
17204 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
17205 bitset_count_): Likewise.
17206 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
17207 bitset_first, bitset_last): Likewise.
17208 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
17209 bitset_stats_list_reverse, bitset_stats_size,
17210 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17211 Likewise.
17212 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17213 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17214 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17215 bitsetv_reflexive_transitive_closure): Likewise.
17216 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
17217 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
17218 Likewise.
17219 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
17220 Likewise.
17221
17222 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
17223 Use size_t, not unsigned int, to count bytes.
17224 * lib/abitset.h (abitset_bytes): Likewise.
17225 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
17226 Likewise.
17227 * lib/bitset.h (bitset_bytes): Likewise.
17228 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
17229 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
17230 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17231 * lib/ebitset.c (ebitset_bytes): Likewise.
17232 * lib/ebitset.h (ebitset_bytes): Likewise.
17233 * lib/lbitset.c (lbitset_bytes): Likewise.
17234 * lib/lbitset.h (lbitset_bytes): Likewise.
17235
17236 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
17237 abitset_subset_p, abitset_disjoint_p, abitset_and,
17238 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
17239 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
17240 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
17241 abitset_or_and, abitset_or_and_cmp):
17242 Use bitset_windex instead of unsigned int.
17243 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17244 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
17245 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
17246 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
17247 Likewise.
17248 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
17249
17250 * lib/bitset.c (bitset_print):
17251 Use proper printf formats for widths of integer types.
17252 * lib/bitset_stats.c (bitset_percent_histogram_print,
17253 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
17254 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
17255 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
17256 * lib/lbitset.c (lbitset_bytes): Likewise.
17257
17258 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
17259 BITSET_SIZE_MAX): New macros.
17260 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
17261 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
17262 to BITSET_WINDEX_MAX.
17263
17264 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
17265 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
17266 since we now return the bitset_bindex type (not int).
17267
17268 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
17269 when computing sizes.
17270 * lib/ebitset.c (ebitset_elts_grow): Likewise.
17271
17272 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
17273 and avoid cast to unsigned.
17274
172752002-09-30 Akim Demaille <akim@epita.fr>
17276
17277 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
17278 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
17279 Updates from Michael Hayes.
17280
172812002-09-30 Art Haas <ahaas@neosoft.com>
17282
17283 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
17284 invocations.
17285 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
17286 defined.
17287
172882002-09-27 Akim Demaille <akim@epita.fr>
17289
17290 Version 1.49c.
17291
172922002-09-27 Akim Demaille <akim@epita.fr>
17293
17294 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
17295 (Because of AC_LIBSOURCE).
17296
172972002-09-27 Akim Demaille <akim@epita.fr>
17298
17299 Playing with Autoscan.
17300
17301 * configure.ac: Remove the old LIBOBJ tweaks.
17302 (AC_REPLACE_FUNCS): Add strrchr and strtol.
17303 * lib/strrchr.c: New.
17304 * lib/strtol.c: New, from the Coreutils 4.5.1.
17305
173062002-09-27 Akim Demaille <akim@epita.fr>
17307
17308 Playing with Autoscan.
17309
17310 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
17311 * lib/Makefile.am (libbison_a_SOURCES): No longer include
17312 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
17313 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
17314 Coreutils 4.5.1.
17315
173162002-09-24 Akim Demaille <akim@epita.fr>
17317
17318 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
17319 (Frequently Asked Questions, Parser Stack Overflow): New.
17320
173212002-09-13 Akim Demaille <akim@epita.fr>
17322
17323 Playing with autoscan.
17324
17325 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
17326 * src/files.c (skeleton_find): Remove, unused.
17327 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
17328 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
17329
173302002-09-13 Akim Demaille <akim@epita.fr>
17331
17332 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
17333 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
17334
173352002-09-13 Akim Demaille <akim@epita.fr>
17336
17337 * configure.ac: Require 2.54.
17338 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
17339 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
17340 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
17341 Remove, provided by Autoconf macros.
17342
173432002-09-12 Akim Demaille <akim@epita.fr>
17344
17345 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17346
173472002-09-12 Akim Demaille <akim@epita.fr>
17348
17349 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17350 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17351 Reported by Martin Mokrejs.
17352
173532002-09-10 Akim Demaille <akim@epita.fr>
17354
17355 * src/parse-gram.y: Associate a human readable string to each
17356 token type.
17357 * tests/regression.at (Invalid inputs): Adjust.
17358
173592002-09-10 Gary V. Vaughan <gary@gnu.org>
17360
17361 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17362 with an Autoconf-2.5x style configure.ac.
17363
173642002-09-06 Paul Eggert <eggert@twinsun.com>
17365
17366 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17367 exception applies only to yacc.c. This is a modification of a
17368 patch originally suggested by Akim Demaille.
17369
173702002-09-06 Akim Demaille <akim@epita.fr>
17371
17372 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17373 here to...
17374 * data/yacc.c: here.
17375
17376 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17377 LocationType.
17378 (b4_ltype): Default to yy::Location from location.hh.
17379
173802002-09-04 Jim Meyering <jim@meyering.net>
17381
17382 * data/yacc.c: Guard the declaration of yytoknum also with
17383 `#ifdef YYPRINT', so it is declared only when used.
17384
173852002-09-04 Akim Demaille <akim@epita.fr>
17386
17387 * configure.in: Rename as...
17388 * configure.ac: this.
17389 Bump to 1.49c.
17390
173912002-09-04 Akim Demaille <akim@epita.fr>
17392
17393 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17394 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17395 translate maintainer only messages.
17396
173972002-08-12 Paul Eggert <eggert@twinsun.com>
17398
17399 Version 1.49b.
17400
17401 * Makefile.am (SUBDIRS): Remove intl.
17402 (DISTCLEANFILES): Remove.
17403 * NEWS: Mention that GNU M4 is now required. Clarify what is
17404 meant by "larger grammars". Mention the pt_BR translation.
17405 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17406 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17407 Bump version from 0.11.2 to 0.11.5.
17408 (BISON_PREREQ_STAGE): Remove.
17409 (AM_GNU_GETTEXT): Use external gettext.
17410 (AC_OUTPUT): Remove intl/Makefile.
17411
17412 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17413
17414 * data/glr.c: Include string.h, for strlen.
17415 (yyreportParseError): Use size_t for yysize.
17416 (yy_yypstack): No longer nested inside yypstates, as nested
17417 functions are not portable. Do not assume size_t is the
17418 same width as int.
17419 (yypstates): Do not assume that ptrdiff_t is the same width
17420 as int, and similarly for yyposn and YYINDEX.
17421
17422 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17423
17424 * lib/Makefile.am (INCLUDES): Do not include from the intl
17425 directory, which has been removed.
17426 * src/Makefile.am (INCLUDES): Likewise.
17427
17428 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17429 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17430 New vars.
17431
17432 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17433 * tests/Makefile.am (EXTRA_DIST): Likewise.
17434
17435 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17436 Do not assume that bitset_windex is the same width as unsigned.
17437
17438 * lib/abitset.c (abitset_unused_clear): Do not assume that
17439 bitset_word is the same width as int.
17440 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17441 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17442 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17443 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17444 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17445
17446 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17447 portability to one's complement hosts!).
17448 * lib/ebitset.c (ebitset_op1): Likewise.
17449 * lib/lbitset.c (lbitset_op1): Likewise.
17450
17451 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17452 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17453 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17454 Sync with fileutils.
17455 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17456 lib/gettext.h: Sync with diffutils.
17457
17458 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17459 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17460
17461 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17462 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17463 check for void *.
17464
17465 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17466 size_t; the old version tried to do this but casted improperly.
17467 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17468 (bitset_test): Now returns int, not unsigned long.
17469
17470 * lib/bitset_stats.c: Include "gettext.h".
17471 (_): New macro.
17472 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17473 name locals "index", as it generates unnecessary warnings on some
17474 hosts that have an "index" function.
17475
17476 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17477 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17478 they need translation.
17479 * src/LR0.c (state_list_append, new_itemsets, get_state,
17480 append_states, generate_states): Likewise.
17481 * src/assoc.c (assoc_to_string): Likewise.
17482 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17483 * src/gram.c (grammar_dump): Likewise.
17484 * src/injections.c (injections_compute): Likewise.
17485 * src/lalr.c (lookaheads_print): Likewise.
17486 * src/relation.c (relation_transpose): Likewise.
17487 * src/scan-gram.l: Likewise.
17488 * src/tables.c (table_grow, pack_vector): Likewise.
17489
17490 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17491 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17492 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17493 * m4/mbstate_t.m4: Sync with fileutils.
17494 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17495
17496 * po/LINGUAS: Add pt_BR.
17497 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17498 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17499 lib/timevar.c.
17500 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17501 manual recommends.
17502 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17503
17504 * src/complain.c (strerror_r): Remove decl; not needed.
17505 (strerror): Use same pattern as ../lib/error.c.
17506
17507 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17508
17509 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17510
17511 * src/main.c (main): Cast result of bindtextdomain and textdomain
17512 to void, to avoid a GCC warning when --disable-nls is in effect.
17513
17514 * src/scan-gram.l: Use strings rather than escapes when possible,
17515 to minimize the number of warnings from xgettext.
17516 (handle_action_dollar, handle_action_at): Don't use isdigit,
17517 as it mishandles negative chars and it may not work as expected
17518 outside the C locale.
17519
17520 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17521 this is a GCC extension and is not portable to other compilers.
17522
17523 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17524 Do not include <ctype.h>; no longer needed.
17525 Do not include <malloc.h>; no longer needed (and generates
17526 warnings on OpenBSD 3.0).
17527
17528 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17529 it's not portable.
17530
17531 * tests/regression.at: Do not use 'cc -c input.c -o input';
17532 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17533
17534 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17535 exit status as failure, not just exit status 1. Sun C exits
17536 with status 2 sometimes.
17537
17538 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17539 Use it for the two large tests.
17540
175412002-08-02 Akim Demaille <akim@epita.fr>
17542
17543 * src/conflicts.c (conflicts_output): Don't output rules never
17544 reduced here, since anyway that computation doesn't work.
17545 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17546 (rule_useless_p, rule_never_reduced_p): New.
17547 (grammar_rules_partial_print): Use a filter instead of a range.
17548 Display the title only if needed.
17549 (grammar_rules_print): Adjust.
17550 (grammar_rules_never_reduced_report): New.
17551 * src/tables.c (action_row): Move the computation of rules never
17552 reduced to...
17553 (token_actions): here.
17554 * src/main.c (main): Make the parser before making the report, so
17555 that rules never reduced are computed.
17556 Call grammar_rules_never_reduced_report.
17557 * src/print.c (print_results): Report rules never reduced.
17558 * tests/conflicts.at, tests/reduce.at: Adjust.
17559
175602002-08-01 Akim Demaille <akim@epita.fr>
17561
17562 Instead of attaching lookaheads and duplicating the rules being
17563 reduced by a state, attach the lookaheads to the reductions.
17564
17565 * src/state.h (state_t): Remove the `lookaheads',
17566 `lookaheads_rule' member.
17567 (reductions_t): Add a `lookaheads' member.
17568 Use a regular array for the `rules'.
17569 * src/state.c (reductions_new): Initialize the lookaheads member
17570 to 0.
17571 (state_rule_lookaheads_print): Adjust.
17572 * src/state.h, src/state.c (state_reductions_find): New.
17573 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17574 (count_rr_conflicts): Adjust.
17575 * src/lalr.c (LArule): Remove.
17576 (add_lookback_edge): Adjust.
17577 (state_lookaheads_count): New.
17578 (states_lookaheads_initialize): Merge into...
17579 (initialize_LA): this.
17580 (lalr_free): Adjust.
17581 * src/main.c (main): Don't free nullable and derives too early: it
17582 is used by --verbose.
17583 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17584
175852002-08-01 Akim Demaille <akim@epita.fr>
17586
17587 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17588 `rule_number_t**'.
17589 (set_derives, free_derives): Rename as...
17590 (derives_compute, derives_free): this.
17591 Adjust all dependencies.
17592 * src/nullable.c (set_nullable, free_nullable): Rename as...
17593 (nullable_compute, nullable_free): these.
17594 (rule_list_t): Store rule_t *, not rule_number_t.
17595 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17596 pointers, instead of their numbers.
17597 * src/main.c (main): Call nullable_free, and derives_free earlier,
17598 as they were lo longer used.
17599
176002002-08-01 Akim Demaille <akim@epita.fr>
17601
17602 * lib/timevar.c (get_time): Include children time.
17603 * src/lalr.h (LA, LArule): Don't export them: used with the
17604 state_t.
17605 * src/lalr.c (LA, LArule): Static.
17606 * src/lalr.h, src/lalr.c (lalr_free): New.
17607 * src/main.c (main): Call it.
17608 * src/tables.c (pack_vector): Check whether loc is >= to the
17609 table_size, not >.
17610 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17611 (tables_generate): do it, since that's also it which allocates
17612 them.
17613 Don't free LA and LArule, main does.
17614
176152002-07-31 Akim Demaille <akim@epita.fr>
17616
17617 Separate parser tables computation and output.
17618
17619 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17620 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17621 (yydefgoto, yydefact, high): Move to...
17622 * src/tables.h, src/tables.c: here.
17623 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17624 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17625 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17626 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17627 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17628 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17629 (action_row, save_row, token_actions, save_column, default_goto)
17630 (goto_actions, sort_actions, matching_state, pack_vector)
17631 (table_ninf_remap, pack_table, prepare_actions): Move to...
17632 * src/tables.c: here.
17633 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17634 * src/output.c (token_actions, output_base, output_conflicts)
17635 (output_check): Merge into...
17636 (prepare_actions): this.
17637 (actions_output): Rename as...
17638 (user_actions_output): this.
17639 * src/main.c (main): Call tables_generate and tables_free.
17640
176412002-07-31 Akim Demaille <akim@epita.fr>
17642
17643 Steal GCC's --time-report support.
17644
17645 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17646 stolen/adjusted from GCC.
17647 * m4/stage.m4: Remove time related checks.
17648 * m4/timevar.m4: New.
17649 * configure.in: Adjust.
17650 * src/system.h: Adjust to using timevar.h.
17651 * src/getargs.h, src/getargs.c: Support trace_time for
17652 --trace=time.
17653 * src/main.c (stage): Remove.
17654 (main): Replace `stage' invocations with timevar calls.
17655 * src/output.c: Insert pertinent timevar calls.
17656
176572002-07-31 Akim Demaille <akim@epita.fr>
17658
17659 Let --trace have arguments.
17660
17661 * src/getargs.h (enum trace_e): New.
17662 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17663 (long_options, short_options): --trace/-T takes an optional
17664 argument.
17665 Change all the uses of trace_flag to reflect the new flags.
17666 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17667
17668 Strengthen `stage' portability.
17669
17670 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17671 * configure.in: Use it.
17672 Don't check for malloc.h and sys/times.h.
17673 * src/system.h: Include them when appropriate.
17674 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17675 times and struct tms are available.
17676
176772002-07-30 Akim Demaille <akim@epita.fr>
17678
17679 In verbose parse error message, don't report `error' as an
17680 expected token.
17681 * tests/actions.at (Printers and Destructors): Adjust.
17682 * tests/calc.at (Calculator $1): Adjust.
17683 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17684 error message, do not report the parser accepts the error token in
17685 that state.
17686
176872002-07-30 Akim Demaille <akim@epita.fr>
17688
17689 Normalize conflict related messages.
17690
17691 * src/complain.h, src/complain.c (warn, complain): New.
17692 * src/conflicts.c (conflicts_print): Use them.
17693 (conflict_report_yacc): New, extracted from...
17694 (conflicts_print): here.
17695 * tests/conflicts.at, tests/existing.at: Adjust.
17696
176972002-07-30 Akim Demaille <akim@epita.fr>
17698
17699 Report rules which are never reduced by the parser: those hidden
17700 by conflicts.
17701
17702 * src/LR0.c (save_reductions): Don't make the final state too
17703 different: save its reduction (accept) instead of having a state
17704 without any action (no shift or goto, no reduce).
17705 Note: the final state is now a ``regular'' state, i.e., the
17706 parsers now contain `reduce 0' as default reduction.
17707 Nevertheless, since they decide to `accept' when yystate =
17708 final_state, they still will not reduce rule 0.
17709 * src/print.c (print_actions, print_reduction): Adjust.
17710 * src/output.c (action_row): Track reduced rules.
17711 (token_actions): Report rules never reduced.
17712 * tests/conflicts.at, tests/regression.at: Adjust.
17713
177142002-07-30 Akim Demaille <akim@epita.fr>
17715
17716 `stage' was accidently included in a previous patch.
17717 Initiate its autoconfiscation.
17718
17719 * configure.in: Look for malloc.h and sys/times.h.
17720 * src/main.c (stage): Adjust.
17721 Report only when trace_flag.
17722
177232002-07-29 Akim Demaille <akim@epita.fr>
17724
17725 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17726 state_number_t.
17727 (errs_t): symbol_t*, not symbol_number_t.
17728 (reductions_t): rule_t*, not rule_number_t.
17729 (FOR_EACH_SHIFT): New.
17730 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17731 * src/print.c, src/print_graph.c: Adjust.
17732
177332002-07-29 Akim Demaille <akim@epita.fr>
17734
17735 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17736
17737 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17738 (endtoken, accept): these.
17739 * src/reader.c (reader): Set endtoken's default tag to "$end".
17740 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17741 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17742 Adjust.
17743
177442002-07-29 Akim Demaille <akim@epita.fr>
17745
17746 * src/reduce.c (reduce_grammar): When the language is empty,
17747 complain about the start symbol, not the axiom.
17748 Use its location.
17749 * tests/reduce.at (Empty Language): New.
17750
177512002-07-26 Akim Demaille <akim@epita.fr>
17752
17753 * src/reader.h, src/reader.c (gram_error): ... can't get
17754 yycontrol without making too strong assumptions on the parser
17755 itself.
17756 * src/output.c (prepare_tokens): Use the real 0th value of
17757 token_translations instead of `0'.
17758 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17759 visible here.
17760 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17761 for the time being: %locations ought to provide it to yyerror.
17762
177632002-07-25 Akim Demaille <akim@epita.fr>
17764
17765 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17766 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17767 * tests/regression.at (Web2c Actions): Adjust.
17768
177692002-07-25 Akim Demaille <akim@epita.fr>
17770
17771 Stop storing rules from 1 to nrules + 1.
17772
17773 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17774 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17775 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17776 Iterate from 0 to nrules.
17777 Use rule_number_as_item_number and item_number_as_rule_number.
17778 Adjust to `derive' now containing possibly 0.
17779 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17780 Handle the `- 1' part in rule numbers from/to item numbers.
17781 * src/conflicts.c (log_resolution): Fix the message which reversed
17782 shift and reduce.
17783 * src/output.c (action_row): Initialize default_rule to -1.
17784 (token_actions): Adjust.
17785 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17786 expected output.
17787 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17788
177892002-07-25 Akim Demaille <akim@epita.fr>
17790
17791 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17792 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17793 (b4_c_knr_arg_decl): New.
17794 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17795 yyreport_parse_error.
17796
177972002-07-25 Akim Demaille <akim@epita.fr>
17798
17799 * data/yacc.c (yyreport_parse_error): New, extracted from...
17800 (yyparse): here.
17801 (yydestruct, yysymprint): Move above yyparse.
17802 Be K&R compliant.
17803
178042002-07-25 Akim Demaille <akim@epita.fr>
17805
17806 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17807 replace...
17808 (b4_sint_type, b4_uint_type): these.
17809 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17810 * tests/regression.at (Web2c Actions): Adjust.
17811
178122002-07-25 Akim Demaille <akim@epita.fr>
17813
17814 * src/gram.h (TIEM_NUMBER_MAX): New.
17815 (item_number_of_rule_number, rule_number_of_item_number): Rename
17816 as...
17817 (rule_number_as_item_number, item_number_as_rule_number): these.
17818 Adjust dependencies.
17819 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17820 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17821 (symbol_number_to_vector_number): New.
17822 (order): Of vector_number_t* type.
17823 (base_t, BASE_MAX, BASE_MIN): New.
17824 (froms, tos, width, pos, check): Of base_t type.
17825 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17826 (actrow): Of action_number_t type.
17827 (conflrow): Of unsigned int type.
17828 (table_ninf, base_ninf): New.
17829 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17830 (muscle_insert_int_table, muscle_insert_base_table)
17831 (muscle_insert_rule_number_table): New.
17832 (prepare_tokens): Output `toknum' as int_table.
17833 (action_row): Returns a rule_number_t.
17834 Use ACTION_MIN, not SHRT_MIN.
17835 (token_actions): yydefact is rule_number_t*.
17836 (table_ninf_remap): New.
17837 (pack_table): Use it for `base' and `table'.
17838 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17839 replaced with...
17840 (YYPACT_NINF, YYTABLE_NINF): these.
17841 (yypact, yytable): Compute their types instead of hard-coded
17842 `short'.
17843 * tests/regression.at (Web2c Actions): Adjust.
17844
178452002-07-19 Akim Demaille <akim@epita.fr>
17846
17847 * src/scan-gram.l (id): Can start with an underscore.
17848
178492002-07-16 Akim Demaille <akim@epita.fr>
17850
17851 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17852 Adjust all former `associativity' dependencies.
17853 * src/symtab.c (symbol_new): Default associativity is `undef', not
17854 `right'.
17855 (symbol_check_alias_consistence): Adjust.
17856
178572002-07-09 Akim Demaille <akim@epita.fr>
17858
17859 * doc/bison.texinfo: Properly set the ``header'' part.
17860 Use @dircategory ``GNU programming tools'' as per Texinfo's
17861 documentation.
17862 Use @copying.
17863
178642002-07-09 Akim Demaille <akim@epita.fr>
17865
17866 * lib/quotearg.h: Protect against multiple inclusions.
17867 * src/location.h (location_t): Add a `file' member.
17868 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17869 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17870 `error_one_per_line' support.
17871
178722002-07-09 Akim Demaille <akim@epita.fr>
17873
17874 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17875 * src/reader.c (lineno): Remove.
17876 Adjust all dependencies.
17877 (get_merge_function): Take a location and use complain_at.
17878 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17879 * tests/regression.at (Invalid inputs, Mixing %token styles):
17880 Adjust.
17881
178822002-07-09 Akim Demaille <akim@epita.fr>
17883
17884 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17885 recovery rule, and forbid extensions when --yacc.
17886 (gram_error): Use complain_at.
17887 * src/reader.c (reader): Exit if there were parse errors.
17888
178892002-07-09 Akim Demaille <akim@epita.fr>
17890
17891 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17892 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17893 Reported by R Blake <blakers@mac.com>.
17894
178952002-07-09 Akim Demaille <akim@epita.fr>
17896
17897 * data/yacc.c: Output the copyright notive in the header.
17898
178992002-07-03 Akim Demaille <akim@epita.fr>
17900
17901 * src/output.c (froms, tos): Are state_number_t.
17902 (save_column): sp, sp1, and sp2 are state_number_t.
17903 (prepare): Rename `final' as `final_state_number', `nnts' as
17904 `nterms_number', `nrules' as `rules_number', `nstates' as
17905 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17906 unused.
17907 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17908 * data/lalr1.cc (nsym_): Remove, unused.
17909
179102002-07-03 Akim Demaille <akim@epita.fr>
17911
17912 * src/lalr.h, src/lalr.c (goto_number_t): New.
17913 * src/lalr.c (goto_list_t): New.
17914 Propagate them.
17915 * src/nullable.c (rule_list_t): New.
17916 Propagate.
17917 * src/types.h: Remove.
17918
179192002-07-03 Akim Demaille <akim@epita.fr>
17920
17921 * src/closure.c (print_fderives): Use rule_rhs_print.
17922 * src/derives.c (print_derives): Use rule_rhs_print.
17923 (rule_list_t): New, replaces `shorts'.
17924 (set_derives): Add comments.
17925 * tests/sets.at (Nullable, Firsts): Adjust.
17926
179272002-07-03 Akim Demaille <akim@epita.fr>
17928
17929 * src/output.c (prepare_actions): Free `tally' and `width'.
17930 (prepare_actions): Allocate and free `order'.
17931 * src/symtab.c (symbols_free): Free `symbols'.
17932 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17933 * src/output.c (m4_invoke): Move to...
17934 * src/scan-skel.l: here.
17935 (<<EOF>>): Close yyout, and free its name.
17936
179372002-07-03 Akim Demaille <akim@epita.fr>
17938
17939 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17940
17941 * src/LR0.c (new_state): Merge into...
17942 (state_list_append): this.
17943 (new_states): Merge into...
17944 (generate_states): here.
17945 (set_states): Don't ensure a proper `errs' state member here, do it...
17946 * src/conflicts.c (conflicts_solve): here.
17947 * src/state.h, src/state.c: Comment changes.
17948 (state_t): Rename member `shifts' as `transitions'.
17949 Adjust all dependencies.
17950 (errs_new): For consistency, also take the values as argument.
17951 (errs_dup): Remove.
17952 (state_errs_set): New.
17953 (state_reductions_set, state_transitions_set): Assert that no
17954 previous value was assigned.
17955 (state_free): New.
17956 (states_free): Use it.
17957 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17958 temporary storage: use `errs' and `nerrs' as elsewhere.
17959 (set_conflicts): Allocate and free this `errs'.
17960
179612002-07-02 Akim Demaille <akim@epita.fr>
17962
17963 * lib/libiberty.h: New.
17964 * lib: Update the bitset implementation from upstream.
17965 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17966 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17967 * src/main.c: Adjust bitset stats calls.
17968
179692002-07-01 Paul Eggert <eggert@twinsun.com>
17970
17971 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17972 char, so that negative chars don't collide with $.
17973
179742002-06-30 Akim Demaille <akim@epita.fr>
17975
17976 Have the GLR tests be `warning' checked, and fix the warnings.
17977
17978 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17979 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17980 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17981 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17982 (yyaddDeferredAction): static.
17983 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17984 (yyreportParseError): yyprefix is const.
17985 yytokenp is used only when verbose.
17986 (yy__GNUC__): Replace with __GNUC__.
17987 (yypdumpstack): yyi is size_t.
17988 (yypreference): Un-yy local variables and arguments, to avoid
17989 clashes with `yyr1'. Anyway, we are not in the user name space.
17990 (yytname_size): be an int, as is compared with ints.
17991 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17992 Use them.
17993 * tests/cxx-gram.at: Use quotation to protect $1.
17994 Use AT_COMPILE to enable warnings hunts.
17995 Prototype yylex and yyerror.
17996 `Use' argc.
17997 Include `string.h', not `strings.h'.
17998 Produce and prototype stmtMerge only when used.
17999 yylex takes a location.
18000
180012002-06-30 Akim Demaille <akim@epita.fr>
18002
18003 We spend a lot of time in quotearg, in particular when --verbose.
18004
18005 * src/symtab.c (symbol_get): Store a quoted version of the key.
18006 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18007 Adjust all callers.
18008
180092002-06-30 Akim Demaille <akim@epita.fr>
18010
18011 * src/state.h (reductions_t): Rename member `nreds' as num.
18012 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18013 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18014
180152002-06-30 Akim Demaille <akim@epita.fr>
18016
18017 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18018 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18019 (shifts_to): Rename as...
18020 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18021 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18022 (TRANSITION_IS_DISABLED, transitions_to): these.
18023
180242002-06-30 Akim Demaille <akim@epita.fr>
18025
18026 * src/print.c (print_shifts, print_gotos): Merge into...
18027 (print_transitions): this.
18028 (print_transitions, print_errs, print_reductions): Align the
18029 lookaheads columns.
18030 (print_core, print_transitions, print_errs, print_state,
18031 print_grammar): Output empty lines separator before, not after.
18032 (state_default_rule_compute): Rename as...
18033 (state_default_rule): this.
18034 * tests/conflicts.at (Defaulted Conflicted Reduction),
18035 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18036 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18037
180382002-06-30 Akim Demaille <akim@epita.fr>
18039
18040 Display items as we display rules.
18041
18042 * src/gram.h, src/gram.c (rule_lhs_print): New.
18043 * src/gram.c (grammar_rules_partial_print): Use it.
18044 * src/print.c (print_core): Likewise.
18045 * tests/conflicts.at (Defaulted Conflicted Reduction),
18046 (Unresolved SR Conflicts): Adjust.
18047 (Unresolved SR Conflicts): Adjust and rename as...
18048 (Resolved SR Conflicts): this, as was meant.
18049 * tests/regression.at (Web2c Report): Adjust.
18050
180512002-06-30 Akim Demaille <akim@epita.fr>
18052
18053 * src/print.c (state_default_rule_compute): New, extracted from...
18054 (print_reductions): here.
18055 Pessimize, but clarify the code.
18056 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18057
180582002-06-30 Akim Demaille <akim@epita.fr>
18059
18060 * src/output.c (action_row): Let default_rule be always a rule
18061 number.
18062
180632002-06-30 Akim Demaille <akim@epita.fr>
18064
18065 * src/closure.c (print_firsts, print_fderives, closure):
18066 Use BITSET_EXECUTE.
18067 * src/lalr.c (lookaheads_print): Likewise.
18068 * src/state.c (state_rule_lookaheads_print): Likewise.
18069 * src/print_graph.c (print_core): Likewise.
18070 * src/print.c (print_reductions): Likewise.
18071 * src/output.c (action_row): Likewise.
18072 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18073
180742002-06-30 Akim Demaille <akim@epita.fr>
18075
18076 * src/print_graph.c: Use report_flag.
18077
180782002-06-30 Akim Demaille <akim@epita.fr>
18079
18080 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18081 to...
18082 * src/relation.h, src/relation.c (traverse, relation_digraph)
18083 (relation_print, relation_transpose): New.
18084
180852002-06-30 Akim Demaille <akim@epita.fr>
18086
18087 * src/state.h, src/state.c (shifts_to): New.
18088 * src/lalr.c (build_relations): Use it.
18089
180902002-06-30 Akim Demaille <akim@epita.fr>
18091
18092 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18093 (item_number_of_rule_number, rule_number_of_item_number): New.
18094 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18095 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18096 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18097 Propagate their use.
18098 Much remains to be done, in particular wrt `shorts' from types.h.
18099
181002002-06-30 Akim Demaille <akim@epita.fr>
18101
18102 * src/symtab.c (symbol_new): Initialize the `printer' member.
18103
181042002-06-30 Akim Demaille <akim@epita.fr>
18105
18106 * src/LR0.c (save_reductions): Remove, replaced by...
18107 * src/state.h, src/state.c (state_reductions_set): New.
18108 (reductions, errs): Rename as...
18109 (reductions_t, errs_t): these.
18110 Adjust all dependencies.
18111
181122002-06-30 Akim Demaille <akim@epita.fr>
18113
18114 * src/LR0.c (state_list_t, state_list_append): New.
18115 (first_state, last_state): Now symbol_list_t.
18116 (this_state): Remove.
18117 (new_itemsets, append_states, save_reductions): Take a state_t as
18118 argument.
18119 (set_states, generate_states): Adjust.
18120 (save_shifts): Remove, replaced by...
18121 * src/state.h, src/state.c (state_shifts_set): New.
18122 (shifts): Rename as...
18123 (shifts_t): this.
18124 Adjust all dependencies.
18125 * src/state.h (state_t): Remove the `next' member.
18126
181272002-06-30 Akim Demaille <akim@epita.fr>
18128
18129 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
18130 escaped in slot 0.
18131
181322002-06-30 Akim Demaille <akim@epita.fr>
18133
18134 Use hash.h for the state hash table.
18135
18136 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
18137 (allocate_storage): Use state_hash_new.
18138 (free_storage): Use state_hash_free.
18139 (new_state, get_state): Adjust.
18140 * src/lalr.h, src/lalr.c (states): Move to...
18141 * src/states.h (state_t): Remove the `link' member, no longer
18142 used.
18143 * src/states.h, src/states.c: here.
18144 (state_hash_new, state_hash_free, state_hash_lookup)
18145 (state_hash_insert, states_free): New.
18146 * src/states.c (state_table, state_compare, state_hash): New.
18147 * src/output.c (output_actions): Do not free states now, since we
18148 still need to know the final_state number in `prepare', called
18149 afterwards. Do it...
18150 * src/main.c (main): here: call states_free after `output'.
18151
181522002-06-30 Akim Demaille <akim@epita.fr>
18153
18154 * src/state.h, src/state.c (state_new): New, extracted from...
18155 * src/LR0.c (new_state): here.
18156 * src/state.h (STATE_ALLOC): Move to...
18157 * src/state.c: here.
18158 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
18159 * src/state.h, src/state.c: here.
18160
181612002-06-30 Akim Demaille <akim@epita.fr>
18162
18163 * src/reader.c (gensym): Rename as...
18164 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
18165 (getsym): Rename as...
18166 (symbol_get): this.
18167
181682002-06-30 Akim Demaille <akim@epita.fr>
18169
18170 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
18171 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
18172 * src/output.c, src/print.c, src/print_graph.c: Propagate.
18173 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
18174
181752002-06-30 Akim Demaille <akim@epita.fr>
18176
18177 Make the test suite pass with warnings checked.
18178
18179 * tests/actions.at (Printers and Destructors): Improve.
18180 Avoid unsigned vs. signed issues.
18181 * tests/calc.at: Don't exercise the scanner here, do it...
18182 * tests/input.at (Torturing the Scanner): here.
18183
181842002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18185
18186 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
18187 reorganize first lines parallel to yacc.c.
18188
181892002-06-28 Akim Demaille <akim@epita.fr>
18190
18191 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
18192 (b4_token_enum, b4_token_defines): New, factored from...
18193 * data/lalr1.cc, data/yacc.c, glr.c: here.
18194
181952002-06-28 Akim Demaille <akim@epita.fr>
18196
18197 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
18198 unused variables.
18199 * src/output.c (merger_output): static.
18200
182012002-06-28 Akim Demaille <akim@epita.fr>
18202
18203 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
18204 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
18205 pacify GCC.
18206 * src/output.c (save_row): Initialize all the variables to pacify GCC.
18207
182082002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18209
18210 Accumulated changelog for new GLR parsing features.
18211
18212 * src/conflicts.c (count_total_conflicts): Change name to
18213 conflicts_total_count.
18214 * src/conflicts.h: Ditto.
18215 * src/output.c (token_actions): Use the new name.
18216 (output_conflicts): Change conflp => conflict_list_heads, and
18217 confl => conflict_list for better readability.
18218 * data/glr.c: Use the new names.
18219 * NEWS: Add self to GLR announcement.
18220
18221 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
18222
18223 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
18224 Akim Demaille.
18225
18226 * data/bison.glr: Change name to glr.c
18227 * data/glr.c: Renamed from bison.glr.
18228 * data/Makefile.am: Add glr.c
18229
18230 * src/getargs.c:
18231
18232 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
18233 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
18234
18235 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18236
18237 * data/bison.glr: Be sure to restore the
18238 current #line when returning to the skeleton contents after having
18239 exposed the input file's #line.
18240
18241 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18242
18243 * data/bison.glr: Bring up to date with changes to bison.simple.
18244
18245 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18246
18247 * data/bison.glr: Correct definitions that use b4_prefix.
18248 Various reformatting.
18249 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
18250 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
18251 yytokenp argument; now part of stack.
18252 (yychar): Define to behave as documented.
18253 (yyclearin): Ditto.
18254
18255 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18256
18257 * src/reader.h: Add declaration for free_merger_functions.
18258
18259 * src/reader.c (merge_functions): New variable.
18260 (get_merge_function): New function.
18261 (free_merger_functions): New function.
18262 (readgram): Check for %prec that is not followed by a symbol.
18263 Handle %dprec and %merge declarations.
18264 (packgram): Initialize dprec and merger fields in rules array.
18265
18266 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
18267 conflict_list_cnt, conflict_list_free): New variables.
18268 (table_grow): Also grow conflict_table.
18269 (prepare_rules): Output dprec and merger tables.
18270 (conflict_row): New function.
18271 (action_row): Output conflict lists for GLR parser. Don't use
18272 default reduction in conflicted states for GLR parser so that there
18273 are spaces for the conflict lists.
18274 (save_row): Also save conflict information.
18275 (token_actions): Allocate conflict list.
18276 (merger_output): New function.
18277 (pack_vector): Pack conflict table, too.
18278 (output_conflicts): New function to output yyconflp and yyconfl.
18279 (output_check): Allocate conflict_tos.
18280 (output_actions): Output conflict tables, also.
18281 (output_skeleton): Output b4_mergers definition.
18282 (prepare): Output b4_max_rhs_length definition.
18283 Use 'bison.glr' as default skeleton for GLR parsers.
18284
18285 * src/gram.c (glr_parser): New flag.
18286 (grammar_free): Call free_merger_functions.
18287
18288 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
18289 all pairs of conflicting reductions, rather than just all tokens
18290 causing conflicts. Needed to size conflict tables.
18291 (conflicts_output): Modify call to count_rr_conflicts for new
18292 interface.
18293 (conflicts_print): Ditto.
18294 (count_total_conflicts): New function.
18295
18296 * src/reader.h (merger_list): New type.
18297 (merge_functions): New variable.
18298
18299 * src/lex.h (tok_dprec, tok_merge): New token types.
18300
18301 * src/gram.h (rule_s): Add dprec and merger fields.
18302 (glr_parser): New flag.
18303
18304 * src/conflicts.h (count_total_conflicts): New function.
18305
18306 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
18307
18308 * doc/bison.texinfo (Generalized LR Parsing): New section.
18309 (GLR Parsers): New section.
18310 (Language and Grammar): Mention GLR parsing.
18311 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
18312 Correct typo ("tge" -> "the").
18313
18314 * data/bison.glr: New skeleton for GLR parsing.
18315
18316 * tests/cxx-gram.at: New tests for GLR parsing.
18317
18318 * tests/testsuite.at: Include cxx-gram.at.
18319
18320 * tests/Makefile.am: Add cxx-gram.at.
18321
18322 * src/parse-gram.y:
18323
18324 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
18325
18326 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
18327
183282002-06-27 Akim Demaille <akim@epita.fr>
18329
18330 * src/options.h, src/options.c: Remove.
18331 * src/getargs.c (short_options, long_options): New.
18332
183332002-06-27 Akim Demaille <akim@epita.fr>
18334
18335 * data/bison.simple, data/bison.c++: Rename as...
18336 * data/yacc.c, data/lalr1.cc: these.
18337 * doc/bison.texinfo (Environment Variables): Remove.
18338
183392002-06-25 Raja R Harinath <harinath@cs.umn.edu>
18340
18341 * src/getargs.c (report_argmatch): Initialize strtok().
18342
183432002-06-20 Akim Demaille <akim@epita.fr>
18344
18345 * data/bison.simple (b4_symbol_actions): New, replaces...
18346 (b4_symbol_destructor, b4_symbol_printer): these.
18347 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18348 user token numbers.
18349
183502002-06-20 Akim Demaille <akim@epita.fr>
18351
18352 * data/bison.simple (yydestructor): Rename as...
18353 (yydestruct): this.
18354
183552002-06-20 Akim Demaille <akim@epita.fr>
18356
18357 * src/symtab.h, src/symtab.c (symbol_type_set)
18358 (symbol_destructor_set, symbol_precedence_set): The location is
18359 the last argument.
18360 Adjust all callers.
18361
183622002-06-20 Akim Demaille <akim@epita.fr>
18363
18364 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18365 internals.
18366 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18367 Takes a location.
18368 * src/symtab.h, src/symtab.c (symbol_class_set)
18369 (symbol_user_token_number_set): Likewise.
18370 Adjust all callers.
18371 Promote complain_at.
18372 * tests/input.at (Type Clashes): Adjust.
18373
183742002-06-20 Akim Demaille <akim@epita.fr>
18375
18376 * data/bison.simple (YYLEX): Fix the declaration when
18377 %pure-parser.
18378
183792002-06-20 Akim Demaille <akim@epita.fr>
18380
18381 * data/bison.simple (yysymprint): Don't print the token number,
18382 just its name.
18383 * tests/actions.at (Destructors): Rename as...
18384 (Printers and Destructors): this.
18385 Also exercise %printer.
18386
183872002-06-20 Akim Demaille <akim@epita.fr>
18388
18389 * data/bison.simple (YYDSYMPRINT): New.
18390 Use it to remove many of the #if YYDEBUG/if (yydebug).
18391
183922002-06-20 Akim Demaille <akim@epita.fr>
18393
18394 * src/symtab.h, src/symtab.c (symbol_t): printer and
18395 printer_location are new members.
18396 (symbol_printer_set): New.
18397 * src/parse-gram.y (PERCENT_PRINTER): New token.
18398 Handle its associated rule.
18399 * src/scan-gram.l: Adjust.
18400 (handle_destructor_at, handle_destructor_dollar): Rename as...
18401 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18402 * src/output.c (symbol_printers_output): New.
18403 (output_skeleton): Call it.
18404 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18405 since there are already many grammar files with a user `yyprint'.
18406 Replace the calls to YYPRINT to calls to yysymprint.
18407 * tests/calc.at: Adjust.
18408 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18409 taking advantage of parser very internal details (stack size!).
18410
184112002-06-20 Akim Demaille <akim@epita.fr>
18412
18413 * src/scan-gram.l: Complete the scanner with the missing patterns
18414 to pacify Flex.
18415 Use `quote' and `symbol_tag_get' where appropriate.
18416
184172002-06-19 Akim Demaille <akim@epita.fr>
18418
18419 * tests/actions.at (Destructors): Augment to test locations.
18420 * data/bison.simple (yydestructor): Pass it the current location
18421 if locations are enabled.
18422 Prototype only when __STDC__ or C++.
18423 Change the argument names to move into the yy name space: there is
18424 user code here.
18425
184262002-06-19 Akim Demaille <akim@epita.fr>
18427
18428 * data/bison.simple (b4_pure_if): New.
18429 Use it instead of #ifdef YYPURE.
18430
184312002-06-19 Akim Demaille <akim@epita.fr>
18432
18433 * data/bison.simple (b4_location_if): New.
18434 Use it instead of #ifdef YYLSP_NEEDED.
18435
184362002-06-19 Akim Demaille <akim@epita.fr>
18437
18438 Prepare @$ in %destructor, but currently don't bind it in the
18439 skeleton, as %location use is not cleaned up yet.
18440
18441 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18442 (handle_action_at): New.
18443 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18444 a braced_code_t and a location as additional arguments.
18445 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18446 unquote one when outputting `b4_dollar_dollar'.
18447 Adjust callers.
18448 * data/bison.simple (b4_eval): Remove.
18449 (b4_symbol_destructor): Adjust.
18450 * tests/input.at (Invalid @n): Adjust.
18451
184522002-06-19 Zack Weinberg <zack@codesourcery.com>
18453
18454 * doc/bison.texinfo: Document ability to have multiple
18455 prologue sections.
18456
184572002-06-18 Akim Demaille <akim@epita.fr>
18458
18459 * src/files.c (compute_base_names): When computing the output file
18460 names from the input file name, strip the directory part.
18461
184622002-06-18 Akim Demaille <akim@epita.fr>
18463
18464 * data/bison.simple.new: Comment changes.
18465 Reported by Andreas Schwab.
18466
184672002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18468
18469 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18470 there are no `label `yyoverflowlab' defined but not used' warnings
18471 when yyoverflow is defined.
18472
184732002-06-18 Akim Demaille <akim@epita.fr>
18474
18475 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18476 new member.
18477 (symbol_destructor_set): Adjust.
18478 * src/output.c (symbol_destructors_output): Output the destructor
18479 locations.
18480 Output the symbol name.
18481 * data/bison.simple (b4_symbol_destructor): Adjust.
18482
184832002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18484 and Akim Demaille <akim@epita.fr>
18485
18486 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18487 what's left on the stack when the error recovery hits EOF.
18488 * tests/actions.at (Destructors): Complete to exercise this case.
18489
184902002-06-17 Akim Demaille <akim@epita.fr>
18491
18492 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18493 arguments is really empty, not only equal to `[]'.
18494 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18495 member.
18496 (symbol_destructor_set): New.
18497 * src/output.c (symbol_destructors_output): New.
18498 * src/reader.h (brace_code_t, current_braced_code): New.
18499 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18500 (handle_dollar): Rename as...
18501 (handle_action_dollar): this.
18502 (handle_destructor_dollar): New.
18503 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18504 (grammar_declaration): Use it.
18505 * data/bison.simple (yystos): Is always defined.
18506 (yydestructor): New.
18507 * tests/actions.at (Destructors): New.
18508 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18509
185102002-06-17 Akim Demaille <akim@epita.fr>
18511
18512 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18513 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18514 rule_length only when needed.
18515 * src/output.c (actions_output, token_definitions_output): Output
18516 the full M4 block.
18517 * src/symtab.c: Don't access directly to the symbol tag, use
18518 symbol_tag_get.
18519 * src/parse-gram.y: Use symbol_list_free.
18520
185212002-06-17 Akim Demaille <akim@epita.fr>
18522
18523 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18524 (symbol_list_prepend, get_type_name): Move to...
18525 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18526 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18527 Adjust all callers.
18528 (symbol_list_free): New.
18529 * src/scan-gram.l (handle_dollar): Takes a location.
18530 * tests/input.at (Invalid $n): Adjust.
18531
185322002-06-17 Akim Demaille <akim@epita.fr>
18533
18534 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18535 (symbol_list_prepend): New.
18536 * src/parse-gram.y (%union): `list' is a new member.
18537 (symbols.1): New, replaces...
18538 (terms_to_prec.1, nterms_to_type.1): these.
18539 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18540 Take a location as additional argument.
18541 Adjust all callers.
18542
185432002-06-15 Akim Demaille <akim@epita.fr>
18544
18545 * src/parse-gram.y: Move %token in the declaration section so that
18546 we don't depend upon CVS Bison.
18547
185482002-06-15 Akim Demaille <akim@epita.fr>
18549
18550 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18551 * src/print.c (print_core): Use it.
18552
185532002-06-15 Akim Demaille <akim@epita.fr>
18554
18555 * src/conflicts.c (log_resolution): Accept the rule involved in
18556 the sr conflicts instead of the lookahead number that points to
18557 that rule.
18558 (flush_reduce): Accept the current lookahead vector as argument,
18559 instead of the index in LA.
18560 (resolve_sr_conflict): Accept the current number of lookahead
18561 bitset to consider for the STATE, instead of the index in LA.
18562 (set_conflicts): Adjust.
18563 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18564
185652002-06-15 Akim Demaille <akim@epita.fr>
18566
18567 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18568 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18569 Adjust all dependencies.
18570 * src/lalr.c (initialize_lookaheads): Split into...
18571 (states_lookaheads_count, states_lookaheads_initialize): these.
18572 (lalr): Adjust.
18573
185742002-06-15 Akim Demaille <akim@epita.fr>
18575
18576 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18577 out of...
18578 (grammar_rules_print): here.
18579 * src/reduce.c (reduce_output): Use it.
18580 * tests/reduce.at (Useless Rules, Reduced Automaton)
18581 (Underivable Rules): Adjust.
18582
185832002-06-15 Akim Demaille <akim@epita.fr>
18584
18585 Copy BYacc's nice way to report the grammar.
18586
18587 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18588 New.
18589 Don't print the rules' location, it is confusing and useless.
18590 (rule_print): Use grammar_rhs_print.
18591 * src/print.c (print_grammar): Use grammar_rules_print.
18592
185932002-06-15 Akim Demaille <akim@epita.fr>
18594
18595 Complete and rationalize `useless thing' warnings.
18596
18597 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18598 (symbol_tag_print): New.
18599 Use them everywhere in place of accessing directly the tag member.
18600 * src/gram.h, src/gram.c (rule_print): New.
18601 Use it where a rule used to be printed `by hand'.
18602 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18603 (reduce_grammar_tables): Report the useless rules.
18604 (reduce_print): Useless things are a warning, not an error.
18605 Report it as such.
18606 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18607 (Reduced Automaton, Underivable Rules): Adjust.
18608 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18609 * tests/conflicts.at (Unresolved SR Conflicts)
18610 (Solved SR Conflicts): Adjust.
18611
186122002-06-15 Akim Demaille <akim@epita.fr>
18613
18614 Let symbols have a location.
18615
18616 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18617 (getsym): Adjust.
18618 Adjust all callers.
18619 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18620 Use location_t, not int.
18621 * src/symtab.c (symbol_check_defined): Take advantage of the
18622 location.
18623 * tests/regression.at (Invalid inputs): Adjust.
18624
186252002-06-15 Akim Demaille <akim@epita.fr>
18626
18627 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18628 (input): Don't try to initialize yylloc here, do it in the
18629 scanner.
18630 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18631 * src/gram.h (rule_t): Change line and action_line into location
18632 and action_location, of location_t type.
18633 Adjust all dependencies.
18634 * src/location.h, src/location.c (empty_location): New.
18635 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18636 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18637 (grammar_current_rule_symbol_append)
18638 (grammar_current_rule_action_append): Expect a location as argument.
18639 * src/reader.c (grammar_midrule_action): Adjust to attach an
18640 action's location as dummy symbol location.
18641 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18642 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18643 the line numbers.
18644
186452002-06-14 Akim Demaille <akim@epita.fr>
18646
18647 Grammar declarations may be found in the grammar section.
18648
18649 * src/parse-gram.y (rules_or_grammar_declaration): New.
18650 (declarations): Each declaration may end with a semicolon, not
18651 just...
18652 (grammar_declaration): `"%union"'.
18653 (grammar): Branch to rules_or_grammar_declaration.
18654
186552002-06-14 Akim Demaille <akim@epita.fr>
18656
18657 * src/main.c (main): Invoke scanner_free.
18658
186592002-06-14 Akim Demaille <akim@epita.fr>
18660
18661 * src/output.c (m4_invoke): Extracted from...
18662 (output_skeleton): here.
18663 Free tempfile.
18664
186652002-06-14 Akim Demaille <akim@epita.fr>
18666
18667 * src/parse-gram.y (directives, directive, gram)
18668 (grammar_directives, precedence_directives, precedence_directive):
18669 Rename as...
18670 (declarations, declaration, grammar, grammar_declaration)
18671 (precedence_declaration, precedence_declarator): these.
18672 (symbol_declaration): New.
18673
186742002-06-14 Akim Demaille <akim@epita.fr>
18675
18676 * src/files.c (action_obstack): Remove, unused.
18677 (output_obstack): Remove it, and all its dependencies, as it is no
18678 longer needed.
18679 * src/reader.c (epilogue_set): Build the epilogue in the
18680 muscle_obstack.
18681 * src/output.h, src/output.c (muscle_obstack): Move to...
18682 * src/muscle_tab.h, src/muscle_tab.h: here.
18683 (muscle_init): Initialize muscle_obstack.
18684 (muscle_free): New.
18685 * src/main.c (main): Call it.
18686
186872002-06-14 Akim Demaille <akim@epita.fr>
18688
18689 * src/location.h: New, extracted from...
18690 * src/reader.h: here.
18691 * src/Makefile.am (noinst_HEADERS): Merge into
18692 (bison_SOURCES): this.
18693 Add location.h.
18694 * src/parse-gram.y: Use location_t instead of Bison's.
18695 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18696 Use location_t instead of ints.
18697
186982002-06-14 Akim Demaille <akim@epita.fr>
18699
18700 * data/bison.simple, data/bison.c++: Be sure to restore the
18701 current #line when returning to the skeleton contents after having
18702 exposed the input file's #line.
18703
187042002-06-12 Akim Demaille <akim@epita.fr>
18705
18706 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18707 eager.
18708 * tests/actions.at (Exotic Dollars): New.
18709
187102002-06-12 Akim Demaille <akim@epita.fr>
18711
18712 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18713 ['"/] too eagerly.
18714 * tests/input.at (Torturing the Scanner): New.
18715
187162002-06-11 Akim Demaille <akim@epita.fr>
18717
18718 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18719 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18720 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18721 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18722 * src/reader.c (reader): Use it.
18723
187242002-06-11 Akim Demaille <akim@epita.fr>
18725
18726 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18727 Adjust all callers.
18728 (scanner_last_string_free): New.
18729
187302002-06-11 Akim Demaille <akim@epita.fr>
18731
18732 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18733 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18734 (last_string, YY_OBS_FREE): New.
18735 Use them when returning an ID.
18736
187372002-06-11 Akim Demaille <akim@epita.fr>
18738
18739 Have Bison grammars parsed by a Bison grammar.
18740
18741 * src/reader.c, src/reader.h (prologue_augment): New.
18742 * src/reader.c (copy_definition): Remove.
18743
18744 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18745 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18746 (grammar_current_rule_prec_set, grammar_current_rule_check)
18747 (grammar_current_rule_symbol_append)
18748 (grammar_current_rule_action_append): Export.
18749 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18750 (symbol_list_action_append): Remove.
18751 Hook the routines from reader.
18752 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18753 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18754
18755 * src/reader.c (read_declarations): Remove, unused.
18756
18757 * src/parse-gram.y: Handle the epilogue.
18758 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18759 (grammar_start_symbol_set): this.
18760 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18761 * src/reader.c (readgram): Remove, unused.
18762 (reader): Adjust to insert eoftoken and axiom where appropriate.
18763
18764 * src/reader.c (copy_dollar): Replace with...
18765 * src/scan-gram.h (handle_dollar): this.
18766 * src/parse-gram.y: Remove `%thong'.
18767
18768 * src/reader.c (copy_at): Replace with...
18769 * src/scan-gram.h (handle_at): this.
18770
18771 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18772 New.
18773
18774 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18775 time being.
18776
18777 * src/reader.h, src/reader.c (grammar_rule_end): New.
18778
18779 * src/parse.y (current_type, current_class): New.
18780 Implement `%nterm', `%token' support.
18781 Merge `%term' into `%token'.
18782 (string_as_id): New.
18783 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18784 type name.
18785
18786 * src/parse-gram.y: Be sure to handle properly the beginning of
18787 rules.
18788
18789 * src/parse-gram.y: Handle %type.
18790 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18791
18792 * src/parse-gram.y: More directives support.
18793 * src/options.c: No longer handle source directives.
18794
18795 * src/parse-gram.y: Fix %output.
18796
18797 * src/parse-gram.y: Handle %union.
18798 Use the prologue locations.
18799 * src/reader.c (parse_union_decl): Remove.
18800
18801 * src/reader.h, src/reader.c (epilogue_set): New.
18802 * src/parse-gram.y: Use it.
18803
18804 * data/bison.simple, data/bison.c++: b4_stype is now either not
18805 defined, then default to int, or to the contents of %union,
18806 without `union' itself.
18807 Adjust.
18808 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18809
18810 * src/output.c (actions_output): Don't output braces, as they are
18811 already handled by the scanner.
18812
18813 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18814 characters to themselves.
18815
18816 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18817 that the epilogue has a proper #line.
18818
18819 * src/parse-gram.y: Handle precedence/associativity.
18820
18821 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18822 a terminal.
18823 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18824 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18825 at all to define terminals that cannot be emitted.
18826
18827 * src/scan-gram.l: Escape M4 characters.
18828
18829 * src/scan-gram.l: Working properly with escapes in user
18830 strings/characters.
18831
18832 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18833 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18834 grammar.
18835 Use more modest sizes, as for the time being the parser does not
18836 release memory, and therefore the process swallows a huge amount
18837 of memory.
18838
18839 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18840 stricter %token grammar.
18841
18842 * src/symtab.h (associativity): Add `undef_assoc'.
18843 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18844 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18845
18846 * tests/regression.at (Invalid %directive): Remove, as it is now
18847 meaningless.
18848 (Invalid inputs): Adjust to the new error messages.
18849 (Token definitions): The new grammar doesn't allow too many
18850 eccentricities.
18851
18852 * src/lex.h, src/lex.c: Remove.
18853 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18854 (copy_character, copy_string2, copy_string, copy_identifier)
18855 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18856 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18857 (parse_action): Remove.
18858 * po/POTFILES.in: Adjust.
18859
188602002-06-11 Akim Demaille <akim@epita.fr>
18861
18862 * src/reader.c (parse_action): Don't store directly into the
18863 rule's action member: return the action as a string.
18864 Don't require `rule_length' as an argument: compute it.
18865 (grammar_current_rule_symbol_append)
18866 (grammar_current_rule_action_append): New, eved out from
18867 (readgram): here.
18868 Remove `action_flag', `rulelength', unused now.
18869
188702002-06-11 Akim Demaille <akim@epita.fr>
18871
18872 * src/reader.c (grammar_current_rule_prec_set).
18873 (grammar_current_rule_check): New, eved out from...
18874 (readgram): here.
18875 Remove `xaction', `first_rhs': useless.
18876 * tests/input.at (Type clashes): New.
18877 * tests/existing.at (GNU Cim Grammar): Adjust.
18878
188792002-06-11 Akim Demaille <akim@epita.fr>
18880
18881 * src/reader.c (grammar_midrule_action): New, Eved out from
18882 (readgram): here.
18883
188842002-06-11 Akim Demaille <akim@epita.fr>
18885
18886 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18887 New.
18888 (readgram): Use them as replacement of inlined code, crule and
18889 crule1.
18890
188912002-06-11 Akim Demaille <akim@epita.fr>
18892
18893 * src/reader.c (grammar_end, grammar_symbol_append): New.
18894 (readgram): Use them.
18895 Make the use of `p' as local as possible.
18896
188972002-06-10 Akim Demaille <akim@epita.fr>
18898
18899 GCJ's parser requires the tokens to be defined before the prologue.
18900
18901 * data/bison.simple: Output the token definition before the user's
18902 prologue.
18903 * tests/regression.at (Braces parsing, Duplicate string)
18904 (Mixing %token styles): Check the output from bison.
18905 (Early token definitions): New.
18906
189072002-06-10 Akim Demaille <akim@epita.fr>
18908
18909 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18910 assigning twice the same user number to a token, so that we can
18911 use it in...
18912 * src/lex.c (lex): here.
18913 Also use `symbol_class_set' instead of hand written code.
18914 * src/reader.c (parse_assoc_decl): Likewise.
18915
189162002-06-10 Akim Demaille <akim@epita.fr>
18917
18918 * src/symtab.c, src/symtab.c (symbol_class_set)
18919 (symbol_user_token_number_set): New.
18920 * src/reader.c (parse_token_decl): Use them.
18921 Use a switch instead of ifs.
18922 Use a single argument.
18923
189242002-06-10 Akim Demaille <akim@epita.fr>
18925
18926 Remove `%thong' support as it is undocumented, unused, duplicates
18927 `%token's job, and creates useless e-mail traffic with people who
18928 want to know what it is, why it is undocumented, unused, and
18929 duplicates `%token's job.
18930
18931 * src/reader.c (parse_thong_decl): Remove.
18932 * src/options.c (option_table): Remove "thong".
18933 * src/lex.h (tok_thong): Remove.
18934
189352002-06-10 Akim Demaille <akim@epita.fr>
18936
18937 * src/symtab.c, src/symtab.c (symbol_type_set)
18938 (symbol_precedence_set): New.
18939 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18940 (value_components_used): Remove, unused.
18941
189422002-06-09 Akim Demaille <akim@epita.fr>
18943
18944 Move symbols handling code out of the reader.
18945
18946 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18947 (axiom): Move to...
18948 * src/symtab.h, src/symtab.c: here.
18949
18950 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18951 * src/reader.c (startval): Rename as...
18952 * src/symtab.h, src/symtab.c (startsymbol): this.
18953 * src/reader.c: Adjust.
18954
18955 * src/reader.c (symbol_check_defined, symbol_make_alias)
18956 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18957 (token_translations_init)
18958 Move to...
18959 * src/symtab.c: here.
18960 * src/reader.c (packsymbols): Move to...
18961 * src/symtab.h, src/symtab.c (symbols_pack): here.
18962 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18963 argument.
18964
189652002-06-03 Akim Demaille <akim@epita.fr>
18966
18967 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18968 then statements.
18969
189702002-06-03 Akim Demaille <akim@epita.fr>
18971
18972 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18973 structs with non literals.
18974 * src/scan-skel.l: never-interactive.
18975 * src/conflicts.c (enum conflict_resolution_e): No trailing
18976 comma.
18977 * src/getargs.c (usage): Split long literal strings.
18978 Reported by Hans Aberg.
18979
189802002-05-28 Akim Demaille <akim@epita.fr>
18981
18982 * data/bison.c++: Use C++ ostreams.
18983 (cdebug_): New member.
18984
189852002-05-28 Akim Demaille <akim@epita.fr>
18986
18987 * src/output.c (output_skeleton): Be sure to allocate enough room
18988 for `/' _and_ for `\0' in full_skeleton.
18989
189902002-05-28 Akim Demaille <akim@epita.fr>
18991
18992 * data/bison.c++: Catch up with bison.simple:
18993 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18994 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18995 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18996 and popping traces.
18997
189982002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18999
19000 * src/output.c (output_skeleton): Put an explicit path in front of
19001 the skeleton file name, rather than relying on the -I directory,
19002 to partially alleviate effects of having a skeleton file lying around
19003 in the current directory.
19004
190052002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19006
19007 * src/conflicts.c (log_resolution): Correct typo:
19008 obstack_printf should be obstack_fgrow1.
19009
190102002-05-26 Akim Demaille <akim@epita.fr>
19011
19012 * src/state.h (state_t): `solved_conflicts' is a new member.
19013 * src/LR0.c (new_state): Set it to 0.
19014 * src/conflicts.h, src/conflicts.c (print_conflicts)
19015 (free_conflicts, solve_conflicts): Rename as...
19016 (conflicts_print, conflicts_free, conflicts_solve): these.
19017 Adjust callers.
19018 * src/conflicts.c (enum conflict_resolution_e)
19019 (solved_conflicts_obstack): New, used by...
19020 (log_resolution): this.
19021 Adjust to attach the conflict resolution to each state.
19022 Complete the description with the precedence/associativity
19023 information.
19024 (resolve_sr_conflict): Adjust.
19025 * src/print.c (print_state): Output its solved_conflicts.
19026 * tests/conflicts.at (Unresolved SR Conflicts)
19027 (Solved SR Conflicts): Exercise --report=all.
19028
190292002-05-26 Akim Demaille <akim@epita.fr>
19030
19031 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19032 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19033 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19034 (token_number_t, item_number_as_token_number)
19035 (token_number_as_item_number, muscle_insert_token_number_table):
19036 Rename as...
19037 (symbol_number_t, item_number_as_symbol_number)
19038 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19039 these, since it is more appropriate.
19040
190412002-05-26 Akim Demaille <akim@epita.fr>
19042
19043 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19044 `Error:' lines.
19045 * data/bison.simple (yystos) [YYDEBUG]: New.
19046 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19047 error recovery.
19048 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19049
190502002-05-25 Akim Demaille <akim@epita.fr>
19051
19052 * doc/bison.texinfo (Debugging): Split into...
19053 (Tracing): this new section, its former contents, and...
19054 (Understanding): this new section.
19055 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19056 by...
19057 (report_flag): this.
19058 Adjust all dependencies.
19059 (report_args, report_types, report_argmatch): New.
19060 (usage, getargs): Report/support -r, --report.
19061 * src/options.h
19062 (struct option_table_struct): Rename as..,
19063 (struct option_table_s): this.
19064 Rename the `set_flag' member to `flag' to match with getopt_long's
19065 struct.
19066 * src/options.c (option_table): Split verbose into an entry for
19067 %verbose, and another for --verbose.
19068 Support --report/-r, so remove -r from the obsolete --raw.
19069 * src/print.c: Attach full item sets and lookaheads reports to
19070 report_flag instead of trace_flag.
19071 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19072
190732002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19074 and Paul Eggert <eggert@twinsun.com>
19075
19076 * data/bison.simple (yyparse): Correct error handling to conform to
19077 POSIX and yacc. Specifically, after syntax error is discovered,
19078 do not reduce further before shifting the error token.
19079 Clean up the code a bit by removing the labels yyerrdefault,
19080 yyerrhandle, yyerrpop.
19081 * NEWS: Document the above.
19082
190832002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19084
19085 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19086 type; it isn't always big enough, since it doesn't necessarily
19087 include non-terminals.
19088 (yytranslate): Expand definition of yy_token_number_type, so that
19089 the latter can be removed.
19090 (yy_token_number_type): Remove, only one use.
19091 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19092 don't use TokenNumberType as element type.
19093
19094 * tests/regression.at: Modify expected output to agree with change
19095 to yyr1 and yytranslate.
19096
190972002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19098
19099 * src/reader.c (parse_action): Use copy_character instead of
19100 obstack_1grow.
19101
191022002-05-13 Akim Demaille <akim@epita.fr>
19103
19104 * tests/regression.at (Token definitions): Prototype yylex and
19105 yyerror.
19106
191072002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19108
19109 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
19110 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19111 32-bit arithmetic.
19112 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19113
191142002-05-07 Akim Demaille <akim@epita.fr>
19115
19116 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19117 avoid GCC warnings.
19118
191192002-05-07 Akim Demaille <akim@epita.fr>
19120
19121 Kill GCC warnings.
19122
19123 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19124 over the RHS of each rule.
19125 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
19126 * src/state.h (state_t): Member `nitems' is unsigned short.
19127 * src/LR0.c (get_state): Adjust.
19128 * src/reader.c (packgram): Likewise.
19129 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
19130 `Type'.
19131 (muscle_insert_int_table): Remove, unused.
19132 (prepare_rules): Remove `max'.
19133
191342002-05-06 Akim Demaille <akim@epita.fr>
19135
19136 * src/closure.c (print_firsts): Display of the symbol tags.
19137 (bitmatrix_print): Move to...
19138 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
19139 here.
19140 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
19141
191422002-05-06 Akim Demaille <akim@epita.fr>
19143
19144 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
19145 hash_do_for_each.
19146
191472002-05-06 Akim Demaille <akim@epita.fr>
19148
19149 * src/LR0.c (new_state, get_state): Instead of using the global
19150 `kernel_size' and `kernel_base', have two new arguments:
19151 `core_size' and `core'.
19152 Adjust callers.
19153
191542002-05-06 Akim Demaille <akim@epita.fr>
19155
19156 * src/reader.c (packgram): No longer end `ritem' with a 0
19157 sentinel: it is not used.
19158
191592002-05-05 Akim Demaille <akim@epita.fr>
19160
19161 New experimental feature: display the lookaheads in the report and
19162 graph.
19163
19164 * src/print (print_core): When --trace-flag, display the rules
19165 lookaheads.
19166 * src/print_graph.c (print_core): Likewise.
19167 Swap the arguments.
19168 Adjust caller.
19169
191702002-05-05 Akim Demaille <akim@epita.fr>
19171
19172 * tests/torture.at (Many lookaheads): New test.
19173
191742002-05-05 Akim Demaille <akim@epita.fr>
19175
19176 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
19177 (GENERATE_MUSCLE_INSERT_TABLE): this.
19178 (output_int_table, output_unsigned_int_table, output_short_table)
19179 (output_token_number_table, output_item_number_table): Replace with...
19180 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
19181 (muscle_insert_short_table, muscle_insert_token_number_table)
19182 (muscle_insert_item_number_table): these.
19183 Adjust all callers.
19184 (prepare_tokens): Don't free `translations', since...
19185 * src/reader.h, src/reader.c (grammar_free): do it.
19186 Move to...
19187 * src/gram.h, src/gram.c (grammar_free): here.
19188 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19189 b4_translate_max.
19190
191912002-05-05 Akim Demaille <akim@epita.fr>
19192
19193 * src/output.c (output_unsigned_int_table): New.
19194 (prepare_rules): `i' is unsigned.
19195 `prhs', `rline', `r2' are unsigned int.
19196 Rename muscle `rhs_number_max' as `rhs_max'.
19197 Output muscles `prhs_max', `rline_max', and `r2_max'.
19198 Free rline and r1.
19199 * data/bison.simple, data/bison.c++: Adjust to use these muscles
19200 to compute types instead of constant types.
19201 * tests/regression.at (Web2c Actions): Adjust.
19202
192032002-05-04 Akim Demaille <akim@epita.fr>
19204
19205 * src/symtab.h (SALIAS, SUNDEF): Rename as...
19206 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
19207 Adjust dependencies.
19208 * src/output.c (token_definitions_output): Be sure not to output a
19209 `#define 'a'' when fed with `%token 'a' "a"'.
19210 * tests/regression.at (Token definitions): New.
19211
192122002-05-03 Paul Eggert <eggert@twinsun.com>
19213
19214 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
19215 for K&R C.
19216
192172002-05-03 gettextize <bug-gnu-gettext@gnu.org>
19218
19219 * Makefile.am (SUBDIRS): Remove intl.
19220 (EXTRA_DIST): Add config/config.rpath.
19221
192222002-05-03 Akim Demaille <akim@epita.fr>
19223
19224 * data/bison.simple (m4_if): Don't output empty enums.
19225 And actually, output valid enum definitions :(.
19226
192272002-05-03 Akim Demaille <akim@epita.fr>
19228
19229 * configure.bat: Remove, completely obsolete.
19230 * Makefile.am (EXTRA_DIST): Adjust.
19231 Don't distribute config.rpath...
19232 * config/Makefile.am (EXTRA_DIST): Do it.
19233
192342002-05-03 Akim Demaille <akim@epita.fr>
19235
19236 * configure.in (GETTEXT_VERSION): New.
19237 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
19238
192392002-05-03 Akim Demaille <akim@epita.fr>
19240
19241 * data/bison.simple (b4_token_enum): New.
19242 (b4_token_defines): Use it to output tokens both as #define and
19243 enums.
19244 Suggested by Paul Eggert.
19245 * src/output.c (token_definitions_output): Don't output spurious
19246 white spaces.
19247
192482002-05-03 Akim Demaille <akim@epita.fr>
19249
19250 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19251
192522002-05-02 Robert Anisko <robert@lrde.epita.fr>
19253
19254 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
19255 Update the stack class, give a try to deque as the default container.
19256
192572002-05-02 Akim Demaille <akim@epita.fr>
19258
19259 * data/bison.simple (yyparse): Do not implement @$ = @1.
19260 (YYLLOC_DEFAULT): Adjust to do it.
19261 * doc/bison.texinfo (Location Default Action): Fix.
19262
192632002-05-02 Akim Demaille <akim@epita.fr>
19264
19265 * src/reader.c (parse_braces): Merge into...
19266 (parse_action): this.
19267
192682002-05-02 Akim Demaille <akim@epita.fr>
19269
19270 * configure.in (ALL_LINGUAS): Remove.
19271 * po/LINGUAS, hr.po: New.
19272
192732002-05-02 Akim Demaille <akim@epita.fr>
19274
19275 Remove the so called hairy (semantic) parsers.
19276
19277 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
19278 * src/gram.h, src/gram.c (semantic_parser): Remove.
19279 (rule_t): Remove the guard and guard_line members.
19280 * src/lex.h (token_t): remove tok_guard.
19281 * src/options.c (option_table): Remove %guard and %semantic_parser
19282 support.
19283 * src/output.c, src/output.h (guards_output): Remove.
19284 (prepare): Adjust.
19285 (token_definitions_output): Don't output the `T'
19286 tokens (???).
19287 (output_skeleton): Don't output the guards.
19288 * src/files.c, src/files.c (attrsfile): Remove.
19289 * src/reader.c (symbol_list): Remove the guard and guard_line
19290 members.
19291 Adjust dependencies.
19292 (parse_guard): Remove.
19293 * data/bison.hairy: Remove.
19294 * doc/bison.texinfo (Environment Variables): Remove occurrences of
19295 BISON_HAIRY.
19296
192972002-05-02 Akim Demaille <akim@epita.fr>
19298
19299 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
19300 (parse_guard): Rename the formal argument `stack_offset' as
19301 `rule_length', which is more readable.
19302 Adjust callers.
19303 (copy_at, copy_dollar): Instead of outputting the hard coded
19304 values of $$, $n and so forth, output invocation to b4_lhs_value,
19305 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
19306 Note: this patch partially drops `semantic-parser' support: it
19307 always does `rule_length - n', where semantic parsers ought to
19308 always use `-n'.
19309 * data/bison.simple, data/bison.c++ (b4_lhs_value)
19310 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
19311
193122002-05-02 Akim Demaille <akim@epita.fr>
19313
19314 * configure.in (AC_INIT): Bump to 1.49b.
19315 (AM_INIT_AUTOMAKE): Short invocation.
19316
193172002-05-02 Akim Demaille <akim@epita.fr>
19318
19319 Version 1.49a.
19320
193212002-05-01 Akim Demaille <akim@epita.fr>
19322
19323 * src/skeleton.h: Remove.
19324
193252002-05-01 Akim Demaille <akim@epita.fr>
19326
19327 * src/skeleton.h: Fix the #endif.
19328 Reported by Magnus Fromreide.
19329
193302002-04-26 Paul Eggert <eggert@twinsun.com>
19331
19332 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
19333 Define if we define YYSTYPE and YYLTYPE, respectively.
19334 (YYCOPY): Fix [] quoting problem in the non-GCC case.
19335
193362002-04-25 Robert Anisko <robert@lrde.epita.fr>
19337
19338 * src/scan-skel.l: Postprocess quadrigraphs.
19339
19340 * src/reader.c (copy_character): New function, used to output
19341 single characters while replacing `[' and `]' with quadrigraphs, to
19342 avoid troubles with M4 quotes.
19343 (copy_comment): Output characters with copy_character.
19344 (read_additionnal_code): Likewise.
19345 (copy_string2): Likewise.
19346 (copy_definition): Likewise.
19347
19348 * tests/calc.at: Exercise M4 quoting.
19349
193502002-04-25 Akim Demaille <akim@epita.fr>
19351
19352 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19353 between `!' and the command.
19354 Reported by Paul Eggert.
19355
193562002-04-24 Robert Anisko <robert@lrde.epita.fr>
19357
19358 * tests/calc.at: Exercise prologue splitting.
19359
19360 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19361 `b4_post_prologue' instead of `b4_prologue'.
19362
19363 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19364 muscles.
19365 (output): Free pre_prologue_obstack and post_prologue_obstack.
19366 * src/files.h, src/files.c (attrs_obstack): Remove.
19367 (pre_prologue_obstack, post_prologue_obstack): New.
19368 * src/reader.c (copy_definition): Add a parameter to specify the
19369 obstack to fill, instead of using attrs_obstack unconditionally.
19370 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19371 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19372
193732002-04-23 Paul Eggert <eggert@twinsun.com>
19374
19375 * data/bison.simple: Remove unnecessary commentary and white
19376 space differences from 1_29-branch.
19377 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19378
19379 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19380 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19381 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19382 constructors or destructors.
19383
19384 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19385
193862002-04-23 Akim Demaille <akim@epita.fr>
19387
19388 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19389 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19390 location with columns.
19391 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19392 All reported by Paul Eggert.
19393
193942002-04-22 Akim Demaille <akim@epita.fr>
19395
19396 * src/reduce.c (dump_grammar): Move to...
19397 * src/gram.h, src/gram.c (grammar_dump): here.
19398 Be sure to separate long item numbers.
19399 Don't read the members of a rule's prec if its nil.
19400
194012002-04-22 Akim Demaille <akim@epita.fr>
19402
19403 * src/output.c (table_size, table_grow): New.
19404 (MAXTABLE): Remove, replace uses with table_size.
19405 (pack_vector): Instead of dying when the table is too big, grow it.
19406
194072002-04-22 Akim Demaille <akim@epita.fr>
19408
19409 * data/bison.simple (yyr1): Its type is that of a token number.
19410 * data/bison.c++ (r1_): Likewise.
19411 * tests/regression.at (Web2c Actions): Adjust.
19412
194132002-04-22 Akim Demaille <akim@epita.fr>
19414
19415 * src/reader.c (token_translations_init): 256 is now the default
19416 value for the error token, i.e., it will be assigned another
19417 number if the user assigned 256 to one of her tokens.
19418 (reader): Don't force 256 to error.
19419 * doc/bison.texinfo (Symbols): Adjust.
19420 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19421 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19422 etc. instead of 10, 20, 30 (which was used to `jump' over error
19423 (256) and undefined (2)).
19424
194252002-04-22 Akim Demaille <akim@epita.fr>
19426
19427 Propagate more token_number_t.
19428
19429 * src/gram.h (token_number_as_item_number)
19430 (item_number_as_token_number): New.
19431 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19432 Use it to create output_item_number_table and
19433 output_token_number_table.
19434 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19435 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19436 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19437 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19438
194392002-04-22 Akim Demaille <akim@epita.fr>
19440
19441 * src/output.h, src/output.c (get_lines_number): Remove.
19442
194432002-04-19 Akim Demaille <akim@epita.fr>
19444
19445 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19446 as Lex/Flex'.
19447 (Debugging): More details about enabling the debugging features.
19448 (Table of Symbols): Describe $$, $n, @$, and @n.
19449 Suggested by Tim Josling.
19450
194512002-04-19 Akim Demaille <akim@epita.fr>
19452
19453 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19454
194552002-04-10 Akim Demaille <akim@epita.fr>
19456
19457 * src/system.h: Rely on HAVE_LIMITS_H.
19458 Suggested by Paul Eggert.
19459
194602002-04-09 Akim Demaille <akim@epita.fr>
19461
19462 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19463 full stderr, and strip it according to the bison options, instead
19464 of composing the error message from different bits.
19465 This makes it easier to check for several error messages.
19466 Adjust all the invocations.
19467 Add an invocation exercising the error token.
19468 Add an invocation demonstrating a stupid error message.
19469 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19470 Adjust the tests.
19471 Error message are for stderr, not stdout.
19472
194732002-04-09 Akim Demaille <akim@epita.fr>
19474
19475 * src/gram.h, src/gram.c (error_token_number): Remove, use
19476 errtoken->number.
19477 * src/reader.c (reader): Don't specify the user token number (2)
19478 for $undefined, as it uselessly prevents using it.
19479 * src/gram.h (token_number_t): Move to...
19480 * src/symtab.h: here.
19481 (state_t.number): Is a token_number_t.
19482 * src/print.c, src/reader.c: Use undeftoken->number instead of
19483 hard coded 2.
19484 (Even though this 2 is not the same as above: the number of the
19485 undeftoken remains being 2, it is its user token number which
19486 might not be 2).
19487 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19488 `user_token_number_max'.
19489 Output `undef_token_number'.
19490 * data/bison.simple, data/bison.c++: Use them.
19491 Be sure to map invalid yylex return values to
19492 `undef_token_number'. This saves us from gratuitous SEGV.
19493
19494 * tests/conflicts.at (Solved SR Conflicts)
19495 (Unresolved SR Conflicts): Adjust.
19496 * tests/regression.at (Web2c Actions): Adjust.
19497
194982002-04-08 Akim Demaille <akim@epita.fr>
19499
19500 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19501 Adding #line.
19502 Remove the duplicate `typedefs'.
19503 (RhsNumberType): Fix the declaration and various other typos.
19504 Use __ofile__.
19505 * data/bison.simple: Use __ofile__.
19506 * src/scan-skel.l: Handle __ofile__.
19507
195082002-04-08 Akim Demaille <akim@epita.fr>
19509
19510 * src/gram.h (item_number_t): New, the type of item numbers in
19511 RITEM. Note that it must be able to code symbol numbers as
19512 positive number, and the negation of rule numbers as negative
19513 numbers.
19514 Adjust all dependencies (pretty many).
19515 * src/reduce.c (rule): Remove this `short *' pointer: use
19516 item_number_t.
19517 * src/system.h (MINSHORT, MAXSHORT): Remove.
19518 Include `limits.h'.
19519 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19520 (shortcpy): Remove.
19521 (MAXTABLE): Move to...
19522 * src/output.c (MAXTABLE): here.
19523 (prepare_rules): Use output_int_table to output rhs.
19524 * data/bison.simple, data/bison.c++: Adjust.
19525 * tests/torture.at (Big triangle): Move the limit from 254 to
19526 500.
19527 * tests/regression.at (Web2c Actions): Ajust.
19528
19529 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19530 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19531 passes, but produces negative #line number, once fixed, GCC is
19532 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19533 C), it passes.
19534 * src/state.h (state_h): Code input lines on ints, not shorts.
19535
195362002-04-08 Akim Demaille <akim@epita.fr>
19537
19538 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19539 and then the grammar.
19540
195412002-04-08 Akim Demaille <akim@epita.fr>
19542
19543 * src/system.h: No longer using strndup.
19544
195452002-04-07 Akim Demaille <akim@epita.fr>
19546
19547 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19548 * src/output.c (output_table_data): Return the longest number.
19549 (prepare_tokens): Output `token_number_max').
19550 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19551 New.
19552 Use them to define yy_token_number_type/TokenNumberType.
19553 Use this type for yytranslate.
19554 * tests/torture.at (Big triangle): Push the limit from 124 to
19555 253.
19556 * tests/regression.at (Web2c Actions): Adjust.
19557
195582002-04-07 Akim Demaille <akim@epita.fr>
19559
19560 * tests/torture.at (Big triangle): New.
19561 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19562 * tests/existing.at: here.
19563
195642002-04-07 Akim Demaille <akim@epita.fr>
19565
19566 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19567 nritems.
19568 Adjust dependencies.
19569
195702002-04-07 Akim Demaille <akim@epita.fr>
19571
19572 * src/reader.c: Normalize increments to prefix form.
19573
195742002-04-07 Akim Demaille <akim@epita.fr>
19575
19576 * src/reader.c, symtab.c: Remove debugging code.
19577
195782002-04-07 Akim Demaille <akim@epita.fr>
19579
19580 Rename all the `bucket's as `symbol_t'.
19581
19582 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19583 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19584 * src/symtab.c, src/symtab.h (bucket): Rename as...
19585 (symbol_t): this.
19586 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19587 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19588 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19589 (buckets_new, buckets_free, buckets_do): Rename as...
19590 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19591 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19592 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19593 (symbols_new, symbols_free, symbols_do): these.
19594
195952002-04-07 Akim Demaille <akim@epita.fr>
19596
19597 Use lib/hash for the symbol table.
19598
19599 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19600 EOF.
19601 * src/lex.c (lex): Set the `number' member of new terminals.
19602 * src/reader.c (bucket_check_defined, bucket_make_alias)
19603 (bucket_check_alias_consistence, bucket_translation): New.
19604 (reader, grammar_free, readgram, token_translations_init)
19605 (packsymbols): Adjust.
19606 (reader): Number the predefined tokens.
19607 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19608 for predefined tokens.
19609 * src/symtab.h (bucket): Remove all the hash table related
19610 members.
19611 * src/symtab.c (symtab): Replace by...
19612 (bucket_table): this.
19613 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19614 (buckets_new, buckets_do): New.
19615
196162002-04-07 Akim Demaille <akim@epita.fr>
19617
19618 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19619 (start_symbol, max_user_token_number, semantic_parser)
19620 (error_token_number): Initialize.
19621 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19622 Initialize.
19623 (reader): Don't.
19624 (errtoken, eoftoken, undeftoken, axiom): Extern.
19625
196262002-04-07 Akim Demaille <akim@epita.fr>
19627
19628 * src/gram.h (rule_s): prec and precsym are now pointers
19629 to the bucket giving the priority/associativity.
19630 Member `associativity' removed: useless.
19631 * src/reduce.c, src/conflicts.c: Adjust.
19632
196332002-04-07 Akim Demaille <akim@epita.fr>
19634
19635 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19636 Properly escape the symbols' TAG when outputting them.
19637
196382002-04-07 Akim Demaille <akim@epita.fr>
19639
19640 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19641
196422002-04-07 Akim Demaille <akim@epita.fr>
19643
19644 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19645 (LArule): this, which is an array to rule_t*.
19646 * src/print.c, src/conflicts.c: Adjust.
19647
196482002-04-07 Akim Demaille <akim@epita.fr>
19649
19650 * src/gram.h (rule_t): Rename `number' as `user_number'.
19651 `number' is a new member.
19652 Adjust dependencies.
19653 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19654
196552002-04-07 Akim Demaille <akim@epita.fr>
19656
19657 As a result of the previous patch, it is no longer needed
19658 to reorder ritem itself.
19659
19660 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19661
196622002-04-07 Akim Demaille <akim@epita.fr>
19663
19664 Be sure never to walk through RITEMS, but use only data related to
19665 the rules themselves. RITEMS should be banished.
19666
19667 * src/output.c (output_token_translations): Rename as...
19668 (prepare_tokens): this.
19669 In addition to `translate', prepare the muscles `tname' and
19670 `toknum', which were handled by...
19671 (output_rule_data): this.
19672 Remove, and move the remainder of its outputs into...
19673 (prepare_rules): this new routines, which also merges content from
19674 (output_gram): this.
19675 (prepare_rules): Be sure never to walk through RITEMS.
19676 (output_stos): Rename as...
19677 (prepare_stos): this.
19678 (output): Always invoke prepare_states, after all, just don't use it
19679 in the output if you don't need it.
19680
196812002-04-07 Akim Demaille <akim@epita.fr>
19682
19683 * src/LR0.c (new_state): Display `nstates' as the name of the
19684 newly created state.
19685 Adjust to initialize first_state and last_state if needed.
19686 Be sure to distinguish the initial from the final state.
19687 (new_states): Create the itemset of the initial state, and use
19688 new_state.
19689 * src/closure.c (closure): Now that the initial state has its
19690 items properly set, there is no need for a special case when
19691 creating `ruleset'.
19692
19693 As a result, now the rule 0, reducing to $axiom, is visible in the
19694 outputs. Adjust the test suite.
19695
19696 * tests/conflicts.at (Solved SR Conflicts)
19697 (Unresolved SR Conflicts): Adjust.
19698 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19699 * tests/conflicts.at (S/R in initial): New.
19700
197012002-04-07 Akim Demaille <akim@epita.fr>
19702
19703 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19704 the RHS of the rules.
19705 * src/output.c (output_gram): Likewise.
19706
197072002-04-07 Akim Demaille <akim@epita.fr>
19708
19709 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19710 bucket.
19711 Adjust all dependencies.
19712 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19713 `number' of the buckets too.
19714 * src/gram.h: Include `symtab.h'.
19715 (associativity): Move to...
19716 * src/symtab.h: here.
19717 No longer include `gram.h'.
19718
197192002-04-07 Akim Demaille <akim@epita.fr>
19720
19721 * src/gram.h, src/gram.c (rules_rhs_length): New.
19722 (ritem_longest_rhs): Use it.
19723 * src/gram.h (rule_t): `number' is a new member.
19724 * src/reader.c (packgram): Set it.
19725 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19726 the end of `rules', and count them out of `nrules'.
19727 (reduce_output, dump_grammar): Adjust.
19728 * src/print.c (print_grammar): It is no longer needed to check for
19729 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19730 * tests/reduce.at (Reduced Automaton): New test.
19731
197322002-04-07 Akim Demaille <akim@epita.fr>
19733
19734 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19735 lacking `+ 1' to nrules, Bison reported as useless a token if it
19736 was used solely to set the precedence of the last rule...
19737
197382002-04-07 Akim Demaille <akim@epita.fr>
19739
19740 * data/bison.c++, data/bison.simple: Don't output the current file
19741 name in #line, to avoid useless diffs between two identical
19742 outputs under different names.
19743
197442002-04-07 Akim Demaille <akim@epita.fr>
19745
19746 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19747 Normalize loops to using `< nrules + 1', not `<= nrules'.
19748
197492002-04-07 Akim Demaille <akim@epita.fr>
19750
19751 * TODO: Update.
19752
197532002-04-07 Akim Demaille <akim@epita.fr>
19754
19755 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19756 bucket.value as bucket.number.
19757
197582002-04-07 Akim Demaille <akim@epita.fr>
19759
19760 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19761 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19762 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19763 RHS, instead of being an index in RITEMS.
19764
197652002-04-04 Paul Eggert <eggert@twinsun.com>
19766
19767 * doc/bison.texinfo: Update copyright date.
19768 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19769 (Symbols): Warn about running Bison in one character set,
19770 but compiling and/or running in an incompatible one.
19771 Warn about character code 256, too.
19772
197732002-04-03 Paul Eggert <eggert@twinsun.com>
19774
19775 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19776 YYERROR_VERBOSE is nonzero, not whether it is defined.
19777
19778 Merge changes from bison-1_29-branch.
19779
197802002-03-20 Paul Eggert <eggert@twinsun.com>
19781
19782 Merge fixes from Debian bison_1.34-1.diff.
19783
19784 * configure.in (AC_PREREQ): 2.53.
19785
197862002-03-20 Akim Demaille <akim@epita.fr>
19787
19788 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19789
197902002-03-19 Paul Eggert <eggert@twinsun.com>
19791
19792 * src/bison.simple (YYCOPY): New macro.
19793 (YYSTACK_RELOCATE): Use it.
19794 Remove Type arg; no longer needed. All callers changed.
19795 (yymemcpy): Remove; no longer needed.
19796
19797 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19798 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19799
198002002-03-19 Akim Demaille <akim@epita.fr>
19801
19802 Test and fix the #line outputs.
19803
19804 * tests/atlocal.at (GCC): New.
19805 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19806 (Prologue synch line, %union synch line, Postprologue synch line)
19807 (Action synch line, Epilogue synch line): New tests.
19808 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19809 * data/bison.simple, data/bison.c++: Use it.
19810
198112002-03-19 Akim Demaille <akim@epita.fr>
19812
19813 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19814 (Solved SR Conflicts, %expect not enough, %expect right)
19815 (%expect too much): Move to...
19816 * tests/conflicts.at: this new file.
19817
198182002-03-19 Akim Demaille <akim@epita.fr>
19819
19820 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19821 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19822 that we can move to enums for instance.
19823 * src/output.c (token_definitions_output): Output a list of
19824 `token-name, token-number' instead of the #define.
19825 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19826
198272002-03-14 Akim Demaille <akim@epita.fr>
19828
19829 Use Gettext 0.11.1.
19830
198312002-03-09 Robert Anisko <robert@lrde.epita.fr>
19832
19833 * data/bison.c++: Make the user able to add members to the generated
19834 parser by subclassing.
19835
198362002-03-05 Robert Anisko <robert@lrde.epita.fr>
19837
19838 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19839 a character.
19840 Reported by Nicolas Tisserand and Nicolas Burrus.
19841
198422002-03-04 Robert Anisko <robert@lrde.epita.fr>
19843
19844 * src/reader.c: Warn about lacking semi-colons, do not complain.
19845
198462002-03-04 Robert Anisko <robert@lrde.epita.fr>
19847
19848 * data/bison.c++: Remove a debug line.
19849
198502002-03-04 Robert Anisko <robert@lrde.epita.fr>
19851
19852 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19853 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19854 provide a default implementation.
19855
198562002-03-04 Akim Demaille <akim@epita.fr>
19857
19858 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19859 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19860 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19861 * tests/semantic.at (Parsing Guards): Similarly.
19862 * src/reader.at (readgram): Complain if the last rule is not ended
19863 with a semi-colon.
19864
198652002-03-04 Akim Demaille <akim@epita.fr>
19866
19867 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19868 * src/closure.c: here.
19869 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19870 RTC.
19871 * src/warshall.h, src/warshall.c: Remove.
19872 * tests/sets.at (Broken Closure): Adjust.
19873
198742002-03-04 Akim Demaille <akim@epita.fr>
19875
19876 * src/output.c (output_skeleton): tempdir is const.
19877 bytes_read is unused.
19878
198792002-03-04 Akim Demaille <akim@epita.fr>
19880
19881 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19882 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19883 Update.
19884 From Michael Hayes.
19885
198862002-03-04 Akim Demaille <akim@epita.fr>
19887
19888 * src/closure.c (closure): `r' is unused.
19889
198902002-03-04 Akim Demaille <akim@epita.fr>
19891
19892 * tests/sets.at (Broken Closure): Add the ending `;'.
19893 * src/reader.at (readgram): Complain if a rule is not ended with a
19894 semi-colon.
19895
198962002-03-04 Akim Demaille <akim@epita.fr>
19897
19898 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19899 (count_sr_conflicts): Use bitset_count.
19900 * src/reduce.c (inaccessable_symbols): Ditto.
19901 (bits_size): Remove.
19902 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19903
199042002-03-04 Akim Demaille <akim@epita.fr>
19905
19906 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19907 * src/reduce.c: Remove the `bitset_zero's following the
19908 `bitset_create's, as now it is performed by the latter.
19909
199102002-03-04 Akim Demaille <akim@epita.fr>
19911
19912 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19913 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19914 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19915 latest sources from Michael.
19916
199172002-03-04 Akim Demaille <akim@epita.fr>
19918
19919 * src/output.c (output): Don't free the grammar.
19920 * src/reader.c (grammar_free): New.
19921 * src/main.c (main): Call it and don't free symtab here.
19922
199232002-03-04 Akim Demaille <akim@epita.fr>
19924
19925 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19926 before returning.
19927 Reported by Benoit Perrot.
19928
199292002-03-04 Akim Demaille <akim@epita.fr>
19930
19931 Use bitset operations when possible, not loops over bits.
19932
19933 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19934 bitset_or.
19935 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19936 * src/reduce.c (useless_nonterminals): Formatting changes.
19937 * src/warshall.c (TC): Use bitset_or.
19938
199392002-03-04 Akim Demaille <akim@epita.fr>
19940
19941 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19942 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19943 Ditto.
19944
199452002-03-04 Akim Demaille <akim@epita.fr>
19946
19947 * src/lalr.c (F): Now a bitset*.
19948 Adjust all dependencies.
19949
199502002-03-04 Akim Demaille <akim@epita.fr>
19951
19952 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19953 Adjust all dependencies.
19954
199552002-03-04 Akim Demaille <akim@epita.fr>
19956
19957 * src/L0.c, src/LR0.h (nstates): Be size_t.
19958 Adjust comparisons (signed vs unsigned).
19959 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19960 bitset*.
19961 Adjust all dependencies.
19962
199632002-03-04 Akim Demaille <akim@epita.fr>
19964
19965 * src/closure.c (firsts): Now, also a bitset.
19966 Adjust all dependencies.
19967 (varsetsize): Remove, now unused.
19968 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19969
199702002-03-04 Akim Demaille <akim@epita.fr>
19971
19972 * src/print.c: Convert to use bitset.h, not hand coded iterations
19973 over ints.
19974
199752002-03-04 Akim Demaille <akim@epita.fr>
19976
19977 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19978
199792002-03-04 Akim Demaille <akim@epita.fr>
19980
19981 * src/closure.c (ruleset): Be a bitset.
19982 (rulesetsize): Remove.
19983
199842002-03-04 Akim Demaille <akim@epita.fr>
19985
19986 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19987 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19988 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19989 * src/closure.c (fderives): Be an array of bitsets.
19990
199912002-02-28 Robert Anisko <robert@lrde.epita.fr>
19992
19993 * data/bison.c++: Merge the two generated headers. Insert a copyright
19994 notice in each output file.
19995
199962002-02-28 Akim Demaille <akim@epita.fr>
19997
19998 * data/bison.c++: Copy the prologue of bison.simple to fetch
19999 useful M4 definitions, such as b4_header_guard.
20000
200012002-02-25 Akim Demaille <akim@epita.fr>
20002
20003 * src/getargs.c (version): Give the name of the authors, and use a
20004 translator friendly scheme for the bgr
20005 copyright notice.
20006
200072002-02-25 Akim Demaille <akim@epita.fr>
20008
20009 * src/output.c (header_output): Remove, now handled completely via
20010 M4.
20011
200122002-02-25 Akim Demaille <akim@epita.fr>
20013
20014 * m4/m4.m4: New, from CVS Autoconf.
20015 * configure.in: Invoke it.
20016 * src/output.c (output_skeleton): Use its result instead of the
20017 hard coded name.
20018
200192002-02-25 Akim Demaille <akim@epita.fr>
20020
20021 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20022 Fileutils 4.1.5.
20023 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20024 * src/output.c (output_skeleton): Use mkstemp to create a real
20025 temporary file.
20026 Move the filling of `skeleton' and its muscle to...
20027 (prepare): here.
20028 (output): Move the definition of the prologue muscle to...
20029 (prepare): here.
20030 * src/system.h (DEFAULT_TMPDIR): New.
20031
200322002-02-14 Paul Eggert <eggert@twinsun.com>
20033
20034 Remove the support for C++ namespace cleanliness; it was
20035 causing more problems than it was curing, since it didn't work
20036 properly on some nonstandard C++ compilers. This can wait
20037 for a proper C++ parser.
20038
20039 * NEWS: Document this.
20040 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20041 of C++, as it's treated like C now.
20042 * src/bison.simple (YYSTD): Remove.
20043 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20044 Treat C++ just like Standard C instead of trying to support
20045 namespace cleanliness.
20046
200472002-02-14 Akim Demaille <akim@epita.fr>
20048
20049 * tests/regression.at (else): Adjust to Andreas' change.
20050
200512002-02-14 Akim Demaille <akim@epita.fr>
20052
20053 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20054
200552002-02-13 Andreas Schwab <schwab@suse.de>
20056
20057 * src/output.c (output_rule_data): Don't output NULL, it might
20058 not be defined yet.
20059
200602002-02-11 Robert Anisko <robert@lrde.epita.fr>
20061
20062 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20063 (Copyright notice): Update.
20064
200652002-02-11 Akim Demaille <akim@epita.fr>
20066
20067 * tests/regression.at (%nonassoc and eof): Don't include
20068 nonportable headers.
20069
200702002-02-08 Robert Anisko <robert@lrde.epita.fr>
20071
20072 * data/bison.c++: Correct error recovery. Make the user able to
20073 initialize the starting location.
20074
200752002-02-07 Akim Demaille <akim@epita.fr>
20076
20077 * tests/input.at: New.
20078
200792002-02-07 Robert Anisko <robert@lrde.epita.fr>
20080
20081 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20082 more consistent when naming methods and variables. Put preprocessor
20083 directives around tables only needed for debugging.
20084
200852002-02-07 Robert Anisko <robert@lrde.epita.fr>
20086
20087 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20088 C++ parsers.
20089 (yy::b4_name::parse): Use print_.
20090
200912002-02-07 Robert Anisko <robert@lrde.epita.fr>
20092
20093 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20094
200952002-02-07 Robert Anisko <robert@lrde.epita.fr>
20096
20097 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20098 C++ parsers.
20099 (yy::b4_name::parse): Build verbose error messages, and use error_.
20100
201012002-02-06 Robert Anisko <robert@lrde.epita.fr>
20102
20103 * data/bison.c++: Fix m4 quoting in comments.
20104
201052002-02-06 Robert Anisko <robert@lrde.epita.fr>
20106
20107 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20108 not expanded by m4.
20109
201102002-02-05 Akim Demaille <akim@epita.fr>
20111
20112 * data/bison.c++: Adjust to the M4 back end.
20113 More is certainly needed.
20114
201152002-02-05 Akim Demaille <akim@epita.fr>
20116
20117 Give a try to M4 as a back end.
20118
20119 * lib/readpipe.c: New, from wdiff.
20120 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20121 BISON_HAIRY.
20122 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20123 specific values. Now it is m4 that performs the lookup.
20124 * src/parse-skel.y: Remove.
20125 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
20126 * src/output.c (actions_output, guards_output)
20127 (token_definitions_output): No longer keeps track of the output
20128 line number, hence remove the second argument.
20129 (guards_output): Check against the guard member of a rule, not the
20130 action member.
20131 Adjust callers.
20132 (output_skeleton): Don't look for the skeleton location, let m4 do
20133 that.
20134 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
20135 file will be used.
20136 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
20137 (prepare): Given that for the time being changesyntax is not
20138 usable in M4, rename the muscles using `-' to `_'.
20139 Define `defines_flag', `output_parser_name' and `output_header_name'.
20140 * src/output.h (actions_output, guards_output)
20141 (token_definitions_output): Adjust prototypes.
20142 * src/scan-skel.l: Instead of scanning the skeletons, it now
20143 processes the output of m4: `__oline__' and `#output'.
20144 * data/bison.simple: Adjust to be used by M4(sugar).
20145 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
20146 to date.
20147 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
20148 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
20149 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
20150 shamelessly stolen from CVS Autoconf.
20151
201522002-02-05 Akim Demaille <akim@epita.fr>
20153
20154 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
20155 * configure.in: Check for the declarations of free and malloc.
20156 * src/muscle_tab.c: Adjust.
20157
201582002-02-05 Akim Demaille <akim@epita.fr>
20159
20160 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
20161 which have no values.
20162
201632002-02-05 Akim Demaille <akim@epita.fr>
20164
20165 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
20166 * data/: here.
20167
201682002-01-29 Paul Eggert <eggert@twinsun.com>
20169
20170 * src/bison.simple (YYSIZE_T): Do not define merely because
20171 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
20172 On some platforms, <alloca.h> does not declare YYSTD (size_t).
20173
201742002-01-27 Akim Demaille <akim@epita.fr>
20175
20176 Fix `%nonassoc and eof'.
20177
20178 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
20179 which were not properly copied! Replace
20180 memcpy (res->errs, src->errs, src->nerrs);
20181 with
20182 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
20183 !!!
20184 * tests/regression.at (%nonassoc and eof): Adjust to newest
20185 Autotest: `.' is not in the PATH.
20186
201872002-01-27 Akim Demaille <akim@epita.fr>
20188
20189 * tests/sets.at (AT_EXTRACT_SETS): New.
20190 (Nullable): Use it.
20191 (Firsts): New.
20192
201932002-01-26 Akim Demaille <akim@epita.fr>
20194
20195 * tests/actions.at, tests/calc.at, tests/headers.at,
20196 * tests/torture.at: Adjust to the newest Autotest which no longer
20197 forces `.' in the PATH.
20198
201992002-01-25 Akim Demaille <akim@epita.fr>
20200
20201 * tests/regression.at (%nonassoc and eof): New.
20202 Suggested by Robert Anisko.
20203
202042002-01-24 Akim Demaille <akim@epita.fr>
20205
20206 Bison dumps core when trying to complain about broken input files.
20207 Reported by Cris van Pelt.
20208
20209 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
20210 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
20211 into...
20212 (Invalid inputs): Strengthen: exercise parse_percent_token.
20213
202142002-01-24 Robert Anisko <robert.anisko@epita.fr>
20215
20216 * src/Makefile.am: Add bison.c++.
20217 * src/bison.c++: New skeleton.
20218
202192002-01-21 Paolo Bonzini <bonzini@gnu.org>
20220
20221 * po/it.po: New.
20222
202232002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
20224
20225 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
20226
202272002-01-20 Marc Autret <marc@gnu.org>
20228
20229 * src/files.c (compute_output_file_names): Fix
20230
202312002-01-20 Marc Autret <marc@gnu.org>
20232
20233 * tests/output.at: New test.
20234 * src/files.c (compute_base_names): Don't map extensions when
20235 the YACC flag is set, use defaults.
20236 Reported by Evgeny Stambulchik.
20237
202382002-01-20 Marc Autret <marc@gnu.org>
20239
20240 * src/system.h: Need to define __attribute__ away for non-GCC
20241 compilers as well (i.e., the vendor C compiler).
20242 Suggested by Albert Chin-A-Young.
20243
202442002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
20245
20246 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
20247 canonical definition.
20248 * src/system.h: Use the canonical definition for PARAMS (avoids
20249 a conflict with the macro from lib/hash.h).
20250
202512002-01-11 Akim Demaille <akim@epita.fr>
20252
20253 * configure.in: Use AC_FUNC_STRNLEN.
20254 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
20255
202562002-01-09 Akim Demaille <akim@epita.fr>
20257
20258 * src/files.c, src/files.h (output_infix): New.
20259 (tab_extension): Remove.
20260 (compute_base_names): Compute the former, drop the latter.
20261 * src/output.c (prepare): Insert the muscles `output-infix', and
20262 `output-suffix'.
20263 * src/parse-skel.y (string, string.1): New.
20264 (section.header): Use it.
20265 (section.yacc): Remove.
20266 (prefix): Remove too.
20267 * src/scan-skel.l: Adjust.
20268 * src/bison.simple, src/bison.hairy: Adjust.
20269
202702002-01-09 Akim Demaille <akim@epita.fr>
20271
20272 * configure.in (WERROR_CFLAGS): Compute it.
20273 * src/Makefile.am (CFLAGS): Pass it.
20274 * tests/atlocal.in (CFLAGS): Idem.
20275 * src/files.c: Fix a few warnings.
20276 (get_extension_index): Remove, unused.
20277
202782002-01-08 Akim Demaille <akim@epita.fr>
20279
20280 * src/getargs.c (AS_FILE_NAME): New.
20281 (getargs): Use it to convert DOSish file names.
20282 * src/files.c (base_name): Rename as full_base_name to avoid
20283 clashes with `base_name ()'.
20284 (filename_split): New.
20285 (compute_base_names): N-th rewrite, using filename_split.
20286
202872002-01-08 Akim Demaille <akim@epita.fr>
20288
20289 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
20290 New, stolen from the Fileutils 4.1.
20291 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20292 * configure.in: Check for the presence of memrchr, and of its
20293 prototype.
20294
202952002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
20296
20297 * lib/hash.h (__P): Added definition for this macro.
20298 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
20299 BUILT_SOURCES, to ensure they are generated first.
20300 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
20301 %error-verbose to allow bootstrapping with bison 1.30x.
20302
203032002-01-06 Akim Demaille <akim@epita.fr>
20304
20305 * src/reader.c (parse_braces): Don't fetch the next char, the
20306 convention is to fetch on entry.
20307 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
20308 'switch' without a following semicolon.
20309 * tests/regression.at (braces parsing): New.
20310
203112002-01-06 Akim Demaille <akim@epita.fr>
20312
20313 Bison is dead wrong in its RR conflict reports.
20314
20315 * tests/torture.at (GNU Cim Grammar): New.
20316 * src/conflicts.c (count_rr_conflicts): Fix.
20317
203182002-01-06 Akim Demaille <akim@epita.fr>
20319
20320 Creating package.m4 from configure.ac causes too many problems.
20321
20322 * tests/Makefile.am (package.m4): Create it by hand,
20323 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
20324
203252002-01-06 Akim Demaille <akim@epita.fr>
20326
20327 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
20328 skeleton.h.
20329
203302002-01-04 Paul Eggert <eggert@twinsun.com>
20331
20332 * doc/bison.texinfo (Debugging):
20333 Remove YYSTDERR; it's no longer defined or used.
20334 Also, s/cstdio.h/cstdio/.
20335
203362002-01-03 Akim Demaille <akim@epita.fr>
20337
20338 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
20339
203402002-01-03 Akim Demaille <akim@epita.fr>
20341
20342 * src/parse-skel.y (process_skeleton): Don't bind the parser's
20343 tracing code to --trace, wait for a better --trace option, with
20344 args.
20345
203462002-01-03 Akim Demaille <akim@epita.fr>
20347
20348 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20349 The ISO C++ standard is extremely clear about it: stderr is
20350 considered a macro, not a regular symbol (see table 94 `Header
20351 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20352 Therefore std:: does not apply to it. It still does with fprintf.
20353 Also, s/cstdio.h/cstdio/.
20354
203552002-01-03 Akim Demaille <akim@epita.fr>
20356
20357 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20358 for non system headers.
20359
203602002-01-02 Akim Demaille <akim@epita.fr>
20361
20362 Equip the skeleton chain with location tracking, runtime trace,
20363 pure parser and scanner.
20364
20365 * src/parse-skel.y: Request a pure parser, locations, and prefix
20366 renaming.
20367 (%union): Having several members with the same type does not help
20368 type mismatches, simplify.
20369 (YYPRINT, yyprint): New.
20370 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20371 (skel_error): this.
20372 Handle locations.
20373 * src/scan-skel.l: Adjust to these changes.
20374 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20375 (LOCATION_PRINT, skel_control_t): New.
20376
203772001-12-30 Akim Demaille <akim@epita.fr>
20378
20379 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20380 replace `gb' with BLANKS.
20381 * src/scan-skel.l: Adjust.
20382
203832001-12-30 Akim Demaille <akim@epita.fr>
20384
20385 * src/system.h: We don't need nor want bcopy.
20386 Throw away MS-DOS crap: we don't need getpid.
20387 * configure.in: We don't need strndup. It was even causing
20388 problems: because Flex includes the headers *before* us,
20389 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20390 not visible.
20391 * lib/xstrndup.c: New.
20392 * src/scan-skel.l: Use it.
20393 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20394 * src/parse-skel.y: Use %directives instead of #defines.
20395
203962001-12-30 Akim Demaille <akim@epita.fr>
20397
20398 * src/skeleton.h: New.
20399 * src/output.c (output_parser, output_master_parser): Remove, dead
20400 code.
20401 * src/output.h (get_lines_number, actions_output, guards_output)
20402 (token_definitions_output): Prototype them.
20403 * src/parse-skel.y: Add the license notice.
20404 Include output.h and skeleton.h.
20405 (process_skeleton): Returns void, and takes a single parameter.
20406 * src/scan-skel.l: Add the license notice.
20407 Include skeleton.h.
20408 Don't use %option yylineno: it seems that then Flex imagines
20409 REJECT has been used, and therefore it won't reallocate its
20410 buffers (which makes no other sense to me than a bug). It results
20411 in warnings for `unused: yy_flex_realloc'.
20412
204132001-12-30 Robert Anisko <robert.anisko@epita.fr>
20414
20415 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20416 (MUSCLE_INSERT_PREFIX): ...to there.
20417 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20418 (MUSCLE_INSERT_PREFIX): Move from here...
20419
20420 * src/bison.hairy: Add a section directive. Put braces around muscle
20421 names. This parser skeleton is still broken, but Bison should not
20422 choke on a bad muscle 'syntax'.
20423 * src/bison.simple: Add a section directive. Put braces around muscle
20424 names.
20425
20426 * src/files.h (strsuffix, stringappend): Add declarations.
20427 (tab_extension): Add declaration.
20428 (short_base_name): Add declaration.
20429
20430 * src/files.c (strsuffix, stringappend): No longer static. These
20431 functions are used in the skeleton parser.
20432 (tab_extension): New.
20433 (compute_base_names): Use the computations done in this function
20434 to guess if the generated parsers should have '.tab' in their
20435 names.
20436 (short_base_name): No longer static.
20437
20438 * src/output.c (output_skeleton): New.
20439 (output): Disable call to output_master_parser, and give a try to
20440 a new skeleton handling system.
20441 (guards_output, actions_output): No longer static.
20442 (token_definitions_output, get_lines_number): No longer static.
20443
20444 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20445
20446 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20447 parse-skel.y.
20448
20449 * src/parse-skel.y: New file.
20450 * src/scan-skel.l: New file.
20451
204522001-12-29 Akim Demaille <akim@epita.fr>
20453
20454 %name-prefix is broken.
20455
20456 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20457 Adjust all dependencies.
20458 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20459 %name-prefix.
20460
20461 Renaming yylval but not yylloc is not consistent. Now we do.
20462
20463 * src/bison.simple: Prefix yylloc if used.
20464 * doc/bison.texinfo (Decl Summary): Document that.
20465
204662001-12-29 Akim Demaille <akim@epita.fr>
20467
20468 * doc/bison.texinfo: Promote `%long-directive' over
20469 `%long_directive'.
20470 Remove all references to fixed-output-files, yacc is enough.
20471
204722001-12-29 Akim Demaille <akim@epita.fr>
20473
20474 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20475 user prologue. These are defaults.
20476 * tests/actions.at (Mid-rule actions): Make sure the user can
20477 define YYDEBUG and YYERROR_VERBOSE.
20478
204792001-12-29 Akim Demaille <akim@epita.fr>
20480
20481 * src/output.c (header_output): Don't forget to export YYLTYPE and
20482 yylloc.
20483 * tests/headers.at (export YYLTYPE): New, make sure it does.
20484 * tests/regression.at (%union and --defines, Invalid CPP headers):
20485 Move to...
20486 * tests/headers.at: here.
20487
204882001-12-29 Akim Demaille <akim@epita.fr>
20489
20490 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20491
204922001-12-29 Akim Demaille <akim@epita.fr>
20493
20494 * tests/actions.at (Mid-rule actions): Output on a single line
20495 instead of several.
20496
204972001-12-29 Akim Demaille <akim@epita.fr>
20498
20499 * doc/bison.texinfo: Formatting changes.
20500
205012001-12-29 Akim Demaille <akim@epita.fr>
20502
20503 Don't store the token defs in a muscle, just be ready to output it
20504 on command. Now possible via `symbols'. Fixes a memory leak.
20505
20506 * src/output.c (token_definitions_output): New.
20507 (output_parser, header_output): Use it.
20508 * src/reader.c (symbols_save): Remove.
20509
205102001-12-29 Akim Demaille <akim@epita.fr>
20511
20512 * src/bison.simple: Do not provide a default for YYSTYPE and
20513 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20514 default.
20515
205162001-12-29 Akim Demaille <akim@epita.fr>
20517
20518 Mid-rule actions are simply... ignored!
20519
20520 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20521 the empty-rule associated to the dummy symbol, not to the host
20522 rule.
20523 * tests/actions.at (Mid-rule actions): New.
20524
205252001-12-29 Akim Demaille <akim@epita.fr>
20526
20527 Memory leak.
20528
20529 * src/reader.c (reader): Free grammar.
20530
205312001-12-29 Akim Demaille <akim@epita.fr>
20532
20533 Memory leak.
20534
20535 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20536 since it allocates it for each state, although only one is needed.
20537 (allocate_storage): Do it here.
20538
205392001-12-29 Akim Demaille <akim@epita.fr>
20540
20541 * src/options.h, src/options.c (create_long_option_table): Rename
20542 as...
20543 (long_option_table_new): this, with a clearer prototype.
20544 (percent_table): Remove, unused,
20545 * src/getargs.c (getargs): Adjust.
20546
205472001-12-29 Akim Demaille <akim@epita.fr>
20548
20549 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20550 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20551 as states.
20552
205532001-12-29 Akim Demaille <akim@epita.fr>
20554
20555 * src/lalr.c (build_relations): Rename `states' as `states1'.
20556 Sorry, I don't understand exactly what it is, no better name...
20557
205582001-12-29 Akim Demaille <akim@epita.fr>
20559
20560 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20561 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20562 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20563 as rules.
20564
205652001-12-29 Akim Demaille <akim@epita.fr>
20566
20567 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20568 ago.
20569
205702001-12-29 Akim Demaille <akim@epita.fr>
20571
20572 * src/reader.c, src/reader.h (user_toknums): Remove.
20573 Adjust all users to use symbols[i]->user_token_number.
20574
205752001-12-29 Akim Demaille <akim@epita.fr>
20576
20577 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20578 Adjust all users to use symbols[i]->prec or ->assoc.
20579
205802001-12-29 Akim Demaille <akim@epita.fr>
20581
20582 * src/reader.c, src/reader.h (tags): Remove.
20583 Adjust all users to use symbols[i]->tag.
20584
205852001-12-29 Akim Demaille <akim@epita.fr>
20586
20587 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20588 and rule_table.
20589 * src/reader.c (packsymbols): Fill this table.
20590 Drop sprec.
20591 * src/conflicts.c (resolve_sr_conflict): Adjust.
20592 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20593 single table.
20594 Use symbols[i]->tag instead of tags[i].
20595
205962001-12-29 Akim Demaille <akim@epita.fr>
20597
20598 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20599 In addition, put a comment in there, to replace...
20600 * tests/regression.at (%union and C comments): Remove.
20601
206022001-12-29 Akim Demaille <akim@epita.fr>
20603
20604 * tests/regression.at (Web2c Actions): Blindly move the actual
20605 output as expected output. The contents *seem* right to me, but I
20606 can't pretend reading perfectly parser tables... Nonetheless, all
20607 the other tests pass correctly, the table look OK, even though the
20608 presence of `$axiom' is to be noted: AFAICS it is useless (but
20609 harmless).
20610
206112001-12-29 Akim Demaille <akim@epita.fr>
20612
20613 * src/reader.c (readgram): Don't add the rule 0 if there were no
20614 rules read. In other words, add it _after_ having performed
20615 grammar sanity checks.
20616 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20617
206182001-12-29 Akim Demaille <akim@epita.fr>
20619
20620 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20621 visible, and some states have now a different number.
20622
206232001-12-29 Akim Demaille <akim@epita.fr>
20624
20625 * src/reader.c (readgram): Bind the initial rule's lineno to that
20626 of the first rule.
20627 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20628 (Solved SR Conflicts): Adjust rule 0's line number.
20629
206302001-12-29 Akim Demaille <akim@epita.fr>
20631
20632 Fix the `GAWK Grammar' failure.
20633
20634 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20635 the reductions of the first state which was mistakenly confused
20636 with the final state because precisely final_state was initialized
20637 to 0.
20638 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20639 now noticed by Bison.
20640 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20641 have a reduction on $default.
20642
206432001-12-29 Akim Demaille <akim@epita.fr>
20644
20645 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20646 rule line numbers.
20647 * src/closure.c (print_closure): Likewise.
20648 * src/derives.c (print_derives): Likewise.
20649 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20650 now.
20651
206522001-12-29 Akim Demaille <akim@epita.fr>
20653
20654 * src/lalr.c (lookaheads_print): New.
20655 (lalr): Call it when --trace-flag.
20656 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20657 are dumped.
20658
206592001-12-29 Akim Demaille <akim@epita.fr>
20660
20661 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20662 when walking through ritem, even via rule->rhs.
20663 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20664 (useful_production, useless_nonterminals): Likewise.
20665 (reduce_grammar_tables): Likewise, plus update nritems.
20666 * src/nullable.c (set_nullable): Likewise.
20667 * src/lalr.c (build_relations): Likewise.
20668 * tests/sets.at (Nullable): Adjust.
20669 Fortunately, now, the $axiom is no longer nullable.
20670
206712001-12-29 Akim Demaille <akim@epita.fr>
20672
20673 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20674 the 0-sentinel.
20675 * src/gram.c (ritem_longest_rhs): Likewise.
20676 * src/reduce.c (nonterminals_reduce): Likewise.
20677 * src/print_graph.c (print_graph): Likewise.
20678 * src/output.c (output_rule_data): Likewise.
20679 * src/nullable.c (set_nullable): Likewise.
20680
206812001-12-29 Akim Demaille <akim@epita.fr>
20682
20683 * src/output.c: Comment changes.
20684
206852001-12-27 Paul Eggert <eggert@twinsun.com>
20686
20687 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20688 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20689 Sparc, as they were causing more porting problems than the
20690 (minor) performance improvement was worth.
20691
20692 Also, catch up with 1.31's YYSTD.
20693
206942001-12-27 Akim Demaille <akim@epita.fr>
20695
20696 * src/output.c (output_gram): Rely on nritems, not the
20697 0-sentinel. See below.
20698 Use -1 as separator, not 0.
20699 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20700 Rely on -1 as separator in yyrhs, instead of 0.
20701 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20702 twice `Now at end of input', therefore there are two lines less to
20703 expect.
20704
207052001-12-27 Akim Demaille <akim@epita.fr>
20706
20707 * tests/regression.at (Unresolved SR Conflicts):
20708 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20709 below.
20710
207112001-12-27 Akim Demaille <akim@epita.fr>
20712
20713 * src/LR0.c (new_state): Recognize the final state by the fact it
20714 is reached by eoftoken.
20715 (insert_start_shifting_state, insert_eof_shifting_state)
20716 (insert_accepting_state, augment_automaton): Remove, since now
20717 these states are automatically computed from the initial state.
20718 (generate_states): Adjust.
20719 * src/print.c: When reporting a rule number to the user, substract
20720 1, so that the axiom rule is rule 0, and the first user rule is 1.
20721 * src/reduce.c: Likewise.
20722 * src/print_graph.c (print_core): For the time being, just as for
20723 the report, depend upon --trace-flags to dump the full set of
20724 items.
20725 * src/reader.c (readgram): Once the grammar read, insert the rule
20726 0: `$axiom: START-SYMBOL $'.
20727 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20728 number of the states has changed (the final state is no longer
20729 necessarily the last), catch up.
20730
207312001-12-27 Akim Demaille <akim@epita.fr>
20732
20733 Try to make the use of the eoftoken valid. Given that its value
20734 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20735 is used instead of > 0 where appropriate, (ii), depend upon nritems
20736 instead of the 0-sentinel.
20737
20738 * src/gram.h, src/gram.c (nritems): New.
20739 Expected to be duplication of nitems, but for the time being...
20740 * src/reader.c (packgram): Assert nritems and nitems are equal.
20741 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20742 * src/closure.c (print_closure, print_fderives): Likewise.
20743 * src/gram.c (ritem_print): Likewise.
20744 * src/print.c (print_core, print_grammar): Likewise.
20745 * src/print_graph.c: Likewise.
20746
207472001-12-27 Akim Demaille <akim@epita.fr>
20748
20749 * src/main.c (main): If there are complains after grammar
20750 reductions, then output the report anyway if requested, then die.
20751 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20752 * src/reader.c (eoftoken): New.
20753 (parse_token_decl): If the token being defined has value `0', it
20754 is the eoftoken.
20755 (packsymbols): No longer hack `tags' to insert `$' by hand.
20756 Be sure to preserve the value of the eoftoken.
20757 (reader): Make sure eoftoken is defined.
20758 Initialize nsyms to 0: now eoftoken is created just like the others.
20759 * src/print.c (print_grammar): Don't special case the eof token.
20760 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20761 lie anyway, albeit pleasant.
20762 * tests/calc.at: Exercise error messages with eoftoken.
20763 Change the grammar so that empty input is invalid.
20764 Adjust expectations.
20765 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20766
207672001-12-27 Akim Demaille <akim@epita.fr>
20768
20769 * configure.in: Check the protos of strchr ans strspn.
20770 Replace strchr if needed.
20771 * src/system.h: Provide the protos of strchr, strspn and memchr if
20772 missing.
20773 * lib/strchr.c: New.
20774 * src/reader.c (symbols_save): Use strchr.
20775
207762001-12-27 Akim Demaille <akim@epita.fr>
20777
20778 * src/print.c, src/print_graph.c (escape): New.
20779 Use it to quote the TAGS outputs.
20780 * src/print_graph.c (print_state): Now errors are in red, and
20781 reductions in green.
20782 Prefer high to wide: output the state number on a line of its own.
20783
207842001-12-27 Akim Demaille <akim@epita.fr>
20785
20786 * src/state.h, src/state.c (reductions_new): New.
20787 * src/LR0.c (set_state_table): Let all the states have a
20788 `reductions', even if reduced to 0.
20789 (save_reductions): Adjust.
20790 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20791 * src/print.c (print_reductions, print_actions): Adjust.
20792 * src/output.c (action_row): Adjust.
20793
207942001-12-27 Akim Demaille <akim@epita.fr>
20795
20796 * src/state.h, src/state.c (errs_new, errs_dup): New.
20797 * src/LR0.c (set_state_table): Let all the states have an errs,
20798 even if reduced to 0.
20799 * src/print.c (print_errs, print_reductions): Adjust.
20800 * src/output.c (output_actions, action_row): Adjust.
20801 * src/conflicts.c (resolve_sr_conflict): Adjust.
20802
208032001-12-27 Akim Demaille <akim@epita.fr>
20804
20805 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20806
208072001-12-27 Akim Demaille <akim@epita.fr>
20808
20809 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20810 * src/print.c: here.
20811 (lookaheadset, shiftset): New, used as additional storage by
20812 print_reductions.
20813 (print_results): Adjust.
20814 (print_shifts, print_gotos, print_errs): New, extracted from...
20815 (print_actions): here.
20816 * src/print_graph.c (print_actions): Remove dead code.
20817
208182001-12-27 Akim Demaille <akim@epita.fr>
20819
20820 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20821 `$n' and `@n'.
20822
208232001-12-27 Akim Demaille <akim@epita.fr>
20824
20825 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20826 (build_relations): Adjust.
20827
208282001-12-27 Akim Demaille <akim@epita.fr>
20829
20830 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20831 duplication.
20832
208332001-12-27 Akim Demaille <akim@epita.fr>
20834
20835 * src/reader.c (packgram): Catch nitems overflows.
20836
208372001-12-27 Akim Demaille <akim@epita.fr>
20838
20839 * src/files.c, src/files.h (guard_obstack): Remove.
20840 * src/output.c (output): Adjust.
20841 * src/reader.c (parse_braces): New, factoring...
20842 (copy_action, copy_guard): these two which are renamed as...
20843 (parse_action, parse_guard): these.
20844 As a voluntary consequence, using braces around guards is now
20845 mandatory.
20846
208472001-12-27 Akim Demaille <akim@epita.fr>
20848
20849 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20850 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20851 members.
20852 (symbol_list_new): Adjust.
20853 (copy_action): action_line is the first line, not the last.
20854 (copy_guard): Just as for actions, store the `action' only, not
20855 the switch/case/break flesh.
20856 Don't parse the user action that might follow the guard, let...
20857 (readgram): do it, i.e., now, there can be an action after a
20858 guard.
20859 In other words the guard is just explicitly optional.
20860 (packgram): Adjust.
20861 * src/output.c (guards_output): New.
20862 (output_parser): Call it when needed.
20863 (output): Also free the guard and attrs obstacks.
20864 * src/files.c, src/files.h (obstack_save): Remove.
20865 (output_files): Remove.
20866 As a result, if one needs the former `.act' file, using an
20867 appropriate skeleton which requires actions and guards is now
20868 required.
20869 * src/main.c (main): Adjust.
20870 * tests/semantic.at: New.
20871 * tests/regression.at: Use `input.y' as input file name.
20872 Avoid 8+3 problems by requiring input.c when the test needs the
20873 parser.
20874
208752001-12-27 Akim Demaille <akim@epita.fr>
20876
20877 * src/reader.c (symbol_list_new): Be sure to initialize all the
20878 fields.
20879
208802001-12-27 Akim Demaille <akim@epita.fr>
20881
20882 All the hacks using a final pseudo state are now useless.
20883
20884 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20885 * src/lalr.c (nLA): New.
20886 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20887 instead of lookaheadsp from the pseudo state (nstate + 1).
20888
208892001-12-27 Akim Demaille <akim@epita.fr>
20890
20891 * src/output.c (action_row, token_actions): Use a state_t instead
20892 of a integer, and nlookaheads instead of the following state's
20893 lookaheadsp.
20894
208952001-12-27 Akim Demaille <akim@epita.fr>
20896
20897 * src/conflicts.c (log_resolution, flush_shift)
20898 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20899 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20900 (conflicts_print, print_reductions): Use a state_t instead of an
20901 integer when referring to a state.
20902 As much as possible, depend upon nlookaheads, instead of the
20903 `lookaheadsp' member of the following state (since lookaheads of
20904 successive states are successive, the difference between state n + 1
20905 and n served as the number of lookaheads for state n).
20906 * src/lalr.c (add_lookback_edge): Likewise.
20907 * src/print.c (print_core, print_actions, print_state)
20908 (print_results): Likewise.
20909 * src/print_graph.c (print_core, print_actions, print_state)
20910 (print_graph): Likewise.
20911 * src/conflicts.h: Adjust.
20912
209132001-12-27 Akim Demaille <akim@epita.fr>
20914
20915 * src/bison.hairy: Formatting/comment changes.
20916 ANSIfy.
20917 Remove `register' indications.
20918 Add plenty of `static'.
20919
209202001-12-27 Akim Demaille <akim@epita.fr>
20921
20922 * src/output.c (prepare): Drop the muscle `ntbase' which
20923 duplicates ntokens.
20924 * src/bison.simple: Formatting/comment changes.
20925 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20926 is an undocumented synonym.
20927
209282001-12-22 Akim Demaille <akim@epita.fr>
20929
20930 * src/output.c (output_table_data): Change the prototype to use
20931 `int' for array ranges: some invocations do pass an int, not a
20932 short.
20933 Reported by Wayne Green.
20934
209352001-12-22 Akim Demaille <akim@epita.fr>
20936
20937 Some actions of web2c.y are improperly triggered.
20938 Reported by Mike Castle.
20939
20940 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20941 * tests/regression.at (Web2c): Rename as...
20942 (Web2c Report): this.
20943 (Web2c Actions): New.
20944
209452001-12-22 Akim Demaille <akim@epita.fr>
20946
20947 Reductions in web2c.y are improperly reported.
20948 Reported by Mike Castle.
20949
20950 * src/conflicts.c (print_reductions): Fix.
20951 * tests/regression.at (Web2c): New.
20952
209532001-12-18 Akim Demaille <akim@epita.fr>
20954
20955 Some host fail on `assert (!"foo")', which expands to
20956 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20957 Reported by Nelson Beebee.
20958
20959 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20960 `#define it_succeeded 0' and `assert (it_succeeded)'.
20961
209622001-12-17 Marc Autret <autret_m@epita.fr>
20963
20964 * src/bison.simple: Don't hard code the skeleton line and filename.
20965 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20966 New line counter 'skeleton_line' (skeleton-line muscle).
20967
209682001-12-17 Paul Eggert <eggert@twinsun.com>
20969
20970 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20971 YYDEBUG must be defined to a nonzero value.
20972
20973 * src/bison.simple (yytname): Do not assume that the user defines
20974 YYDEBUG to a properly parenthesized expression.
20975
209762001-12-17 Akim Demaille <akim@epita.fr>
20977
20978 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20979 nlookaheads is a new member.
20980 Adjust all users.
20981 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20982 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20983 state.
20984
209852001-12-17 Akim Demaille <akim@epita.fr>
20986
20987 * src/files.h, src/files.c (open_files, close_files): Remove.
20988 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20989 let...
20990 * src/reader.c (reader): Do it.
20991
209922001-12-17 Akim Demaille <akim@epita.fr>
20993
20994 * src/conflicts.c (print_reductions): Formatting changes.
20995
209962001-12-17 Akim Demaille <akim@epita.fr>
20997
20998 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20999 (flush_reduce): New.
21000 (resolve_sr_conflict): Adjust.
21001
210022001-12-17 Akim Demaille <akim@epita.fr>
21003
21004 * src/output.c (output_obstack): Be static and rename as...
21005 (format_obstack): this, to avoid any confusion with files.c's
21006 output_obstack.
21007 * src/reader.h (muscle_obstack): Move to...
21008 * src/output.h: here, since it's defined in output.c.
21009
210102001-12-17 Akim Demaille <akim@epita.fr>
21011
21012 * src/output.c (action_row, save_column, default_goto)
21013 (sort_actions, matching_state, pack_vector): Better variable
21014 locality.
21015
210162001-12-17 Akim Demaille <akim@epita.fr>
21017
21018 * src/output.c: Various formatting changes.
21019
210202001-12-17 Akim Demaille <akim@epita.fr>
21021
21022 * src/files.c (output_files): Free the output_obstack.
21023 * src/main.c (main): Call print and print_graph conditionally.
21024 * src/print.c (print): Work unconditionally.
21025 * src/print_graph.c (print_graph): Work unconditionally.
21026 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21027
210282001-12-16 Marc Autret <autret_m@epita.fr>
21029
21030 * src/output.c (actions_output): Fix. When we use %no-lines,
21031 there is one less line per action.
21032
210332001-12-16 Marc Autret <autret_m@epita.fr>
21034
21035 * src/bison.simple: Remove a useless #line directive.
21036 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21037 * src/output.c (get_lines_number): New.
21038 (output_parser): Adjust, now takes care about the lines of a
21039 output muscles.
21040 Fix line numbering.
21041 (actions_output): Computes the number of lines taken by actions.
21042 (output_master_parser): Insert new skeleton which is the name of
21043 the output parser file name.
21044
210452001-12-15 Marc Autret <autret_m@epita.fr>
21046
21047 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21048
210492001-12-15 Marc Autret <autret_m@epita.fr>
21050
21051 * src/output.c (output_gram): Keep track of the hairy one.
21052
210532001-12-15 Akim Demaille <akim@epita.fr>
21054
21055 Make `make distcheck' work.
21056
21057 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21058 system.h which uses libgettext.h.
21059
210602001-12-15 Akim Demaille <akim@epita.fr>
21061
21062 * src/nullable.c (set_nullable): Useless rules must be skipped,
21063 otherwise, since we range over their symbols, we might look at a
21064 nonterminal which no longer ``exists'', i.e., it is not counted in
21065 `nvars', hence we overflow our arrays.
21066
210672001-12-15 Akim Demaille <akim@epita.fr>
21068
21069 The header can also be produced directly, without any obstack!
21070 Yahoo!
21071
21072 * src/files.c, src/files.h (defines_obstack): Remove.
21073 (compute_header_macro): Global.
21074 (defines_obstack_save): Remove.
21075 * src/reader.c (parse_union_decl): No longer output to
21076 defines_obstack: its content can be found in the `stype' muscle
21077 anyway.
21078 (output_token_translations): Merge into...
21079 (symbols_output): this.
21080 Rename as...
21081 (symbols_save): this.
21082 (reader): Adjust.
21083 * src/output.c (header_output): New.
21084 (output): Call it.
21085
210862001-12-15 Akim Demaille <akim@epita.fr>
21087
21088 * src/reader.c (parse_union_decl): Instead of handling two obstack
21089 simultaneously, use one to define the `stype' muscle, and use the
21090 value of the latter to fill defines_obstack.
21091 (copy_comment): Remove.
21092 (copy_comment2): Work for a single obstack.
21093 Rename as...
21094 (copy_comment): this.
21095
210962001-12-15 Akim Demaille <akim@epita.fr>
21097
21098 * src/lex.c, src/lex.h (xgetc): No longer static.
21099 * src/reader.c (parse_union_decl): Revamp.
21100
211012001-12-15 Akim Demaille <akim@epita.fr>
21102
21103 Still making progress in separating Bison into (i) input, (ii)
21104 process, (iii) output: now we can directly output the parser file
21105 without using table_obstack at all.
21106
21107 * src/files.c, src/files.h (table_obstack): Bye bye.
21108 (parser_file_name): New.
21109 * src/files.c (compute_output_file_names): Compute it.
21110 * src/output.c (actions_output, output_parser)
21111 (output_master_parser): To a file instead of an obstack.
21112
211132001-12-15 Akim Demaille <akim@epita.fr>
21114
21115 Attach actions to rules, instead of pre-outputting them to
21116 actions_obstack.
21117
21118 * src/gram.h (rule_t): action and action_line are new members.
21119 * src/reader.c (symbol_list): Likewise.
21120 (copy_action): Save the actions within the rule.
21121 (packgram): Save them in rule_table.
21122 * src/output.c (actions_output): New.
21123 (output_parser): Use it on `%%actions'.
21124 (output_rule_data): Don't free rule_table.
21125 (output): Do it.
21126 (prepare): Don't save the `action' muscle.
21127 * src/bison.simple: s/%%action/%%actions/.
21128
211292001-12-15 Akim Demaille <akim@epita.fr>
21130
21131 * src/reader.c (copy_action): When --yacc, don't append a `;'
21132 to the user action: let it fail if lacking.
21133 Suggested by Arnold Robbins and Tom Tromey.
21134
211352001-12-14 Akim Demaille <akim@epita.fr>
21136
21137 * src/lex.c (literalchar): Simply return the char you decoded, non
21138 longer mess around with obstacks and int pointers.
21139 Adjust all callers.
21140
211412001-12-14 Akim Demaille <akim@epita.fr>
21142
21143 * src/lex.c (literalchar): Don't escape the special characters,
21144 just decode them, and keep them as char (before, eol was output as
21145 the 2 char string `\n' etc.).
21146 * src/output.c (output_rule_data): Use quotearg to output the
21147 token strings.
21148
211492001-12-13 Paul Eggert <eggert@twinsun.com>
21150
21151 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
21152 Do not infringe on the global user namespace when using C++.
21153 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
21154 All uses of `fprintf' and `stderr' changed.
21155
21156 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
21157
211582001-12-13 Akim Demaille <akim@epita.fr>
21159
21160 The computation of nullable is broken: it doesn't handle empty
21161 RHS's properly.
21162
21163 * tests/torture.at (GNU AWK Grammar): New.
21164 * tests/sets.at (Nullable): New.
21165 * src/nullable.c (set_nullable): Instead of blindly looping over
21166 `ritems', loop over the rules, and then over their rhs's.
21167
21168 Work around Autotest bugs.
21169
21170 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
21171 frame, because Autotest understand lines starting with a `+' as
21172 traces from the shell. Then, they are not processed properly.
21173 Admittedly an Autotest bug, but we don't have time to wait for
21174 Autotest to catch up.
21175 * tests/regression.at (Broken Closure): Adjust to the new table
21176 frames.
21177 Move to...
21178 * tests/sets.at: here.
21179
211802001-12-13 Akim Demaille <akim@epita.fr>
21181
21182 * src/closure.c (closure): Use nrules instead of playing tricks
21183 with BITS_PER_WORD.
21184
211852001-12-13 Akim Demaille <akim@epita.fr>
21186
21187 * src/print.c (print_actions): Output the handling of `$' as the
21188 traces do: shifting the token EOF. Before EOF was treated as a
21189 nonterminal.
21190 * tests/regression.at: Adjust some tests.
21191 * src/print_graph.c (print_core): Complete the set of items via
21192 closure. The next-to-final and final states are still unsatisfying,
21193 but that's to be addressed elsewhere.
21194 No longer output the rule numbers, but do output the state number.
21195 A single loop for the shifts + gotos is enough, but picked a
21196 distinct color for each.
21197 (print_graph): Initialize and finalize closure.
21198
211992001-12-13 Akim Demaille <akim@epita.fr>
21200
21201 * src/reader.c (readgram): Remove dead code, an strip useless
21202 braces.
21203 (get_type): Remove, unused.
21204
212052001-12-12 Akim Demaille <akim@epita.fr>
21206
21207 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
21208 on that of lib/error.c.
21209
212102001-12-12 Akim Demaille <akim@epita.fr>
21211
21212 Some hosts don't like `/' in includes.
21213
21214 * src/system.h: Include libgettext.h without qualifying the path.
21215 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
21216 $(top_srcdir).
21217
212182001-12-11 Marc Autret <autret_m@epita.fr>
21219
21220 * src/output.c (output_parser): Remove useless muscle.
21221
212222001-12-11 Marc Autret <autret_m@epita.fr>
21223
21224 * src/bison.simple: Remove #line just before %%epilogue. It
21225 is now handled in ...
21226 * src/reader.c (read_additionnal_code): Add the output of a
21227 #line for the epilogue.
21228
212292001-12-10 Marc Autret <autret_m@epita.fr>
21230
21231 * src/reader.c (copy_definition): Re-use CPP-outed code which
21232 replace precedent remove.
21233 * src/bison.simple: Remove #line before %%prologue because
21234 %%input-line is wrong at this time.
21235
212362001-12-10 Marc Autret <autret_m@epita.fr>
21237
21238 * src/reader.c (symbols_output): Clean up.
21239 * src/output.c (output_gram, output): Clean up.
21240
212412001-12-10 Akim Demaille <akim@epita.fr>
21242
21243 * src/lalr.c (initialize_lookaheads): New. Extracted from...
21244 * src/LR0.c (set_state_table): here.
21245 * src/lalr.c (lalr): Call it.
21246
212472001-12-10 Akim Demaille <akim@epita.fr>
21248
21249 * src/state.h (shifts): Remove the `number' member: shifts are
21250 attached to state, hence no longer need to be labelled with a
21251 state number.
21252
212532001-12-10 Akim Demaille <akim@epita.fr>
21254
21255 Now that states have a complete set of members, the linked list of
21256 shifts is useless: just fill directly the state's shifts member.
21257
21258 * src/state.h (shifts): Remove the `next' member.
21259 * src/LR0.c (first_state, last_state): Remove.
21260 Adjust the callers.
21261 (augment_automaton): Don't look for the shifts that must be added
21262 a shift on EOF: it is those of the state we looked for! But now,
21263 since shifts are attached, it is no longer needed to looking
21264 merely by its id: its number.
21265
212662001-12-10 Akim Demaille <akim@epita.fr>
21267
21268 * src/LR0.c (augment_automaton): Better variable locality.
21269 Remove an impossible branch: if there is a state corresponding to
21270 the start symbol being shifted, then there is shift for the start
21271 symbol from the initial state.
21272
212732001-12-10 Akim Demaille <akim@epita.fr>
21274
21275 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
21276 only when appropriate: when insert_start_shifting_state' is not
21277 invoked.
21278 * tests/regression.at (Rule Line Numbers): Adjust.
21279
212802001-12-10 Akim Demaille <akim@epita.fr>
21281
21282 * src/LR0.c (augment_automaton): Now that all states have shifts,
21283 merge the two cases addition shifts to the initial state.
21284
212852001-12-10 Akim Demaille <akim@epita.fr>
21286
21287 * src/lalr.c (set_state_table): Move to...
21288 * src/LR0.c: here.
21289 * src/lalr.c (lalr): Don't call it...
21290 * src/LR0.c (generate_states): do it.
21291 * src/LR0.h (first_state): Remove, only the table is used.
21292
212932001-12-10 Akim Demaille <akim@epita.fr>
21294
21295 * src/LR0.h (first_shift, first_reduction): Remove.
21296 * src/lalr.c: Don't use first_shift: find shifts through the
21297 states.
21298
212992001-12-10 Akim Demaille <akim@epita.fr>
21300
21301 * src/LR0.c: Attach shifts to states as soon as they are
21302 computed.
21303 * src/lalr.c (set_state_table): Instead of assigning shifts to
21304 state, just assert that the mapping was properly done.
21305
213062001-12-10 Akim Demaille <akim@epita.fr>
21307
21308 * src/LR0.c (insert_start_shift): Rename as...
21309 (insert_start_shifting_state): this.
21310 (insert_eof_shifting_state, insert_accepting_state): New.
21311 (augment_automaton): Adjust.
21312 Better locality of the variables.
21313 When looking if the start_symbol is shifted from the initial
21314 state, using `while (... symbol != start_symbol ...)' sounds
21315 better than `while (... symbol < start_symbol ...)': If fail
21316 to see how the order between symbols could be relevant!
21317
213182001-12-10 Akim Demaille <akim@epita.fr>
21319
21320 * src/getargs.h: Don't declare `spec_name_prefix' and
21321 `spec_file_prefix', declared by src/files.h.
21322 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
21323 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
21324 * src/output.c (prepare): Adjust.
21325 * src/reader.c (symbols_output): Likewise.
21326 * src/vmsgetargs.c: Vaguely adjust, but who cares?
21327
213282001-12-10 Akim Demaille <akim@epita.fr>
21329
21330 * src/muscle_tab.c (muscle_init): NULL is a better default than
21331 `"0"'.
21332
213332001-12-10 Akim Demaille <akim@epita.fr>
21334
21335 * src/reader.c (reader): Calling symbols_output once is enough.
21336
213372001-12-10 Akim Demaille <akim@epita.fr>
21338
21339 Now that states have a complete set of members, the linked list of
21340 reductions is useless: just fill directly the state's reductions
21341 member.
21342
21343 * src/state.h (struct reductions): Remove member `number' and
21344 `next'.
21345 * src/LR0.c (first_reduction, last_reduction): Remove.
21346 (save_reductions): Don't link the new reductions, store them in
21347 this_state.
21348 * src/lalr.c (set_state_table): No need to attach reductions to
21349 states, it's already done.
21350 * src/output.c (output_actions): No longer free the shifts, then
21351 the reductions, then the states: free all the states and their
21352 members.
21353
213542001-12-10 Akim Demaille <akim@epita.fr>
21355
21356 * src/options.c (OPTN, DRTV, BOTH): New.
21357 (option_table): Use them.
21358
21359 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21360 the job of system.h.
21361 * src/options.c: Don't include stdio.h and xalloc.h for the same
21362 reasons.
21363
213642001-12-10 Akim Demaille <akim@epita.fr>
21365
21366 * src/output.c (output, prepare): Make sure the values of the
21367 muscles `action' and `prologue' are 0-terminated.
21368
213692001-12-10 Akim Demaille <akim@epita.fr>
21370
21371 Clean up GCC warnings.
21372
21373 * src/reader.c (copy_action): `buf' is not used.
21374 (parse_skel_decl): Be static.
21375 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21376 * src/options.h (create_long_option_table): Have a real prototype.
21377 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21378 (hash_delete_at): Return const void *.
21379 Adjust casts to preserve the const.
21380
213812001-12-10 Akim Demaille <akim@epita.fr>
21382
21383 * configure.in: Require 2.52g.
21384 M4 is not needed, but AUTOM4TE is.
21385 * m4/m4.m4: Remove.
21386 * tests/Makefile.am: Adjust.
21387
213882001-12-10 Akim Demaille <akim@epita.fr>
21389
21390 One structure for states is enough, even though theoretically
21391 there are LR(0) states and LALR(1) states.
21392
21393 * src/lalr.h (state_t): Remove.
21394 (state_table): Be state_t **, not state_t *.
21395 * src/state.h (core, CORE_ALLOC): Rename as...
21396 (state_t, STATE_ALLOC): this.
21397 Add the LALR(1) members: shifts, reductions, errs.
21398 * src/LR0.c (state_table): Rename as...
21399 (state_hash): this, to avoid name clashes with the global
21400 `state_table'.
21401 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21402 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21403
214042001-12-10 Akim Demaille <akim@epita.fr>
21405
21406 Bison dumps core on bash.y.
21407 Reported by Pascal Bart.
21408
21409 * src/warshall.c (bitmatrix_print): New.
21410 (TC): Use it.
21411 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21412 j must be the outer loop.
21413 * tests/regression.at (Broken Closure): New.
21414
214152001-12-05 Akim Demaille <akim@epita.fr>
21416
21417 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21418 its argument.
21419 Reported by Peter Hamorsky.
21420
214212001-12-05 Akim Demaille <akim@epita.fr>
21422
21423 * src/conflicts.c (err_table): Remove.
21424 (resolve_sr_conflict): Adjust.
21425 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21426 Rename as...
21427 (state_t.reductions, state_t.shifts): this.
21428
214292001-12-05 Akim Demaille <akim@epita.fr>
21430
21431 * src/reduce.c (reduce_grammar_tables): No longer disable the
21432 removal of useless rules via CPP but via `if (0)', so that the
21433 compiler still check the code is valid.
21434 For instance, it should have noticed `rline' no longer exists: use
21435 the `line' member of rule_t.
21436 * src/gram.c (dummy, rline): Remove, unused.
21437
214382001-12-05 Akim Demaille <akim@epita.fr>
21439
21440 * src/output.c (pack_vector): Use assert, not berror.
21441 * src/main.c (berror): Remove, unused.
21442
214432001-12-05 Akim Demaille <akim@epita.fr>
21444
21445 New experimental feature: if --verbose --trace output all the
21446 items of a state, not only its kernel.
21447
21448 * src/print.c (print_core): If `trace_flag', then invoke closure
21449 before outputting the items of the state (print_core is no longer
21450 a correct name them).
21451 (print_results): Invoke new_closure/free_closure if needed.
21452
214532001-12-05 Akim Demaille <akim@epita.fr>
21454
21455 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21456 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21457 (nitemset): for consistency with the rest of the project.
21458
214592001-12-05 Akim Demaille <akim@epita.fr>
21460
21461 * src/closure.c (print_closure): Improve.
21462 (closure): Use it for printing input and output.
21463
214642001-12-05 Akim Demaille <akim@epita.fr>
21465
21466 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21467 indexed by nonterminals.
21468
214692001-12-05 Akim Demaille <akim@epita.fr>
21470
21471 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21472 what it was!).
21473 * src/warshall.h: Remove accidental duplication of the content.
21474
214752001-12-05 Akim Demaille <akim@epita.fr>
21476
21477 * src/closure.c (set_fderives): De-obfuscate.
21478
214792001-12-05 Akim Demaille <akim@epita.fr>
21480
21481 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21482
214832001-12-05 Akim Demaille <akim@epita.fr>
21484
21485 * src/closure.c (set_firsts): De-obfuscate.
21486
214872001-12-05 Akim Demaille <akim@epita.fr>
21488
21489 * src/output.c (action_row): De-obfuscate
21490 using the good o' techniques: arrays not pointers, variable
21491 locality, BITISSET, RESETBIT etc.
21492
214932001-12-05 Akim Demaille <akim@epita.fr>
21494
21495 Pessimize the code to simplify it: from now on, all the states
21496 have a valid SHIFTS, which NSHIFTS is possibly 0.
21497
21498 * src/LR0.c (shifts_new): Be global and move to..
21499 * src/state.c, src/state.h: here.
21500 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21501 * src/print_graph: Adjust.
21502
215032001-12-05 Akim Demaille <akim@epita.fr>
21504
21505 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21506 * src/conflicts.c: Use it.
21507 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21508 incorrectly ``simplified''.
21509
215102001-12-05 Akim Demaille <akim@epita.fr>
21511
21512 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21513 using the good o' techniques: arrays not pointers, variable
21514 locality, BITISSET, RESETBIT etc.
21515
215162001-12-05 Akim Demaille <akim@epita.fr>
21517
21518 * src/state.h (SHIFT_SYMBOL): New.
21519 * src/conflicts.c: Use it to deobfuscate.
21520
215212001-12-05 Akim Demaille <akim@epita.fr>
21522
21523 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21524 (print_reductions): De-obfuscate using the good o' techniques:
21525 arrays not pointers, variable locality, BITISSET.
21526
215272001-12-05 Akim Demaille <akim@epita.fr>
21528
21529 * src/conflicts.c (print_reductions): Arrays, not pointers.
21530 Use BITISSET.
21531
215322001-12-05 Akim Demaille <akim@epita.fr>
21533
21534 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21535
215362001-12-05 Akim Demaille <akim@epita.fr>
21537
21538 * src/conflicts.c (print_reductions): Improve variable locality.
21539
215402001-12-05 Akim Demaille <akim@epita.fr>
21541
21542 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21543
215442001-12-05 Akim Demaille <akim@epita.fr>
21545
21546 * src/conflicts.c (print_reductions): Improve variable locality.
21547
215482001-12-05 Akim Demaille <akim@epita.fr>
21549
21550 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21551 * src/lalr.c: Use them.
21552
215532001-12-05 Akim Demaille <akim@epita.fr>
21554
21555 * src/LR0.c (augment_automaton): Formatting changes.
21556 Better variable locality.
21557
215582001-12-05 Akim Demaille <akim@epita.fr>
21559
21560 * src/lalr.c (matrix_print): New.
21561 (transpose): Use it.
21562 Use arrays instead of pointers.
21563
215642001-12-05 Akim Demaille <akim@epita.fr>
21565
21566 * src/lalr.c (maxrhs): Move to...
21567 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21568 * src/lalr.c (build_relations): Adjust.
21569
215702001-12-05 Akim Demaille <akim@epita.fr>
21571
21572 * src/lalr.c (transpose): Free the memory allocated to the
21573 argument, as it is replaced by the results by the unique caller.
21574 (build_relations): Merely invoke transpose: it handles the memory
21575 deallocation.
21576 Improve variable locality.
21577 Avoid variables used as mere abbreviations.
21578 (compute_lookaheads): Use arrays instead of pointers.
21579
215802001-12-05 Akim Demaille <akim@epita.fr>
21581
21582 * src/lalr.c (initialize_F): Improve variable locality.
21583 Avoid variables used as mere abbreviations.
21584
215852001-12-05 Akim Demaille <akim@epita.fr>
21586
21587 * src/derives.c (print_derives): Display the ruleno.
21588 * src/lalr.c (initialize_F, transpose): Better variable locality
21589 to improve readability.
21590 Avoid variables used as mere abbreviations.
21591
215922001-12-05 Akim Demaille <akim@epita.fr>
21593
21594 * src/lalr.c (traverse): Use arrays instead of pointers.
21595
215962001-12-05 Akim Demaille <akim@epita.fr>
21597
21598 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21599 the handling of squeue.
21600 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21601
216022001-12-05 Akim Demaille <akim@epita.fr>
21603
21604 Because useless nonterminals are now kept alive (instead of being
21605 `destroyed'), we now sometimes examine them, and store information
21606 related to them. Hence we need to know their number, and adjust
21607 memory allocations.
21608
21609 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21610 static.
21611 * src/LR0.c (allocate_itemsets): The memory allocated to
21612 `symbol_count' was used for two different purpose: once to count
21613 the number of occurrences of each symbol, and later reassigned to
21614 `shift_symbol', containing the symbol that can be shifted from a
21615 given state.
21616 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21617 only, and...
21618 (new_itemsets): Allocate `shift_symbol' here.
21619 (allocate_itemsets): symbol_count includes useless nonterminals.
21620 Make room for them.
21621 (free_storage): Use `free', not `XFREE', for pointers that cannot
21622 be null.
21623
216242001-12-05 Akim Demaille <akim@epita.fr>
21625
21626 * src/nullable.c (set_nullable): Deobfuscate the handling of
21627 ritem.
21628 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21629
216302001-12-05 Akim Demaille <akim@epita.fr>
21631
21632 * src/gram.c, src/gram.h (ritem_print): New.
21633 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21634 (This useless function was defined only to work around VMS linkers
21635 that can't handle compilation units with variables only).
21636 * src/reduce.c (dump_grammar): Use it to trace the construction of
21637 ritem.
21638
216392001-12-04 Paul Eggert <eggert@twinsun.com>
21640
21641 * src/bison.simple (union yyalloc): Change member names
21642 to be the same as the stack names.
21643 (yyparse): yyptr is now union yyalloc *, not char *.
21644 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21645 and may generate better code on some machines.
21646 (yystpcpy): Use prototype if __STDC__ is defined, not just
21647 if __cplusplus is defined.
21648
216492001-11-30 Akim Demaille <akim@epita.fr>
21650
21651 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21652 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21653 Gettext doesn't compile cleanly, and dies with -Werror.
21654 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21655 Include WARNING_CFLAGS here.
21656 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21657 before being defined.
21658
216592001-11-27 Paul Eggert <eggert@twinsun.com>
21660
21661 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21662 First arg is int, not unsigned.
21663 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21664 (SIZE_MAX, UINT_MAX): New macros.
21665 (quotearg_n_options): Abort if N is negative.
21666 Avoid overflow check on hosts where size_t is 64 bits and int
21667 is 32 bits, as overflow is impossible there.
21668 Fix off-by-one typo that caused unnecessary reallocation.
21669
216702001-11-29 Paul Eggert <eggert@twinsun.com>
21671
21672 Name space cleanup in generated parser.
21673
21674 * doc/bison.texinfo (Bison Parser): Discuss system headers
21675 and their effect on the user name space.
21676
21677 * src/bison.simple:
21678 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21679 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21680 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21681
21682 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21683 on user names when possible.
21684
21685 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21686 Simplify test for whather <alloca.h> exists.
21687
21688 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21689
21690 (<stdio.h>): Include if YYDEBUG.
21691
21692 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21693 ! defined (yyoverflow) && ! defined (yymemcpy).
21694
21695 (yymemcpy, yyparse): Rename local variables as needed so that
21696 they all begin with 'yy'.
21697
21698 (yystrlen, yystpcpy): New functions.
21699
21700 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21701 All uses changed.
21702
21703 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21704 instead of relying on string.h functions. Use YYSTACK_ALLOC
21705 and YYSTACK_FREE instead of malloc and free.
21706
217072001-11-30 Akim Demaille <akim@epita.fr>
21708
21709 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21710 before their first uses.
21711 (YYBISON, YYPURE): Move to the top of the output.
21712
217132001-11-30 Akim Demaille <akim@epita.fr>
21714
21715 * tests/reduce.at (Useless Nonterminals): Fix.
21716
217172001-11-30 Akim Demaille <akim@epita.fr>
21718
21719 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21720 if body instead of `;' to pacify GCC's warnings.
21721
217222001-11-30 Akim Demaille <akim@epita.fr>
21723
21724 Instead of mapping the LHS of unused rules to -1, keep the LHS
21725 valid, but flag the rules as invalid.
21726
21727 * src/gram.h (rule_t): `useful' is a new member.
21728 * src/print.c (print_grammar): Adjust.
21729 * src/derives.c (set_derives): Likewise.
21730 * src/reader.c (packgram, reduce_output): Likewise.
21731 * src/reduce.c (reduce_grammar_tables): Likewise.
21732 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21733
217342001-11-30 Akim Demaille <akim@epita.fr>
21735
21736 * src/reduce.c (reduce_output): Formatting changes.
21737 * src/print.c (print_results, print_grammar): Likewise.
21738 * tests/regression.at (Rule Line Numbers)
21739 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21740
217412001-11-30 Akim Demaille <akim@epita.fr>
21742
21743 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21744 useless nonterminals, move them at the end of the symbol arrays.
21745 (reduce_output): Adjust.
21746 * tests/reduce.at (Useless Nonterminals): Adjust.
21747
217482001-11-30 Akim Demaille <akim@epita.fr>
21749
21750 * src/reduce.c: Various comment/formatting changes.
21751 (nonterminals_reduce): New, extracted from...
21752 (reduce_grammar_tables): here.
21753 (reduce_grammar): Call nonterminals_reduce.
21754
217552001-11-29 Paul Eggert <eggert@twinsun.com>
21756
21757 * src/bison.simple (YYSTACK_REALLOC): Remove.
21758 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21759 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21760 New macros.
21761 (union yyalloc): New type.
21762 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21763 an arbitrary restriction on hosts where size_t is wider than int.
21764
21765 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21766 a parser stack overflow. Allocate just one block of memory for all
21767 three stacks, instead of allocating three blocks; this typically is
21768 faster and reduces fragmentation.
21769
21770 Do not limit the number of items in the stack to a value that fits
21771 in 'int', as this is an arbitrary limit on hosts with 64-bit
21772 size_t and 32-bit int.
21773
217742001-11-29 Marc Autret <autret_m@epita.fr>
21775
21776 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21777 of defining YYERROR_VERBOSE.
21778 [AT_DATA]: $4 is now out of C declarations in the prologue.
21779
217802001-11-28 Marc Autret <autret_m@epita.fr>
21781
21782 * src/reader.c (parse_dquoted_param): New.
21783 (parse_skel_decl): Use it.
21784 * src/lex.h: Add its prototype.
21785 * src/lex.c (literalchar): Become not static.
21786
217872001-11-28 Marc Autret <autret_m@epita.fr>
21788
21789 * src/output.h: And put its extern declaration here.
21790 * src/output.c (error_verbose): Define here.
21791 (prepare): Echo name modification.
21792 * src/getargs.h: Clean its extern declaration.
21793 * src/getargs.c (error_verbose_flag): Remove.
21794 (getargs): Remove case 'e'.
21795 * src/options.c (option_table): 'error-verbose' is now seen as simple
21796 percent option.
21797 Include output.h.
21798
21799 * src/reader.c (read_declarations): Remove case tok_include.
21800 (parse_include_decl): Remove.
21801 * src/lex.h (token_t): Remove tok_include.
21802 * src/options.c (option_table): 'include' is now a simple command line
21803 option.
21804
218052001-11-28 Marc Autret <autret_m@epita.fr>
21806
21807 * src/bison.simple: Adjust muscle names.
21808 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21809 * src/output.c (prepare): s/_/-/ for the muscles names.
21810 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21811
218122001-11-28 Marc Autret <autret_m@epita.fr>
21813
21814 * src/bison.simple: Fix debug.
21815 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21816
218172001-11-28 Akim Demaille <akim@epita.fr>
21818
21819 * src/LR0.c (shifts_new): New.
21820 (save_shifts, insert_start_shift, augment_automaton): Use it.
21821
218222001-11-28 Akim Demaille <akim@epita.fr>
21823
21824 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21825 keep ruleno only.
21826
218272001-11-28 Akim Demaille <akim@epita.fr>
21828
21829 * src/closure.c (closure): Instead of looping over word in array
21830 then bits in words, loop over bits in array.
21831
218322001-11-28 Akim Demaille <akim@epita.fr>
21833
21834 * src/closure.c (closure): No longer optimize the special case
21835 where all the bits of `ruleset[r]' are set to 0, to make the code
21836 clearer.
21837
218382001-11-28 Akim Demaille <akim@epita.fr>
21839
21840 * src/closure.c (closure): `r' and `c' are new variables, used to
21841 de-obfuscate accesses to RULESET and CORE.
21842
218432001-11-28 Akim Demaille <akim@epita.fr>
21844
21845 * src/reduce.c (reduce_print): Use ngettext.
21846 (dump_grammar): Improve the trace accuracy.
21847
218482001-11-28 Akim Demaille <akim@epita.fr>
21849
21850 * src/reduce.c (dump_grammar): Don't translate trace messages.
21851
218522001-11-28 Akim Demaille <akim@epita.fr>
21853
21854 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21855 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21856 as all tags are free'ed afterwards.
21857 From Enrico Scholz.
21858
218592001-11-27 Paul Eggert <eggert@twinsun.com>
21860
21861 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21862 use alloca when we didn't want to, and vice versa.
21863
218642001-11-27 Marc Autret <autret_m@epita.fr>
21865
21866 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21867 initialization.
21868 * src/output.c (prepare): Remove its update.
21869
218702001-11-27 Marc Autret <autret_m@epita.fr>
21871
21872 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21873 Use %error-verbose.
21874
218752001-11-27 Marc Autret <autret_m@epita.fr>
21876
21877 * src/bison.simple: Remove YYERROR_VERBOSE using.
21878 Use %%error_verbose.
21879 (yyparse): Likewise.
21880 * src/output.c (prepare): Give its final value.
21881 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21882 * src/getargs.h: Add its extern declaration.
21883 * src/getargs.c (error_verbose_flag): New int.
21884 (getargs): Update to catch new case.
21885 * src/options.c (option_table): 'error-verbose' is a new option.
21886 (shortopts): Update.
21887
218882001-11-27 Akim Demaille <akim@epita.fr>
21889
21890 * src/system.h: Use intl/libgettext.h.
21891 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21892
218932001-11-27 Akim Demaille <akim@epita.fr>
21894
21895 * tests/torture.at (Exploding the Stack Size with Malloc):
21896 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21897
218982001-11-27 Akim Demaille <akim@epita.fr>
21899
21900 * src/files.c: Include error.h.
21901 Reported by Hans Aberg.
21902
219032001-11-26 Marc Autret <autret_m@epita.fr>
21904
21905 * src/reader.c (parse_include_decl): New, not yet implemented.
21906 (read_declarations): Add case tok_include.
21907 * src/getargs.h (include): Add its extern definition.
21908 * src/getargs.c (include): New const char *.
21909 (getargs): Add case '-I'.
21910 * src/options.c (option_table): Add include as command line and
21911 percent option.
21912 * src/lex.h (token_t): Add tok_include.
21913
219142001-11-26 Akim Demaille <akim@epita.fr>
21915
21916 * src/reader.c (readgram): Make sure rules for mid-rule actions
21917 have a lineno equal to that of their host rule.
21918 Reported by Hans Aberg.
21919 * tests/regression.at (Rule Line Numbers): New.
21920
219212001-11-26 Akim Demaille <akim@epita.fr>
21922
21923 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21924 size_ts.
21925
219262001-11-26 Akim Demaille <akim@epita.fr>
21927
21928 * src/complain.c, src/complain.h (error): Remove, provided by
21929 lib/error.[ch].
21930
219312001-11-26 Akim Demaille <akim@epita.fr>
21932
21933 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21934 issue an error message.
21935 * tests/regression.at (Invalid %directive): New.
21936 Reported by Hans Aberg.
21937
219382001-11-26 Akim Demaille <akim@epita.fr>
21939
21940 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21941 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21942
219432001-11-26 Akim Demaille <akim@epita.fr>
21944
21945 * src/conflicts.c (conflicts_print): Don't complain at all when
21946 there are no reduce/reduce conflicts, and as many shift/reduce
21947 conflicts as expected.
21948 * tests/regression.at (%expect right): Adjust.
21949
219502001-11-23 Akim Demaille <akim@epita.fr>
21951
21952 * lib/alloca.c: Update, from fileutils.
21953
219542001-11-23 Akim Demaille <akim@epita.fr>
21955
21956 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21957
219582001-11-23 Akim Demaille <akim@epita.fr>
21959
21960 * src/system.h: Include alloca.h.
21961 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21962
219632001-11-23 Akim Demaille <akim@epita.fr>
21964
21965 * src/print_graph.c (print_actions): Remove `rule', unused.
21966 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21967 pacify GCC's signed < unsigned warnings.
21968 * src/closure.c (itemsetsize): Likewise.
21969 * src/reader.c (symbol_list_new): Static.
21970
219712001-11-23 Akim Demaille <akim@epita.fr>
21972
21973 Attaching lineno to buckets is stupid, since only one copy of each
21974 symbol is kept, only the line of the first occurrence is kept too.
21975
21976 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21977 * src/reader.c (rline_allocated): Remove, unused.
21978 (symbol_list): Have a `line' member.
21979 (symbol_list_new): New.
21980 (readgram): Use it.
21981 * src/print.c (print_grammar): Output the rule line numbers.
21982 * tests/regression.at (Solved SR Conflicts)
21983 (Unresolved SR Conflicts): Adjust.
21984 Reported by Hans Aberg.
21985
219862001-11-22 Marc Autret <autret_m@epita.fr>
21987
21988 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21989
219902001-11-22 Marc Autret <autret_m@epita.fr>
21991
21992 * src/muscle_tab.c (muscle_init): Remove initialization of
21993 skeleton muscle.
21994 * src/output.c (output_master_parser): Do it here.
21995
219962001-11-20 Akim Demaille <akim@epita.fr>
21997
21998 * po/sv.po: New.
21999 * configure.in (ALL_LINGUAS): Adjust.
22000 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22001 longer contains strings to translate.
22002
220032001-11-19 Akim Demaille <akim@epita.fr>
22004
22005 * src/conflicts.c (conflicts_print): Add a missing \n.
22006
220072001-11-19 Akim Demaille <akim@epita.fr>
22008
22009 * src/nullable.c (nullable_print): New.
22010 (set_nullable): Call it when tracing.
22011 Better locality of variables.
22012
220132001-11-19 Akim Demaille <akim@epita.fr>
22014
22015 * src/print.c (print_actions): Better locality of variables.
22016
220172001-11-19 Akim Demaille <akim@epita.fr>
22018
22019 * src/derives.c (print_derives): Fix and enrich.
22020 * src/closure.c (print_fderives): Likewise.
22021
220222001-11-19 Akim Demaille <akim@epita.fr>
22023
22024 * src/closure.c (itemsetend): Remove, replaced with...
22025 (itemsetsize): new.
22026
220272001-11-19 Akim Demaille <akim@epita.fr>
22028
22029 * src/LR0.c (kernel_end): Remove, replaced with...
22030 (kernel_size): new.
22031
220322001-11-19 Akim Demaille <akim@epita.fr>
22033
22034 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22035 to clarify.
22036
220372001-11-19 Akim Demaille <akim@epita.fr>
22038
22039 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22040
220412001-11-19 Akim Demaille <akim@epita.fr>
22042
22043 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22044 trace messages.
22045 * src/LR0.c: Likewise.
22046 (allocate_itemsets): Use arrays instead of pointers to clarify.
22047
220482001-11-19 Akim Demaille <akim@epita.fr>
22049
22050 * src/getargs.c (statistics_flag): Replace with...
22051 (trace_flag): New.
22052 (longopts): Accept --trace instead of --statistics.
22053 * src/getargs.h, src/options.c: Adjust.
22054 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22055 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22056
220572001-11-19 Akim Demaille <akim@epita.fr>
22058
22059 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22060 pointers to clarify the code.
22061 (save_reductions, save_shifts): Factor common parts of alternatives.
22062
220632001-11-19 Akim Demaille <akim@epita.fr>
22064
22065 * src/LR0.c (new_state, get_state): Complete TRACE code.
22066 * src/closure.c: Include `reader.h' to get `tags', needed by the
22067 trace code.
22068 Rename the conditional DEBUG as TRACE.
22069 Output consistently TRACEs to stderr, not stdout.
22070 * src/derives.c: Likewise.
22071 * src/reduce.c: (inaccessable_symbols): Using if is better style
22072 than goto.
22073 Use `#if TRACE' instead of `#if 0' for tracing code.
22074
220752001-11-19 Akim Demaille <akim@epita.fr>
22076
22077 * src/system.h (LIST_FREE, shortcpy): New.
22078 * src/LR0.c: Use them.
22079 * src/output.c (free_itemsets, free_reductions, free_shifts):
22080 Remove, replaced by LIST_FREE.
22081
220822001-11-19 Akim Demaille <akim@epita.fr>
22083
22084 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22085 (REDUCTIONS_ALLOC): New.
22086 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22087 allocation.
22088
220892001-11-19 Akim Demaille <akim@epita.fr>
22090
22091 * src/LR0.c (new_state): Complete trace code.
22092 * src/nullable.c (set_nullable): Don't translate traces.
22093
220942001-11-19 Akim Demaille <akim@epita.fr>
22095
22096 * src/print_graph.c (print_core): Better locality of variables.
22097 * src/print.c (print_core): Likewise.
22098
220992001-11-19 Akim Demaille <akim@epita.fr>
22100
22101 * src/vcg.c: You do the output, so you are responsible of the
22102 handling of VCG syntax, in particular: use quotearg.
22103 * src/print_graph.c: Don't.
22104 (print_actions): Don't output the actions as part of the nodes,
22105 since that's the job of the edges.
22106 (print_state): Don't output by hand: fill the node description,
22107 and ask for its output.
22108
221092001-11-19 Akim Demaille <akim@epita.fr>
22110
22111 * src/bison.simple (yyparse): When verbosely reporting an error,
22112 no longer put additional quotes around token names.
22113 * tests/calc.at: Adjust.
22114
221152001-11-19 Akim Demaille <akim@epita.fr>
22116
22117 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22118 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22119 * src/output.c: Adjust.
22120
221212001-11-19 Akim Demaille <akim@epita.fr>
22122
22123 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22124 (rule_t): this.
22125 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
22126
221272001-11-19 Akim Demaille <akim@epita.fr>
22128
22129 * src/gram.h (rule_t): New.
22130 (rule_table): New.
22131 (rrhs, rlhs): Remove, part of state_t.
22132 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
22133 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
22134 * src/reader.c, src/reduce.c: Adjust.
22135
221362001-11-19 Akim Demaille <akim@epita.fr>
22137
22138 * src/reader.c (symbols_output): New, extracted from...
22139 (packsymbols): Here.
22140 (reader): Call it.
22141
221422001-11-19 Akim Demaille <akim@epita.fr>
22143
22144 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
22145 (maxrhs): this new function.
22146
221472001-11-19 Akim Demaille <akim@epita.fr>
22148
22149 * src/lalr.c (F): New macro to access the variable F.
22150 Adjust.
22151
221522001-11-19 Akim Demaille <akim@epita.fr>
22153
22154 * src/lalr.h (LA): New macro to access the variable LA.
22155 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22156 * src/lalr.c: Adjust.
22157
221582001-11-19 Akim Demaille <akim@epita.fr>
22159
22160 * src/lalr.c (initialize_LA): Only initialize LA. Let...
22161 (set_state_table): handle the `lookaheads' members.
22162
221632001-11-19 Akim Demaille <akim@epita.fr>
22164
22165 * src/lalr.h (lookaheads): Removed array, whose contents is now
22166 a member of...
22167 (state_t): this structure.
22168 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22169 Adjust.
22170
221712001-11-19 Akim Demaille <akim@epita.fr>
22172
22173 * src/lalr.h (consistent): Removed array, whose contents is now
22174 a member of...
22175 (state_t): this structure.
22176 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22177 Adjust.
22178
221792001-11-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
22182 contents are now members of...
22183 (state_t): this structure.
22184 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
22185 Adjust.
22186
221872001-11-19 Akim Demaille <akim@epita.fr>
22188
22189 * src/lalr.h (state_t): New.
22190 (state_table): Be a state_t * instead of a core **.
22191 (accessing_symbol): Remove, part of state_t.
22192 * src/lalr.c: Adjust.
22193 (set_accessing_symbol): Merge into...
22194 (set_state_table): this.
22195 * src/print_graph.c, src/conflicts.c: Adjust.
22196
221972001-11-14 Akim Demaille <akim@epita.fr>
22198
22199 * tests/calc.at, tests/output.at, tests/regression.at,
22200 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
22201 now the tests are run in private dirs, therefore AC_CLEANUP and
22202 family can be simplified to 0-ary.
22203 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
22204 use abs. path to find config.h.
22205 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
22206 stderr, there can be way too much random noise.
22207 Instead pass -Werror to GCC and rely on the exit status.
22208 Reported by Wolfram Wagner.
22209
222102001-11-14 Akim Demaille <akim@epita.fr>
22211
22212 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
22213 defined only if yyoverflow is defined, to avoid `warning: unused
22214 variable `yyvs1''.
22215 Reported by The Test Suite.
22216
222172001-11-14 Akim Demaille <akim@epita.fr>
22218
22219 * src/print.c: Include reduce.h.
22220 Reported by Hans Aberg.
22221
222222001-11-14 Akim Demaille <akim@epita.fr>
22223
22224 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
22225 Revert a previous patch: these are really const.
22226 * src/conflicts.c (conflict_report): Additional useless pair of
22227 braces to pacify GCC's warnings for `if () if () {} else {}'.
22228 * src/lex.c (parse_percent_token): Replace equal_offset with
22229 arg_offset.
22230 arg is const.
22231 Be sure to strdup `arg' when used, since there is no reason for
22232 token_buffer not to change.
22233
222342001-11-14 Akim Demaille <akim@epita.fr>
22235
22236 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
22237 definition.
22238 * src/main.c (main): Use them.
22239 Suggested by Hans Aberg.
22240
222412001-11-12 Akim Demaille <akim@epita.fr>
22242
22243 * src/system.h (ngettext): Now that we use ngettext, be sure to
22244 provide a default definition when NLS are not used.
22245
222462001-11-12 Akim Demaille <akim@epita.fr>
22247
22248 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
22249 Use @kbd to denote user input.
22250 (Language and Grammar): ANSIfy the example.
22251 Adjust its layout for info/notinfo.
22252 (Location Tracking Calc): Output error messages to stderr.
22253 Output locations in a more GNUtically correct way.
22254 Fix a couple of Englishos.
22255 Adjust @group/@end group pairs.
22256
222572001-11-12 Akim Demaille <akim@epita.fr>
22258
22259 %expect was not functioning at all.
22260
22261 * src/conflicts.c (expected_conflicts): Set to -1.
22262 (conflict_report): Use ngettext.
22263 (conflicts_print): Check %expect and make its violation an error.
22264 * doc/bison.texinfo (Expect Decl): Adjust.
22265 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
22266 * tests/regression.at (%expect not enough, %expect right)
22267 (%expect too much): New.
22268
222692001-11-12 Akim Demaille <akim@epita.fr>
22270
22271 * tests/regression.at (Conflicts): Rename as...
22272 (Unresolved SR Conflicts): this.
22273 (Solved SR Conflicts): New.
22274
222752001-11-12 Akim Demaille <akim@epita.fr>
22276
22277 * src/reduce.c (print_results): Rename as...
22278 (reduce_output): This.
22279 Output to OUT, passed as argument, instead of output_obstack.
22280 (dump_grammar): Likewise.
22281 (reduce_free): New.
22282 Also free V1.
22283 (reduce_grammar): No longer call reduce_output, since...
22284 * src/print.c (print_results): do it.
22285 * src/main.c (main): Call reduce_free;
22286
222872001-11-12 Akim Demaille <akim@epita.fr>
22288
22289 * src/conflicts.c (print_reductions): Accept OUT as argument.
22290 Output to it, not to output_obstack.
22291 * src/print.c (print_actions): Adjust.
22292
222932001-11-12 Akim Demaille <akim@epita.fr>
22294
22295 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
22296 the result instead of using...
22297 (src_total, rrc_total, src_count, rrc_count): Remove.
22298 (any_conflicts): Remove.
22299 (print_conflicts): Split into...
22300 (conflicts_print, conflicts_output): New.
22301 * src/conflicts.h: Adjust.
22302 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
22303 * src/print.c (print_grammar): Issue `\n' between two rules.
22304 * tests/regression.at (Conflicts): New.
22305 Reported by Tom Lane.
22306
223072001-11-12 Akim Demaille <akim@epita.fr>
22308
22309 * tests/regression.at (Invalid input): Remove, duplicate with
22310 ``Invalid input: 1''.
22311
223122001-11-12 Akim Demaille <akim@epita.fr>
22313
22314 * tests/torture.at (AT_DATA_STACK_TORTURE)
22315 (Exploding the Stack Size with Alloca)
22316 (Exploding the Stack Size with Malloc): New.
22317
223182001-11-12 Akim Demaille <akim@epita.fr>
22319
22320 * src/bison.simple (YYSTACK_REALLOC): New.
22321 (yyparse) [!yyoverflow]: Use it and free the old stack.
22322 Reported by Per Allansson.
22323
223242001-11-12 Pascal Bart <pascal.bart@epita.fr>
22325
22326 * src/bison.simple: Define type yystype instead of YYSTYPE, and
22327 define CPP macro, which substitute YYSTYPE by yystype.
22328 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
22329 with yyltype/YYLTYPE. This allows inclusion of the generated
22330 header within the parser if the compiler, such as GGC, accepts
22331 multiple equivalent #defines.
22332 From Akim.
22333
223342001-11-05 Akim Demaille <akim@epita.fr>
22335
22336 * src/reader.c (symbols_output): New, extracted from...
22337 (packsymbols): here.
22338 (reader): Adjust.
22339
223402001-11-05 Akim Demaille <akim@epita.fr>
22341
22342 * src/lex.c (parse_percent_token): s/quotearg/quote/.
22343
223442001-11-05 Akim Demaille <akim@epita.fr>
22345
22346 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22347 pattern.
22348
223492001-11-05 Akim Demaille <akim@epita.fr>
22350
22351 * src/options.h (struct option_table_struct): set_flags is void*.
22352 * src/options.c (longopts): Support `--output' and `%output'.
22353 (usage): Adjust.
22354 * src/lex.h (tok_setopt): Remove, replaced with...
22355 (tok_intopt, tok_stropt): these new guys.
22356 * src/lex.c (getopt.h): Not needed.
22357 (token_buffer, unlexed_token_buffer): Not const.
22358 (percent_table): Promote `-' over `_' in directive names.
22359 Active `%name-prefix', `file-prefix', and `output'.
22360 (parse_percent_token): Accept possible arguments to directives.
22361 Promote `-' over `_' in directive names.
22362
223632001-11-04 Akim Demaille <akim@epita.fr>
22364
22365 * doc/bison.texinfo (Decl Summary): Split the list into
22366 `directives for grammars' and `directives for bison'.
22367 Sort'em.
22368 Add description of `%name-prefix', `file-prefix', and `output'.
22369 Promote `-' over `_' in directive names.
22370 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22371 Simplify the description of `--name-prefix'.
22372 Promote `-' over `_' in directive names.
22373 Promote `--output' over `--output-file'.
22374 Fix the description of `--defines'.
22375 * tests/output.at: Exercise %file-prefix and %output.
22376
223772001-11-02 Akim Demaille <akim@epita.fr>
22378
22379 * doc/refcard.tex: Update.
22380
223812001-11-02 Akim Demaille <akim@epita.fr>
22382
22383 * src/symtab.h (SUNDEF): New.
22384 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22385 stand for `uninitialized', instead of 0.
22386 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22387 * src/lex.c (lex): Adjust.
22388
22389 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22390 Number it 0.
22391 Let yylex return it instead of a plain 0.
22392 Reported by Dick Streefland.
22393
223942001-11-02 Akim Demaille <akim@epita.fr>
22395
22396 * tests/regression.at (Mixing %token styles): New test.
22397
223982001-11-02 Akim Demaille <akim@epita.fr>
22399
22400 * src/reader.c (parse_thong_decl): Formatting changes.
22401 (token_translations_init): New, extracted from...
22402 (packsymbols): Here.
22403 Adjust.
22404
224052001-11-01 Akim Demaille <akim@epita.fr>
22406
22407 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22408 Check that `9foo.y' produces correct cpp guards.
22409 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22410 guards.
22411 Reported by Wwp.
22412
224132001-11-01 Akim Demaille <akim@epita.fr>
22414
22415 * tests/regression.at (Invalid input: 2): New.
22416 * src/lex.c (unlexed_token_buffer): New.
22417 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22418 too.
22419 Reported by Wwp.
22420
224212001-11-01 Akim Demaille <akim@epita.fr>
22422
22423 * tests/calc.at: Catch up with 1.30.
22424 * configure.in: Bump to 1.49a.
22425 Adjust to newer Autotest.
22426
224272001-10-19 Pascal Bart <pascal.bart@epita.fr>
22428
22429 * src/conflicts.c: Move global variables rrc_total and src_total ...
22430 (print_conflicts): here.
22431 * src/output.c (output): Free global variable user_toknums.
22432 * src/lex.c (token_obstack): Become static.
22433
224342001-10-18 Akim Demaille <akim@epita.fr>
22435
22436 * tests/atlocal.in (GCC): Add.
22437 * tests/calc.at: s/m4_match/m4_bmatch/.
22438 s/m4_patsubst/m4_bpatsubst/.
22439 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22440 * configure.in: AC_SUBST(GCC).
22441
224422001-10-14 Marc Autret <autret_m@epita.fr>
22443
22444 * src/options.c (create_long_option_table): Fix.
22445
224462001-10-10 Akim Demaille <akim@epita.fr>
22447
22448 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22449
224502001-10-04 Akim Demaille <akim@epita.fr>
22451
22452 * src/reader.c (parse_union_decl): Push the caracters in
22453 union_obstack, not attrs_obstack.
22454
224552001-10-04 Akim Demaille <akim@epita.fr>
22456
22457 Merge in the branch 1.29.
22458
22459 * src/reader.c (packsymbols): Use a temporary obstack for
22460 `%%tokendef', since output_stack is already used elsewhere.
22461
22462 2001-10-02 Akim Demaille <akim@epita.fr>
22463
22464 Bump 1.29d.
22465
22466 2001-10-02 Akim Demaille <akim@epita.fr>
22467
22468 Version 1.29c.
22469
22470 2001-10-02 Akim Demaille <akim@epita.fr>
22471
22472 * tests/regression.at (Invalid CPP headers): New.
22473 From Alexander Belopolsky.
22474 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22475
22476 2001-10-02 Akim Demaille <akim@epita.fr>
22477
22478 * tests/regression.at (Invalid input): New.
22479 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22480 Reported by Shura.
22481
22482 2001-10-02 Akim Demaille <akim@epita.fr>
22483
22484 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22485
22486 2001-10-02 Akim Demaille <akim@epita.fr>
22487
22488 * src/output.c (output_parser): Assert `skeleton'.
22489 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22490 systems.
22491 From Shura.
22492
22493 2001-10-01 Marc Autret <autret_m@epita.fr>
22494
22495 * src/lex.h: Echo modifications.
22496 * src/lex.c (unlex): Parameter is now token_t.
22497 From Hans Aberg.
22498
22499 2001-10-01 Marc Autret <autret_m@epita.fr>
22500
22501 * src/main.c: Include lex.h.
22502 From Hans Aberg.
22503
22504 2001-09-29 Akim Demaille <akim@epita.fr>
22505
22506 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22507
22508 2001-09-28 Akim Demaille <akim@epita.fr>
22509
22510 * tests/testsuite.at: Update to newer Autotest.
22511 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22512
22513 2001-09-27 Akim Demaille <akim@epita.fr>
22514
22515 Position independent wrapper.
22516
22517 * tests/bison: Remove.
22518 * tests/bison.in: New.
22519 * configure.in: Adjust.
22520
22521 2001-09-27 Paul Eggert <eggert@twinsun.com>
22522
22523 Port quotearg fixes from tar 1.13.24.
22524
22525 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22526 tm to be declared.
22527 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22528 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22529
22530 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22531 * m4/mbrtowc.m4: New file.
22532 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22533 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22534
22535 2001-09-27 Akim Demaille <akim@epita.fr>
22536
22537 Bump to 1.29c.
22538
22539 2001-09-27 Akim Demaille <akim@epita.fr>
22540
22541 Version 1.29b.
22542
22543 2001-09-25 Akim Demaille <akim@epita.fr>
22544
22545 * src/system.h: Include `xalloc.h'.
22546 Remove it from the C files.
22547 * src/files.c (output_files): Free the obstacks.
22548 * src/lex.c (init_lex): Rename as...
22549 (lex_init): this.
22550 (lex_free): New.
22551 * src/main.c (main): Use it.
22552
22553 2001-09-24 Marc Autret <autret_m@epita.fr>
22554
22555 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22556 to output informations in fout (FILE*).
22557 (open_graph, close_graph): Likewise.
22558 (output_graph, output_edge, output_node): Likewise.
22559 * src/vcg.h: Update function prototypes.
22560 * src/print_graph.c (print_graph): Open output graph file.
22561 (print_actions): Adjust.
22562 * src/files.h: Remove extern declaration.
22563 * src/files.c: Remove graph_obstack declaration.
22564 (open_files): Remove graph_obstack initialization.
22565 (output_files): Remove graph_obstack saving.
22566
22567 2001-09-24 Marc Autret <autret_m@epita.fr>
22568
22569 * src/files.c (compute_output_file_names): Fix.
22570
22571 2001-09-24 Marc Autret <autret_m@epita.fr>,
22572 Akim Demaille <akim@epita.fr>
22573
22574 * src/reader.c (reader): Remove call to free_symtab ().
22575 * src/main.c (main): Call it here.
22576 Include symtab.h.
22577 * src/conflicts.c (initialize_conflicts): Rename as...
22578 (solve_conflicts): this.
22579 * src/print.c (print_core, print_actions, print_state)
22580 (print_grammar): Dump to a file instead a `output_obstack'.
22581 (print_results): Dump `output_obstack', and then proceed with the
22582 FILE *.
22583 * src/files.c (compute_output_file_names, close_files): New.
22584 (output_files): Adjust.
22585 * src/main.c (main): Adjust.
22586
22587 2001-09-23 Marc Autret <autret_m@epita.fr>
22588
22589 * src/files.c (compute_header_macro): Computes header macro name
22590 from spec_defines_file when given.
22591
22592 2001-09-23 Marc Autret <autret_m@epita.fr>
22593
22594 * src/files.c (output_files): Add default extensions.
22595
22596 2001-09-22 Akim Demaille <akim@epita.fr>
22597
22598 * src/conflicts.c (finalize_conflicts): Rename as...
22599 (free_conflicts): this.
22600
22601 2001-09-22 Akim Demaille <akim@epita.fr>
22602
22603 * src/gram.c (gram_free): Rename back as...
22604 (dummy): this.
22605 (output_token_translations): Free `token_translations'.
22606 * src/symtab.c (free_symtab): Free the tag field.
22607
22608 2001-09-22 Akim Demaille <akim@epita.fr>
22609
22610 Remove `translations' as it is always set to true.
22611
22612 * src/gram.h: Adjust.
22613 * src/reader.c (packsymbols, parse_token_decl): Adjust
22614 * src/print.c (print_grammar): Adjust.
22615 * src/output.c (output_token_translations): Adjust.
22616 * src/lex.c (lex): Adjust.
22617 * src/gram.c: Be sure the set pointers to NULL.
22618 (dummy): Rename as...
22619 (gram_free): this.
22620
22621 2001-09-22 Akim Demaille <akim@epita.fr>
22622
22623 * configure.in: Invoke AM_LIB_DMALLOC.
22624 * src/system.h: Use dmalloc.
22625 * src/LR0.c: Be sure to have pointers initialized to NULL.
22626 (allocate_itemsets): Allocate kernel_items only if needed.
22627
22628 2001-09-22 Akim Demaille <akim@epita.fr>
22629
22630 * configure.in: Bump to 1.29b.
22631 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22632 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22633 need xmalloc.c in calc.y.
22634 From Pascal Bart.
22635
22636 2001-09-21 Akim Demaille <akim@epita.fr>
22637
22638 Version 1.29a.
22639 * Makefile.maint, config/config.guess, config/config.sub,
22640 * config/missing: Update from masters.
22641 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22642 upon package.m4.
22643 * configure.in (ALL_LINGUAS): Add `tr'.
22644
22645 2001-09-21 Akim Demaille <akim@epita.fr>
22646
22647 * tests/Makefile.am (package.m4): Move to...
22648 ($(srcdir)/$(TESTSUITE)): here.
22649
22650 2001-09-20 Akim Demaille <akim@epita.fr>
22651
22652 * src/complain.c: No longer try to be standalone: use system.h.
22653 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22654 * src/complain.h: Likewise.
22655 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22656 Remove the unused variable `n'.
22657 From Albert Chin-A-Young.
22658
22659 2001-09-18 Marc Autret <autret_m@epita.fr>
22660
22661 * doc/bison.1: Update.
22662 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22663 descriptions.
22664 (Option Cross Key): Update.
22665 Add --graph.
22666
22667 2001-09-18 Marc Autret <autret_m@epita.fr>
22668
22669 * tests/regression.at: New test (comment in %union).
22670
22671 2001-09-18 Marc Autret <autret_m@epita.fr>
22672
22673 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22674 do that.
22675 Reported by Keith Browne.
22676
22677 2001-09-18 Marc Autret <autret_m@epita.fr>
22678
22679 * tests/output.at: Add tests for --defines and --graph.
22680
22681 2001-09-18 Marc Autret <autret_m@epita.fr>
22682
22683 * tests/output.at: Removes tests of %{header,src}_extension features.
22684
22685 2001-09-18 Akim Demaille <akim@epita.fr>
22686
22687 * tests/Makefile.am (package.m4): New.
22688 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22689 (_AT_CHECK_CALC_ERROR): Likewise.
22690 Factor the `, ' part of verbose error messages.
22691
22692 2001-09-18 Marc Autret <autret_m@epita.fr>
22693
22694 * src/getargs.c (longopts): Declare --defines and --graph as options
22695 with optional arguments.
22696 * src/files.h: Add extern declarations.
22697 * src/files.c (spec_graph_file, spec_defines_file): New.
22698 (output_files): Update.
22699 Remove CPP-outed code.
22700
22701 2001-09-18 Marc Autret <autret_m@epita.fr>
22702
22703 Turn off %{source,header}_extension feature.
22704
22705 * src/files.c (compute_exts_from_gf): Update.
22706 (compute_exts_from_src): Update.
22707 (output_files): CPP-out useless code.
22708 * src/files.h: Remove {header,source}_extension extern declarations.
22709 * src/reader.c (parse_dquoted_param): CPP-out.
22710 (parse_header_extension_decl): Remove.
22711 (parse_source_extension_decl): Remove.
22712 (read_declarations): Remove cases tok_{hdrext,srcext}.
22713 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22714 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22715
22716 2001-09-10 Akim Demaille <akim@epita.fr>
22717
22718 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22719 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22720 (AT_CHECK_OUTPUT): this.
22721 Merely check ls' exit status, its output is useless.
22722
22723 2001-09-10 Akim Demaille <akim@epita.fr>
22724
22725 * tests/calc.at: Use m4_match.
22726 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22727
22728 2001-09-10 Marc Autret <autret_m@epita.fr>,
22729 Akim Demaille <akim@epita.fr>
22730
22731 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22732 enum color_e.
22733 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22734 to `normal'.
22735 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22736 * src/lex.h: Adjust prototype.
22737 (token_t): Add `tok_undef'.
22738 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22739 (parse_percent_token): Now returns token_t.
22740 Add default statement in switch.
22741 (lex): Separate `c' as an input variable, from the token_t result
22742 part.
22743 (unlexed): Is a token_t.
22744
22745 2001-09-10 Akim Demaille <akim@epita.fr>
22746
22747 * configure.in: Bump to 1.29a.
22748
22749 2001-09-07 Akim Demaille <akim@epita.fr>
22750
22751 Version 1.29.
22752
22753 2001-08-30 Akim Demaille <akim@epita.fr>
22754
22755 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22756 * m4/atconfig.m4: Remove.
22757 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22758 * tests/bison: New.
22759 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22760 m4_if, m4_patsubst, and m4_regexp.
22761 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22762 `input' file instead of echo.
22763
22764 2001-08-29 Akim Demaille <akim@epita.fr>
22765
22766 Bump to 1.28e.
22767
22768 2001-08-29 Akim Demaille <akim@epita.fr>
22769
22770 Version 1.28d.
22771
22772 2001-08-29 Paul Eggert <eggert@twinsun.com>
22773
22774 * src/bison.simple (yyparse): Don't take the address of an
22775 item before the start of an array, as that doesn't conform to
22776 the C Standard.
22777
22778 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22779
22780 * doc/bison.texinfo (Location Tracking Calc): New node.
22781
22782 2001-08-29 Paul Eggert <eggert@twinsun.com>
22783
22784 * src/output.c (output): Do not define const, as this now
22785 causes more problems than it cures.
22786
22787 2001-08-29 Akim Demaille <akim@epita.fr>
22788
22789 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22790 the nodes.
22791 Be sure to tag the `detailmenu'.
22792
22793 2001-08-29 Akim Demaille <akim@epita.fr>
22794
22795 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22796 download in a tmp dir.
22797
22798 2001-08-28 Marc Autret <autret_m@epita.fr>
22799
22800 * config/depcomp: New file.
22801
22802 2001-08-28 Marc Autret <autret_m@epita.fr>
22803
22804 * doc/bison.1 (mandoc): Adjust.
22805 From Juan Manuel Guerrero.
22806
22807 2001-08-28 Marc Autret <autret_m@epita.fr>
22808
22809 * src/print_graph.c (print_state): Fix.
22810
22811 2001-08-27 Marc Autret <autret_m@epita.fr>
22812
22813 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22814 char * members.
22815 Echo modifications to the functions prototypes.
22816 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22817
22818 2001-08-27 Marc Autret <autret_m@epita.fr>
22819
22820 * src/vcg.c: Include `xalloc.h'.
22821 (add_colorentry): New.
22822 (add_classname): New.
22823 (add_infoname): New.
22824 * src/vcg.h: Add new prototypes.
22825
22826 2001-08-27 Akim Demaille <akim@epita.fr>
22827
22828 * Makefile.maint: Sync. again with CVS Autoconf.
22829
22830 2001-08-27 Akim Demaille <akim@epita.fr>
22831
22832 * Makefile.maint: Formatting changes.
22833 (po-update, cvs-update, update): New targets.
22834 (AMTAR): Remove.
22835
22836 2001-08-27 Akim Demaille <akim@epita.fr>
22837
22838 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22839 * Makefile.maint: Sync. with CVS Autoconf.
22840
22841 2001-08-27 Marc Autret <autret_m@epita.fr>
22842
22843 * src/vcg.h (struct infoname_s): New.
22844 (struct colorentry_s): New.
22845 (graph_s): New fields {vertical,horizontal}_order in structure.
22846 Add `infoname' field.
22847 Add `colorentry' field;
22848 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22849 (G_HORIZONTAL_ORDER): New.
22850 (G_INFONAME): New.
22851 (G_COLORENTRY): New.
22852 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22853 Add output of `infoname'.
22854 Add output of `colorentry'.
22855
22856 2001-08-27 Marc Autret <autret_m@epita.fr>
22857
22858 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22859 This one shadowed a global parameter.
22860
22861 2001-08-24 Marc Autret <autret_m@epita.fr>
22862
22863 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22864 instead of `unsigned'.
22865 (print_state): Do not call obstack_object_size () in obstack_grow ()
22866 to avoid macro variables shadowing.
22867
22868 2001-08-23 Marc Autret <autret_m@epita.fr>
22869
22870 * src/lex.c (percent_table): Typo: s/naem/name/.
22871 Add graph option.
22872 Normalize new options declarations.
22873
22874 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22875
22876 * tests/suite.at: Exercise %header_extension and %source_extension.
22877
22878 2001-08-16 Marc Autret <autret_m@epita.fr>
22879
22880 * src/reader.c (parse_dquoted_param): New.
22881 (parse_header_extension_decl): Use it.
22882 (parse_source_extension_decl): Likewise.
22883
22884 2001-08-16 Marc Autret <autret_m@epita.fr>
22885
22886 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22887 (get_xxxx_str): Use assert () instead of complain ().
22888 Remove return invokations in default cases.
22889 (get_decision_str): Modify default behaviour. Remove second argument.
22890 Echo modifications on calls.
22891 (output_graph): Fix.
22892
22893 2001-08-16 Marc Autret <autret_m@epita.fr>
22894
22895 * src/getargs.c (usage): Update with ``-g, --graph''.
22896
22897 2001-08-16 Marc Autret <autret_m@epita.fr>
22898
22899 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22900 (Option Cross Key): Likewise.
22901 * doc/bison.1: Update.
22902
229032001-09-25 Pascal Bart <pascal.bart@epita.fr>
22904
22905 * src/output.c (output_master_parser): Don't finish action_obstack.
22906 (output_parser): Don't care about the muscle action, here.
22907 (prepare): Copy the action_obstack in the action muscle.
22908 (output): Free action_obstack.
22909
229102001-09-23 Pascal Bart <pascal.bart@epita.fr>
22911
22912 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22913 will contain `%union' declaration.
22914 (parse_union_decl): Delete #line directive output.
22915 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22916 informations about %union.
22917 (parse_union_decl): Copy the union_obstack in the muscle stype.
22918 * src/bison.simple: Add new #line directive.
22919 Add typdef %%stype YYSTYPE.
22920
229212001-09-23 Pascal Bart <pascal.bart@epita.fr>
22922
22923 * src/bison.simple: Add new `#line' directive.
22924
229252001-09-22 Pascal Bart <pascal.bart@epita.fr>
22926
22927 * src/bison.simple: New `#line' directive.
22928 * src/output.c (output_parser): Support new dynamic muscle input_line.
22929
229302001-09-22 Marc Autret <autret_m@epita.fr>
22931
22932 * src/output.c (output_master_parser): New.
22933 (output_parser): Be more re-entrant.
22934
229352001-09-21 Marc Autret <autret_m@epita.fr>
22936
22937 * src/reader.c (copy_definition, parse_union_decl): Update and use
22938 `linef' muscle.
22939 (copy_action): Likewise.
22940 Use obstack_1grow ().
22941 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22942
229432001-09-21 Marc Autret <autret_m@epita.fr>
22944
22945 * src/options.c (option_table): Adjust.
22946 * src/lex.c (parse_percent_token): Fix.
22947
229482001-09-20 Pascal Bart <pascal.bart@epita.fr>
22949
22950 * src/options.c (symtab.h): Include it, need by lex.h.
22951
229522001-09-20 Pascal Bart <pascal.bart@epita.fr>
22953
22954 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22955 is now an option_table_struct*.
22956 (option_strcmp): New function option_strcmp.
22957 (parse_percent_token): Call option_strcmp.
22958 * src/getargs.c (xalloc.h, options.h): Include it.
22959 (getargs): Call create_long_option_table.
22960 (getargs): Free longopts at the end of the function.
22961 (shortopts): Move in options.c.
22962 * src/options.c (create_long_option_table): New function. Convert
22963 information from option_table to option structure.
22964 * src/reader.c (options.h): Include it.
22965
22966 * src/Makefile.am: Adjust.
22967 * src/options.c (option_table): Create from longopts and percent_table.
22968 * src/getargs.c (longopts): Delete.
22969 * src/lex.c (struct percent_table_struct): Delete.
22970 (percent_table): Delete.
22971 (options.h): Include it.
22972 * src/options.c: Create.
22973 * src/options.h: Create.
22974 Declare enum opt_access_e.
22975 Define struct option_table_struct.
22976
229772001-09-20 Marc Autret <autret_m@epita.fr>
22978
22979 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22980 sections of Bison.
22981
229822001-09-19 Pascal Bart <pascal.bart@epita.fr>
22983
22984 * src/bison.simple: s/%%filename/%%skeleton.
22985 * src/muscle_tab.c (getargs.h): Include it.
22986 (muscle_init): Insert new muscle skeleton.
22987
229882001-09-18 Pascal Bart <pascal.bart@epita.fr>
22989
22990 * src/output.c (output_parser): Delete unused variable actions_dumped.
22991
229922001-09-07 Pascal Bart <pascal.bart@epita.fr>
22993
22994 * src/output.c (output): Delete call to reader_output_yylsp.
22995 * src/reader.c (reader): Likewise.
22996 * src/reader.h: Delete declaration of reader_output_yylsp.
22997
229982001-09-02 Marc Autret <autret_m@epita.fr>
22999
23000 * src/reader.c: Include muscle_tab.h.
23001 (parse_union_decl): Update.
23002 (parse_macro_decl): Rename parse_muscle_decl.
23003 Update to use renamed functions and variable.
23004 (read_declarations, copy_action, read_additionnal_code, : Updated
23005 with correct variables and functions names.
23006 (packsymbols, reader): Likewise.
23007
23008 * src/reader.h (muscle_obstack): Extern declaration update.
23009
23010 * src/output.c: Include muscle_tab.h
23011 In all functions using macro_insert, change by using muscle_insert ().
23012 (macro_obstack): Rename muscle_obstack.
23013 Echo modifications in the whole file.
23014 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23015 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23016 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23017
23018 * src/muscle_tab.h: Update double inclusion macros.
23019 (macro_entry_s): Rename muscle_entry_s.
23020 Update prototypes.
23021
23022 * src/muscle_tab.c: Include muscle_tab.h.
23023 Rename macro_tabble to muscle_table.
23024 (mhash1, mhash2, mcmp): Use muscle_entry.
23025 (macro_init): Rename muscle_init. Update.
23026 (macro_insert): Rename muscle_insert. Update.
23027 (macro_find): Rename muscle_find. Update.
23028
23029 * src/main.c: Include muscle_tab.h.
23030 (main): Call muscle_init ().
23031 * src/Makefile.am (bison_SOURCES): Echo modifications.
23032
230332001-09-02 Marc Autret <autret_m@epita.fr>
23034
23035 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23036
23037 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23038
230392001-09-02 Marc Autret <autret_m@epita.fr>
23040
23041 * src/macrotab.c, src/macrotab.h: Remove.
23042
230432001-09-01 Pascal Bart <pascal.bart@epita.fr>
23044
23045 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23046 filename.
23047
230482001-09-01 Marc Autret <autret_m@epita.fr>
23049
23050 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23051 to an explicit value to activate the feature. We do it here.
23052
230532001-08-31 Pascal Bart <pascal.bart@epita.fr>
23054
23055 * src/output.c (prepare): Delete the `filename' muscule insertion.
23056 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23057 (parse_union_decl): Likewise.
23058 * src/macrotab.c (macro_init): Initialize filename by infile.
23059
230602001-08-31 Marc Autret <autret_m@epita.fr>
23061
23062 * src/bison.simple (YYLSP_NEEDED): New definition.
23063 * src/output.c (prepare): Add macro insertion of `locations_flag'
23064
230652001-08-31 Pascal Bart <pascal.bart@epita.fr>
23066
23067 * src/output.c (prepare): Delete insertion of previous muscles,
23068 and insert the `prefix' muscles.
23069 * src/macrotab.c (macro_init): Likewise.
23070 (macro_init): Initialization prefix directive by `yy'.
23071 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23072 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23073 yylval, yydebug, yyerror, yynerrs and yyparse.
23074 New directive `#define' to substitute yydebug, ... with option
23075 name_prefix.
23076
230772001-08-31 Pascal Bart <pascal.bart@epita.fr>
23078
23079 * src/main.c (main): Standardize.
23080 * src/output.c (output_table_data, output_parser): Likewise.
23081 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23082
230832001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23084
23085 * src/reader.c (read_additionnal_code): Rename %%user_code to
23086 %%epilogue.
23087 * src/output.c (output): Rename %%declarations to %%prologue.
23088 * src/bison.simple: Echo modifications.
23089
230902001-08-31 Marc Autret <autret_m@epita.fr>
23091
23092 * src/reader.c (readgram): CleanUp.
23093 (output_token_defines): Likewise.
23094 (packsymbols): Likewise.
23095 (reader): Likewise.
23096 * src/output.c (output): CPP-out useless code.
23097
230982001-08-31 Pascal Bart <pascal.bart@epita.fr>
23099
23100 * src/reader.c (reader): Delete obsolete call to function
23101 output_trailers and output_headers.
23102 * src/output.h: Remove obsolete functions prototypes of output_headers
23103 and output_trailers.
23104
231052001-08-30 Pascal Bart <pascal.bart@epita.fr>
23106
23107 * src/main.c: Include macrotab.h.
23108 * src/macrotab.h (macro_entry_s): Constify fields.
23109 Adjust functions prototypes.
23110 * src/macrotab.c (macro_insert): Constify key and value.
23111 (macro_find): Constify key.
23112 (macro_insert): Include 'xalloc.h'
23113 (macro_insert): Use XMALLOC.
23114 (macro_find): Constify return value.
23115 * src/output.c (output_table_data): Rename table to table_data.
23116 (output_parser): Constify macro_key, macro_value.
23117
231182001-08-30 Marc Autret <autret_m@epita.fr>
23119
23120 * src/reader.c (parse_skel_decl): New.
23121 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
23122 * src/lex.h (token_t): New token `tok_skel'.
23123 * src/lex.c (percent_table): Add skeleton option entry.
23124 Standardize.
23125
231262001-08-29 Marc Autret <autret_m@epita.fr>
23127
23128 * src/bison.simple: Add %%user_code directive at the end.
23129 * src/reader.c (read_additionnal_code): New.
23130 (reader): Use it.
23131 * src/output.c (output_program): Remove.
23132 (output): Update.
23133
231342001-08-28 Marc Autret <autret_m@epita.fr>
23135
23136 * src/output.c (output_actions): Clean up.
23137 (output_gram): CPP-out useless code.
23138 * src/reader.c (reader): Clean up, CPP-out useless code.
23139
231402001-08-28 Pascal Bart <pascal.bart@epita.fr>
23141
23142 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
23143 directive.
23144 * src/bison.simple: Add `%%definitions'.
23145
231462001-08-28 Marc Autret <autret_m@epita.fr>
23147
23148 * config/depcomp: New file.
23149
231502001-08-27 Paul Eggert <eggert@twinsun.com>
23151
23152 * src/bison.simple (yyparse): Don't take the address of an
23153 item before the start of an array, as that doesn't conform to
23154 the C Standard.
23155
231562001-08-27 Robert Anisko <robert.anisko@epita.fr>
23157
23158 * src/output.c (output): Remove the initialization of the macro
23159 obstack. It was done too late here.
23160
23161 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
23162 completely wrong.
23163 (reader): Initialize the macro obstack here, since we need it to grow
23164 '%define' directives.
23165
23166 * src/reader.h: Declare the macro obstack as extern.
23167
231682001-08-27 Robert Anisko <robert.anisko@epita.fr>
23169
23170 * src/output.c (output_parser): Fix. Store single '%' characters in
23171 the output obstack instead of throwing them away.
23172
231732001-08-27 Akim Demaille <akim@epita.fr>
23174
23175 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23176
231772001-08-25 Robert Anisko <robert.anisko@epita.fr>
23178
23179 * lib/Makefile.am: Adjust.
23180
231812001-08-25 Robert Anisko <robert.anisko@epita.fr>
23182
23183 * src/bison.simple: Update and add '%%' directives.
23184
231852001-08-25 Robert Anisko <robert.anisko@epita.fr>
23186
23187 * src/reader.c (reader): Remove calls to 'output_headers' and
23188 'output_trailers'. Remove some C output.
23189 (readgram): Disable a piece of code that was writing a default
23190 definition for 'YYSTYPE'.
23191 (reader_output_yylsp): Remove.
23192 (packsymbols): Output token defintions to a macro.
23193 (copy_definition): Disable C output.
23194
23195 * src/reader.c (parse_macro_decl): New function used to parse macro
23196 declarations.
23197 (copy_string2): Put the body of copy_string into this new function.
23198 Add a parameter to let the caller choose whether he wants to copy the
23199 string delimiters or not.
23200 (copy_string): Be a simple call to copy_string2 with the last argument
23201 bound to true.
23202 (read_declarations): Add case for macro definition.
23203 (copy_identifier): New.
23204 (parse_macro_decl): Read macro identifiers using copy_identifier
23205 rather than lex.
23206
232072001-08-25 Robert Anisko <robert.anisko@epita.fr>
23208
23209 * src/output.c (prepare): Add prefixed names.
23210 (output_parser): Output semantic actions.
23211 (output_parser): Fix bug on '%%line' directives.
23212
23213 * src/output.c (output_headers): Remove. The C code printed by this
23214 function should now be in the skeletons.
23215 (output_trailers): Remove.
23216 (output): Disable call to 'reader_output_yylsp'.
23217 (output_rule_data): Do not output tables to the table obstack.
23218
23219 * src/output.c: Remove some C dedicated output.
23220 Improve the use of macro and output obstacks.
23221 (output_defines): Remove.
23222
23223 * src/output.c (output_token_translations): Associate 'translate'
23224 table with a macro. No output to the table obstack.
23225 (output_gram): Same for 'rhs' and 'prhs'.
23226 (output_stos): Same for 'stos'.
23227 (output_rule_data): Same for 'r1' and 'r2'.
23228 (token_actions): Same for 'defact'.
23229 (goto_actions): Same for 'defgoto'.
23230 (output_base): Same for 'pact' and 'pgoto'.
23231 (output_table): Same for 'table'.
23232 (output_check): Same for 'check'.
23233
23234 * src/output.c (output_table_data): New function.
23235 (output_short_table): Remove.
23236 (output_short_or_char_table): Remove.
23237
23238 * src/output.c (output_parser): Replace most of the skeleton copy code
23239 with something new. Skeletons are now processed character by character
23240 rather than line by line, and Bison looks for '%%' macros. This is the
23241 first step in making Bison's output process (a lot) more flexible.
23242 (output_parser): Use the macro table.
23243
232442001-08-25 Robert Anisko <robert.anisko@epita.fr>
23245
23246 * src/main.c (main): Initialize the macro table.
23247
232482001-08-25 Robert Anisko <robert.anisko@epita.fr>
23249
23250 * src/lex.c (percent_table): Add tok_define.
23251 * src/lex.h: Add tok_define.
23252
232532001-08-25 Robert Anisko <robert.anisko@epita.fr>
23254
23255 * src/macrotab.c: New file.
23256 * src/macrotab.h: New file.
23257 * src/Makefile.am: Update.
23258
232592001-08-25 Robert Anisko <robert.anisko@epita.fr>
23260
23261 * lib/hash.c: New file.
23262 * lib/hash.h: New file.
23263 * lib/Makefile.am: Update.
23264
232652001-08-15 Akim Demaille <akim@epita.fr>
23266
23267 Version 1.28c.
23268
232692001-08-15 Marc Autret <autret_m@epita.fr>
23270
23271 * src/reader.c (readgram): Indent output macro YYSTYPE.
23272 (packsymbols): Likewise.
23273 (output_token_defines): Likewise.
23274 * src/files.c: Standardize.
23275 (compute_header_macro): New.
23276 (defines_obstack_save): New. Use compute_header_macro.
23277 (output_files): Update. Use defines_obstack_save.
23278
232792001-08-15 Akim Demaille <akim@epita.fr>
23280
23281 * doc/bison.texinfo (Table of Symbols): Document
23282 YYSTACK_USE_ALLOCA.
23283
232842001-08-15 Akim Demaille <akim@epita.fr>
23285
23286 * missing: Update from CVS Automake.
23287 * config/config.guess, config/config.sub, config/texinfo.tex:
23288 Update from gnu.org.
23289
232902001-08-15 Akim Demaille <akim@epita.fr>
23291
23292 * Makefile.maint: Sync with CVS Autoconf.
23293
232942001-08-14 Pascal Bart <pascal.bart@epita.fr>
23295
23296 * doc/bison.texinfo: Include GNU Free Documentation License from
23297 `fdl.texi'.
23298 * doc/fdl.texi: Add to package.
23299
233002001-08-14 Marc Autret <autret_m@epita.fr>
23301
23302 Turn on %{source,header}_extension features.
23303
23304 * src/lex.c (percent_table): Un-CPP out header_extension and
23305 source_extension.
23306 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
23307 (compute_exts_from_src): Remove conditions. It restores priorities
23308 between options.
23309
233102001-08-14 Marc Autret <autret_m@epita.fr>
23311
23312 * src/files.c (compute_base_names): Add extensions computing when
23313 `--file-prefix' used.
23314 Standardize function calls.
23315
233162001-08-13 Marc Autret <autret_m@epita.fr>
23317
23318 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
23319 defining it (defined but null disables alloca).
23320
233212001-08-13 Marc Autret <autret_m@epita.fr>
23322
23323 * src/bison.simple (_yy_memcpy): CPP reformat.
23324
233252001-08-13 Pascal Bart <pascal.bart@epita.fr>
23326
23327 * tests/atconfig.in (CPPFLAGS): Fix.
23328
233292001-08-10 Pascal Bart <pascal.bart@epita.fr>
23330
23331 * doc/bison.texinfo: Include GNU General Public License from
23332 `gpl.texi'.
23333 * doc/gpl.texi: Add to package.
23334
233352001-08-10 Marc Autret <autret_m@epita.fr>
23336
23337 * src/print_graph.h: Fix.
23338 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
23339
233402001-08-10 Akim Demaille <akim@epita.fr>
23341
23342 * src/system.h: Provide default declarations for stpcpy, strndup,
23343 and strnlen.
23344
233452001-08-10 Robert Anisko <anisko_r@epita.fr>
23346
23347 * doc/bison.texinfo (Locations): Update @$ stuff.
23348
233492001-08-09 Robert Anisko <anisko_r@epita.fr>
23350
23351 * src/bison.simple (YYLLOC_DEFAULT): Update.
23352 (yyparse): Adjust.
23353
233542001-08-08 Marc Autret <autret_m@epita.fr>
23355
23356 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23357 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23358 Reported by Fabrice Bauzac.
23359
233602001-08-08 Marc Autret <autret_m@epita.fr>
23361
23362 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23363 * src/vcg.c (output_node): Fix.
23364 * src/vcg.h: Cleanup.
23365 * src/print_graph.c: Add comments.
23366 (node_output_size): New global variable. Simplify the formatting of
23367 the VCG graph output.
23368 (print_actions): Unused code is now used. It notifies the final state
23369 and no action states in the VCG graph. It also give the reduce actions.
23370 The `shift and goto' edges are red and the `go to state' edges are
23371 blue.
23372 Get the current node name and node_obstack by argument.
23373 (node_obstack): New variable.
23374 (print_state): Manage node_obstack.
23375 (print_core): Use node_obstack given by argument.
23376 A node is not only computed here but in print_actions also.
23377 (print_graph): CPP out useless code instead of commenting it.
23378
233792001-08-07 Pascal Bart <pascal.bart@epita.fr>
23380
23381 * tests/atconfig.in (CPPFLAGS): Fix.
23382
233832001-08-07 Akim Demaille <akim@epita.fr>
23384
23385 * src/print_graph.c (quote): New.
23386 (print_core): Use it.
23387
233882001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23389
23390 * src/vcg.c (complain.h): Include it.
23391 Unepitaize `return' invocations.
23392 [NDEBUG] (main): Remove.
23393 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23394 * src/files.c (open_files): Initialize graph_obstack.
23395 * src/print_graph.c (print_actions): CPP out useless code.
23396 (print_core): Don't output the last `\n' in labels.
23397 Use `quote'.
23398 * src/files.c (output_files): Output the VCG file.
23399 * src/main.c (main): Invoke print_graph ();
23400
234012001-08-06 Marc Autret <autret_m@epita.fr>
23402
23403 Automaton VCG graph output.
23404 Using option ``-g'' or long option ``--graph'', you can generate
23405 a gram_filename.vcg file containing a VCG description of the LALR (1)
23406 automaton of your grammar.
23407
23408 * src/main.c: Call to print_graph() function.
23409 * src/getargs.h: Update.
23410 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23411 (graph_flag): New flag.
23412 (longopts): Update.
23413 (getargs): Add case `g'.
23414 * src/files.c (graph_obstack): New obstack struct.
23415 (open_files): Initialize new obstack.
23416 (output_files): Saves graph_obstack if required.
23417 * src/files.h (graph_obstack): New extern declaration.
23418 * src/Makefile.am: Add new source files.
23419
234202001-08-06 Marc Autret <autret_m@epita.fr>
23421
23422 * src/print_graph.c, src/print_graph.h (graph): New.
23423 * src/vcg.h: New file.
23424 * src/vcg.c: New file, VCG graph handling.
23425
234262001-08-06 Marc Autret <autret_m@epita.fr>
23427
23428 Add of %source_extension and %header_extension which specify
23429 the source or/and the header output file extension.
23430
23431 * src/files.c (compute_base_names): Remove initialisation of
23432 src_extension and header_extension.
23433 (compute_exts_from_gf): Update.
23434 (compute_exts_from_src): Update.
23435 (output_files): Update.
23436 * src/reader.c (parse_header_extension_decl): New.
23437 (parse_source_extension_decl): New.
23438 (read_declarations): New case statements for the new tokens.
23439 * src/lex.c (percent_table): Add entries for %source_extension
23440 and %header_extension.
23441 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23442
234432001-08-06 Marc Autret <autret_m@epita.fr>
23444
23445 * configure.in: Bump to 1.28c.
23446 * doc/bison.texinfo: Texinfo thingies.
23447
234482001-08-04 Pascal Bart <pascal.bart@epita.fr>
23449
23450 * tests/atconfig.in (CPPFLAGS): Add.
23451 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23452
234532001-08-03 Akim Demaille <akim@epita.fr>
23454
23455 Version 1.28b.
23456
234572001-08-03 Akim Demaille <akim@epita.fr>
23458
23459 * tests/Makefile.am (check-local): Ship testsuite.
23460 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23461 Include `string.h'.
23462
234632001-08-03 Akim Demaille <akim@epita.fr>
23464
23465 * configure.in: Try using -Wformat when compiling.
23466
234672001-08-03 Akim Demaille <akim@epita.fr>
23468
23469 * configure.in: Bump to 1.28b.
23470
234712001-08-03 Akim Demaille <akim@epita.fr>
23472
23473 * src/complain.c: Adjust strerror_r portability issues.
23474
234752001-08-03 Akim Demaille <akim@epita.fr>
23476
23477 Version 1.28a.
23478
234792001-08-03 Akim Demaille <akim@epita.fr>
23480
23481 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23482 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23483 * src/getargs.c: Include complain.h.
23484 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23485 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23486
234872001-08-03 Akim Demaille <akim@epita.fr>
23488
23489 * src/reader.c (readgram): Display hidden chars in error messages.
23490
234912001-08-03 Akim Demaille <akim@epita.fr>
23492
23493 Update to gettext 0.10.39.
23494
234952001-08-03 Akim Demaille <akim@epita.fr>
23496
23497 * lib/strspn.c: New.
23498
234992001-08-01 Marc Autret <autret_m@epita.fr>
23500
23501 * doc/bison.texinfo: Update.
23502 * doc/bison.1 (mandoc): Update.
23503 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23504 * src/files.c: Support output files extensions computing.
23505 (src_extension): New static variable.
23506 (header_extension): New static variable.
23507 (tr): New function.
23508 (get_extension_index): New function, gets the index of an extension
23509 filename in a string.
23510 (compute_exts_from_gf): New function, computes extensions from the
23511 grammar file extension.
23512 (compute_exts_from_src): New functions, computes extensions from the
23513 C source file extension, file given by ``-o'' option.
23514 (compute_base_names): Update.
23515 (output_files): Update.
23516
235172001-08-01 Robert Anisko <anisko_r@epita.fr>
23518
23519 * doc/bison.texi: Document @$.
23520 (Locations): New section.
23521
235222001-07-18 Akim Demaille <akim@epita.fr>
23523
23524 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23525 * config/prev-version.txt, config/move-if-change: New.
23526 * Makefile.am: Adjust.
23527
235282001-07-08 Pascal Bart <pascal.bart@epita.fr>
23529
23530 * src/bison.simple (yyparse): Suppress warning `comparaison
23531 between signed and unsigned'.
23532
235332001-07-05 Pascal Bart <pascal.bart@epita.fr>
23534
23535 * src/getargs.h (raw_flag): Remove.
23536 * src/getargs.c: Die on `-r'/`--raw'.
23537 * src/lex.c (parse_percent_token): Die on `%raw'.
23538 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23539 * tests/calc.at: Suppress test with option `--raw'.
23540
235412001-07-14 Akim Demaille <akim@epita.fr>
23542
23543 * config/: New.
23544 * configure.in: Require Autoconf 2.50.
23545 Update to gettext 0.10.38.
23546
235472001-03-16 Akim Demaille <akim@epita.fr>
23548
23549 * doc/bison.texinfo: ANSIfy the examples.
23550
235512001-03-16 Akim Demaille <akim@epita.fr>
23552
23553 * getargs.c (skeleton): New variable.
23554 (longopts): --skeleton is a new option.
23555 (shortopts, getargs): -S is a new option.
23556 * getargs.h: Declare skeleton.
23557 * output.c (output_parser): Use it.
23558
235592001-03-16 Akim Demaille <akim@epita.fr>
23560
23561 * m4/strerror_r.m4: New.
23562 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23563 * lib/error.h, lib/error.c: Update.
23564
235652001-03-16 Akim Demaille <akim@epita.fr>
23566
23567 * src/getargs.c (longopts): Clean up.
23568
235692001-02-21 Akim Demaille <akim@epita.fr>
23570
23571 * src/reader.c (gensym): `gensym_count' is your own.
23572 Use a static buf to create the symbol name, as token_buffer is no
23573 longer a buffer.
23574
235752001-02-08 Akim Demaille <akim@epita.fr>
23576
23577 * src/conflicts.c (conflict_report): Be sure not to append to res
23578 between two calls, which could happen if both first sprintf were
23579 skipped, but not the first cp += strlen.
23580
235812001-02-08 Akim Demaille <akim@epita.fr>
23582
23583 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23584 New, from fileutils 4.0.37.
23585 * configure.in: Require Autoconf 2.49c. I took some time before
23586 making this decision. This is the only way out for portability
23587 issues in Bison, it would mean way too much duplicate effort to
23588 import in Bison features implemented in 2.49c since 2.13.
23589 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23590
235912001-02-02 Akim Demaille <akim@epita.fr>
23592
23593 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23594 * lib/xalloc.h, lib/xmalloc.c: Update.
23595
235962001-01-19 Akim Demaille <akim@epita.fr>
23597
23598 Get rid of the ad hoc handling of token_buffer in the scanner: use
23599 the obstacks.
23600
23601 * src/lex.c (token_obstack): New.
23602 (init_lex): Initialize it. No longer call...
23603 (grow_token_buffer): this. Remove it.
23604 Adjust all the places which used it to use the obstack.
23605
236062001-01-19 Akim Demaille <akim@epita.fr>
23607
23608 * src/lex.h: Rename all the tokens:
23609 s/\bENDFILE\b/tok_eof/g;
23610 s/\bIDENTIFIER\b/tok_identifier/g;
23611 etc.
23612 Let them be enums, not #define, to ease debugging.
23613 Adjust all the code.
23614
236152001-01-18 Akim Demaille <akim@epita.fr>
23616
23617 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23618 * src/lex.c (maxtoken, grow_token_buffer): Static.
23619
236202001-01-18 Akim Demaille <akim@epita.fr>
23621
23622 Since we now use obstacks, more % directives can be enabled.
23623
23624 * src/lex.c (percent_table): Also accept `%yacc',
23625 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23626 `%debug'.
23627 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23628 instead of returning a token.
23629 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23630 * src/reader.c (read_declarations): Adjust.
23631 * src/files.c (open_files): Don't call `compute_base_names', don't
23632 compute `attrsfile' since they depend upon data which might be
23633 *in* the input file now.
23634 (output_files): Do it here.
23635 * src/output.c (output_headers): Document the fact that this patch
23636 introduces a guaranteed SEGV for semantic parsers.
23637 * doc/bison.texinfo: Document them.
23638 * tests/suite.at: Exercise these %options.
23639
236402000-12-20 Akim Demaille <akim@epita.fr>
23641
23642 Also handle the output file (--verbose) with obstacks.
23643
23644 * files.c (foutput): Remove.
23645 (output_obstack): New.
23646 Adjust all dependencies.
23647 * src/conflicts.c: Return a string.
23648 * src/system.h (obstack_grow_string): Rename as...
23649 (obstack_sgrow): this. Be ready to work with non literals.
23650 (obstack_fgrow4): New.
23651
236522000-12-20 Akim Demaille <akim@epita.fr>
23653
23654 * src/files.c (open_files): Fix the computation of short_base_name
23655 in the case of `-o foo.tab.c'.
23656
236572000-12-20 Akim Demaille <akim@epita.fr>
23658
23659 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23660 (copy_dollar): Now that everything uses obstacks, get rid of the
23661 FILE * parameters.
23662
236632000-12-20 Akim Demaille <akim@epita.fr>
23664
23665 * src/files.c (open_files): Actually the `.output' file is based
23666 on the short_base_name, not base_name.
23667 * tests/suite.at (Checking output file names): Adjust.
23668
236692000-12-20 Akim Demaille <akim@epita.fr>
23670
23671 * src/bison.s1: Remove, we now use directly...
23672 * src/bison.simple: this.
23673 * src/Makefile.am: Use pkgdata instead of data.
23674
236752000-12-20 Akim Demaille <akim@epita.fr>
23676
23677 * src/files.c (guard_obstack): New.
23678 (open_files): Initialize it.
23679 (output_files): Dump it...
23680 * src/files.h: Export it.
23681 * src/reader.c (copy_guard): Use it.
23682
236832000-12-19 Akim Demaille <akim@epita.fr>
23684
23685 * src/files.c (outfile, defsfile, actfile): Removed as global
23686 vars.
23687 (open_files): Don't compute them.
23688 (output_files): Adjust.
23689 (base_name, short_base_name): Be global.
23690 Adjust dependencies.
23691
236922000-12-19 Akim Demaille <akim@epita.fr>
23693
23694 * src/files.c (strsuffix): New.
23695 (stringappend): Be just like strcat but allocate.
23696 (base_names): Eve out from open_files.
23697 Try to simplify the rather hairy computation of base_name and
23698 short_base_name.
23699 (open_files): Use it.
23700 * tests/suite.at (Checking output file names): New test.
23701
237022000-12-19 Akim Demaille <akim@epita.fr>
23703
23704 * src/system.h (obstack_grow_literal_string): Rename as...
23705 (obstack_grow_string): this.
23706 * src/output.c (output_parser): Recognize `%% actions' instead of
23707 `$'.
23708 * src/bison.s1: s/$/%% actions/.
23709 * src/bison.hairy: Likewise.
23710
237112000-12-19 Akim Demaille <akim@epita.fr>
23712
23713 * src/output.c (output_parser): Compute the `#line' lines when
23714 there are.
23715 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23716 Suggested by Hans Aberg.
23717
237182000-12-19 Akim Demaille <akim@epita.fr>
23719
23720 Let the handling of the skeleton files be local to the procedures
23721 that use it.
23722
23723 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23724 longer static.
23725 (fparser, open_extra_files): Remove.
23726 (open_files, output_files): Don't take care of fparser.
23727 * src/files.h: Adjust.
23728 * src/output.c (output_parser): Open and close the file to the
23729 skeleton.
23730 * src/reader.c (read_declarations): When %semantic_parser, open
23731 fguard.
23732
237332000-12-19 Akim Demaille <akim@epita.fr>
23734
23735 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23736 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23737
237382000-12-19 Akim Demaille <akim@epita.fr>
23739
23740 * src/files.c (open_files): Yipee! We no longer need all the code
23741 looking for `/tmp' since we have no tmp file.
23742
237432000-12-19 Akim Demaille <akim@epita.fr>
23744
23745 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23746 New macros.
23747 * src/files.c (open_files): Less dependency on MSDOS etc.
23748
237492000-12-14 Akim Demaille <akim@epita.fr>
23750
23751 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23752 Provide a default definition.
23753 Use it when executing the default @ action.
23754 * src/reader.c (reader_output_yylsp): No longer include
23755 `timestamp' and `text' in the default YYLTYPE.
23756
237572000-12-12 Akim Demaille <akim@epita.fr>
23758
23759 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23760 (copy_guard): Quote the file names.
23761 Reported by Laurent Mascherpa.
23762
237632000-12-12 Akim Demaille <akim@epita.fr>
23764
23765 * src/output.c (output_headers, output_program, output): Be sure
23766 to escape special characters when outputting filenames.
23767 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23768 (output_headers): Don't depend on them, Use ACTSTR.
23769
237702000-11-17 Akim Demaille <akim@epita.fr>
23771
23772 * lib/obstack.h: Formatting changes.
23773 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23774 prevents type checking.
23775 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23776 cast the value to (void *): assigning a `foo *' to a `void *'
23777 variable is valid.
23778 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23779 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23780 append characters.
23781
237822000-11-17 Akim Demaille <akim@epita.fr>
23783
23784 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23785 as...
23786 (suite.m4, regression.m4, calc.m4): these.
23787 * tests/atgeneral.m4: Update from CVS Autoconf.
23788
237892000-11-17 Akim Demaille <akim@epita.fr>
23790
23791 * tests/regression.m4 (%union and --defines): New test,
23792 demonstrating a current bug in the obstack implementation.
23793
237942000-11-17 Akim Demaille <akim@epita.fr>
23795
23796 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23797 macros.
23798 Use them to declare the variables which are global or local to
23799 `yyparse'.
23800
238012000-11-17 Akim Demaille <akim@epita.fr>
23802
23803 * acconfig.h: Remove, no longer used.
23804
238052000-11-07 Akim Demaille <akim@epita.fr>
23806
23807 * src: s/Copyright (C)/Copyright/g.
23808
238092000-11-07 Akim Demaille <akim@epita.fr>
23810
23811 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23812 defining.
23813 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23814
238152000-11-07 Akim Demaille <akim@epita.fr>
23816
23817 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23818 Merge in a single CPP if/else.
23819
238202000-11-07 Akim Demaille <akim@epita.fr>
23821
23822 * src/output.c (output): Remove useless variables.
23823 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23824 argument `data' for consistency with the prototypes.
23825 Qualify it `const'.
23826 (obstack_copy, obstack_copy0): Rename the second argument as
23827 `address' for consistency. Qualify it `const'.
23828 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23829 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23830 `const' their input argument (`data' or `address').
23831 Adjust the corresponding macros to include `const' in casts.
23832
238332000-11-03 Akim Demaille <akim@epita.fr>
23834
23835 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23836 s/PFILE1/BISON_HAIRY/.
23837 Adjust dependencies.
23838
238392000-11-03 Akim Demaille <akim@epita.fr>
23840
23841 For some reason, this was not applied.
23842
23843 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23844 `unlink': it's no longer used.
23845
238462000-11-03 Akim Demaille <akim@epita.fr>
23847
23848 * src/files.c (skeleton_find): New function, eved out of...
23849 (open_files, open_extra_files): here.
23850
238512000-11-03 Akim Demaille <akim@epita.fr>
23852
23853 Don't use `atexit'.
23854
23855 * src/files.c (obstack_save): New function.
23856 (done): Rename as...
23857 (output_files): this.
23858 Use `obstack_save'.
23859 * src/main.c (main): Don't use `atexit' to register `done', since
23860 it no longer has to remove tmp files, just call `output_files'
23861 when there are no errors.
23862
238632000-11-02 Akim Demaille <akim@epita.fr>
23864
23865 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23866 `unlink': it's no longer used.
23867 * src/files.h: Formatting changes.
23868
238692000-11-02 Akim Demaille <akim@epita.fr>
23870
23871 Remove the last uses of mktemp and unlink/delete.
23872
23873 * src/files.c (fdefines, ftable): Removed.
23874 (defines_ostack, table_obstack): New.
23875 Adjust dependencies of the former into uses of the latter.
23876 * src/output.c (output_short_or_char_table, output_short_table):
23877 Convert to using obstacks.
23878 * src/reader.c (copy_comment2): Accept one FILE * and two
23879 obstacks.
23880 (output_token_defines, reader_output_yylsp): Use obstacks.
23881 * src/system.h (obstack_fgrow3): New.
23882 * po/POTFILES.in: Adjust.
23883
238842000-11-01 Akim Demaille <akim@epita.fr>
23885
23886 Change each use of `fattrs' into a use of `attrs_obstack'.
23887
23888 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23889 * src/files.c (fattrs): Remove.
23890 (attrs_obstack): New.
23891 Adjust all dependencies.
23892 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23893
238942000-11-01 Akim Demaille <akim@epita.fr>
23895
23896 Introduce obstacks.
23897 Change each use of `faction' into a use of `action_obstack'.
23898
23899 * lib/obstack.h, lib/obstack.c: New files.
23900 * src/files.c (faction): Remove.
23901 (action_obstack): New.
23902 Adjust all dependencies.
23903
239042000-10-20 Akim Demaille <akim@epita.fr>
23905
23906 * lib/quote.h (PARAMS): New macro. Use it.
23907
239082000-10-16 Akim Demaille <akim@epita.fr>
23909
23910 * src/output.c (output_short_or_char_table): New function.
23911 (output_short_table, output_token_translations): Use it.
23912 (goto_actions): Use output_short_table.
23913
239142000-10-16 Akim Demaille <akim@epita.fr>
23915
23916 * src/symtab.c (bucket_new): New function.
23917 (getsym): Use it.
23918
23919 * src/output.c (output_short_table): New argument to display the
23920 comment associated with the table.
23921 Adjust dependencies.
23922 (output_gram): Use it.
23923 (output_rule_data): Nicer output layout for YYTNAME.
23924
239252000-10-16 Akim Demaille <akim@epita.fr>
23926
23927 * src/lex.c (read_typename): New function.
23928 (lex): Use it.
23929 * src/reader.c (copy_dollar): Likewise.
23930
239312000-10-16 Akim Demaille <akim@epita.fr>
23932
23933 * src/reader.c (copy_comment2): Expect the input stream to be on
23934 the `/' which is suspected to open a comment, instead of being
23935 called after `//' or `/*' was read.
23936 (copy_comment, copy_definition, parse_union_decl, copy_action)
23937 (copy_guard): Adjust.
23938
239392000-10-16 Akim Demaille <akim@epita.fr>
23940
23941 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23942 `read_signed_integer'.
23943
239442000-10-16 Akim Demaille <akim@epita.fr>
23945
23946 * src/reader.c (copy_dollar): New function.
23947 (copy_guard, copy_action): Use it.
23948
239492000-10-16 Akim Demaille <akim@epita.fr>
23950
23951 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23952 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23953 New files, from Fileutils 4.0.27.
23954 * src/main.c (printable_version): Remove.
23955 * src/lex.c, src/reader.c: Use `quote'.
23956
239572000-10-04 Akim Demaille <akim@epita.fr>
23958
23959 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23960
239612000-10-04 Akim Demaille <akim@epita.fr>
23962
23963 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23964
239652000-10-04 Akim Demaille <akim@epita.fr>
23966
23967 When a literal string is used to define two different tokens,
23968 `bison -v' segfaults.
23969 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23970
23971 * tests/regression.m4: New file.
23972 Include the core of the sample provided by Piotr Gackiewicz.
23973 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23974 properly.
23975
239762000-10-04 Akim Demaille <akim@epita.fr>
23977
23978 * src/reader.c (parse_expect_decl): Keep `count' within the size
23979 of `buffer'.
23980 From Neil Booth.
23981
239822000-10-02 Paul Eggert <eggert@twinsun.com>
23983
23984 * bison.s1 (yyparse): Assign the default value
23985 unconditionally, to avoid a GCC warning and make the parser a
23986 tad smaller.
23987
239882000-10-02 Akim Demaille <akim@epita.fr>
23989
23990 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23991 options.
23992
239932000-10-02 Akim Demaille <akim@epita.fr>
23994
23995 * src/derives.c, src/print.c, src/reduce.c: To ease the
23996 translation, move some `\n' out of the translated strings.
23997
239982000-10-02 Akim Demaille <akim@epita.fr>
23999
24000 The location tracking mechanism is precious for parse error
24001 messages. Nevertheless, it is enabled only when `@n' is used in
24002 the grammar, which is a different issue (you can use it in error
24003 message, but not in the grammar per se). Therefore, there should
24004 be another means to enable it.
24005
24006 * src/getargs.c (getargs): Support `--locations'.
24007 (usage): Report it.
24008 * src/getargs.h (locationsflag): Export it.
24009 * src/lex.c (percent_table): Support `%locations'.
24010 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24011 with `locationsflag'.
24012 * doc/bison.texinfo: Document `--locations' and `%locations'.
24013 Sort the options.
24014 * tests/calc.m4: Test it.
24015
24016 For regularity of the names, replace each
24017 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24018 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24019 In addition replace each `flag' with `_flag'.
24020
240212000-10-02 Akim Demaille <akim@epita.fr>
24022
24023 Also test parse error messages, including with YYERROR_VERBOSE.
24024
24025 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24026 associative).
24027 Use it to check the computations.
24028 Use it to check `nonassoc' is honored.
24029 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24030 `--yyerror-verbose'.
24031 (_AT_CHECK_CALC): Adjust to this option.
24032 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24033
240342000-10-02 Akim Demaille <akim@epita.fr>
24035
24036 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24037 the latter demonstrates a flaw in the handling of non debugging
24038 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24039 was used in order to simplify:
24040
24041 #if YYDEBUG
24042 if (yydebug)
24043 {
24044 ...
24045 }
24046 #endif
24047
24048 into
24049
24050 if (yydebug)
24051 {
24052 ...
24053 }
24054
24055 unfortunately this leads to a CPP conflict when
24056 `--name-prefix=foo' is used since it produces `#define yydebug
24057 foodebug'.
24058
24059 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24060 (YYDPRINTF): New macro.
24061 Spread its use.
24062 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24063 the bison options.
24064 Also test `--verbose', `--defines' and `--name-prefix'.
24065
240662000-10-02 Akim Demaille <akim@epita.fr>
24067
24068 Improve the readability of the produced parsers.
24069
24070 * src/bison.s1: Formatting changes.
24071 Improve the comment related to the `$' mark.
24072 (yydefault): Don't fall through to `yyresume': `goto' there.
24073 * src/output.c (output_parser): When the `$' is met, skip the end
24074 of its line.
24075 New variable, `number_of_dollar_signs', to check there's exactly
24076 one `$' in the parser skeleton.
24077
240782000-10-02 Akim Demaille <akim@epita.fr>
24079
24080 * lib/xstrdup.c: New file, from the fileutils.
24081 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24082 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24083 instead of strlen + xmalloc + strcpy.
24084 * src/symtab.c (copys): Remove, use xstrdup instead.
24085
240862000-10-02 Akim Demaille <akim@epita.fr>
24087
24088 * src/gram.h (associativity): New enum type which replaces the
24089 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24090 `right_assoc', `left_assoc' and `non_assoc'.
24091 Adjust all dependencies.
24092 * src/reader.c: Formatting changes.
24093 (LTYPESTR): Don't define it, use it as a literal in
24094 `reader_output_yylsp'.
24095 * src/symtab.h (symbol_class): New enum type which replaces the
24096 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24097 `sunknown', `stoken and `snterm'.
24098
240992000-10-02 Akim Demaille <akim@epita.fr>
24100
24101 * src/getargs.c (fixed_outfiles): Rename as...
24102 (yaccflag): for consistency and accuracy.
24103 Adjust dependencies.
24104
241052000-10-02 Akim Demaille <akim@epita.fr>
24106
24107 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24108 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24109 difficult and introduced a lot of core dump. It turns out that
24110 Bison used an implementation of `xmalloc' based on `calloc', and
24111 at various places it does depend upon the initialization to 0. I
24112 have not tried to isolate the pertinent places, and all the former
24113 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24114 someone should address this issue.
24115
24116 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24117 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24118 files.
24119 Adjust dependencies.
24120 * src/warshall.h: New file.
24121 Propagate.
24122
241232000-10-02 Akim Demaille <akim@epita.fr>
24124
24125 Various anti-`extern in *.c' changes.
24126
24127 * src/system.h: Include `assert.h'.
24128
241292000-10-02 Akim Demaille <akim@epita.fr>
24130
24131 * src/state.h (nstates, final_state, first_state, first_shift)
24132 (first_reduction): Move their exportation from here...
24133 * src/LR0.h: to here.
24134 Adjust dependencies.
24135 * src/getargs.c (statisticsflag): New variable.
24136 Add support for `--statistics'.
24137 Adjust dependencies.
24138
24139 Remove a lot of now useless `extern' statements in most files.
24140
241412000-10-02 Akim Demaille <akim@epita.fr>
24142
24143 * src/LR0.h: New file.
24144 Propagate its use.
24145
241462000-10-02 Akim Demaille <akim@epita.fr>
24147
24148 * src/print.h: New file.
24149 Propagate its use.
24150 * src/print.c: Formatting and ordering changes.
24151 (verbose, terse): Replace with...
24152 (print_results): this new function.
24153 Adjust dependencies.
24154
241552000-10-02 Akim Demaille <akim@epita.fr>
24156
24157 * src/conflicts.c (conflict_report): New function.
24158 (conflict_log, verbose_conflict_log): Replace with...
24159 (print_conflicts): this function.
24160 Adjust dependencies.
24161 * src/conflicts.h: New file.
24162 Propagate its inclusion.
24163
241642000-10-02 Akim Demaille <akim@epita.fr>
24165
24166 * src/nullable.h: New file.
24167 Propagate its inclusion.
24168 * src/nullable.c: Formatting changes.
24169
241702000-10-02 Akim Demaille <akim@epita.fr>
24171
24172 * src/reduce.h: New file.
24173 Propagate its inclusion.
24174 * src/reduce.c: Topological sort and other formatting changes.
24175 (bool, TRUE, FALSE): Move their definition to...
24176 * src/system.h: here.
24177
241782000-10-02 Akim Demaille <akim@epita.fr>
24179
24180 * src/files.c: Formatting changes.
24181 (tryopen, tryclose, openfiles): Rename as...
24182 (xfopen, xfclose, open_files): this.
24183 (stringappend): static.
24184 * src/files.h: Complete the list of exported symbols.
24185 Propagate its use.
24186
241872000-10-02 Akim Demaille <akim@epita.fr>
24188
24189 * src/reader.h: New file.
24190 Propagate its use instead of tedious list of `extern' and
24191 prototypes.
24192 * src/reader.c: Formatting changes, topological sort,
24193 s/register//.
24194
241952000-10-02 Akim Demaille <akim@epita.fr>
24196
24197 * src/lex.h: Prototype `lex.c' exported functions.
24198 * src/reader.c: Adjust.
24199 * src/lex.c: Formatting changes.
24200 (safegetc): Rename as...
24201 (xgetc): this.
24202
242032000-10-02 Akim Demaille <akim@epita.fr>
24204
24205 * src/lalr.h: New file.
24206 Propagate its inclusion instead of prototypes and `extern'.
24207 * src/lalr.c: Formatting changes, topological sorting etc.
24208
242092000-10-02 Akim Demaille <akim@epita.fr>
24210
24211 * src/output.c (token_actions): Introduce a temporary array,
24212 YYDEFACT, that makes it possible for this function to use
24213 output_short_table.
24214
242152000-10-02 Akim Demaille <akim@epita.fr>
24216
24217 `user_toknums' is output as a `short[]' in `output.c', while it is
24218 defined as a `int[]' in `reader.c'. For consistency with the
24219 other output tables, `user_toknums' is now defined as a table of
24220 shorts.
24221
24222 * src/reader.c (user_toknums): Be a short table instead of an int
24223 table.
24224 Adjust dependencies.
24225
24226 Factor the short table outputs.
24227
24228 * src/output.c (output_short_table): New function.
24229 * src/output.c (output_gram, output_stos, output_rule_data)
24230 (output_base, output_table, output_check): Use it.
24231
242322000-10-02 Akim Demaille <akim@epita.fr>
24233
24234 * src/output.c (output): Topological sort of the functions, in
24235 order to get rid of the `static' prototypes.
24236 No longer use `register'.
24237 * src/output.h: New file.
24238 Propagate its inclusion in files explicitly prototyping functions
24239 from output.c.
24240
242412000-09-21 Akim Demaille <akim@epita.fr>
24242
24243 * src/atgeneral.m4: Update from Autoconf.
24244
242452000-09-21 Akim Demaille <akim@epita.fr>
24246
24247 * src/closure.h: New file.
24248 * src/closure.c: Formatting changes, topological sort over the
24249 functions, use of closure.h.
24250 (initialize_closure, finalize_closure): Rename as...
24251 (new_closure, free_closure): these. Adjust dependencies.
24252 * src/LR0.c: Formatting changes, topological sort, use of
24253 cloture.h.
24254 (initialize_states): Rename as...
24255 (new_states): this.
24256 * src/Makefile.am (noinst_HEADERS): Adjust.
24257
242582000-09-20 Akim Demaille <akim@epita.fr>
24259
24260 * src/acconfig.h: Don't protect config.h against multiple
24261 inclusion.
24262 Don't define PARAMS.
24263 * src/system.h: Define PARAMS.
24264 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
24265 purpose of config.h. system.h must not try to fix wrong
24266 definitions in config.h.
24267
242682000-09-20 Akim Demaille <akim@epita.fr>
24269
24270 * src/derives.h: New file.
24271 * src/main.c, src/derives.h: Use it.
24272 Formatting changes.
24273 * src/Makefile.am (noinst_HEADERS): Adjust.
24274
242752000-09-20 Akim Demaille <akim@epita.fr>
24276
24277 * tests/atgeneral.m4: Update from Autoconf.
24278 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
24279 (AT_CHECK_CALC): New macros.
24280 Use these macros to test bison with options `', `--raw',
24281 `--debug', `--yacc', `--yacc --debug'.
24282
242832000-09-19 Akim Demaille <akim@epita.fr>
24284
24285 * src/output.c: Formatting changes.
24286 * src/machine.h: Remove, leaving its contents in...
24287 * src/system.h: here.
24288 Include stdio.h.
24289 Adjust all dependencies on stdio.h and machine.h.
24290 * src/getargs.h: New file.
24291 Let all `extern' declarations about getargs.c be replaced with
24292 inclusion of `getargs.h'.
24293 * src/Makefile.am (noinst_HEADERS): Adjust.
24294
24295 * tests/calc.m4 (yyin): Be initialized in main, not on the global
24296 scope.
24297 (yyerror): Returns void, not int.
24298 * doc/bison.texinfo: Formatting changes.
24299
243002000-09-19 Akim Demaille <akim@epita.fr>
24301
24302 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
24303 portable.
24304
243052000-09-18 Akim Demaille <akim@epita.fr>
24306
24307 * configure.in: Append WARNING_CFLAGS to CFLAGS.
24308 * src/Makefile.am (INCLUDES): Don't.
24309 Be ready to fetch headers in lib/.
24310
243112000-09-18 Akim Demaille <akim@epita.fr>
24312
24313 * doc/bison.texinfo: Update the copyright.
24314 ANSIfy and GNUify the examples.
24315 Remove the old menu.
24316
243172000-09-18 Akim Demaille <akim@epita.fr>
24318
24319 First set of tests: use the `calc' example from the documentation.
24320
24321 * src/bison.s1 (yyparse): Condition the code using `yytname' which
24322 is defined only when YYDEBUG is.
24323 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
24324 * src/files.c (tryopen, tryclose): Formatting changes.
24325 Move to the top and be static.
24326 * src/reader.c (read_signed_integer): Likewise.
24327 * tests/calc.m4: New file.
24328 * Makefile.am, suite.m4: Adjust.
24329 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
24330
243312000-09-18 Akim Demaille <akim@epita.fr>
24332
24333 Add support for an Autotest test suite for Bison.
24334
24335 * m4/m4.m4, m4/atconfig.m4: New files.
24336 * m4/Makefile.am (EXTRA_DIST): Adjust.
24337 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
24338 files.
24339 * src/getargs.c: Display a more standard --version message.
24340 * src/reader.c (reader): Formatting changes.
24341 No longer depend upon VERSION_STRING.
24342 * configure.in: No longer use `dnl'.
24343 Set up the test suite and the new directory `tests/.
24344 (VERSION_STRING): Remove.
24345
243462000-04-14 Akim Demaille <akim@epita.fr>
24347
24348 * src/reader.c (copy_comment2): New function, same as former
24349 `copy_comment', but outputs into two FILE *.
24350 (copy_comment): Use it.
24351 (parse_union_decl): Use it.
24352 (get_type, parse_start_decl): Use the same `invalid' message.
24353 (parse_start_decl, parse_union_decl): Use the same `multiple'
24354 message.
24355 (parse_union_decl, copy_guard, copy_action): Use the same
24356 `unmatched' message.
24357 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24358
243592000-03-31 Akim Demaille <akim@epita.fr>
24360
24361 * src/files.c (tryopen, tryclose): Move to the top.
24362 Be static.
24363
243642000-03-31 Akim Demaille <akim@epita.fr>
24365
24366 * src/main.c (main): Don't call `done', exit does it.
24367
243682000-03-31 Akim Demaille <akim@epita.fr>
24369
24370 * allocate.c: s/return (foo)/return foo/.
24371 * lalr.c: Likewise.
24372 * LR0.c: Likewise.
24373 * output.c: Likewise.
24374 * reader.c: Likewise.
24375 * symtab.c: Likewise.
24376 * vmsgetargs.c: Likewise.
24377
243782000-03-31 Akim Demaille <akim@epita.fr>
24379
24380 Clean up the error reporting functions.
24381
24382 * src/report.c: New file.
24383 * src/report.h: Likewise.
24384 * src/Makefile.am: Adjust.
24385 * m4/error.m4: New file.
24386 * m4/Makefile.am: Adjust.
24387 * configure.in (jm_PREREQ_ERROR): Call it.
24388 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24389 Remove.
24390 (fatal, fatals): Remove. All callers use complain.c::fatal.
24391 (warn, warni, warns, warnss, warnss): Remove. All callers use
24392 complain.c::complain.
24393 (toomany): Remove, use fatal instead.
24394 * src/files.c (done): No argument, use complain_message_count.
24395 * src/main.c (main): Register `done' to `atexit'.
24396
24397 * src/getargs.c (usage): More `fputs', less `fprintf'.
24398
243992000-03-28 Akim Demaille <akim@epita.fr>
24400
24401 * lib/: New directory.
24402 * Makefile.am (SUBDIRS): Adjust.
24403 * configure.in: Adjust.
24404 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24405 useless.
24406 * src/alloca.c: Moved to lib/.
24407 * src/getopt.c: Likewise.
24408 * src/getopt1.c: Likewise.
24409 * src/getopt.h: Likewise.
24410 * src/ansi2knr.c: Likewise.
24411 * src/ansi2knr.1: Likewise.
24412 * src/Makefile.am: Adjust.
24413 * lib/Makefile.am: New file.
24414
244152000-03-28 Akim Demaille <akim@epita.fr>
24416
24417 * src/getargs.c (usage): Refresh the help message.
24418
244192000-03-17 Akim Demaille <akim@epita.fr>
24420
24421 * src/getopt1.c: Updated from textutils 2.0e
24422 * src/getopt.c: Likewise.
24423 * src/getopt.h: Likewise.
24424
244252000-03-17 Akim Demaille <akim@epita.fr>
24426
24427 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24428 the file name, not the whole `#line LINE FILE'.
24429
244302000-03-17 Akim Demaille <akim@epita.fr>
24431
24432 On syntax errors, report the token on which we choked.
24433
24434 * src/bison.s1 (yyparse): In the label yyerrlab, when
24435 YYERROR_VERBOSE, add yychar in msg.
24436
244372000-03-17 Akim Demaille <akim@epita.fr>
24438
24439 * src/reader.c (copy_at): New function.
24440 (copy_guard): Use it.
24441 (copy_action): Use it.
24442
244432000-03-17 Akim Demaille <akim@epita.fr>
24444
24445 Be kind to translators, save some useless translations.
24446
24447 * src/main.c (banner): New function.
24448 (fatal_banner): Use it.
24449 (warn_banner): Use it.
24450
244512000-03-17 Akim Demaille <akim@epita.fr>
24452
24453 * src/reader.c (copy_definition): Use copy_string and
24454 copy_comment. Removed now unused `match', `ended',
24455 `cplus_comment'.
24456 (copy_comment, copy_string): Moved, to be visible from
24457 copy_definition.
24458
244592000-03-17 Akim Demaille <akim@epita.fr>
24460
24461 * src/reader.c (copy_string): Declare `static inline'. No
24462 problems with inline, since it is checked by configure.
24463 (copy_comment): Likewise.
24464
244652000-03-17 Akim Demaille <akim@epita.fr>
24466
24467 * src/reader.c (packsymbols): Formatting changes.
24468
244692000-03-17 Akim Demaille <akim@epita.fr>
24470
24471 * src/reader.c (copy_comment): New function, factored out from:
24472 (copy_action): Use it. Removed now unused `match', `ended',
24473 `cplus_comment'.
24474 (copy_guard): Likewise.
24475
244762000-03-17 Akim Demaille <akim@epita.fr>
24477
24478 * src/reader.c (copy_string): New function, factored out from:
24479 (copy_action): Use it.
24480 (copy_guard): Likewise.
24481
244822000-03-17 Akim Demaille <akim@epita.fr>
24483
24484 Change the handling of @s so that they behave exactly like $s.
24485 There is now a pseudo variable @$ (readble and writable), location
24486 of the lhs of the rule (by default ranging from the location of
24487 the first symbol of the rhs, to the location of the last symbol,
24488 or, if the rhs is empty, YYLLOC).
24489
24490 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24491 yyval.
24492 (yyparse): When providing a default semantic action, provide a
24493 default location action.
24494 (after the $): No longer change `*YYLSP', just stack YYLOC the
24495 same way you stack YYVAL.
24496 * src/reader.c (read_declarations): Use warns.
24497 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24498 (copy_action, case '@'): Likewise.
24499 Use a standard error message, to save useless work from
24500 translators.
24501
245022000-03-17 Akim Demaille <akim@epita.fr>
24503
24504 * src/bison.s1: Formatting and cosmetics changes.
24505 * src/reader.c: Likewise.
24506 Update the Copyright notice.
24507
245082000-03-17 Akim Demaille <akim@epita.fr>
24509
24510 * src/bison.s1 (#line): All set to `#line' only, since the
24511 Makefile now handles them.
24512
245132000-03-16 Akim Demaille <akim@epita.fr>
24514
24515 * src/output.c (output_rule_data): Output the documentation of
24516 some of the tables.
24517 (Copyright notice): Update.
24518 Formatting changes.
24519
245202000-03-16 Akim Demaille <akim@epita.fr>
24521
24522 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24523 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24524 One `#if YYDEBUG' remains, since it uses variables which are
24525 defined only if `YYDEBUG != 0'.
24526
245272000-03-16 Akim Demaille <akim@epita.fr>
24528
24529 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24530 and related variables so that the similarities are highlighted.
24531
245322000-03-16 Akim Demaille <akim@epita.fr>
24533
24534 * src/bison.s1: Properly indent CPP directives.
24535
245362000-03-16 Akim Demaille <akim@epita.fr>
24537
24538 * src/bison.s1: Properly indent the `alloca' CPP section.
24539
245402000-03-16 Akim Demaille <akim@epita.fr>
24541
24542 Do not hard code values of directories in `configure.in'.
24543 Update the `configure' tool chain.
24544
24545 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24546 src/makefile.am.
24547 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24548 (AC_OUTPUT): Add m4/Makefile.
24549 Bump to bison 1.28a, 1.29 has never been released.
24550 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24551 handled via src/Makefile.am.
24552 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24553 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24554 autoheader.
24555 * Makefile.am (SUBDIRS): Add m4.
24556 (ACLOCAL_AM_FLAGS): New variable.
24557 (AUTOMAKE_OPTIONS): Add check-news.
24558 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24559 the proper line number and file name.
24560 (DEFS): Propagate the location of bison library files and of the
24561 locale files.
24562 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24563 builddir.
24564 * acinclude.m4: Remove, replaced by the directory m4.
24565 * m4/Makefile.am (EXTRA_DIST): New variable.
24566 * m4/gettext.m4: New file, from the fileutils.
24567 * m4/lcmessage.m4: Likewise
24568 * m4/progtest.m4: Likewise.
24569 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24570
245712000-03-10 Akim Demaille <akim@epita.fr>
24572
24573 * src/closure.c:
24574 Formatting changes of various comments.
24575 Respect the GNU coding standards at various places.
24576 Don't use `_()' when no translation is needed.
24577
245781999-12-13 Jesse Thilo <jthilo@gnu.org>
24579
24580 * src/files.c:
24581 OS/2 honors TMPDIR environment variable.
24582
245831999-12-13 Jesse Thilo <jthilo@gnu.org>
24584
24585 * doc/bison.texinfo: Tweaked spelling and grammar.
24586 Updated ISBN.
24587 Removed reference to price of printed copy.
24588 Mention BISON_SIMPLE and BISON_HAIRY.
24589
245901999-12-13 Jesse Thilo <jthilo@gnu.org>
24591
24592 * configure.in, NEWS:
24593 Bison 1.29 released.
24594
245951999-10-27 Jesse Thilo <jthilo@gnu.org>
24596
24597 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24598 Added reference card.
24599
246001999-07-26 Jesse Thilo <jthilo@gnu.org>
24601
24602 * po/ru.po: Added Russian translation.
24603
246041999-07-26 Jesse Thilo <jthilo@gnu.org>
24605
24606 * configure.in: Added Russian translation.
24607
246081999-07-06 Jesse Thilo <jthilo@gnu.org>
24609
24610 * configure.in, NEWS, README:
24611 Released version 1.28.
24612
246131999-06-14 Jesse Thilo <jthilo@gnu.org>
24614
24615 * src/system.h:
24616 Squashed redefinition warning on some systems.
24617
24618 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24619 Have configure build version string instead of relying on ANSI string
24620 concatentation.
24621
246221999-06-14 Jesse Thilo <jthilo@gnu.org>
24623
24624 * po/POTFILES.in: Got rid of version.c.
24625
246261999-06-14 Jesse Thilo <jthilo@gnu.org>
24627
24628 * acconfig.h, configure.in:
24629 Have configure build version string instead of relying on ANSI string
24630 concatentation.
24631
246321999-06-08 Jesse Thilo <jthilo@gnu.org>
24633
24634 * doc/bison.1:
24635 Dropped mention of `+' for long-named options.
24636
246371999-05-30 Jesse Thilo <jthilo@gnu.org>
24638
24639 * src/files.c: Added <unistd.h> for unlink().
24640
24641 * src/Makefile.am, src/system.h:
24642 I18n fixes.
24643
246441999-05-30 Jesse Thilo <jthilo@gnu.org>
24645
24646 * README: Added a FAQ list.
24647
24648 * configure.in, acconfig.h:
24649 I18n fixes.
24650
246511999-05-30 Jesse Thilo <jthilo@gnu.org>
24652
24653 * doc/FAQ, doc/Makefile.am:
24654 Added a FAQ list.
24655
246561999-05-19 Jesse Thilo <jthilo@gnu.org>
24657
24658 * src/alloc.h, src/symtab.h, src/version.c:
24659 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24660
246611999-04-18 Jesse Thilo <jthilo@gnu.org>
24662
24663 * src/.cvsignore, src/Makefile.am:
24664 Reorganized: sources in `src', documentation in `doc'.
24665
24666 * src/lex.c (literalchar):
24667 fixed the code for escaping double quotes (thanks
24668 Jonathan Czisny.)
24669
246701999-04-18 Jesse Thilo <jthilo@gnu.org>
24671
24672 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24673 Adjusted paths to reflect directory reorganization.
24674
246751999-04-18 Jesse Thilo <jthilo@gnu.org>
24676
24677 * doc/.cvsignore, doc/Makefile.am:
24678 Reorganized: sources in `src', documentation in `doc'.
24679
246801999-04-18 Jesse Thilo <jthilo@gnu.org>
24681
24682 * configure.in:
24683 Updated AC_INIT file to reflect directory reorganization.
24684
24685 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24686 Reorganized: sources in `src', documentation in `doc'.
24687
246881999-04-13 Jesse Thilo <jthilo@gnu.org>
24689
24690 * src/allocate.c:
24691 Don't declare calloc() and realloc() if not necessary.
24692
246931999-04-13 Jesse Thilo <jthilo@gnu.org>
24694
24695 * configure.in, acconfig.h, acinclude.m4:
24696 Don't declare calloc() and realloc() if not necessary.
24697
246981999-03-23 Jesse Thilo <jthilo@gnu.org>
24699
24700 * po/.cvsignore: Added i18n support.
24701
247021999-03-23 Jesse Thilo <jthilo@gnu.org>
24703
24704 * acconfig.h, configure.in, Makefile.am:
24705 Added i18n support.
24706
247071999-03-22 Jesse Thilo <jthilo@gnu.org>
24708
24709 * src/bison.s1: Fixed #line numbers.
24710
247111999-03-15 Jesse Thilo <jthilo@gnu.org>
24712
24713 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24714 Added PO files from Translation Project.
24715
247161999-03-03 Jesse Thilo <jthilo@gnu.org>
24717
24718 * Makefile.am:
24719 Added support for non-ANSI compilers (ansi2knr).
24720
247211999-02-16 Jesse Thilo <jthilo@gnu.org>
24722
24723 * configure.in: Bumped version number to 1.27.
24724
24725 * Makefile.am:
24726 Added `bison.simple' to list of files removed by `make distclean'.
24727
247281999-02-12 Jesse Thilo <jthilo@gnu.org>
24729
24730 * src/files.c, src/files.h:
24731 Defined locations of parser files in config.h instead of Makefile.
24732
247331999-02-12 Jesse Thilo <jthilo@gnu.org>
24734
24735 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24736 Defined locations of parser files in config.h instead of Makefile.
24737
247381999-02-09 Jesse Thilo <jthilo@gnu.org>
24739
24740 * Makefile.am:
24741 Removed inappropriate use of $< macro.
24742
247431999-02-05 Jesse Thilo <jthilo@gnu.org>
24744
24745 * po/Makefile.in.in, po/POTFILES.in:
24746 Add `po' directory skeleton.
24747
247481999-01-27 Jesse Thilo <jthilo@gnu.org>
24749
24750 * README: Document help-bison list.
24751
24752 * configure.in: Add check for mkstemp().
24753
247541999-01-20 Jesse Thilo <jthilo@gnu.org>
24755
24756 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24757 Hush a few compiler warnings.
24758
24759 * src/files.c:
24760 Add tryclose(), which verifies that fclose was successful.
24761 Hush a couple of compiler warnings.
24762
247631999-01-20 Jesse Thilo <jthilo@gnu.org>
24764
24765 * Makefile.am, OChangeLog:
24766 ChangeLog is now automatically generated. Include the old version as
24767 OChangeLog.
24768
247691999-01-14 Jesse Thilo <jthilo@gnu.org>
24770
24771 * 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:
24772 Update FSF address.
24773
247741999-01-14 Jesse Thilo <jthilo@gnu.org>
24775
24776 * doc/bison.texinfo: Fix formatting glitch.
24777
24778 * doc/bison.texinfo: Update FSF address.
24779
247801999-01-14 Jesse Thilo <jthilo@gnu.org>
24781
24782 * acconfig.h: Update FSF address.
24783
247841999-01-08 Jesse Thilo <jthilo@gnu.org>
24785
24786 * src/system.h:
24787 Don't define PACKAGE here, since config.h defines it.
24788
247891998-12-30 Jesse Thilo <jthilo@gnu.org>
24790
24791 * src/reader.c: Update copyright date.
24792
24793 * src/main.c:
24794 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24795 favor of output directly to stderr (avoids buffer overruns).
24796
24797 * src/reader.c: Some checks for premature EOF.
24798
24799 * 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:
24800 Use prototypes if the compiler understands them.
24801
24802 * src/files.c: Honor TMPDIR on Unix hosts.
24803 Use prototypes if the compiler understands them.
24804
24805 * src/reader.c:
24806 Fix a couple of buffer overrun bugs.
24807 Use prototypes if the compiler understands them.
24808
24809 * src/system.h: Include unistd.h and ctype.h.
24810 Use #ifdef instead of #if for NLS symbols.
24811
248121998-12-30 Jesse Thilo <jthilo@gnu.org>
24813
24814 * doc/bison.texinfo:
24815 Delete comment "consider using @set for edition number, etc..." since
24816 we now are doing so.
24817
248181998-12-30 Jesse Thilo <jthilo@gnu.org>
24819
24820 * configure.in:
24821 Use prototypes if the compiler understands them.
24822
24823 * NEWS: Document 1.26 highlights.
24824
24825 * Makefile.am: Require Automake 1.3 or later.
24826
24827 * acconfig.h:
24828 Use prototypes if the compiler understands them.
24829
248301998-12-29 Jesse Thilo <jthilo@gnu.org>
24831
24832 * src/version.c:
24833 Use VERSION symbol from automake for version number.
24834
248351998-12-29 Jesse Thilo <jthilo@gnu.org>
24836
24837 * acconfig.h, configure.in, version.cin:
24838 Use VERSION symbol from automake for version number.
24839
248401998-11-28 Jesse Thilo <jthilo@gnu.org>
24841
24842 * Makefile.am:
24843 Distribute original version of simple parser (bison.s1), not built
24844 version (bison.simple).
24845
248461998-11-28 Jesse Thilo <jthilo@gnu.org>
24847
24848 * doc/bison.texinfo: Add info dir entry.
24849
24850 * doc/bison.texinfo:
24851 Let automake put version number into documentation.
24852
248531998-11-26 Jesse Thilo <jthilo@gnu.org>
24854
24855 * src/bison.cld, src/build.com, src/vmshlp.mar:
24856 Add non-RCS files from /gd/gnu/bison.
24857
248581998-11-26 Jesse Thilo <jthilo@gnu.org>
24859
24860 * doc/bison.1:
24861 Document the BISON_HAIRY and BISON_SIMPLE variables.
24862
248631998-11-25 Jesse Thilo <jthilo@gnu.org>
24864
24865 * src/version.c: Build version.c automatically.
24866
24867 * src/reader.c:
24868 Fix token numbering (used to start at 258, not 257).
24869
24870 * src/system.h: Include config.h.
24871
24872 * src/getargs.c: Update bug report address.
24873
24874 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24875 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24876
248771998-11-25 Jesse Thilo <jthilo@gnu.org>
24878
24879 * Makefile.am:
24880 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24881
24882 * configure.in, version.cin:
24883 Build version.c automatically.
24884
24885 * AUTHORS: Add AUTHORS file.
24886
24887 * README: Update bug report address.
24888
24889 * bison.simple:
24890 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24891
24892 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24893 Add automake stuff.
24894
248951998-11-25 Jesse Thilo <jthilo@gnu.org>
24896
24897 * doc/bison.texinfo: Clean up some formatting.
24898
248991998-05-05 Richard Stallman <rms@gnu.org>
24900
24901 * doc/bison.texinfo:
24902 Explain better why to make a pure parser.
24903
249041998-01-05 Richard Stallman <rms@gnu.org>
24905
24906 * src/files.c (openfiles):
24907 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24908 find a temporary directory, if possible. Do not unlink files while
24909 they are open.
24910
249111997-08-25 Richard Stallman <rms@gnu.org>
24912
24913 * src/reader.c (stack_offset;):
24914 Change some warni to warns.
24915
24916 * src/lex.c (literalchar): Use warns, not warni.
24917
249181997-06-28 Richard Stallman <rms@gnu.org>
24919
24920 * src/bison.s1: Add a Bison version comment.
24921
24922 * src/main.c (fatal, warn, berror):
24923 Use program_name.
24924
249251997-06-28 Richard Stallman <rms@gnu.org>
24926
24927 * Makefile.in (bison_version): New variable.
24928 (dist): Use that variable.
24929 (bison.s1): Substitute the Bison version into bison.simple.
24930
24931 * bison.simple: Add a Bison version comment.
24932
249331997-06-18 Richard Stallman <rms@gnu.org>
24934
24935 * src/main.c (fatal, warn, berror):
24936 Make error messages standard.
24937 (toomany): Improve error message text.
24938
24939 * 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:
24940 new.h renamed to alloc.h.
24941
249421997-06-18 Richard Stallman <rms@gnu.org>
24943
24944 * Makefile.in: new.h renamed to alloc.h.
24945
249461997-05-24 Richard Stallman <rms@gnu.org>
24947
24948 * src/lex.c (literalchar):
24949 Fix the code for escaping \, " and '.
24950
24951 (lex): Avoid trouble when there are many chars
24952 to discard in a char literal with just several chars in it.
24953
249541997-05-17 Richard Stallman <rms@gnu.org>
24955
24956 * src/bison.s1:
24957 Use malloc, if using alloca is troublesome.
24958 (YYSTACK_USE_ALLOCA): New flag macro.
24959 Define it for some systems and compilers.
24960 (YYSTACK_ALLOC): New macro.
24961 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24962 If it was malloc'd, free it.
24963
249641997-05-17 Richard Stallman <rms@gnu.org>
24965
24966 * bison.simple:
24967 Use malloc, if using alloca is troublesome.
24968 (YYSTACK_USE_ALLOCA): New flag macro.
24969 Define it for some systems and compilers.
24970 (YYSTACK_ALLOC): New macro.
24971 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24972 If it was malloc'd, free it.
24973
249741997-04-23 Richard Stallman <rms@gnu.org>
24975
24976 * src/bison.s1:
24977 (alloca) [__hpux]: Always define as __builtin_alloca.
24978
249791997-04-23 Richard Stallman <rms@gnu.org>
24980
24981 * bison.simple:
24982 (alloca) [__hpux]: Always define as __builtin_alloca.
24983
249841997-04-22 Richard Stallman <rms@gnu.org>
24985
24986 * src/bison.s1:
24987 [__hpux]: Include alloca.h (right for HPUX 10)
24988 instead of declaring alloca (right for HPUX 9).
24989
24990 * src/bison.s1 (__yy_memcpy):
24991 Declare arg `count' as unsigned int.
24992 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24993
249941997-04-22 Richard Stallman <rms@gnu.org>
24995
24996 * bison.simple:
24997 [__hpux]: Include alloca.h (right for HPUX 10)
24998 instead of declaring alloca (right for HPUX 9).
24999
25000 * bison.simple (__yy_memcpy):
25001 Declare arg `count' as unsigned int.
25002 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25003
250041997-01-03 Richard Stallman <rms@gnu.org>
25005
25006 * src/allocate.c: [__STDC__ or _MSC_VER]:
25007 Declare calloc and realloc to return void *.
25008
250091997-01-02 Richard Stallman <rms@gnu.org>
25010
25011 * src/system.h:
25012 [_MSC_VER]: Include stdlib.h and process.h.
25013 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25014
25015 * src/main.c (main): Return FAILURE as a value.
25016 (printable_version): Declare arg as int, not char.
25017
250181997-01-02 Richard Stallman <rms@gnu.org>
25019
25020 * Makefile.in (dist):
25021 Explicitly check for symlinks, and copy them.
25022
250231996-12-19 Richard Stallman <rms@gnu.org>
25024
25025 * src/files.c:
25026 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25027
250281996-12-18 Paul Eggert <eggert@gnu.org>
25029
25030 * src/bison.s1 (yyparse):
25031 If __GNUC__ and YYPARSE_PARAM are both defined,
25032 declare yyparse to have a void * argument.
25033
250341996-12-18 Paul Eggert <eggert@gnu.org>
25035
25036 * bison.simple (yyparse):
25037 If __GNUC__ and YYPARSE_PARAM are both defined,
25038 declare yyparse to have a void * argument.
25039
250401996-12-17 Richard Stallman <rms@gnu.org>
25041
25042 * src/reduce.c (nbits): Add some casts.
25043
250441996-08-12 Richard Stallman <rms@gnu.org>
25045
25046 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25047
250481996-08-12 Richard Stallman <rms@gnu.org>
25049
25050 * bison.simple: Test _MSDOS as well as _MSDOS_.
25051
250521996-07-31 Richard Stallman <rms@gnu.org>
25053
25054 * src/bison.s1:
25055 [__sun && __i386]: Include alloca.h.
25056
250571996-07-31 Richard Stallman <rms@gnu.org>
25058
25059 * bison.simple:
25060 [__sun && __i386]: Include alloca.h.
25061
250621996-07-30 Richard Stallman <rms@gnu.org>
25063
25064 * src/bison.s1: Comment change.
25065
25066 * src/bison.s1: Test _MSDOS_, not MSDOS.
25067
250681996-07-30 Richard Stallman <rms@gnu.org>
25069
25070 * bison.simple: Comment change.
25071
25072 * bison.simple: Test _MSDOS_, not MSDOS.
25073
250741996-06-01 Richard Stallman <rms@gnu.org>
25075
25076 * 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:
25077 Insert `_' macro around many string constants.
25078
25079 * src/main.c:
25080 Insert `_' macro around many string constants.
25081
25082 (main): Call setlocale, bindtextdomain and textdomain.
25083
25084 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25085 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25086 [ENABLE_NLS]: Include libintl.h.
25087 [ENABLE_NLS] (gettext): Define.
25088 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25089 (N_, PACKAGE, LOCALEDIR): New macros.
25090
250911996-06-01 Richard Stallman <rms@gnu.org>
25092
25093 * POTFILES.in: New file.
25094
25095 * Makefile.in (allocate.o):
25096 Define target explicitly.
25097
25098 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25099 (LDFLAGS): Set to @LDFLAGS@.
25100 (configure): Run autoconf only if preceding `cd' succeeds.
25101 (bison.s1): Redirect output to temporary file then move the
25102 temporary to the target, rather than redirecting directly to bison.s1.
25103 (clean): Remove config.status and config.log.
25104 (distclean): Don't remove config.status here.
25105
251061996-05-12 Richard Stallman <rms@gnu.org>
25107
25108 * src/bison.s1:
25109 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25110
251111996-05-12 Richard Stallman <rms@gnu.org>
25112
25113 * bison.simple:
25114 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25115
251161996-05-11 Richard Stallman <rms@gnu.org>
25117
25118 * src/bison.s1 (__yy_memcpy):
25119 Really reorder the args, as was supposedly done on Feb 14 1995.
25120 (yyparse): Calls changed accordingly.
25121
251221996-05-11 Richard Stallman <rms@gnu.org>
25123
25124 * Makefile.in (dist): Don't use $(srcdir).
25125
25126 * bison.simple (__yy_memcpy):
25127 Really reorder the args, as was supposedly done on Feb 14 1995.
25128 (yyparse): Calls changed accordingly.
25129
251301996-01-27 Richard Stallman <rms@gnu.org>
25131
25132 * src/output.c (output_rule_data):
25133 Test YYERROR_VERBOSE in the conditional
25134 around the definition of ttyname.
25135
251361995-12-29 Richard Stallman <rms@gnu.org>
25137
25138 * src/bison.s1:
25139 Fix line numbers in #line commands.
25140
251411995-12-29 Richard Stallman <rms@gnu.org>
25142
25143 * bison.simple:
25144 Fix line numbers in #line commands.
25145
251461995-12-27 Richard Stallman <rms@gnu.org>
25147
25148 * src/bison.s1 (YYPARSE_PARAM_DECL):
25149 In C++, make it always null.
25150 (YYPARSE_PARAM_ARG): New macro.
25151 (yyparse): Use YYPARSE_PARAM_ARG.
25152
251531995-12-27 Richard Stallman <rms@gnu.org>
25154
25155 * bison.simple (YYPARSE_PARAM_DECL):
25156 In C++, make it always null.
25157 (YYPARSE_PARAM_ARG): New macro.
25158 (yyparse): Use YYPARSE_PARAM_ARG.
25159
251601995-11-29 Richard Stallman <rms@gnu.org>
25161
25162 * doc/bison.texinfo:
25163 Describe literal string tokens, %raw, %no_lines, %token_table.
25164
251651995-11-29 Daniel Hagerty <hag@gnu.org>
25166
25167 * doc/bison.texinfo: Fixed update date
25168
251691995-10-16 Richard Stallman <rms@gnu.org>
25170
25171 * src/version.c: Version 1.25.
25172
251731995-10-16 Richard Stallman <rms@gnu.org>
25174
25175 * NEWS: *** empty log message ***
25176
251771995-10-16 Richard Stallman <rms@gnu.org>
25178
25179 * doc/bison.1, doc/bison.rnh:
25180 Add new options.
25181
251821995-10-15 Richard Stallman <rms@gnu.org>
25183
25184 * src/vmsgetargs.c, src/getargs.c:
25185 Added -n, -k, and -raw switches.
25186 (noparserflag, toknumflag, rawtoknumflag): New variables.
25187
25188 * src/symtab.h (SALIAS):
25189 New #define for adding aliases to %token.
25190 (struct bucket): Added `alias' field.
25191
25192 * src/reduce.c (reduce_grammar):
25193 Revise error message.
25194 (print_notices): Remove final `.' from error message.
25195
25196 * src/reader.c (reader_output_yylsp):
25197 New function.
25198 (readgram): Use `#if 0' around code that accepted %command
25199 inside grammar rules: The documentation doesn't allow it,
25200 and it will fail since the %command processors scan for the next %.
25201 (parse_token_decl): Extended the %token
25202 declaration to allow a multi-character symbol as an alias.
25203 (parse_thong_decl): New function.
25204 (read_declarations): Added %thong declarations.
25205 (read_declarations): Handle NOOP to deal with allowing
25206 % declarations as another means to specify the flags.
25207 (readgram): Allow %prec prior to semantics embedded in a rule.
25208 (skip_to_char, read_declarations, copy_definition)
25209 (parse_token_decl, parse_start_decl, parse_type_decl)
25210 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
25211 (get_type_name, copy_guard, copy_action, readgram)
25212 (get_type, packsymbols): Revised most error messages.
25213 Changed `fatal' to `warnxxx' to avoid aborting for error.
25214 Revised and use multiple warnxxx functions to avoid using VARARGS1.
25215 (read_declarations): Improve the error message for
25216 an invalid character. Do not abort.
25217 (read_declarations, copy_guard, copy_action): Use
25218 printable_version to avoid unprintable characters in printed output.
25219 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
25220 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
25221 Allow the type of a non-terminal can be given
25222 more than once, as long as all specifications give the same type.
25223
25224 * src/output.c:
25225 (output_headers, output_trailers, output, output_gram)
25226 (output_rule_data): Implement noparserflag variable.
25227 Implement toknumflag variable.
25228 (output): Call reader_output_yylsp to output LTYPESTR.
25229
25230 * src/main.c (main):
25231 If reader sees an error, don't process the grammar.
25232 (fatals): Updated to not use VARARGS1.
25233 (printable_version, int_to_string, warn, warni, warns, warnss)
25234 (warnsss): New error reporting functions. Avoid abort for error.
25235
25236 * src/lex.h:
25237 Added THONG and NOOP for alias processing.
25238 Added SETOPT for the new code that allows setting options with %flags.
25239
25240 * src/lex.c:
25241 Include getopt.h. Add some extern decls.
25242 (safegetc): New function to deal with EOF gracefully.
25243 (literalchar); new function to deal with reading \ escapes.
25244 (lex): Use literalchar.
25245 (lex): Implemented "..." tokens.
25246 (literalchar, lex, parse_percent_token): Made tokenbuffer
25247 always contain the token. This includes growing the token
25248 buffer while reading an integer.
25249 (parse_percent_token): Replaced if-else statement with percent_table.
25250 (parse_percent_token): Added % declarations as another
25251 way to specify the flags -n, -l, and -r. Also added hooks for
25252 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
25253 major changes to files.c.
25254 (lex) Retain in the incoming stream a character following
25255 an incorrect '/'.
25256 (skip_white_space, lex): Revised most error messages
25257 and changed fatal to warn to avoid aborting.
25258 (percent_table): Added %thong declarations.
25259
25260 * src/gram.h: Comment changes.
25261
25262 * src/files.c (openfiles, open_extra_files, done):
25263 Add faction flag
25264 and actfile file. Handle noparserflag. Both for -n switch.
25265
25266 * src/conflicts.c (resolve_sr_conflict):
25267 Remove use of alloca.
25268
252691995-06-01 Jim Meyering <meyering@gnu.org>
25270
25271 * doc/bison.texinfo: *** empty log message ***
25272
252731995-05-06 Richard Stallman <rms@gnu.org>
25274
25275 * src/bison.s1: Comment change.
25276
252771995-05-06 Richard Stallman <rms@gnu.org>
25278
25279 * bison.simple: Comment change.
25280
252811995-05-03 Richard Stallman <rms@gnu.org>
25282
25283 * src/version.c: Version now 1.24.
25284
25285 * src/bison.s1: Change distribution terms.
25286
25287 * src/version.c: Version now 1.23.
25288
252891995-05-03 Richard Stallman <rms@gnu.org>
25290
25291 * doc/bison.texinfo:
25292 Rewrite "Conditions for Using Bison".
25293 Update version to 1.24.
25294
252951995-05-03 Richard Stallman <rms@gnu.org>
25296
25297 * bison.simple: Change distribution terms.
25298
252991995-02-23 Richard Stallman <rms@gnu.org>
25300
25301 * src/files.c: Test __VMS_POSIX as well as VMS.
25302
253031995-02-14 Jim Meyering <meyering@gnu.org>
25304
25305 * src/bison.s1 (__yy_memcpy):
25306 Renamed from __yy_bcopy to avoid
25307 confusion. Reverse FROM and TO arguments to be consistent with
25308 those of memcpy.
25309
253101995-02-14 Jim Meyering <meyering@gnu.org>
25311
25312 * bison.simple (__yy_memcpy):
25313 Renamed from __yy_bcopy to avoid
25314 confusion. Reverse FROM and TO arguments to be consistent with
25315 those of memcpy.
25316
253171994-11-10 David J. MacKenzie <djm@gnu.org>
25318
25319 * NEWS: reformat
25320
25321 * NEWS: New file.
25322
25323 * Makefile.in (DISTFILES): Include NEWS.
25324
25325 * Makefile.in (DISTFILES):
25326 Include install-sh, not install.sh.
25327
25328 * configure.in: Update to Autoconf v2 macro names.
25329
253301994-10-05 David J. MacKenzie <djm@gnu.org>
25331
25332 * Makefile.in: fix typo
25333
25334 * Makefile.in (prefix, exec_prefix):
25335 Let configure set them.
25336
253371994-09-28 David J. MacKenzie <djm@gnu.org>
25338
25339 * Makefile.in: Set datadir to $(prefix)/share.
25340
253411994-09-15 Richard Stallman <rms@gnu.org>
25342
25343 * src/bison.s1:
25344 Update copyright notice and GPL version.
25345
253461994-09-15 Richard Stallman <rms@gnu.org>
25347
25348 * bison.simple:
25349 Update copyright notice and GPL version.
25350
253511994-07-12 Richard Stallman <rms@gnu.org>
25352
25353 * src/reduce.c, src/reader.c:
25354 entered into RCS
25355
253561994-05-05 David J. MacKenzie <djm@gnu.org>
25357
25358 * Makefile.in: entered into RCS
25359
253601994-03-26 Richard Stallman <rms@gnu.org>
25361
25362 * src/bison.s1: entered into RCS
25363
253641994-03-26 Richard Stallman <rms@gnu.org>
25365
25366 * bison.simple: entered into RCS
25367
253681994-03-25 Richard Stallman <rms@gnu.org>
25369
25370 * src/main.c: entered into RCS
25371
253721994-03-24 Richard Stallman <rms@gnu.org>
25373
25374 * src/conflicts.c: entered into RCS
25375
253761994-01-02 Richard Stallman <rms@gnu.org>
25377
25378 * Makefile.in: *** empty log message ***
25379
253801993-11-21 Richard Stallman <rms@gnu.org>
25381
25382 * src/bison.s1: *** empty log message ***
25383
253841993-11-21 Richard Stallman <rms@gnu.org>
25385
25386 * doc/bison.texinfo: entered into RCS
25387
25388 * doc/bison.texinfo: *** empty log message ***
25389
253901993-11-21 Richard Stallman <rms@gnu.org>
25391
25392 * bison.simple: *** empty log message ***
25393
253941993-10-25 David J. MacKenzie <djm@gnu.org>
25395
25396 * doc/bison.texinfo: *** empty log message ***
25397
253981993-10-19 Richard Stallman <rms@gnu.org>
25399
25400 * src/bison.s1: *** empty log message ***
25401
254021993-10-19 Richard Stallman <rms@gnu.org>
25403
25404 * bison.simple: *** empty log message ***
25405
254061993-10-14 Richard Stallman <rms@gnu.org>
25407
25408 * src/bison.s1: *** empty log message ***
25409
254101993-10-14 Richard Stallman <rms@gnu.org>
25411
25412 * bison.simple: *** empty log message ***
25413
254141993-09-14 David J. MacKenzie <djm@gnu.org>
25415
25416 * doc/bison.texinfo: *** empty log message ***
25417
254181993-09-13 Noah Friedman <friedman@gnu.org>
25419
25420 * Makefile.in: *** empty log message ***
25421
254221993-09-10 Richard Stallman <rms@gnu.org>
25423
25424 * src/conflicts.c: *** empty log message ***
25425
25426 * src/system.h: entered into RCS
25427
254281993-09-10 Richard Stallman <rms@gnu.org>
25429
25430 * doc/bison.1: entered into RCS
25431
254321993-09-06 Noah Friedman <friedman@gnu.org>
25433
25434 * src/version.c: entered into RCS
25435
254361993-09-06 Noah Friedman <friedman@gnu.org>
25437
25438 * Makefile.in: *** empty log message ***
25439
254401993-07-30 David J. MacKenzie <djm@gnu.org>
25441
25442 * Makefile.in: *** empty log message ***
25443
254441993-07-24 Richard Stallman <rms@gnu.org>
25445
25446 * src/bison.s1: *** empty log message ***
25447
254481993-07-24 Richard Stallman <rms@gnu.org>
25449
25450 * bison.simple: *** empty log message ***
25451
254521993-07-08 David J. MacKenzie <djm@gnu.org>
25453
25454 * Makefile.in: *** empty log message ***
25455
254561993-07-04 Richard Stallman <rms@gnu.org>
25457
25458 * src/bison.s1: *** empty log message ***
25459
254601993-07-04 Richard Stallman <rms@gnu.org>
25461
25462 * bison.simple: *** empty log message ***
25463
254641993-06-26 David J. MacKenzie <djm@gnu.org>
25465
25466 * src/getargs.c: entered into RCS
25467
254681993-06-26 David J. MacKenzie <djm@gnu.org>
25469
25470 * doc/bison.texinfo: *** empty log message ***
25471
25472 * doc/bison.1: New file.
25473
254741993-06-25 Richard Stallman <rms@gnu.org>
25475
25476 * src/getargs.c: New file.
25477
254781993-06-16 Richard Stallman <rms@gnu.org>
25479
25480 * src/bison.s1: *** empty log message ***
25481
254821993-06-16 Richard Stallman <rms@gnu.org>
25483
25484 * bison.simple: *** empty log message ***
25485
254861993-06-03 Richard Stallman <rms@gnu.org>
25487
25488 * src/bison.s1: New file.
25489
254901993-06-03 Richard Stallman <rms@gnu.org>
25491
25492 * doc/bison.texinfo: *** empty log message ***
25493
254941993-06-03 Richard Stallman <rms@gnu.org>
25495
25496 * bison.simple: New file.
25497
254981993-05-19 Richard Stallman <rms@gnu.org>
25499
25500 * doc/bison.texinfo: New file.
25501
255021993-05-07 Noah Friedman <friedman@gnu.org>
25503
25504 * Makefile.in: *** empty log message ***
25505
255061993-04-28 Noah Friedman <friedman@gnu.org>
25507
25508 * src/reader.c: *** empty log message ***
25509
255101993-04-23 Noah Friedman <friedman@gnu.org>
25511
25512 * src/alloc.h: entered into RCS
25513
255141993-04-20 David J. MacKenzie <djm@gnu.org>
25515
25516 * src/version.c: *** empty log message ***
25517
25518 * src/files.c, src/allocate.c:
25519 entered into RCS
25520
25521 * src/reader.c: *** empty log message ***
25522
25523 * src/lex.c: entered into RCS
25524
25525 * src/conflicts.c: New file.
25526
25527 * src/symtab.c: entered into RCS
25528
25529 * src/alloc.h: New file.
25530
25531 * src/LR0.c: entered into RCS
25532
255331993-04-18 Noah Friedman <friedman@gnu.org>
25534
25535 * src/reader.c: New file.
25536
25537 * src/version.c: *** empty log message ***
25538
255391993-04-18 Noah Friedman <friedman@gnu.org>
25540
25541 * Makefile.in: *** empty log message ***
25542
255431993-04-17 Noah Friedman <friedman@gnu.org>
25544
25545 * Makefile.in: *** empty log message ***
25546
255471993-04-15 Richard Stallman <rms@gnu.org>
25548
25549 * src/main.c, src/files.c:
25550 New file.
25551
255521993-04-15 Noah Friedman <friedman@gnu.org>
25553
25554 * configure.in: entered into RCS
25555
25556 * configure.in: *** empty log message ***
25557
25558 * configure.in: New file.
25559
255601993-04-14 Richard Stallman <rms@gnu.org>
25561
25562 * Makefile.in: New file.
25563
255641993-04-13 Richard Stallman <rms@gnu.org>
25565
25566 * src/version.c: New file.
25567
255681993-03-25 Richard Stallman <rms@gnu.org>
25569
25570 * src/output.c: entered into RCS
25571
255721992-09-25 Richard Stallman <rms@gnu.org>
25573
25574 * configure.bat: entered into RCS
25575
255761992-06-22 Richard Stallman <rms@gnu.org>
25577
25578 * src/vmsgetargs.c: entered into RCS
25579
255801992-06-22 Richard Stallman <rms@gnu.org>
25581
25582 * doc/bison.rnh: entered into RCS
25583
255841992-04-20 David J. MacKenzie <djm@gnu.org>
25585
25586 * README: entered into RCS
25587
255881992-01-22 Richard Stallman <rms@gnu.org>
25589
25590 * src/machine.h: entered into RCS
25591
255921991-12-21 Richard Stallman <rms@gnu.org>
25593
25594 * src/lalr.c, src/closure.c:
25595 entered into RCS
25596
255971991-12-20 Richard Stallman <rms@gnu.org>
25598
25599 * src/state.h: entered into RCS
25600
256011991-12-18 Richard Stallman <rms@gnu.org>
25602
25603 * src/print.c, src/nullable.c, src/derives.c:
25604 entered into RCS
25605
256061991-11-03 David J. MacKenzie <djm@gnu.org>
25607
25608 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25609 entered into RCS
25610
256111988-09-09 Richard Stallman <rms@gnu.org>
25612
25613 * src/bison.hairy: entered into RCS
25614
256151987-12-16 Richard Stallman <rms@gnu.org>
25616
25617 * REFERENCES: entered into RCS
25618
25619
25620 -----
25621
25622 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25623 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25624 2008, 2009, 2010 Free Software Foundation, Inc.
25625
25626 Copying and distribution of this file, with or without
25627 modification, are permitted provided the copyright notice and this
25628 notice are preserved.